PageSourceSearch

https://www.cromatic.bio/assets/index-BehjRJXN.js

js cromatic.bio collected 2026-10-08 23:14:32 UTC 1,750,155 bytes, 2,471 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="38ab9c59-736b-5faa-a9fe-c807f6e028e0")}catch(e){}}();
3const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/IdentityExplorer-CUBr6Rd6.js","assets/index-CL10LGZK.js","assets/index-BRWfinYG.css","assets/index-_sxoNn_n.js","assets/index-YXz4pjeN.js","assets/createFluentIcon-CMy8slG1.js","assets/emotion-hash.esm-DFFAhID7.js","assets/index-CZ15XX1D.css","assets/createLucideIcon-CtfWecfK.js","assets/network-C90BfWk2.js","assets/arrow-right-CR2bs_IS.js","assets/index-tvtGWuQ5.js","assets/use-flags-BUirF84g.js","assets/react-select.esm-Df_EX7To.js","assets/svgSanitizer-CW6f11uo.js","assets/index-DtGYZJeZ.js","assets/index-BjBl9RXe.css","assets/useCrmConnected-DFMNf7Vk.js","assets/transition-TqFPPMnJ.js","assets/zod-CropDHhg.js","assets/x-Do7Oun7e.js","assets/index-CaBoKfwF.js","assets/useTailwindBreakpoint-Cbp4mM37.js","assets/chunk-28-BLyaiMz-.js","assets/dayjs.min-pqEW51Rf.js","assets/fragment-masking-9DdRl5C1.js","assets/index-BNaTVihY.js","assets/index-D_nVYfBH.js","assets/index-B0Wubt8t.js","assets/index-CKUgfQS8.js","assets/index-CK5iiery.js","assets/useSuspenseQuery-sAtkDGBu.js","assets/stringFormatter-CTqHttMF.js","assets/index-DlaT0n7H.js","assets/index-CrkAFHVd.js","assets/index-B0PapF_k.js","assets/index-BOchebRH.js","assets/index-CGMv5Top.css","assets/index-Dqk-kbVe.js","assets/CrmRequiredFieldsPrompt-C1FfWVxU.js","assets/index-CWrup8z4.js","assets/index-MOP37tAv.js","assets/index-CQplDvD-.js","assets/minus-KEopYRQZ.js"])))=>i.map(i=>d[i]);
4import{b$ as e,aC as t,bZ as n,c0 as r,c1 as a,bL as i,c2 as s,c3 as o,c4 as l,c5 as c,c6 as u,bR as d,c7 as p,c8 as h,bT as m,bQ as f,c9 as g,ca as y,cb as x,bO as b,bU as v,cc as w,bW as j,cd as C,b_ as N,ce as k,bY as S,bS as E,cf as A,cg as O,ch as _,bK as P,ci as I,bP as M,bN as T,cj as R,ck as L,cl as D,cm as F,cn as q,co as B,cp as U,cq as z,cr as H,cs as V,ct as $,cu as W,cv as Q,cw as Z,cx as K,cy as G,cz as Y,cA as J,cB as X,cC as ee,cD as te,cE as ne,cF as re,cG as ae,cH as ie,cI as se,cJ as oe,cK as le,cL as ce,cM as ue,cN as de,cO as pe,cP as he,cQ as me,cR as fe,cS as ge,cT as ye,cU as xe}from"./index-CL10LGZK.js";import{u as be,s as ve,G as we,w as je,A as Ce,F as Ne,a as ke,o as Se,b as Ee,l as Ae,f as Oe,c as _e,d as Pe,h as Ie,e as Me,g as Te,i as Re,j as Le,k as De,m as Fe,T as qe,n as Be,p as Ue,C as ze,q as He,r as Ve,t as $e,v as We,x as Qe,I as Ze,y as Ke,z as Ge,B as Ye,P as Je,D as Xe,E as et,H as tt,J as nt,S as rt,K as at,L as it,M as st,N as ot}from"./index-tvtGWuQ5.js";import{A as lt,a as ct,u as ut,b as dt,c as pt,d as ht,e as mt,f as ft,g as gt,h as yt,i as xt,j as bt}from"./useCrmConnected-DFMNf7Vk.js";import{P as vt,u as wt,c as jt,a as Ct,b as Nt,d as kt,e as St,f as Et,g as At,h as Ot,R as _t,i as Pt,F as It,D as Mt,j as Tt}from"./index-YXz4pjeN.js";import{a as Rt,T as Lt,S as Dt}from"./react-select.esm-Df_EX7To.js";import{s as Ft,n as qt,t as Bt,y as Ut,q as zt,a as Ht}from"./transition-TqFPPMnJ.js";import{o as Vt,s as $t,t as Wt,U as Qt,y as Zt,l as Kt,u as Gt,O as Yt,M as Jt,p as Xt,C as en,a as tn,f as nn,N as rn,T as an,b as sn,c as on,d as ln,I as cn,e as un,g as dn,r as pn,h as hn,i as mn}from"./use-flags-BUirF84g.js";import{F as fn,T as gn,B as yn,u as xn,s as bn,C as vn}from"./zod-CropDHhg.js";import{c as wn}from"./createLucideIcon-CtfWecfK.js";import{c as jn}from"./createFluentIcon-CMy8slG1.js";import{S as Cn,C as Nn,P as kn,X as Sn}from"./x-Do7Oun7e.js";import{B as En,u as An}from"./index-DtGYZJeZ.js";import{D as On,a as _n,b as Pn,c as In,P as Mn,d as Tn,e as Rn,f as Ln,g as Dn,h as Fn,i as qn}from"./index-_sxoNn_n.js";import{A as Bn}from"./index-CaBoKfwF.js";import{u as Un}from"./useTailwindBreakpoint-Cbp4mM37.js";import{C as zn,a as Hn}from"./chunk-28-BLyaiMz-.js";import{d as Vn}from"./dayjs.min-pqEW51Rf.js";import{u as $n}from"./fragment-masking-9DdRl5C1.js";import{M as Wn,r as Qn}from"./index-BNaTVihY.js";import Zn from"./index-D_nVYfBH.js";import{P as Kn}from"./index-B0Wubt8t.js";import{P as Gn}from"./index-CKUgfQS8.js";import{S as Yn}from"./index-CK5iiery.js";import{u as Jn}
4from"./useSuspenseQuery-sAtkDGBu.js";import{t as Xn,s as er,e as tr,f as nr}from"./stringFormatter-CTqHttMF.js";import{r as rr}from"./index-DlaT0n7H.js";import{p as ar}from"./svgSanitizer-CW6f11uo.js";const ir=e=>{if(!e)return!1;return!("[]"?.includes(e)||!1)},sr=()=>!1,or=()=>!1,lr=()=>!0,cr=()=>!0,ur=()=>!0,dr=()=>!1,pr=!0,hr=()=>pr,mr=()=>!1,fr=()=>!1,gr=()=>!0,yr=()=>!1,xr=()=>!0,br=()=>{const t=!1;return e({skip:!0}),t},vr=()=>!0,wr=()=>!0,jr=jn("CircleFilled","1em",["M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z"]),Cr=jn("ArrowLeftFilled","1em",["M8.73 16.8a.75.75 0 0 0 1.03-1.1l-5.24-4.95h12.73a.75.75 0 0 0 0-1.5H4.52l5.24-4.96A.75.75 0 1 0 8.73 3.2L2.31 9.27a1 1 0 0 0 0 1.46l6.42 6.07Z"]),Nr=jn("MoreHorizontal24Regular","24",["M7.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm6 0a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM18 13.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z"]),kr=jn("Handshake20Regular","20",["M10.24 3.01a.5.5 0 0 0-.39.19l-.08.06A5.13 5.13 0 0 0 4.7 4.44a4.7 4.7 0 0 0-1.37 4.31l-.05.05-.78.75c-.64.61-.64 1.6 0 2.22.4.38.95.53 1.46.43.06.29.21.56.44.79.31.3.71.45 1.11.46.01.39.17.77.48 1.07.3.3.7.44 1.1.45.02.4.18.78.49 1.07.6.58 1.56.61 2.2.1l.43.42c.64.61 1.68.61 2.32 0 .3-.3.47-.68.48-1.07.4 0 .8-.16 1.1-.46.3-.3.47-.67.48-1.06.4-.01.78-.17 1.09-.46.24-.23.39-.52.45-.82.5.08 1.05-.06 1.44-.44.63-.61.63-1.6 0-2.22l-.72-.7.14-.54c.3-1.13.15-2.32-.42-3.34a4.8 4.8 0 0 0-4.2-2.43h-2.13Zm2.46 3.72 2.4 2.31 1.75 1.68c.24.23.24.6 0 .84a.63.63 0 0 1-.87 0l-1.32-1.27a.52.52 0 0 0-.72 0h-.01c-.2.2-.2.51 0 .7l1.03 1c.24.22.24.6 0 .83a.63.63 0 0 1-.8.05.52.52 0 0 0-.67.05.48.48 0 0 0-.04.64c.18.24.16.57-.06.78a.63.63 0 0 1-.8.05.52.52 0 0 0-.68.04.48.48 0 0 0-.05.64c.2.24.18.58-.05.8a.64.64 0 0 1-.87 0l-.44-.42.16-.16c.64-.61.64-1.6 0-2.22-.3-.3-.7-.45-1.1-.46a1.54 1.54 0 0 0-.49-1.07c-.3-.3-.7-.44-1.1-.45a1.54 1.54 0 0 0-.48-1.07c-.4-.39-.95-.53-1.46-.43a1.55 1.55 0 0 0-.45-.8c-.35-.33-.83-.48-1.29-.45a3.74 3.74 0 0 1 1.13-3.2 4.06 4.06 0 0 1 3.29-1.1L7.25 5.11a1.7 1.7 0 0 0-.33 2.44c.6.76 1.7.9 2.48.33l1.58-1.15h1.72Zm-4.86-.81 2.6-1.9h.53a2.26 2.26 0 0 1 .15 0h1.24c1.4 0 2.69.74 3.34 1.92.44.8.56 1.72.33 2.6l-2.77-2.67a.5.5 0 0 0-.35-.14h-2.1a.5.5 0 0 0-.3.1l-1.7 1.25a.8.8 0 0 1-1.1-.15.7.7 0 0 1 .13-1.01Zm.45 8.6.78-.75.01-.01a.63.63 0 0 1 .86 0c.24.24.24.6 0 .84l-.78.75a.63.63 0 0 1-.86 0 .57.57 0 0 1-.01-.83Zm.07-1.46v.01l-.78.75-.01.01a.63.63 0 0 1-.86 0 .57.57 0 0 1 0-.84l.78-.75a.63.63 0 0 1 .86 0c.24.23.24.6.01.82Zm-1.6-1.52L6 12.3v.01a.63.63 0 0 1-.86 0 .57.57 0 0 1 0-.84l.77-.75a.63.63 0 0 1 .87 0c.24.23.24.6 0 .83Zm-1.9-1.21-.78.74a.63.63 0 0 1-.86 0 .57.57 0 0 1 0-.83L4 9.5a.63.63 0 0 1 .86 0c.24.23.24.6 0 .84Z"]),Sr=jn("Handshake24Regular","24",["M12.24 2.96c-.23 0-.44.11-.58.28l-.06.04a6.3 6.3 0 0 0-6.26 1.56 6.2 6.2 0 0 0-1.74 5.5l-.02.02-.95.95a2.1 2.1 0 0 0 0 3c.49.48 1.15.68 1.79.6a2.1 2.1 0 0 0 1.88 1.56 2.13 2.13 0 0 0 2.02 1.94 2.14 2.14 0 0 0 3.4 1.59l.4.38a2.15 2.15 0 0 0 3.64-1.32 2.13 2.13 0 0 0 1.94-1.93 2.13 2.13 0 0 0 1.87-1.6 2.1 2.1 0 0 0 1.76-3.6l-.83-.83.17-.67a6.02 6.02 0 0 0-5.83-7.46h-2.6Zm2.92 4.95 3.47 3.44.02.02 1.62 1.61c.25.25.25.64 0 .88a.63.63 0 0 1-.89 0l-1.62-1.61a.76.76 0 0 0-1.06 0l-.02.02c-.3.29-.3.76 0 1.05l1.27 1.26c.24.24.24.64 0 .88a.63.63 0 0 1-.82.06.76.76 0 0 0-.99.07.74.74 0 0 0-.06.98c.19.25.17.6-.06.82a.63.63 0 0 1-.83.05.76.76 0 0 0-1 .06c-.26.27-.29.7-.06.99.2.25.18.6-.05.83a.64.64 0 0 1-.9 0l-.37-.37.1-.1a2.1 2.1 0 0 0-1.4-3.61 2.1 2.1 0 0 0-1.95-2 2.14 2.14 0 0 0-2.41-1.93 2.13 2.13 0 0 0-2.12-1.56 4.77 4.77 0 0 1 4.95-5.23l-1.5 1.13a2.31 2.31 0 0 0-.44 3.25 2.33 2.33 0 0 0 3.26.44l1.9-1.43h1.96ZM9.4 6.84l3.14-2.38h.5a2.75 2.75 0 0 1 .19.01h1.62a4.52 4.52 0 0 1 4.43 5.37l-3.21-3.2a.75.75 0 0 0-.54-.23h-2.58a.75.75 0 0 0-.45.15l-2.1 1.59a.83.83 0 0 1-1.16-.16.81.81 0 0 1 .16-1.15ZM6.03 14.8a.62.62 0 0 1 0-.88l.96-.95a.63.63 0 0 1 .89 0c.24.24.24.62 0 .87l-.96.96a.63.63 0 0 1-.88 0Zm-.49-3.37a.62.62 0 0 1 0 .87l-.96.95a.63.63 0 0 1-.89 0 .62.62 0 0 1 0-.88l.96-.95a.63.63 0 0 1 .88 0h.01Zm5.35 7.31a.63.63 0 0 1-.89 0 .62.62 0 0 1 0-.88l.96-.95a.63.63 0 0 1 .89 0c.24.25.24.64 0 .88l-.9
46.95Zm-2.02-2a.63.63 0 0 1-.89 0 .62.62 0 0 1 0-.88l.96-.96h.01a.63.63 0 0 1 .88 0c.24.25.24.64 0 .88l-.96.96Z"]),Er=jn("Alert24Regular","24",["M12 2a7.5 7.5 0 0 1 7.5 7.25v4.35l1.38 3.15a1.25 1.25 0 0 1-1.15 1.75H15a3 3 0 0 1-6 .18v-.18H4.27a1.25 1.25 0 0 1-1.14-1.75L4.5 13.6V9.5C4.5 5.35 7.85 2 12 2Zm1.5 16.5h-3a1.5 1.5 0 0 0 3 .15v-.15ZM12 3.5c-3.32 0-6 2.67-6 6v4.4L4.66 17h14.7L18 13.9V9.29a5.99 5.99 0 0 0-6-5.78Z"]);function Ar(e,n){let r=t.useRef([]),a=Vt(e);t.useEffect(()=>{let e=[...r.current];for(let[t,i]of n.entries())if(r.current[t]!==i){let t=a(n,e);return r.current=n,t}},[a,...n])}let Or=[];function _r(e,n,r,a){let i=$t(r);t.useEffect(()=>{function t(e){i.current(e)}return(e=null!=e?e:window).addEventListener(n,t,a),()=>e.removeEventListener(n,t,a)},[e,n,a])}function Pr(e){let n=Vt(e),r=t.useRef(!1);t.useEffect(()=>(r.current=!1,()=>{r.current=!0,Wt(()=>{r.current&&n()})}),[n])}!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&Or[0]!==e.target&&(Or.unshift(e.target),Or=Or.filter(e=>null!=e&&e.isConnected),Or.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var Ir=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ir||{});function Mr(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var Tr=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Tr||{});let Rr=Qt(function(e,r){let a=t.useRef(null),i=Zt(a,r),{initialFocus:s,containers:o,features:l=30,...c}=e;Kt()||(l=1);let u=qt(a);!function({ownerDocument:e},n){let r=function(e=!0){let n=t.useRef(Or.slice());return Ar(([e],[t])=>{!0===t&&!1===e&&Wt(()=>{n.current.splice(0)}),!1===t&&!0===e&&(n.current=Or.slice())},[e,Or,n]),Vt(()=>{var e;return null!=(e=n.current.find(e=>null!=e&&e.isConnected))?e:null})}(n);Ar(()=>{n||(null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&tn(r())},[n]),Pr(()=>{n&&tn(r())})}({ownerDocument:u},Boolean(16&l));let d=function({ownerDocument:e,container:n,initialFocus:r},a){let i=t.useRef(null),s=nn();return Ar(()=>{if(!a)return;let t=n.current;t&&Wt(()=>{if(!s.current)return;let n=null==e?void 0:e.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===n)return void(i.current=n)}else if(t.contains(n))return void(i.current=n);null!=r&&r.current?tn(r.current):(Yt(t,Jt.First),rn.Error),i.current=null==e?void 0:e.activeElement})},[a]),i}({ownerDocument:u,container:a,initialFocus:s},Boolean(2&l));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},a){let i=nn();_r(null==e?void 0:e.defaultView,"focus",e=>{if(!a||!i.current)return;let s=Mr(n);t.current instanceof HTMLElement&&s.add(t.current);let o=r.current;if(!o)return;let l=e.target;l&&l instanceof HTMLElement?Dr(s,l)?(r.current=l,tn(l)):(e.preventDefault(),e.stopPropagation(),tn(o)):tn(r.current)},!0)}({ownerDocument:u,container:a,containers:o,previousActiveElement:d},Boolean(8&l));let p=function(){let e=t.useRef(0);return Ft("keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}(),h=Vt(e=>{let t=a.current;t&&Gt(p.current,{[Ir.Forwards]:()=>{Yt(t,Jt.First,{skipElements:[e.relatedTarget]})},[Ir.Backwards]:()=>{Yt(t,Jt.Last,{skipElements:[e.relatedTarget]})}})}),m=Xt(),f=t.useRef(!1),g={ref:i,onKeyDown(e){"Tab"==e.key&&(f.current=!0,m.requestAnimationFrame(()=>{f.current=!1}))},onBlur(e){let t=Mr(o);a.current instanceof HTMLElement&&t.add(a.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(Dr(t,n)||(f.current?Yt(a.current,Gt(p.current,{[Ir.Forwards]:()=>Jt.Next,[Ir.Backwards]:()=>Jt.Previous})|Jt.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&tn(e.target)))}};return n.createElement(n.Fragment,null,Boolean(4&l)&&n.createElement(be,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ve.Focusable}),en({ourProps:g,theirProps:c,defaultTag:"div",name:"FocusTrap"}),Boolean(4&l)&&n.createElement(be,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ve.Focusable}))}),Lr=Object.assign(Rr,{features:Tr});function Dr(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let Fr=t.createContext(!1);function qr(){return t.useContext(Fr)}function Br(e){return n.createElement(Fr.Provider,{value:e.force},e.children)}let Ur=t.Fragment;let zr=t.Fragment,Hr=t.createContext(null);let Vr=t.createContext(null);let $r=Qt(function(e,n){let a=e,i=t.useRef(null),s=Zt(an(e=>{i.current=e}),n),o=qt(i),l=function(e){let n=qr(),r=t.useContext(Hr),a=qt(e),[i,s]=t.useState(()=>{if(!n&&null!==r||sn.isServer)return null;let e=null==a?void 0:a.getElementById("headlessui-portal-root");
4if(e)return e;if(null===a)return null;let t=a.createElement("div");return t.setAttribute("id","headlessui-portal-root"),a.body.appendChild(t)});return t.useEffect(()=>{null!==i&&(null!=a&&a.body.contains(i)||null==a||a.body.appendChild(i))},[i,a]),t.useEffect(()=>{n||null!==r&&s(r.current)},[r,s,n]),i}(i),[c]=t.useState(()=>{var e;return sn.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null}),u=t.useContext(Vr),d=Kt();return on(()=>{!l||!c||l.contains(c)||(c.setAttribute("data-headlessui-portal",""),l.appendChild(c))},[l,c]),on(()=>{if(c&&u)return u.register(c)},[u,c]),Pr(()=>{var e;!l||!c||(c instanceof Node&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l)))}),d&&l&&c?r.createPortal(en({ourProps:{ref:s},theirProps:a,defaultTag:Ur,name:"Portal"}),c):null}),Wr=Qt(function(e,t){let{target:r,...a}=e,i={ref:Zt(t)};return n.createElement(Hr.Provider,{value:r},en({ourProps:i,theirProps:a,defaultTag:zr,name:"Popover.Group"}))}),Qr=Object.assign($r,{Group:Wr});const Zr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:Kr,useEffect:Gr,useLayoutEffect:Yr,useDebugValue:Jr}=a;function Xr(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Zr(n,e)}catch{return!0}}const ea=!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement)?function(e,t,n){return t()}:function(e,t,n){const r=t(),[{inst:a},i]=Kr({inst:{value:r,getSnapshot:t}});return Yr(()=>{a.value=r,a.getSnapshot=t,Xr(a)&&i({inst:a})},[e,r,t]),Gr(()=>(Xr(a)&&i({inst:a}),e(()=>{Xr(a)&&i({inst:a})})),[e]),Jr(r),r},ta="useSyncExternalStore"in a?a.useSyncExternalStore:ea;function na(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=(null!=(n=t.defaultView)?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,a=r.clientWidth-r.offsetWidth,i=e-a;n.style(r,"paddingRight",`${i}px`)}}}function ra(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let aa=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...a){let i=t[e].call(n,...a);i&&(n=i,r.forEach(e=>e()))}}}(()=>new Map,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:ln(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ra(n)},a=[Bt()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap(e=>e()).some(t=>t.contains(e))}t.microTask(()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=ln();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let a=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:a}=new URL(n.href),s=e.querySelector(a);s&&!r(s)&&(i=s)}catch{}},!0),t.addEventListener(e,"touchstart",e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")}),t.addEventListener(e,"touchmove",e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()},{passive:!1}),t.add(()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;a!==t&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{},na(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];a.forEach(({before:e})=>null==e?void 0:e(r)),a.forEach(({after:e})=>null==e?void 0:e(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function ia(e,t,n){let r=function(e){return ta(e.subscribe,e.getSnapshot,e.getSnapshot)}(aa),a=e?r.get(e):void 0,i=!!a&&a.count>0;return on(()=>
4{if(e&&t)return aa.dispatch("PUSH",e,n),()=>aa.dispatch("POP",e,n)},[t,e]),i}aa.subscribe(()=>{let e=aa.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&aa.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&aa.dispatch("TEARDOWN",n)}});let sa=new Map,oa=new Map;function la(e,t=!0){on(()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let a=null!=(n=oa.get(r))?n:0;return oa.set(r,a+1),0!==a||(sa.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=oa.get(r))?e:1;if(1===t?oa.delete(r):oa.set(r,t-1),1!==t)return;let n=sa.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,sa.delete(r))}},[e,t])}let ca=t.createContext(()=>{});ca.displayName="StackContext";var ua=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(ua||{});function da({children:e,onUpdate:r,type:a,element:i,enabled:s}){let o=t.useContext(ca),l=Vt((...e)=>{null==r||r(...e),o(...e)});return on(()=>{let e=void 0===s||!0===s;return e&&l(0,a,i),()=>{e&&l(1,a,i)}},[l,a,i,s]),n.createElement(ca.Provider,{value:l},e)}var pa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pa||{}),ha=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ha||{});let ma={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},fa=t.createContext(null);function ga(e){let n=t.useContext(fa);if(null===n){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ga),t}return n}function ya(e,t,n=()=>[document.body]){ia(e,t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}function xa(e,t){return Gt(t.type,ma,e,t)}fa.displayName="DialogContext";let ba=hn.RenderStrategy|hn.Static;let va=Qt(function(e,r){let a=cn(),{id:i=`headlessui-dialog-${a}`,open:s,onClose:o,initialFocus:l,role:c="dialog",__demoMode:u=!1,...d}=e,[p,h]=t.useState(0),m=t.useRef(!1);c="dialog"===c||"alertdialog"===c?c:(m.current||(m.current=!0),"dialog");let f=un();void 0===s&&null!==f&&(s=(f&dn.Open)===dn.Open);let g=t.useRef(null),y=Zt(g,r),x=qt(g),b=e.hasOwnProperty("open")||null!==f,v=e.hasOwnProperty("onClose");if(!b&&!v)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!b)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!v)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof s)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${s}`);if("function"!=typeof o)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${o}`);let w=s?0:1,[j,C]=t.useReducer(xa,{titleId:null,descriptionId:null,panelRef:t.createRef()}),N=Vt(()=>o(!1)),k=Vt(e=>C({type:0,id:e})),S=!!Kt()&&(!u&&0===w),E=p>1,A=null!==t.useContext(fa),[O,_]=function(){let e=t.useContext(Vr),r=t.useRef([]),a=Vt(t=>(r.current.push(t),e&&e.register(t),()=>i(t))),i=Vt(t=>{let n=r.current.indexOf(t);-1!==n&&r.current.splice(n,1),e&&e.unregister(t)}),s=t.useMemo(()=>({register:a,unregister:i,portals:r}),[a,i,r]);return[r,t.useMemo(()=>function({children:e}){return n.createElement(Vr.Provider,{value:s},e)},[s])]}(),P={get current(){var e;return null!=(e=j.panelRef.current)?e:g.current}},{resolveContainers:I,mainTreeNodeRef:M,MainTreeNode:T}=function({defaultContainers:e=[],portals:r,mainTreeNodeRef:a}={}){var i;let s=t.useRef(null!=(i=null==a?void 0:a.current)?i:null),o=qt(s),l=Vt(()=>{var t,n,a;let i=[];for(let r of e)null!==r&&(r instanceof HTMLElement?i.push(r):"current"in r&&r.current instanceof HTMLElement&&i.push(r.current));if(null!=r&&r.current)for(let e of r.current)i.push(e);for(let e of null!=(t=null==o?void 0:o.querySelectorAll("html > *, body > *"))?t:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&"headlessui-portal-root"!==e.id&&(e.contains(s.current)||e.contains(null==(a=null==(n=s.current)?void 0:n.getRootNode())?void 0:a.host)||i.some(t=>e.contains(t))||i.push(e));return i});
4return{resolveContainers:l,contains:Vt(e=>l().some(t=>t.contains(e))),mainTreeNodeRef:s,MainTreeNode:t.useMemo(()=>function(){return null!=a?null:n.createElement(be,{features:ve.Hidden,ref:s})},[s,a])}}({portals:O,defaultContainers:[P]}),R=E?"parent":"leaf",L=null!==f&&(f&dn.Closing)===dn.Closing,D=!A&&!L&&S,F=t.useCallback(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==x?void 0:x.querySelectorAll("body > *"))?e:[]).find(e=>"headlessui-portal-root"!==e.id&&(e.contains(M.current)&&e instanceof HTMLElement)))?t:null},[M]);la(F,D);let q=!!E||S,B=t.useCallback(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==x?void 0:x.querySelectorAll("[data-headlessui-portal]"))?e:[]).find(e=>e.contains(M.current)&&e instanceof HTMLElement))?t:null},[M]);la(B,q),Ut(I,e=>{e.preventDefault(),N()},!(!S||E));let U=!(E||0!==w);_r(null==x?void 0:x.defaultView,"keydown",e=>{U&&(e.defaultPrevented||e.key===mn.Escape&&(e.preventDefault(),e.stopPropagation(),N()))}),ya(x,!(L||0!==w||A),I),t.useEffect(()=>{if(0!==w||!g.current)return;let e=new ResizeObserver(e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&N()}});return e.observe(g.current),()=>e.disconnect()},[w,g,N]);let[z,H]=je(),V=t.useMemo(()=>[{dialogState:w,close:N,setTitleId:k},j],[w,j,N,k]),$=t.useMemo(()=>({open:0===w}),[w]),W={ref:y,id:i,role:c,"aria-modal":0===w||void 0,"aria-labelledby":j.titleId,"aria-describedby":z};return n.createElement(da,{type:"Dialog",enabled:0===w,element:g,onUpdate:Vt((e,t)=>{"Dialog"===t&&Gt(e,{[ua.Add]:()=>h(e=>e+1),[ua.Remove]:()=>h(e=>e-1)})})},n.createElement(Br,{force:!0},n.createElement(Qr,null,n.createElement(fa.Provider,{value:V},n.createElement(Qr.Group,{target:g},n.createElement(Br,{force:!1},n.createElement(H,{slot:$,name:"Dialog.Description"},n.createElement(Lr,{initialFocus:l,containers:I,features:S?Gt(R,{parent:Lr.features.RestoreFocus,leaf:Lr.features.All&~Lr.features.FocusLock}):Lr.features.None},n.createElement(_,null,en({ourProps:W,theirProps:d,slot:$,defaultTag:"div",features:ba,visible:0===w,name:"Dialog"}))))))))),n.createElement(T,null))}),wa=Qt(function(e,r){let a=cn(),{id:i=`headlessui-dialog-backdrop-${a}`,...s}=e,[{dialogState:o},l]=ga("Dialog.Backdrop"),c=Zt(r);t.useEffect(()=>{if(null===l.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=t.useMemo(()=>({open:0===o}),[o]);return n.createElement(Br,{force:!0},n.createElement(Qr,null,en({ourProps:{ref:c,id:i,"aria-hidden":!0},theirProps:s,slot:u,defaultTag:"div",name:"Dialog.Backdrop"})))}),ja=Qt(function(e,n){let r=cn(),{id:a=`headlessui-dialog-panel-${r}`,...i}=e,[{dialogState:s},o]=ga("Dialog.Panel"),l=Zt(n,o.panelRef),c=t.useMemo(()=>({open:0===s}),[s]),u=Vt(e=>{e.stopPropagation()});return en({ourProps:{ref:l,id:a,onClick:u},theirProps:i,slot:c,defaultTag:"div",name:"Dialog.Panel"})}),Ca=Qt(function(e,n){let r=cn(),{id:a=`headlessui-dialog-overlay-${r}`,...i}=e,[{dialogState:s,close:o}]=ga("Dialog.Overlay"),l=Zt(n),c=Vt(e=>{if(e.target===e.currentTarget){if(pn(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),o()}}),u=t.useMemo(()=>({open:0===s}),[s]);return en({ourProps:{ref:l,id:a,"aria-hidden":!0,onClick:c},theirProps:i,slot:u,defaultTag:"div",name:"Dialog.Overlay"})}),Na=Qt(function(e,n){let r=cn(),{id:a=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:s,setTitleId:o}]=ga("Dialog.Title"),l=Zt(n);t.useEffect(()=>(o(a),()=>o(null)),[a,o]);let c=t.useMemo(()=>({open:0===s}),[s]);return en({ourProps:{ref:l,id:a},theirProps:i,slot:c,defaultTag:"h2",name:"Dialog.Title"})}),ka=Object.assign(va,{Backdrop:wa,Panel:ja,Overlay:Ca,Title:Na,Description:we});const Sa=()=>{const e=t.useContext(lt);if(!e)throw new Error("useAppLayoutContext has to be used within <AppLayoutContext.Provider>");return e},Ea=({label:e,leftIcon:t,children:n,defaultOpen:r=!1})=>{const{isDesktopSidebarOpen:a}=Sa();return i.jsx("li",{className:"px-2 space-y-1",children:i.jsx(Ce,{defaultOpen:r,children:({open:r})=>i.jsxs(i.Fragment,{children:[i.jsxs(Ce.Button,{className:"inline-flex items-center w-full pl-[17px] py-[10px] rounded-lg text-hoki-600 hover:bg-bleu-50",children:[t&&i.jsx("span",{className:"mx-1",children:t}),i.jsx("span",{className:s("mx-1 text-sm font-medium",!a&&"hidden"),children:e}),i.jsx(Ne,{width:16,className:s("ml-auto mx-1 transition",r?"":"rotate-180")}
4)]}),i.jsx(Ce.Panel,{children:i.jsx("ul",{className:s("w-5/6 ml-auto mr-3 space-y-1"),children:n})})]})})})},Aa=({leftIcon:e,rightElement:t,label:n,to:r,isActive:a=!1,dataTourId:l,onClick:c,hideLabel:u=!1})=>i.jsx("li",{className:"px-2","data-tour-id":l,children:i.jsxs(o,{to:r||"",className:s("inline-flex items-center w-full py-[10px] md:px-5 md:py-4 rounded-lg hover:bg-bleu-50 text-hoki-600",u&&"justify-center",a?"text-hoki-800 bg-bleu-50":"text-hoki-600"),onClick:e=>{c&&c(e)},children:[e&&i.jsx("div",{className:s("mx-1 text-sm",a&&"text-hoki-800"),children:e}),i.jsx("span",{className:s("mx-1 text-sm",a&&"font-semibold",u&&"hidden"),children:n}),t&&i.jsx("span",{className:"mx-1",children:t})]})});var Oa=t.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...s}=e;return i.jsx(vt.svg,{...s,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oa.displayName="Arrow";var _a=Oa;var Pa="Popper",[Ia,Ma]=jt(Pa),[Ta,Ra]=Ia(Pa),La=e=>{const{__scopePopper:n,children:r}=e,[a,s]=t.useState(null);return i.jsx(Ta,{scope:n,anchor:a,onAnchorChange:s,children:r})};La.displayName=Pa;var Da="PopperAnchor",Fa=t.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...s}=e,o=Ra(Da,r),c=t.useRef(null),u=l(n,c),d=t.useRef(null);return t.useEffect(()=>{const e=d.current;d.current=a?.current||c.current,e!==d.current&&o.onAnchorChange(d.current)}),a?null:i.jsx(vt.div,{...s,ref:u})});Fa.displayName=Da;var qa="PopperContent",[Ba,Ua]=Ia(qa),za=t.forwardRef((e,n)=>{const{__scopePopper:r,side:a="bottom",sideOffset:s=0,align:o="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:g="optimized",onPlaced:y,...x}=e,b=Ra(qa,r),[v,w]=t.useState(null),j=l(n,e=>w(e)),[C,N]=t.useState(null),k=function(e){const[n,r]=t.useState(void 0);return wt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let a,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,i=t.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),n}(C),S=k?.width??0,E=k?.height??0,A=a+("center"!==o?"-"+o:""),O="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},_=Array.isArray(p)?p:[p],P=_.length>0,I={padding:O,boundary:_.filter(Wa),altBoundary:P},{refs:M,floatingStyles:T,placement:R,isPositioned:L,middlewareData:D}=ke({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>Rt(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[Se({mainAxis:s+E,alignmentAxis:c}),d&&Ee({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?Ae():void 0,...I}),d&&Oe({...I}),_e({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:i}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${a}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}}),C&&Pe({element:C,padding:u}),Qa({arrowWidth:S,arrowHeight:E}),f&&Ie({strategy:"referenceHidden",...I})]}),[F,q]=Za(R),B=Ct(y);wt(()=>{L&&B?.()},[L,B]);const U=D.arrow?.x,z=D.arrow?.y,H=0!==D.arrow?.centerOffset,[V,$]=t.useState();return wt(()=>{v&&$(window.getComputedStyle(v).zIndex)},[v]),i.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:L?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Ba,{scope:r,placedSide:F,onArrowChange:N,arrowX:U,arrowY:z,shouldHideArrow:H,children:i.jsx(vt.div,{"data-side":F,"data-align":q,...x,ref:j,style:{...x.style,animation:L?void 0:"none"}})})})});za.displayName=qa;var Ha="PopperArrow",Va={top:"bottom",right:"left",bottom:"top",left:"r
4ight"},$a=t.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,a=Ua(Ha,n),s=Va[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(_a,{...r,ref:t,style:{...r.style,display:"block"}})})});function Wa(e){return null!==e}$a.displayName=Ha;var Qa=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,i=0!==a.arrow?.centerOffset,s=i?0:e.arrowWidth,o=i?0:e.arrowHeight,[l,c]=Za(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+s/2,p=(a.arrow?.y??0)+o/2;let h="",m="";return"bottom"===l?(h=i?u:`${d}px`,m=-o+"px"):"top"===l?(h=i?u:`${d}px`,m=`${r.floating.height+o}px`):"right"===l?(h=-o+"px",m=i?u:`${p}px`):"left"===l&&(h=`${r.floating.width+o}px`,m=i?u:`${p}px`),{data:{x:h,y:m}}}});function Za(e){const[t,n="center"]=e.split("-");return[t,n]}var Ka=La,Ga=Fa,Ya=za,Ja=$a;function Xa(e){const n=t.forwardRef((e,n)=>{const{children:r,...a}=e;if(t.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{const t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(a,r.props);return r.type!==t.Fragment&&(i.ref=n?c(n,e):e),t.cloneElement(r,i)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var ei=Symbol("radix.slottable");function ti(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ei}var ni="Popover",[ri]=jt(ni,[Ma]),ai=Ma(),[ii,si]=ri(ni),oi=e=>{const{__scopePopover:n,children:r,open:a,defaultOpen:s,onOpenChange:o,modal:l=!1}=e,c=ai(n),u=t.useRef(null),[d,p]=t.useState(!1),[h,m]=Nt({prop:a,defaultProp:s??!1,onChange:o,caller:ni});return i.jsx(Ka,{...c,children:i.jsx(ii,{scope:n,contentId:kt(),triggerRef:u,open:h,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:t.useCallback(()=>p(!0),[]),onCustomAnchorRemove:t.useCallback(()=>p(!1),[]),modal:l,children:r})})};oi.displayName=ni;var li="PopoverAnchor";t.forwardRef((e,n)=>{const{__scopePopover:r,...a}=e,s=si(li,r),o=ai(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=s;return t.useEffect(()=>(l(),()=>c()),[l,c]),i.jsx(Ga,{...o,...a,ref:n})}).displayName=li;var ci="PopoverTrigger",ui=t.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=si(ci,n),s=ai(n),o=l(t,a.triggerRef),c=i.jsx(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ji(a.open),...r,ref:o,onClick:St(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:i.jsx(Ga,{asChild:!0,...s,children:c})});ui.displayName=ci;var di="PopoverPortal",[pi,hi]=ri(di,{forceMount:void 0}),mi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,s=si(di,t);return i.jsx(pi,{scope:t,forceMount:n,children:i.jsx(Et,{present:n||s.open,children:i.jsx(At,{asChild:!0,container:a,children:r})})})};mi.displayName=di;var fi="PopoverContent",gi=t.forwardRef((e,t)=>{const n=hi(fi,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,s=si(fi,e.__scopePopover);return i.jsx(Et,{present:r||s.open,children:s.modal?i.jsx(xi,{...a,ref:t}):i.jsx(bi,{...a,ref:t})})});gi.displayName=fi;var yi=function(e){const n=Xa(e),r=t.forwardRef((e,r)=>{const{children:a,...s}=e,o=t.Children.toArray(a),l=o.find(ti);if(l){const e=l.props.children,a=o.map(n=>n===l?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return i.jsx(n,{...s,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return i.jsx(n,{...s,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}
4("PopoverContent.RemoveScroll"),xi=t.forwardRef((e,n)=>{const r=si(fi,e.__scopePopover),a=t.useRef(null),s=l(n,a),o=t.useRef(!1);return t.useEffect(()=>{const e=a.current;if(e)return Ot(e)},[]),i.jsx(_t,{as:yi,allowPinchZoom:!0,children:i.jsx(vi,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:St(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||r.triggerRef.current?.focus()}),onPointerDownOutside:St(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:St(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),bi=t.forwardRef((e,n)=>{const r=si(fi,e.__scopePopover),a=t.useRef(!1),s=t.useRef(!1);return i.jsx(vi,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})}),vi=t.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...p}=e,h=si(fi,n),m=ai(n);return Pt(),i.jsx(It,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:i.jsx(Mt,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:i.jsx(Ya,{"data-state":ji(h.open),role:"dialog",id:h.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wi="PopoverClose";t.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=si(wi,n);return i.jsx(vt.button,{type:"button",...r,ref:t,onClick:St(e.onClick,()=>a.onOpenChange(!1))})}).displayName=wi;function ji(e){return e?"open":"closed"}t.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ai(n);return i.jsx(Ja,{...a,...r,ref:t})}).displayName="PopoverArrow";var Ci=mi,Ni=gi;const ki=oi,Si=ui,Ei=t.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>i.jsx(Ci,{children:i.jsx(Ni,{ref:a,align:t,sideOffset:n,className:s("PopoverContent","z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Ei.displayName=Ni.displayName;const Ai=({children:e,label:t,leftIcon:n,onOpenChange:r,open:a})=>{const{isDesktopSidebarOpen:o}=Sa();return i.jsx("li",{className:"px-2 space-y-1",children:i.jsxs(ki,{open:a,onOpenChange:r,children:[i.jsxs(Si,{className:"inline-flex items-center justify-center w-full py-[10px] rounded-lg text-hoki-600 hover:bg-bleu-50",children:[n&&i.jsx("span",{className:"mx-1",children:n}),i.jsx("span",{className:s("mx-1 text-sm font-medium",!o&&"hidden"),children:t})]}),i.jsx(Ei,{side:"right",align:"start",className:"bg-white w-auto",children:i.jsx("ul",{className:"space-y-1",children:e})})]})})},Oi=wn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),_i=wn("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Pi=wn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),Ii=wn("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),Mi=wn("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),Ti=wn("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),Ri=wn("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),Li=wn("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
4],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]),Di=wn("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]),Fi=wn("ChartColumnBig",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]]),qi=wn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Bi=wn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ui=wn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),zi=wn("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),Hi=wn("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),Vi=wn("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),$i=wn("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Wi=wn("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]),Qi=wn("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Zi=wn("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Ki=wn("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),Gi=wn("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),Yi=wn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Ji=wn("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]),Xi=wn("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),es=wn("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]),ts=wn("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),ns=wn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),rs=wn("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),as=wn("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),is=wn("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),ss=wn("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]),os=wn("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),ls=wn("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]),cs=wn("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]),us=wn("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ds=wn("HandCoins",[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]]),ps=wn("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]),hs=wn("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),ms=wn("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),fs=wn("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]),gs=wn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ys=wn("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}
4]]),xs=wn("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),bs=wn("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),vs=wn("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),ws=wn("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]),js=wn("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]),Cs=wn("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),Ns=wn("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]),ks=wn("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Ss=wn("Pill",[["path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z",key:"wa1lgi"}],["path",{d:"m8.5 8.5 7 7",key:"rvfmvr"}]]),Es=wn("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),As=wn("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]),Os=wn("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]),_s=wn("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Ps=wn("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Is=wn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Ms=wn("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Ts=wn("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),Rs=wn("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Ls=wn("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
4y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Ds=wn("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Fs=wn("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),qs=wn("Table2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]),Bs=wn("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),Us=wn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),zs=wn("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Hs=wn("Unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]),Vs=wn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),$s=wn("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ws=wn("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Qs=wn("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),Zs=wn("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Ks=u`
5  query GetUserTriggerCount {
6    userTriggerCount
7  }
8`,Gs=(e=!1)=>d(Ks,{skip:e}),Ys=u`
9  mutation DeleteBigBrainSession($id: String!) {
10    deleteBigBrainSession(id: $id)
11  }
12`;const Js=u`
13  mutation UpdateBigBrainSession($id: String!, $input: UpdateBigBrainSessionInput!) {
14    updateBigBrainSession(id: $id, input: $input) {
15      id
16    }
17  }
18`,Xs=()=>p(Js);function eo(){const e=m(),t=f(),n=g(`${b.App}/session/:sessionId`),r=n?.params.sessionId??null,{activeSessionId:a,setActiveSessionId:i}=y(),{data:s,loading:o}=x(),[l]=Xs(),[c]=p(Ys,{refetchQueries:[{query:h},{query:Ks}]}),u=t.pathname.startsWith(`${b.App}/session/`);return{sessions:s?.bigBrainSessions||[],loading:o,isSessionActive:e=>e===r||e===a&&u,select:t=>{i(t),e(`${b.App}/session/${t}`)},remove:async t=>{await c({variables:{id:t}}),t===a&&(i(null),e(b.App))},rename:async(e,t)=>{await l({variables:{id:e,input:{title:t}},refetchQueries:[{query:h}]})}}}const to=({isOpen:e,disableOnClose:n=!1,children:r,onClose:a,size:o="default"})=>{const l=s("relative w-full transform overflow-y-visible rounded-2xl bg-white text-left align-middle shadow-xl transition-all","sm"===o&&"max-w-[420px]","default"===o&&"max-w-[640px]","lg"===o&&"max-w-[846px]","xl"===o&&"max-w-[1248px]");return i.jsx(zt,{appear:!0,show:e,as:t.Fragment,children:i.jsxs(ka,{onClose:n?()=>null:a,as:"div",className:"relative z-50",static:n,children:[i.jsx(zt.Child,{as:t.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),i.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:i.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:i.jsx(zt.Child,{as:t.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:i.jsx(ka.Panel,{className:l,children:r})})})})]})})},no=({titleClassName:e,isOpen:n,icon:r,title:a,children:o,onClose:l,subtitle:c,size:u="default",disableOnClose:d=!1,renderFooter:p,hideXButton:h=!1,hideHeaderBorder:m=!1})=>{const f=s(e,"font-bold"),[g,y]=t.useState(null),[x,b]=t.useState(null),v=t.useMemo(()=>{const e=720-(g?.clientHeight||0)-(x?.clientHeight||0);return e>0?e:0},[g,x]);return i.jsx(to,{isOpen:n,onClose:l,size:u,disableOnClose:d,children:i.jsxs("div",{className:"h-full rounded-2xl overflow-hidden",children:[i.jsxs("div",{ref:y,className:"flex flex-nowrap items-center justify-between px-6 pt-6 pb-4",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsxs("div",{className:"flex items-center",children:[r&&i.jsx("div",{className:"mr-4",children:r}),a&&i.jsx("div",{className:f,children:a})]}),c&&i.jsx("div",{className:"text-xs text-hoki-500",children:c})]}),!h&&i.jsx("button",{type:"button",className:"ml-auto",onClick:l,children:i.jsx(Me,{width:20,height:20})})]}),!m&&i.jsx("div",{className:"border-b"}),i.jsx("div",{style:{maxHeight:v,..."fullscreen"===u?{height:v}:{}},className:"px-6 py-4 box-border overflow-y-scroll scrollbar-always-visible",children:o}),p?i.jsx("div",{ref:b,children:p()}):null]})})},ro=({text:e,onClick:t,disabled:n,variant:r="primary"})=>i.jsx("button",{type:"button",onClick:t,disabled:n,className:s("px-4 py-1.5 text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed rounded-md transition-colors","danger"===r&&"bg-red-600 hover:bg-red-700 text-white","secondary"===r&&"bg-white hover:bg-gray-100 text-gray-700 border border-gray-200","primary"===r&&"bg-black hover:bg-gray-800 text-white"),children:e});var ao,io,so,oo,lo,co,uo,po,ho,mo,fo,go,yo,xo,bo,vo,wo,jo,Co,No,ko,So,Eo,Ao,Oo,_o,Po,Io;function Mo(){if(io)return ao;return io=1,ao=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function To(){if(oo)return so;oo=1;var e="object"==typeof w&&w&&w.Object===Object&&w;return so=e}function Ro(){if(co)return lo;co=1;var e=To(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return lo=n}function Lo(){if(go)return fo;go=1;var e=function(){if(mo)return ho;mo=1;var e=/\s/;return ho=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n},ho}(),t=/^\s+/;return fo=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n},fo}function Do(){if(xo)return yo;xo=1;var e=Ro().Symbol;return yo=e}function Fo(){if(No)return Co;No=1;var e=Do(),t=function(){if(vo)return bo;vo=1;var e=Do(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;return bo=function(e){var t=n.call(e,a),i=e[a];try{e[a]=void 0;var s=!0}catch(Fr){}var o=r.call(e);return s&&(t?e[a]=i:delete e[a]),o}}(),n=function(){if(jo)return wo;jo=1;var e=Object.prototype.toString;return wo=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;
18return Co=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function qo(){if(So)return ko;return So=1,ko=function(e){return null!=e&&"object"==typeof e}}function Bo(){if(_o)return Oo;_o=1;var e=Lo(),t=Mo(),n=function(){if(Ao)return Eo;Ao=1;var e=Fo(),t=qo();return Eo=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}(),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;return Oo=function(o){if("number"==typeof o)return o;if(n(o))return NaN;if(t(o)){var l="function"==typeof o.valueOf?o.valueOf():o;o=t(l)?l+"":l}if("string"!=typeof o)return 0===o?o:+o;o=e(o);var c=a.test(o);return c||i.test(o)?s(o.slice(2),c?2:8):r.test(o)?NaN:+o}}function Uo(){if(Io)return Po;Io=1;var e=Mo(),t=function(){if(po)return uo;po=1;var e=Ro();return uo=function(){return e.Date.now()}}(),n=Bo(),r=Math.max,a=Math.min;return Po=function(i,s,o){var l,c,u,d,p,h,m=0,f=!1,g=!1,y=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function x(e){var t=l,n=c;return l=c=void 0,m=e,d=i.apply(n,t)}function b(e){var t=e-h;return void 0===h||t>=s||t<0||g&&e-m>=u}function v(){var e=t();if(b(e))return w(e);p=setTimeout(v,function(e){var t=s-(e-h);return g?a(t,u-(e-m)):t}(e))}function w(e){return p=void 0,y&&l?x(e):(l=c=void 0,d)}function j(){var e=t(),n=b(e);if(l=arguments,c=this,h=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(v,s),f?x(e):d}(h);if(g)return clearTimeout(p),p=setTimeout(v,s),x(h)}return void 0===p&&(p=setTimeout(v,s)),d}return s=n(s)||0,e(o)&&(f=!!o.leading,u=(g="maxWait"in o)?r(n(o.maxWait)||0,s):u,y="trailing"in o?!!o.trailing:y),j.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=h=c=p=void 0},j.flush=function(){return void 0===p?d:w(t())},j},Po}const zo=j(Uo());var Ho,Vo;var $o=function(){if(Vo)return Ho;Vo=1;var e=Uo(),t=Mo();return Ho=function(n,r,a){var i=!0,s=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(a)&&(i="leading"in a?!!a.leading:i,s="trailing"in a?!!a.trailing:s),e(n,r,{leading:i,maxWait:r,trailing:s})}}();const Wo=j($o);var Qo=function(e,t){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qo(e,t)};var Zo=function(){return Zo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Zo.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Ko=function(e,t,n,r){switch(t){case"debounce":return zo(e,n,r);case"throttle":return Wo(e,n,r);default:return e}},Go=function(e){return"function"==typeof e},Yo=function(){return"undefined"==typeof window},Jo=function(e){return e instanceof Element||e instanceof HTMLDocument};!function(e){function a(n){var a=e.call(this,n)||this;a.cancelHandler=function(){a.resizeHandler&&a.resizeHandler.cancel&&(a.resizeHandler.cancel(),a.resizeHandler=null)},a.attachObserver=function(){var e=a.props,t=e.targetRef,n=e.observerOptions;if(!Yo()){t&&t.current&&(a.targetRef.current=t.current);var r=a.getElement();r&&(a.observableElement&&a.observableElement===r||(a.observableElement=r,a.resizeObserver.observe(r,n)))}},a.getElement=function(){var e=a.props,t=e.querySelector,n=e.targetDomEl;if(Yo())return null;if(t)return document.querySelector(t);if(n&&Jo(n))return n;if(a.targetRef&&Jo(a.targetRef.current))return a.targetRef.current;var i=r.findDOMNode(a);if(!i)return null;switch(a.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return i;default:return i.parentElement}},a.createResizeHandler=function(e){var t=a.props,n=t.handleWidth,r=void 0===n||n,i=t.handleHeight,s=void 0===i||i,o=t.onResize;if(r||s){e.forEach(function(e){var t=e&&e.contentRect||{},n=t.width,i=t.height;!a.skipOnMount&&!Yo()&&function(e){var t=e.width,n=e.height;a.state.width===t&&a.state.height===n||a.state.width===t&&!s||a.state.height===n&&!r||(null==o||o(t,n),a.setState({width:t,height:n}))}({width:n,height:i}
18),a.skipOnMount=!1})}},a.getRenderType=function(){var e=a.props,n=e.render,r=e.children;return Go(n)?"renderProp":Go(r)?"childFunction":t.isValidElement(r)?"child":Array.isArray(r)?"childArray":"parent"};var i=n.skipOnMount,s=n.refreshMode,o=n.refreshRate,l=void 0===o?1e3:o,c=n.refreshOptions;return a.state={width:void 0,height:void 0},a.sizeRef={current:a.state},a.skipOnMount=i,a.targetRef=t.createRef(),a.observableElement=null,Yo()||(a.resizeHandler=Ko(a.createResizeHandler,s,l,c),a.resizeObserver=new window.ResizeObserver(a.resizeHandler)),a}(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Qo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(a,e),a.prototype.componentDidMount=function(){this.attachObserver()},a.prototype.componentDidUpdate=function(){this.attachObserver(),this.sizeRef.current=this.state},a.prototype.componentWillUnmount=function(){Yo()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},a.prototype.render=function(){var e=this.props,r=e.render,a=e.children,i=e.nodeType,s=void 0===i?"div":i,o=this.state,l={width:o.width,height:o.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return null==r?void 0:r(l);case"childFunction":var c=a;return null==c?void 0:c(l);case"child":var u=a;if(u.type&&"string"==typeof u.type){var d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(l,["targetRef"]);return t.cloneElement(u,d)}return t.cloneElement(u,l);case"childArray":return a.map(function(e){return!!e&&t.cloneElement(e,l)});default:return n.createElement(s,null)}}}(t.PureComponent);const Xo=({children:e,placement:n="bottom",delay:r=600,referenceClassName:a,className:o})=>{const[l,c]=t.useState(!1),[u,d]=t.useState(!1),[p,h]=t.useState(null),m=t.useRef(null),{context:f,refs:g,floatingStyles:y}=Te({placement:n,open:u,onOpenChange:d,elements:{reference:p},middleware:[Se(12),Pe({element:m})]}),x=Re(f,{delay:{open:r}}),{getReferenceProps:b,getFloatingProps:v}=Le([x]),{width:w,height:j}=function(e){var n=void 0===e?{}:e,r=n.skipOnMount,a=void 0!==r&&r,i=n.refreshMode,s=n.refreshRate,o=void 0===s?1e3:s,l=n.refreshOptions,c=n.handleWidth,u=void 0===c||c,d=n.handleHeight,p=void 0===d||d,h=n.targetRef,m=n.observerOptions,f=n.onResize,g=t.useRef(a),y=t.useState({width:void 0,height:void 0}),x=y[0],b=y[1],v=t.useState((null==h?void 0:h.current)||null),w=v[0],j=v[1];h&&setTimeout(function(){h.current!==w&&j(h.current)},0);var C=t.useCallback(function(e){e!==w&&j(e)},[w]);C.current=w;var N=t.useCallback(function(e,t){return(e.width!==t.width||e.height!==t.height)&&!(e.width===t.width&&!p||e.height===t.height&&!u)},[u,p]),k=t.useCallback(function(e){(u||p)&&(g.current?g.current=!1:e.forEach(function(e){var t=(null==e?void 0:e.contentRect)||{},n=t.width,r=t.height;b(function(e){return N(e,{width:n,height:r})?{width:n,height:r}:e})}))},[u,p,g,N]),S=t.useCallback(Ko(k,i,o,l),[k,i,o,l]);return t.useEffect(function(){var e;return w?(e=new window.ResizeObserver(S)).observe(w,m):(x.width||x.height)&&b({width:void 0,height:void 0}),function(){var t,n,r;null===(t=null==e?void 0:e.disconnect)||void 0===t||t.call(e),null===(r=(n=S).cancel)||void 0===r||r.call(n)}},[S,w]),t.useEffect(function(){null==f||f(x.width,x.height)},[x]),Zo({ref:C},x)}({targetRef:{current:g.reference.current}});t.useEffect(()=>{p&&w&&j&&c(p.scrollWidth>p.clientWidth||p.scrollHeight>p.clientHeight)},[p,w,j]);const C=s("overflow-hidden text-ellipsis",a);return i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:h,className:C,...b(),children:e}),l&&u&&i.jsx(De,{children:i.jsxs("div",{ref:g.setFloating,className:s("p-2 bg-hoki-900 text-white text-xs rounded-lg z-10 opacity-90",o),style:y,...v(),children:[e,i.jsx(Fe,{ref:m,context:f})]})})]})},el=({visible:e,onClick:t})=>e?i.jsx("button",{type:"button","aria-label":"Session actions",onClick:e=>{e.stopPropagation(),t(e)},className:"ml-2 p-1 rounded hover:bg-gray-200 transition-colors",children:i.jsx(ns,{className:"w-4 h-4 text-gray-500"})}):null,tl=({menuRef:e,position:t="bottom",onRename:n,onDelete:r})=>i.jsxs("div",{ref:e,className:"absolute right-0 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50 min-w-[140px] "+("top"===t?"bottom-full mb-1":"top-full mt-1"),children:[i.jsxs("button",{type:"button",onClick:e=>{e.stopPropagation(),n()},className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 transition-colors flex items-center gap-2",children:[i.jsx(ks,{className:"w-4 h-4"}),"Rename Session"]}),i.jsxs("button",{type:"button",onClick:e=>{e.stopPropagation(),r()},className:"w-full px-3 py-2 text-left text-sm text-red-600 hover:bg-red-50 transition-colors flex items-center gap-2",children:[i.jsx(Us,{className:"w-4 h-4"}),"Delete Session"]})]}),nl=({session:e,isActive:t,isMenuOpen:n,onMouseEnter:r,onMouseLeave:a,onClick:o,menuRef:l,menuTrigger:c,onRename:u,onDelete:d,dropdownPosition:p,icon:h,trailing:m})=>i.jsxs("div",{className:"relative",onMouseEnter:r,onMouseLeave:a,children:[i.jsxs("button",{type:"button",onClick:o,className:s("w-full px-3 py-2 rounded-lg transition-colors text-left flex items-center justify-between group",t?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-100"),children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[h,i.jsx(Xo,{placement:"right",className:"z-50",referenceClassName:s("text-sm whitespace-nowrap",t?"text-gray-900 font-medium":"text-gray-700"),children:e.title})]}),c,m]}),n&&i.jsx(tl,{menuRef:l,position:p,onRename:u,onDelete:d})]}),rl=({isOpen:e,oldTitle:t,newTitle:n,onChangeNewTitle:r,onClose:a,onSave:s})=>i.jsx(no,{title:"Rename Session",isOpen:e,onClose:a,hideHeaderBorder:!0,children:i.jsxs("div",{className:"w-full flex flex-col gap-4",children:[i.jsxs(fn,{children:[i.jsx(fn.Label,{children:"Current name"}),i.jsx("p",{className:"text-sm text-gray-500",children:t})]}),i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"New name"}),i.jsx(gn,{value:n,onChange:e=>r(e.target.value),placeholder:"Enter new session name"})]}),i.jsxs("div",{className:"flex justify-end gap-3",children:[i.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{type:"button",onClick:s,disabled:!n.trim()||n.trim()===t,className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed rounded-lg transition-colors",children:"Save"})]})]})}),al=()=>{const{toastError:e}=v(),{sessions:n,loading:r,isSessionActive:a,select:s,remove:o,rename:l}=eo(),{hoveredSessionId:c,setHoveredSessionId:u,openMenuId:d,menuRef:p,toggleMenu:h,closeMenu:m,dropdownPosition:f,isRenameModalOpen:g,renameOldTitle:y,renameNewTitle:x,setRenameNewTitle:b,openRename:w,closeRename:j,saveRename:C}=function(e,n){const{toastError:r}=v(),[a,i]=t.useState(null),[s,o]=t.useState(null),l=t.useRef(null);t.useEffect(()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&o(null)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]);const[c,u]=t.useState("bottom"),d=t.useCallback((e,t)=>{if(o(t=>t===e?null:e),t){const e=t.getBoundingClientRect(),n=window.innerHeight-e.bottom,r=e.top;u(n<100&&r>n?"top":"bottom")}},[]),p=t.useCallback(()=>o(null),[]),[h,m]=t.useState(!1),[f,g]=t.useState(null),[y,x]=t.useState(""),[b,w]=t.useState(""),j=t.useCallback(t=>{const n=e.find(e=>e.id===t);g(t),x(n?.title??""),w(n?.title??""),m(!0),o(null)},[e]),C=t.useCallback(()=>{m(!1),g(null)},[]),N=t.useCallback(async()=>
18{if(!f)return;const e=b.trim();try{await n(f,e),m(!1),g(null)}catch{r("Failed to rename session")}},[f,b,n,r]);return{hoveredSessionId:a,setHoveredSessionId:i,openMenuId:s,menuRef:l,toggleMenu:d,closeMenu:p,dropdownPosition:c,isRenameModalOpen:h,renameOldTitle:y,renameNewTitle:b,setRenameNewTitle:w,openRename:j,closeRename:C,saveRename:N}}(n,l);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"px-4 pt-6 pb-3",children:i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Sessions"})}),i.jsx("div",{className:"px-2",children:i.jsxs("div",{className:"space-y-1",children:[r&&i.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:"Loading sessions..."}),!r&&0===n.length&&i.jsx("div",{className:"px-3 py-2 text-xs text-gray-500 text-center",children:i.jsx("p",{children:"No sessions yet"})}),!r&&n.length>0&&n.map(t=>i.jsx(nl,{session:t,isActive:a(t.id),isMenuOpen:d===t.id,onMouseEnter:()=>u(t.id),onMouseLeave:()=>u(null),onClick:()=>s(t.id),menuRef:p,menuTrigger:i.jsx(el,{visible:c===t.id||d===t.id,onClick:e=>h(t.id,e.currentTarget)}),onRename:()=>w(t.id),onDelete:()=>(async t=>{try{await o(t)}catch(n){const t=n instanceof Error?n.message:String(n);e(`Failed to delete session: ${t}`)}m()})(t.id),dropdownPosition:f,trailing:t.triggerCount>0?i.jsx(qe,{className:"z-50",tooltip:`${t.triggerCount} trigger${t.triggerCount>1?"s":""} in this session`,placement:"top",children:i.jsx(Ii,{className:"w-3.5 h-3.5 text-blue-500 flex-shrink-0 ml-1"})}):void 0},t.id))]})}),i.jsx(rl,{isOpen:g,oldTitle:y,newTitle:x,onChangeNewTitle:b,onClose:j,onSave:C})]})};u`
19  query ReveJobsSidebar {
20    reveJobs {
21      id
22      name
23      status
24      updated_at
25    }
26  }
27`;const il=({isCollapsed:e=!1})=>{const t=br(),{pathname:n}=f();if(e)return null;const r=t;return i.jsx("div",{className:"flex flex-col h-full",children:i.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain relative",children:[r,i.jsx(al,{})]})})},sl=e=>t.createElement("svg",{width:23,height:24,viewBox:"0 0 23 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M18.774 1.94943C17.3143 1.904 15.8605 2.44981 14.7828 3.52755L9.87362 8.43673H5.81307C4.50835 8.43673 3.43417 9.51092 3.43417 10.8156C3.43417 11.6099 3.83175 12.3535 4.49276 12.7942L5.21542 13.2756C4.76443 14.0167 4.68 14.9176 4.97811 15.7053C4.52483 15.8145 4.09496 16.0416 3.74276 16.3938C3.31136 16.8252 3.15493 17.3445 3.00546 17.8918C2.85598 18.4391 2.76032 19.0149 2.69686 19.4875C2.56765 20.4502 3.41931 21.3022 4.38241 21.1731H4.38339C4.85591 21.1096 5.43075 21.0139 5.97811 20.8645C6.52548 20.715 7.04569 20.5591 7.47714 20.1272C7.82907 19.7752 8.0555 19.3455 8.16464 18.8928C8.95257 19.1913 9.85391 19.1066 10.5953 18.6555L11.0767 19.3781C11.5174 20.0392 12.261 20.4367 13.0553 20.4367C14.36 20.4367 15.4342 19.3626 15.4342 18.0578V14.1867C15.4349 14.129 15.4291 14.0713 15.4166 14.0149L20.3424 9.08908C21.9851 7.44638 22.3943 4.92859 21.3551 2.8508C21.2825 2.70589 21.165 2.58837 21.0201 2.51584C20.5007 2.25604 19.9529 2.08724 19.399 2.00509C19.1913 1.97429 18.9825 1.95592 18.774 1.94943ZM18.7262 3.44552C18.8767 3.4503 19.0273 3.46415 19.1773 3.48654C19.4906 3.53328 19.7937 3.65136 20.0943 3.77658C20.6993 5.2289 20.4076 6.9028 19.2818 8.02853L10.068 17.2424C9.57363 17.7367 8.79471 17.7367 8.30038 17.2424L7.61679 16.5588L7.60604 16.5461L7.32479 16.2649L7.3121 16.2541L6.6285 15.5705C6.13417 15.0762 6.13417 14.2973 6.6285 13.8029L10.65 9.78146C10.7033 9.7408 10.7509 9.69318 10.7916 9.63986L15.8433 4.5881C16.6241 3.80735 17.6724 3.41208 18.7262 3.44552ZM16.9342 5.93673C16.669 5.93673 16.4146 6.04209 16.2271 6.22963C16.0395 6.41716 15.9342 6.67152 15.9342 6.93673C15.9342 7.20195 16.0395 7.4563 16.2271 7.64384C16.4146 7.83138 16.669 7.93673 16.9342 7.93673C17.1994 7.93673 17.4537 7.83138 17.6413 7.64384C17.8288 7.4563 17.9342 7.20195 17.9342 6.93673C17.9342 6.67152 17.8288 6.41716 17.6413 6.22963C17.4537 6.04209 17.1994 5.93673 16.9342 5.93673ZM14.4342 8.43673C14.169 8.43673 13.9146 8.54209 13.7271 8.72963C13.5395 8.91716 13.4342 9.17152 13.4342 9.43673C13.4342 9.70195 13.5395 9.9563 13.7271 10.1438C13.9146 10.3314 14.169 
2710.4367 14.4342 10.4367C14.6994 10.4367 14.9537 10.3314 15.1413 10.1438C15.3288 9.9563 15.4342 9.70195 15.4342 9.43673C15.4342 9.17152 15.3288 8.91716 15.1413 8.72963C14.9537 8.54209 14.6994 8.43673 14.4342 8.43673ZM5.81307 9.93673H8.37362L6.18807 12.1223L5.32479 11.5461C5.07981 11.3828 4.93417 11.1104 4.93417 10.8156C4.93417 10.3214 5.3188 9.93673 5.81307 9.93673ZM13.9342 15.4973V18.0578C13.9342 18.5521 13.5495 18.9367 13.0553 18.9367C12.7605 18.9367 12.4881 18.7911 12.3248 18.5461L11.7486 17.6828L13.9342 15.4973ZM5.55917 17.1213C5.82658 17.1121 6.09677 17.2031 6.32089 17.385L6.48593 17.55C6.85312 18.0024 6.83793 18.6453 6.41659 19.0666L6.41561 19.0676C6.38505 19.0982 6.02622 19.2973 5.58358 19.4182C5.14127 19.5389 4.61648 19.6287 4.18417 19.6867C4.24221 19.2544 4.33182 18.73 4.45272 18.2873C4.57363 17.8446 4.77271 17.4849 4.80331 17.4543C5.01631 17.2413 5.28596 17.1307 5.55917 17.1213Z",fill:"currentColor"})),ol=e=>t.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"#ff0000",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M10.9836 3.56632C11.8215 2.85973 13.0467 2.85973 13.8846 3.56632L20.6346 9.25843C21.1415 9.68594 21.4341 10.3153 21.4341 10.9785V20.7813C21.4341 21.7478 20.6506 22.5313 19.6841 22.5313H16.1841C15.2176 22.5313 14.4341 21.7478 14.4341 20.7813V15.2813C14.4341 15.1432 14.3221 15.0313 14.1841 15.0313H10.6841C10.546 15.0313 10.4341 15.1432 10.4341 15.2813V20.7813C10.4341 21.7478 9.65058 22.5313 8.68408 22.5313H5.18408C4.21758 22.5313 3.43408 21.7478 3.43408 20.7813V10.9785C3.43408 10.3153 3.72663 9.68594 4.2336 9.25843L10.9836 3.56632ZM12.9176 4.71302C12.6383 4.47749 12.2299 4.47749 11.9506 4.71302L5.20059 10.4051C5.0316 10.5476 4.93408 10.7574 4.93408 10.9785V20.7813C4.93408 20.9193 5.04601 21.0313 5.18408 21.0313H8.68408C8.82215 21.0313 8.93408 20.9193 8.93408 20.7813V15.2813C8.93408 14.3148 9.71758 13.5313 10.6841 13.5313H14.1841C15.1506 13.5313 15.9341 14.3148 15.9341 15.2813V20.7813C15.9341 20.9193 16.046 21.0313 16.1841 21.0313H19.6841C19.8221 21.0313 19.9341 20.9193 19.9341 20.7813V10.9785C19.9341 10.7574 19.8366 10.5476 19.6676 10.4051L12.9176 4.71302Z",fill:"currentColor"})),ll=u`
28  query VendorIdForFeatureFlag {
29    user {
30      vendor {
31        id
32      }
33    }
34  }
35`,cl=()=>{const{data:e}=d(ll);return e?.user?.vendor?.id??null},ul=()=>{const e=Be(),t=Ue(),n=cl(),r=C(N),{canAccessProjects:a,canAccessBigBrain:s}=Sa(),o=ir(n)&&r&&s,l=o,c=o,u=o,d=o;br();const p=o&&true,h=ct({skip:!p}),m=p&&h,f=a;return[...e?[{id:"dashboard",label:"Dashboard",to:b.App,leftIcon:i.jsx(ol,{width:24})},{id:"projects",label:"New Projects",leftIcon:i.jsx(sl,{width:24}),dataTourId:"tour:sidebar-manage-project",to:b.Projects,isActiveRegex:/^\/app\/projects(?:\/(ongoing|new|completed|withdrawn))?$/},{id:"quote-negotiator",label:"Quote Negotiator",leftIcon:i.jsx(Sr,{}),to:b.Negotiator}]:[],...t?[...o?[]:[{id:"company-profile",label:"Company Profile",to:b.App,leftIcon:i.jsx(ol,{width:24})}],...f?[{id:"project",label:"Projects",to:b.Projects,leftIcon:i.jsx(sl,{width:24})}]:[],...o?[{id:"big-brain",label:"Big Brain",to:b.App,leftIcon:i.jsx(Ri,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app($|\/session\/|\/companies\/)/,hasCustomContent:!0}]:[],...l?[{id:"campaigns",label:"Campaigns",to:b.Campaigns,leftIcon:i.jsx(Ms,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app\/campaigns/}]:[],...u?[{id:"outreach-history",label:"Outreach History",to:b.OutreachHistory,leftIcon:i.jsx(hs,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app\/outreach-history/}]:[],...d?[{id:"analytics",label:"Analytics",to:b.Analytics,leftIcon:i.jsx(Fi,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app\/analytics/}]:[],...c?[{id:"data-enrichment",label:"Data Enrichment",to:b.DataEnrichment,leftIcon:i.jsx(Cn,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app\/data-enrichment/}]:[],...m?[{id:"crm",label:"CRM",to:b.CrmDirectory,leftIcon:i.jsx(Ki,{width:24,strokeWidth:1.5}),isActiveRegex:/^\/app\/crm/}]:[]]:[]]},dl=({label:e,items:t,leftIcon:n})=>{const{pathname:r}=f();return i.jsx(Ea,{label:e,leftIcon:n,defaultOpen:!0,children:t?.map(e=>{const t=e.to===r;return i.jsx(Aa,{label:e.label,to:e.to,leftIcon:e.leftIcon,rightElement:e.rightElement,isActive:t},e.label)})})},pl=({leftIcon:e,items:t,label:r})=>{const{pathname:a}=f(),[s,o]=n.useState(!1);return i.jsx(Ai,{label:r,leftIcon:e,open:s,onOpenChange:o,children:t?.map(e=>{const t=e.to===a;return i.jsx(Aa,{label:e.label,to:e.to,leftIcon:e.leftIcon,rightElement:e.rightElement,isActive:t,onClick:()=>o(!1)},e.label)})})},hl=({containerClassName:e})=>{const n=ul(),{pathname:r}=f(),{isDesktopSidebarOpen:a}=Sa(),o=n.filter(e=>!e.pinToBottom),l=n.filter(e=>e.pinToBottom),c=o.find(e=>"big-brain"===e.id);return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsx("ul",{className:s("space-y-1 bg-white z-30",e),children:o.map(e=>(e=>i.jsxs(t.Fragment,{children:["object"==typeof e&&"separator"in e&&e.separator?.to
35p&&i.jsx("li",{children:i.jsx("div",{className:"h-px bg-hoki-200 my-2"})}),"object"==typeof e&&"items"in e&&e.items&&i.jsx("div",{"data-tour-id":e.dataTourId,children:a?i.jsx(dl,{label:e.label,items:e.items,leftIcon:e.leftIcon},e.label):i.jsx(pl,{label:e.label,items:e.items,leftIcon:e.leftIcon},e.label)},e.label),"object"==typeof e&&"to"in e&&i.jsx(Aa,{dataTourId:e.dataTourId,label:e.label,to:e.to,leftIcon:e.leftIcon,rightElement:e.rightElement,isActive:e.isActiveRegex?e.isActiveRegex.test(r):e.to===r,onClick:e.onClick,hideLabel:!a},e.label),"object"==typeof e&&"separator"in e&&e.separator?.bottom&&i.jsx("li",{children:i.jsx("div",{className:"h-px bg-hoki-200 my-2"})})]},e.label))(e))}),c&&i.jsx("div",{className:"flex-1 min-h-0 overflow-hidden mt-1",children:i.jsx(il,{isCollapsed:!a})}),l.length>0&&i.jsx("ul",{className:s("space-y-1 bg-white z-30 flex-shrink-0",e),children:l.map(e=>i.jsxs(t.Fragment,{children:["object"==typeof e&&"separator"in e&&e.separator?.top&&i.jsx("li",{children:i.jsx("div",{className:"h-px bg-hoki-200 my-2"})}),"object"==typeof e&&"items"in e&&e.items&&i.jsx("div",{"data-tour-id":e.dataTourId,children:a?i.jsx(dl,{label:e.label,items:e.items,leftIcon:e.leftIcon},e.label):i.jsx(pl,{label:e.label,items:e.items,leftIcon:e.leftIcon},e.label)},e.label),"object"==typeof e&&"to"in e&&i.jsx(i.Fragment,{children:i.jsx(Aa,{dataTourId:e.dataTourId,label:e.label,to:e.to,leftIcon:e.leftIcon,isActive:e.isActiveRegex?e.isActiveRegex.test(r):e.to===r,onClick:e.onClick,hideLabel:!a},e.label)}),"object"==typeof e&&"separator"in e&&e.separator?.bottom&&i.jsx("li",{children:i.jsx("div",{className:"h-px bg-hoki-200 my-2"})})]},e.label))})]})};const ml=t.forwardRef(function(e,n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 14l-7 7m0 0l-7-7m7 7V3"}))}),fl=e=>t.createElement("svg",{width:187,height:147,viewBox:"0 0 187 147",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("g",{clipPath:"url(#clip0_1391_21098)"},t.createElement("path",{d:"M169.281 0.0957031H0.0722656V108.465H169.281V0.0957031Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M164.442 13.6885H4.91016V102.054H164.442V13.6885Z",fill:"white"}),t.createElement("path",{d:"M169.209 0H0V7.18861H169.209V0Z",fill:"#0000FF"}),t.createElement("path",{d:"M5.34212 5.00748C6.07796 5.00748 6.67447 4.41097 6.67447 3.67513C6.67447 2.93929 6.07796 2.34277 5.34212 2.34277C4.60628 2.34277 4.00977 2.93929 4.00977 3.67513C4.00977 4.41097 4.60628 5.00748 5.34212 5.00748Z",fill:"white"}),t.createElement("path",{d:"M10.3988 5.00748C11.1346 5.00748 11.7311 4.41097 11.7311 3.67513C11.7311 2.93929 11.1346 2.34277 10.3988 2.34277C9.66292 2.34277 9.06641 2.93929 9.06641 3.67513C9.06641 4.41097 9.66292 5.00748 10.3988 5.00748Z",fill:"white"}),t.createElement("path",{d:"M15.4574 5.00748C16.1932 5.00748 16.7897 4.41097 16.7897 3.67513C16.7897 2.93929 16.1932 2.34277 15.4574 2.34277C14.7215 2.34277 14.125 2.93929 14.125 3.67513C14.125 4.41097 14.7215 5.00748 15.4574 5.00748Z",fill:"white"}),t.createElement("path",{d:"M101.705 22.8643H11.8262V42.0489H101.705V22.8643Z",fill:"#0000FF"}),t.createElement("path",{d:"M101.705 47.5674H11.8262V68.3288H101.705V47.5674Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M101.705 73.585H11.8262V92.7696H101.705V73.585Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M150.06 22.8643H109.062V92.7699H150.06V22.8643Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M134.154 55.5673V48.9973C134.154 46.6623 135.082 44.423 136.733 42.772C138.384 41.1209 140.623 40.1934 142.958 40.1934C145.293 40.1934 147.532 41.1209 149.184 42.772C150.835 44.423 151.762 46.6623 151.762 48.9973V55.5673C151.762 55.8809 151.637 56.1815 151.415 56.4032C151.194 56.6249 150.893 56.7496 150.579 56.75H135.337C135.023 56.7496 134.723 56.6249 134.501 56.4032C134.279 56.1815 134.155 55.8809 134.154 55.5673Z",fill:"#2F2E41"}),t.createElement("path",{d:"M155.976 141.069L152.871 141.928L148.078 130.36L152.661 129.092L155.976 141.069Z",fill:"#FFB8B8"}),t.createElement("path",{d:"M150.409 141.655L156.398 139.997L157.441 143.768L147.682 146.469C147.545 145.974 147.507 145.456 147.57 144.946C147.633 144.437 147.795 143.944 148.049 143.497C148.302 143.05 148.641 142.657 149.046 142.341C149.451 142.025 149.914 141.792 150.409 141.655Z",fill:"#2F2E41"}),t.createElement("path",{d:"M123.605 143.458H120.383L118.85 131.03H123.605L123.605 143.458Z",fill:"#FFB8B8"}),t.createElement("path",{d:"M118.08 142.537H124.294V146.449H114.168C114.168 145.936 114.269 145.427 114.466 144.952C114.662 144.478 114.951 144.046 115.314 143.683C115.677 143.32 116.108 143.032 116.583 142.835C117.058 142.638 117.567 142.537 118.08 142.537Z",fill:"#2F2E41"}),t.createElement("path",{d:"M119.72 74.0053C119.95 74.3158 120.245 74.572 120.585 74.756C120.924 74.94 121.3 75.0473 121.686 75.0703C122.072 75.0932 122.458 75.0314 122.817 74.889C123.176 74.7467 123.5 74.5274 123.765 74.2464L132.33 78.0986L131.551 73.281L123.537 70.3615C123.035 69.9472 122.399 69.7313 121.749 69.7546C121.099 69.778 120.48 70.0389 120.01 70.4881C119.539 70.9372 119.25 71.5433 119.196 72.1916C119.143 72.8399 119.329 73.4852 119.72 74.0053Z",fill:"#FFB8B8"}),t.createElement("path",{d:"M137.514 102.976C134.823 102.976 132.037 102.575 129.696 101.383C128.453 100.763 127.351 99.8925 126.46 98.8269C125.569 97.7613 124.907 96.5232 
35124.516 95.1901C123.296 91.3271 124.834 87.532 126.322 83.8619C127.244 81.5877 128.114 79.4397 128.34 77.3224L128.419 76.5707C128.771 73.1943 129.075 70.2783 130.757 69.1846C131.629 68.6177 132.802 68.5854 134.342 69.0855L148.808 73.7848L148.276 101.245L148.188 101.275C148.113 101.3 143.013 102.976 137.514 102.976Z",fill:"#2F2E41"}),t.createElement("path",{d:"M134.088 60.5358C134.088 60.5358 141.184 58.4334 146.703 59.2218C146.703 59.2218 143.549 76.5668 144.6 82.3485C145.652 88.1302 126.335 84.5823 130.278 79.0635L131.592 72.4934C131.592 72.4934 128.964 69.8653 131.329 66.7117L134.088 60.5358Z",fill:"#0000FF"}),t.createElement("path",{d:"M130.599 102.455L121.854 100.815L124.907 77.3191C125.112 76.6631 129.842 61.7761 131.99 60.9706C133.549 60.4213 135.144 59.9782 136.764 59.6443L137.075 59.582L135.321 62.2124L128.34 78.9409L130.599 102.455Z",fill:"#2F2E41"}),t.createElement("path",{d:"M126.041 140.578L114.742 138.695L121.083 112.803L130.519 77.3936L130.612 78.0223C130.619 78.0692 131.501 82.6949 144.58 80.6424L144.695 80.6244L144.727 80.7365L160.535 136.592L147.66 138.738L135.917 97.9857L126.041 140.578Z",fill:"#2F2E41"}),t.createElement("path",{d:"M141.703 106.852L141.71 106.653C141.718 106.433 142.495 84.4799 142.236 75.6511C141.975 66.7922 144.843 59.1205 144.872 59.044L144.896 58.9824L144.959 58.9642C148.67 57.9042 151.889 61.0681 151.921 61.1001L151.966 61.1453L150.909 69.8641L155.434 101.569L141.703 106.852Z",fill:"#2F2E41"}),t.createElement("path",{d:"M141.15 56.5969C144.715 56.5969 147.605 53.7071 147.605 50.1422C147.605 46.5774 144.715 43.6875 141.15 43.6875C137.585 43.6875 134.695 46.5774 134.695 50.1422C134.695 53.7071 137.585 56.5969 141.15 56.5969Z",fill:"#FFB8B8"}),t.createElement("path",{d:"M132.072 49.5229C132.074 47.6765 132.809 45.9063 134.114 44.6007C135.42 43.2951 137.19 42.5607 139.037 42.5586H140.351C142.197 42.5607 143.967 43.2951 145.273 44.6007C146.578 45.9063 147.313 47.6765 147.315 49.5229V49.6543H144.538L143.591 47.0021L143.401 49.6543H141.966L141.488 48.3161L141.393 49.6543H132.072V49.5229Z",fill:"#2F2E41"}),t.createElement("path",{d:"M140.515 57.4891C140.385 57.3126 140.307 57.1028 140.29 56.884C140.274 56.6651 140.32 56.4461 140.422 56.2521C141.815 53.6035 143.765 48.7096 141.177 45.6915L140.991 45.4746H148.504V56.7541L141.679 57.9583C141.61 57.9705 141.54 57.9767 141.469 57.9767C141.283 57.9767 141.099 57.9325 140.933 57.8478C140.768 57.763 140.624 57.6401 140.515 57.4891Z",fill:"#2F2E41"}),t.createElement("path",{d:"M146.984 83.9593L146.434 78.7279L153.992 74.5575L149.064 68.5918L149.868 61.8904L151.871 61.0322L151.933 61.1123C152.877 62.3265 161.159 73.0122 161.159 74.3332C161.159 75.6899 159.575 79.6742 157.407 80.758C155.316 81.8034 147.465 83.8353 147.132 83.9214L146.984 83.9593Z",fill:"#2F2E41"}),t.createElement("path",{d:"M186.203 146.8H86.0753C86.0056 146.8 85.9387 146.772 85.8895 146.723C85.8402 146.674 85.8125 146.607 85.8125 146.537C85.8125 146.468 85.8402 146.401 85.8895 146.351C85.9387 146.302 86.0056 146.274 86.0753 146.274H186.203C186.273 146.274 186.34 146.302 186.389 146.351C186.438 146.401 186.466 146.468 186.466 146.537C186.466 146.607 186.438 146.674 186.389 146.723C186.34 146.772 186.273 146.8 186.203 146.8Z",fill:"#CCCCCC"}),t.createElement("circle",{cx:18.9219,cy:29.9599,r:4.73045,fill:"#C2C2C2"}),t.createElement("circle",{cx:18.9219,cy:56.5029,r:4.73045,fill:"#C2C2C2"}),t.createElement("circle",{cx:18.9219,cy:81.4687,r:4.73045,fill:"#C2C2C2"}),t.createElement("path",{d:"M95.5977 30.8867C94.9862 30.8867 94.3884 30.7054 93.88 30.3657C93.3715 30.0259 92.9752 29.5431 92.7412 28.9781C92.5072 28.4132 92.446 27.7915 92.5653 27.1918C92.6846 26.592 92.979 26.0411 93.4114 25.6087C93.8438 25.1763 94.3947 24.8818 94.9945 24.7625C95.5942 24.6432 96.2159 24.7045 96.7808 24.9385C97.3458 25.1725 97.8286 25.5688 98.1684 26.0772C98.5081 26.5857 98.6894 27.1834 98.6894 27.7949C98.6885 28.6146 98.3625 29.4005 97.7829 29.9801C97.2032 30.5597 96.4174 30.8858 95.5977 30.8867Z",fill:"#4ADE80"}),t.createElement("path",{d:"M95.5977 56.3789C94.9862 56.3789 94.3884 56.1976 93.88 55.8578C93.3715 55.5181 92.9752 55.0352 92.7412 54.4703C92.5072 53.9053 92.446 53.2837 92.5653 52.6839C92.6846 52.0842 92.979 51.5333 93.4114 51.1009C93.8438 50.6685 94.3947 50.374 94.9945 50.2547C95.5942 50.1354 96.2159 50.1967 96.7808 50.4307C97.3458 50.6647 97.8286 51.061 98.1684 51.5694C98.5081 52.0778 98.6894 52.6756 98.6894 53.2871C98.6885 54.1068 98.3625 54.8927 97.7829 55.4723C97.2032 56.0519 96.4174 56.378 95.5977 56.3789Z",fill:"#4ADE80"}),t.createElement("path",{d:"M95.4391 28.8824C95.3624 28.8825 95.2877 28.8577 95.2263 28.8117L95.2225 28.8088L94.4212 28.1958C94.384 28.1674 94.3527 28.1319 94.3293 28.0914C94.3058 28.0509 94.2905 28.0062 94.2844 27.9598C94.2782 27.9134 94.2812 27.8662 94.2933 27.821C94.3054 27.7757 94.3263 27.7333 94.3547 27.6962C94.3832 27.659 94.4188 27.6279 94.4593 27.6045C94.4998 27.581 94.5446 27.56
3559 94.591 27.5598C94.6374 27.5537 94.6846 27.5568 94.7298 27.5689C94.775 27.5811 94.8174 27.602 94.8545 27.6306L95.3735 28.0286L96.6001 26.4285C96.6285 26.3914 96.664 26.3602 96.7045 26.3368C96.7449 26.3134 96.7896 26.2982 96.836 26.2921C96.8823 26.286 96.9294 26.2891 96.9746 26.3012C97.0197 26.3132 97.0621 26.3341 97.0992 26.3625L97.0993 26.3626L97.0917 26.3732L97.0995 26.3626C97.1743 26.4201 97.2233 26.505 97.2356 26.5986C97.248 26.6922 97.2227 26.7868 97.1653 26.8618L95.7226 28.7431C95.6893 28.7864 95.6463 28.8215 95.5972 28.8456C95.5481 28.8697 95.4941 28.8821 95.4394 28.882L95.4391 28.8824Z",fill:"white"}),t.createElement("path",{d:"M95.4391 54.3746C95.3624 54.3747 95.2877 54.3499 95.2263 54.3039L95.2225 54.301L94.4212 53.688C94.384 53.6596 94.3527 53.6241 94.3293 53.5836C94.3058 53.5431 94.2905 53.4984 94.2844 53.452C94.2782 53.4056 94.2812 53.3584 94.2933 53.3132C94.3054 53.2679 94.3263 53.2255 94.3547 53.1884C94.3832 53.1512 94.4188 53.12 94.4593 53.0966C94.4998 53.0732 94.5446 53.058 94.591 53.052C94.6374 53.0459 94.6846 53.049 94.7298 53.0611C94.775 53.0733 94.8174 53.0942 94.8545 53.1228L95.3735 53.5208L96.6001 51.9206C96.6285 51.8835 96.664 51.8524 96.7045 51.829C96.7449 51.8056 96.7896 51.7904 96.836 51.7843C96.8823 51.7782 96.9294 51.7813 96.9746 51.7933C97.0197 51.8054 97.0621 51.8263 97.0992 51.8547L97.0993 51.8548L97.0917 51.8654L97.0995 51.8548C97.1743 51.9123 97.2233 51.9972 97.2356 52.0908C97.248 52.1844 97.2227 52.279 97.1653 52.354L95.7226 54.2353C95.6893 54.2786 95.6463 54.3137 95.5972 54.3378C95.5481 54.3619 95.4941 54.3743 95.4394 54.3742L95.439
351 54.3746Z",fill:"white"}),t.createElement("path",{d:"M68.31 37.5538H28.6524C28.1629 37.5538 27.6934 37.3593 27.3472 37.0132C27.0011 36.667 26.8066 36.1976 26.8066 35.708C26.8066 35.2185 27.0011 34.7491 27.3472 34.4029C27.6934 34.0568 28.1629 33.8623 28.6524 33.8623H68.31C68.7995 33.8623 69.269 34.0568 69.6151 34.4029C69.9612 34.7491 70.1557 35.2185 70.1557 35.708C70.1557 36.1976 69.9612 36.667 69.6151 37.0132C69.269 37.3593 68.7995 37.5538 68.31 37.5538Z",fill:"white"}),t.createElement("path",{d:"M68.31 64.0968H28.6524C28.1629 64.0968 27.6934 63.9023 27.3472 63.5562C27.0011 63.21 26.8066 62.7405 26.8066 62.251C26.8066 61.7615 27.0011 61.292 27.3472 60.9459C27.6934 60.5997 28.1629 60.4053 28.6524 60.4053H68.31C68.7995 60.4053 69.269 60.5997 69.6151 60.9459C69.9612 61.292 70.1557 61.7615 70.1557 62.251C70.1557 62.7405 69.9612 63.21 69.6151 63.5562C69.269 63.9023 68.7995 64.0968 68.31 64.0968Z",fill:"white"}),t.createElement("path",{d:"M68.31 89.0626H28.6524C28.1629 89.0626 27.6934 88.8681 27.3472 88.522C27.0011 88.1758 26.8066 87.7064 26.8066 87.2168C26.8066 86.7273 27.0011 86.2578 27.3472 85.9117C27.6934 85.5656 28.1629 85.3711 28.6524 85.3711H68.31C68.7995 85.3711 69.269 85.5656 69.6151 85.9117C69.9612 86.2578 70.1557 86.7273 70.1557 87.2168C70.1557 87.7064 69.9612 88.1758 69.6151 88.522C69.269 88.8681 68.7995 89.0626 68.31 89.0626Z",fill:"white"}),t.createElement("path",{d:"M41.7774 29.7091H28.6524C28.1629 29.7091 27.6934 29.5146 27.3472 29.1685C27.0011 28.8223 26.8066 28.3528 26.8066 27.8633C26.8066 27.3738 27.0011 26.9043 27.3472 26.5582C27.6934 26.212 28.1629 26.0176 28.6524 26.0176H41.7774C42.267 26.0176 42.7364 26.212 43.0826 26.5582C43.4287 26.9043 43.6232 27.3738 43.6232 27.8633C43.6232 28.3528 43.4287 28.8223 43.0826 29.1685C42.7364 29.5146 42.267 29.7091 41.7774 29.7091Z",fill:"white"}),t.createElement("path",{d:"M41.7774 56.252H28.6524C28.1629 56.252 27.6934 56.0576 27.3472 55.7114C27.0011 55.3653 26.8066 54.8958 26.8066 54.4063C26.8066 53.9168 27.0011 53.4473 27.3472 53.1012C27.6934 52.755 28.1629 52.5605 28.6524 52.5605H41.7774C42.267 52.5605 42.7364 52.755 43.0826 53.1012C43.4287 53.4473 43.6232 53.9168 43.6232 54.4063C43.6232 54.8958 43.4287 55.3653 43.0826 55.7114C42.7364 56.0576 42.267 56.252 41.7774 56.252Z",fill:"white"}),t.createElement("path",{d:"M41.7774 81.2188H28.6524C28.1629 81.2188 27.6934 81.0244 27.3472 80.6782C27.0011 80.3321 26.8066 79.8626 26.8066 79.3731C26.8066 78.8836 27.0011 78.4141 27.3472 78.068C27.6934 77.7218 28.1629 77.5273 28.6524 77.5273H41.7774C42.267 77.5273 42.7364 77.7218 43.0826 78.068C43.4287 78.4141 43.6232 78.8836 43.6232 79.3731C43.6232 79.8626 43.4287 80.3321 43.0826 80.6782C42.7364 81.0244 42.267 81.2188 41.7774 81.2188Z",fill:"white"}),t.createElement("path",{d:"M110.265 10.9184C105.008 6.48236 98.5751 3.66997 91.7488 2.82346C84.9225 1.97694 77.9972 3.13279 71.8158 6.15036C65.6344 9.16793 60.4633 13.9171 56.9318 19.82C53.4003 25.7229 51.6607 32.525 51.9246 39.3985C52.1884 46.2721 54.4445 52.9208 58.4181 58.5356C62.3918 64.1503 67.9118 68.4891 74.3063 71.0239C80.7009 73.5586 87.6943 74.1801 94.4357 72.8128C101.177 71.4454 107.376 68.1481 112.277 63.322L155.802 100.048C156.464 100.608 157.322 100.882 158.186 100.81C159.05 100.737 159.85 100.325 160.41 99.6623C160.97 99 161.244 98.1425 161.172 97.2783C161.099 96.4141 160.687 95.6141 160.024 95.0542L160.019 95.0501L116.495 58.324C121.551 51.0672 123.715 42.1838 122.563 33.4146C121.41 24.6454 117.025 16.6226 110.265 10.9184ZM107.46 54.7875C104.069 58.806 99.5625 61.7288 94.5106 63.1862C89.4587 64.6436 84.088 64.5703 79.0778 62.9754C74.0676 61.3806 69.6429 58.3358 66.3631 54.2262C63.0833 50.1166 61.0958 45.1267 60.652 39.8876C60.2081 34.6484 61.3278 29.3953 63.8695 24.7925C66.4112 20.1897 70.2606 16.4439 74.9311 14.0289C79.6016 11.6139 84.8834 10.6381 90.1084 11.2249C95.3335 11.8117 100.267 13.9347 104.286 17.3255C106.954 19.5769 109.153 22.3318 110.756 25.4328C112.36 28.5339 113.337 31.9205 113.631 35.3992C113.926 38.8778 113.533 42.3805 112.474 45.7071C111.415 49.0338 109.711 52.1193 107.46 54.7875Z",fill:"#3F3D56"}),t.createElement("path",{opacity:.3,d:"M69.9981 57.961C64.8981 53.6572 61.6031 47.593 60.7674 40.9723C59.9317 34.3516 61.6164 27.6587 65.4869 22.2227C64.9786 22.7346 64.4872 23.2707 64.0128 23.831C61.7614 26.4992 60.0575 29.5847 58.9986 32.9113C57.9396 36.238 57.5463 39.7406 57.841 43.2193C58.1357 46.698 59.1127 50.0845 60.7162 53.1856C62.3197 56.2867 64.5183 59.0416 67.1865 61.293C69.8547 63.5444 72.9402 65.2482 76.2668 66.3072C79.5935 67.3661 83.0961 67.7595 86.5748 67.4648C90.0535 67.1701 93.44 66.1931 96.5411 64.5896C99.6422 62.9861 102.397 60.7874 104.649 58.1193C105.122 57.5582 105.568 56.9837 105.986 56.3955C101.278 61.1254 94.9645 63.912 88.2975 64.202C81.6306 64.492 75.0985 62.2642 69.9981 57.961Z",fill:"black"}),t.createElement("path",{d:"M143.222 85.2888C143.598 85.3806 143.989 85.3889 144.367 85.3133C144.746 85.2377 145.104 85.0799 145.415 84.851C145.727 84.6222 145.984 84.3279 146.169 83.9889C146.354 83.6499 146.463 83.2743 146.487 82.8888L155.537 80.377L151.858 77.1699L143.829 80.0468C143.178 80.0487 142.551 80.2892 142.066 80.7226C141.581 81.156 141.272 81.7523 141.197 82.3984C141.123 83.0446 141.287 83.6957 141.661 84.2284C142.034 84.7611 142.59 85.1384 143.222 85.2888Z",fill:"#FFB8B8"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_1391_21098"},t.createElement("rect",{width:186.467,height:146.8,fill:"white"})))),gl=e=>t.createElement("svg",{width:261,height:140,viewBox:"0 0 261 140",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("g",{clipPath:"url(#clip0_1391_21670)"},t.createElement("path",{d:"M10.266 139.234L10.2508 138.944C10.2476 138.88 9.96514 132.53 13.9248 128.307C17.8847 124.084 24.6813 123.487 24.7493 123.481L25.0597 123.456L25.0748 123.74
356C25.0781 123.809 25.3605 130.159 21.4008 134.382C17.441 138.605 10.6444 139.203 10.5764 139.208L10.266 139.234ZM14.3567 128.658C11.0088 132.229 10.7941 137.38 10.7958 138.668C12.1671 138.495 17.6243 137.598 20.969 134.031C24.3133 130.464 24.5306 125.31 24.5299 124.021C23.1577 124.195 17.7012 125.091 14.3567 128.658Z",fill:"#F0F0F0"}),t.createElement("path",{d:"M16.3966 129.857C15.5424 135.536 10.3989 139.192 10.3989 139.192C10.3989 139.192 6.64036 133.641 7.49459 127.962C8.34883 122.283 13.4923 118.627 13.4923 118.627C13.4923 118.627 17.2508 124.178 16.3966 129.857Z",fill:"#F0F0F0"}),t.createElement("path",{d:"M261 4.52441H95.9897V82.8247H261V4.52441Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M256.282 11.2383H100.708V76.5666H256.282V11.2383Z",fill:"white"}),t.createElement("path",{d:"M260.93 0.000976562H95.9194V7.01111H260.93V0.000976562Z",fill:"#0000FF"}),t.createElement("path",{d:"M101.129 4.54196C101.846 4.54196 102.428 3.96024 102.428 3.24266C102.428 2.52508 101.846 1.94336 101.129 1.94336C100.411 1.94336 99.8293 2.52508 99.8293 3.24266C99.8293 3.96024 100.411 4.54196 101.129 4.54196Z",fill:"white"}),t.createElement("path",{d:"M106.06 4.54196C106.778 4.54196 107.36 3.96024 107.36 3.24266C107.36 2.52508 106.778 1.94336 106.06 1.94336C105.343 1.94336 104.761 2.52508 104.761 3.24266C104.761 3.96024 105.343 4.54196 106.06 4.54196Z",fill:"white"}),t.createElement("path",{d:"M110.992 4.54196C111.71 4.54196 112.292 3.96024 112.292 3.24266C112.292 2.52508 111.71 1.94336 110.992 1.94336C110.275 1.94336 109.693 2.52508 109.693 3.24266C109.693 3.96024 110.275 4.54196 110.992 4.54196Z",fill:"white"}),t.createElement("path",{d:"M159.506 37.29H126.521V65.3854H159.506V37.29Z",fill:"white"}),t.createElement("path",{d:"M159.602 65.4796H126.425V37.1924H159.602V65.4796ZM126.616 65.2878H159.41V37.3842H126.616V65.2878Z",fill:"#3F3D56"}),t.createElement("path",{d:"M147.137 42.7549H138.89V65.3846H147.137V42.7549Z",fill:"#0000FF"}),t.createElement("path",{d:"M147.137 42.7549H138.89V65.3846H147.137V42.7549Z",fill:"#0000FF"}),t.createElement("path",{opacity:.2,d:"M126.616 39.3516V43.9097L159.506 46.0157L159.409 40.3911L126.616 39.3516Z",fill:"black"}),t.createElement("path",{d:"M161.424 34.7012H124.603V42.7558H161.424V34.7012Z",fill:"white"}),t.createElement("path",{d:"M161.52 42.8519H124.507V34.6055H161.52V42.8519ZM124.699 42.6601H161.328V34.7973H124.699L124.699 42.6601Z",fill:"#3F3D56"}),t.createElement("path",{d:"M147.137 33.9326H138.89V42.6585H147.137V33.9326Z",fill:"#0000FF"}),t.createElement("path",{d:"M142.13 26.3253C144.307 29.5521 142.256 34.742 142.256 34.742C142.256 34.742 136.676 34.7001 134.499 31.4733C132.322 28.2465 134.373 23.0566 134.373 23.0566C134.373 23.0566 139.954 23.0985 142.13 26.3253Z",fill:"#0000FF"}),t.createElement("path",{d:"M143.129 26.3253C140.953 29.5521 143.004 34.742 143.004 34.742C143.004 34.742 148.584 34.7001 150.761 31.4733C152.937 28.2465 150.886 23.0566 150.886 23.0566C150.886 23.0566 145.306 23.0985 143.129 26.3253Z",fill:"#0000FF"}),t.createElement("path",{d:"M137.26 28.7553C137.737 28.7553 138.123 28.3689 138.123 27.8923C138.123 27.4157 137.737 27.0293 137.26 27.0293C136.783 27.0293 136.397 27.4157 136.397 27.8923C136.397 28.3689 136.783 28.7553 137.26 28.7553Z",fill:"#3F3D56"}),t.createElement("path",{d:"M142.438 37.4819C142.915 37.4819 143.301 37.0955 143.301 36.6189C143.301 36.1422 142.915 35.7559 142.438 35.7559C141.961 35.7559 141.575 36.1422 141.575 36.6189C141.575 37.0955 141.961 37.4819 142.438 37.4819Z",fill:"#3F3D56"}),t.createElement("path",{d:"M142.438 56.3725C142.915 56.3725 143.301 55.9861 143.301 55.5095C143.301 55.0329 142.915 54.6465 142.438 54.6465C141.961 54.6465 141.575 55.0329 141.575 55.5095C141.575 55.9861 141.961 56.3725 142.438 56.3725Z",fill:"#3F3D56"}),t.createElement("path",{d:"M139.561 31.6331C139.879 31.6331 140.137 31.3755 140.137 31.0578C140.137 30.74 139.879 30.4824 139.561 30.4824C139.244 30.4824 138.986 30.74 138.986 31.0578C138.986 31.3755 139.244 31.6331 139.561 31.6331Z",fill:"#3F3D56"}),t.createElement("path",{d:"M148.191 26.7415C148.509 26.7415 148.767 26.4839 148.767 26.1662C148.767 25.8484 148.509 25.5908 148.191 25.5908C147.874 25.5908 147.616 25.8484 147.616 26.1662C147.616 26.4839 147.874 26.7415 148.191 26.7415Z",fill:"#3F3D56"}),t.createElement("path",{d:"M144.452 40.262C144.769 40.262 145.027 40.0044 145.027 39.6867C145.027 39.3689 144.769 39.1113 144.452 39.1113C144.134 39.1113 143.876 39.3689 143.876 39.6867C143.876 40.0044 144.134 40.262 144.452 40.262Z",fill:"#3F3D56"}),t.createElement("path",{d:"M141 47.7415C141.318 47.7415 141.575 47.4839 141.575 47.1662C141.575 46.8484 141.318 46.5908 141 46.5908C140.682 46.5908 140.425 46.8484 140.425 47.1662C140.425 47.4839 140.682 47.7415 141 47.7415Z",fill:"#3F3D56"}),t.createElement("path",{d:"M143.972 50.3313C144.29 50.3313 144.548 50.0737 144.548 49.756C144.548 49.4382 144.29 49.1807 143.972 49.1807C143.655 49.1807 143.397 49.4382 143.397 49.756C143.397 50.0737 143.655 50.3313 143.972 50.3313Z",fill:"#3F3D56"}),t.createElement("path",{d:"M143.301 61.1653C143.619 61.1653 143.876 60.9077 143.876 60.59C143.876 60.2722 143.619 60.0146 143.301 60.0146C142.983 60.0146 142.726 60.2722 142.726 60.59C142.726 60.9077 142.983 61.1653 143.301 61.1653Z",fill:"#3F3D56"}),t.createElement("path",{d:"M229.454 50.5214H180.504C179.893 50.5214 179.307 50.2785 178.874 49.8461C178.442 49.4137 178.199 48.8273 178.199 48.2158C178.199 47.6043 178.442 47.0178 178.874 46.5855C179.307 46.1531 179.893 45.9102 180.504 45.9102H229.454C230.066 45.9
35102 230.652 46.1531 231.085 46.5855C231.517 47.0178 231.76 47.6043 231.76 48.2158C231.76 48.8273 231.517 49.4137 231.085 49.8461C230.652 50.2785 230.066 50.5214 229.454 50.5214Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M213.67 42.6278H180.504C179.893 42.6278 179.307 42.3849 178.874 41.9525C178.442 41.5201 178.199 40.9337 178.199 40.3222C178.199 39.7107 178.442 39.1243 178.874 38.6919C179.307 38.2595 179.893 38.0166 180.504 38.0166H213.67C214.281 38.0166 214.868 38.2595 215.3 38.6919C215.732 39.1243 215.975 39.7107 215.975 40.3222C215.975 40.9337 215.732 41.5201 215.3 41.9525C214.868 42.3849 214.281 42.6278 213.67 42.6278Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M226.102 65.4819C227.735 64.058 230.37 62.7136 232.493 61.9264C230.37 61.1385 227.735 59.7941 226.102 58.3701L227.253 61.5525H221.281V62.3003H227.253L226.102 65.4819Z",fill:"#3F3D56"}),t.createElement("path",{d:"M70.8094 73.1018C70.4932 72.8816 70.1325 72.7334 69.7528 72.6676C69.3731 72.6018 68.9836 72.6201 68.6117 72.7211C68.2399 72.8222 67.8947 73.0035 67.6005 73.2524C67.3062 73.5013 67.0702 73.8117 66.9089 74.1617L60.8897 73.9294L59.8564 77.5529L68.3613 77.7614C68.9672 77.9935 69.6372 77.9951 70.2443 77.7661C70.8514 77.5372 71.3534 77.0934 71.6551 76.5191C71.9569 75.9447 72.0375 75.2796 71.8816 74.6498C71.7258 74.0199 71.3443 73.4692 70.8094 73.1018Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M65.9731 78.2137L59.838 78.9841L59.0613 79.0808L46.5789 80.6465C46.5789 80.6465 42.7487 77.8862 39.3428 74.9699V71.9257C39.3403 68.9385 40.4233 66.0521 42.3901 63.8037C47 66.0401 50.2189 71.2832 50.2189 71.2832L58.2005 72.0629L58.999 72.1409L63.9582 72.6244L65.9731 78.2137Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M40.4704 102.657H52.0114C52.0114 103.152 64.6273 103.553 64.6273 103.553C64.9056 103.763 65.1593 104.003 65.3834 104.27C66.0568 105.073 66.4249 106.088 66.4227 107.136V107.853C66.4223 109.041 65.9502 110.18 65.1103 111.02C64.2703 111.86 63.1313 112.332 61.9434 112.332H40.4704C39.2827 112.331 38.144 111.859 37.3042 111.019C36.4644 110.18 35.9921 109.041 35.9911 107.853V107.136C35.9927 105.949 36.4652 104.811 37.3049 103.971C38.1445 103.131 39.2829 102.659 40.4704 102.657Z",fill:"#3F3D56"}),t.createElement("path",{d:"M53.5216 112.155H48.8632V139.044H53.5216V112.155Z",fill:"#3F3D56"}),t.createElement("path",{d:"M66.7802 138.881C66.7802 139.384 59.7211 139.075 51.0132 139.075C42.3053 139.075 35.2462 139.384 35.2462 138.881C35.2462 138.377 42.3053 134.386 51.0132 134.386C59.7211 134.386 66.7802 138.377 66.7802 138.881Z",fill:"#3F3D56"}),t.createElement("path",{d:"M69.9096 135.806H73.3764L75.0257 122.434H69.9089L69.9096 135.806Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M69.025 134.675L75.8528 134.675C77.0068 134.675 78.1138 135.133 78.9297 135.949C79.7457 136.765 80.2042 137.872 80.2043 139.026V139.167L69.0252 139.168L69.025 134.675Z",fill:"#2F2E41"}),t.createElement("path",{d:"M80.1563 135.806H83.6234L85.2728 122.434H80.156L80.1563 135.806Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M79.2722 134.675L86.1 134.675C87.254 134.675 88.3609 135.133 89.1769 135.949C89.9929 136.765 90.4514 137.872 90.4515 139.026V139.167L79.2724 139.168L79.2722 134.675Z",fill:"#2F2E41"}),t.createElement("path",{d:"M51.0643 58.8209C54.3935 58.8209 57.0924 56.122 57.0924 52.7928C57.0924 49.4635 54.3935 46.7646 51.0643 46.7646C47.735 46.7646 45.0361 49.4635 45.0361 52.7928C45.0361 56.122 47.735 58.8209 51.0643 58.8209Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M51.7441 49.916C51.7441 49.916 53.8882 46.9355 55.8855 49.9173C57.8828 52.8992 59.8579 49.2821 59.399 48.1458C58.9401 47.0096 59.061 46.8727 55.7338 45.3972C52.4067 43.9216 46.0101 40.9545 44.1385 48.3183C42.2669 55.682 46.0965 55.8212 46.0965 55.8212C46.0965 55.8212 46.8779 48.6656 47.7796 50.6802L48.6814 52.6948L49.6079 53.0254L51.7441 49.916Z",fill:"#2F2E41"}),t.createElement("path",{d:"M39.3434 94.0931C39.3434 94.0931 37.3207 104.788 45.0165 106.15C52.7123 107.512 63.8213 108.47 63.8213 108.47L68.81 131.745L75.5122 131.147C75.5122 131.147 74.6208 103.128 72.4288 100.936C70.2367 98.7442 56.3821 92.1807 56.3821 92.1807L39.3434 94.0931Z",fill:"#2F2E41"}),t.createElement("path",{d:"M54.3738 89.6113L57.7396 92.9879C57.7396 92.9879 82.0423 96.9024 82.9799 102.516C84.3953 110.99 86.0672 129.418 86.0672 129.418L78.7604 128.87L75.8951 107.922L64.2041 105.263L50.9031 98.0142L54.3738 89.6113Z",fill:"#2F2E41"}),t.createElement("path",{d:"M57.318 92.4926C57.318 92.4926 38.5445 99.8473 38.9561 95.5212C39.4334 90.5089 39.343 88.3256 39.343 88.3256V71.9257C39.3437 69.6851 39.9536 67.4868 41.1073 65.5661C42.2611 63.6454 43.9153 62.0745 45.893 61.0215L52.2308 61.1275L54.1865 63.7195C55.7584 71.595 56.0703 72.5308 56.0703 72.5308L57.3804 76.1177L57.6548 78.3602L56.6942 83.1355L57.318 92.4926Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M72.7347 73.1182L72.6978 73.1068L73.3142 71.1236C73.5113 70.4896 73.4092 69.8944 73.0863 69.794L70.9461 69.1287C70.6231 69.0283 70.2016 69.4609 70.0046 70.0948L66.6227 80.9748C66.4257 81.6087 66.5277 82.204 66.8506 82.3044L68.9909 82.9697C69.3138 83.07 69.7353 82.6375 69.9324 82.0036L72.259 74.5185L72.2959 74.5299L72.7347 73.1182Z",fill:"#0000FF"}),t.createElement("path",{d:"M73.0466 73.4307L73.0097 73.4193L73.6261 71.4361C73.8232 70.8021 73.7211 70.2069 73.3982 70.1065L71.258 69.4412C70.935 69.3408 70.5135 69.7734 70.3165 70.4073L66.9346 81.2873C66.7375 81.9212 66.8396 82.5165 67.1625 82.6169L69.3028 83.2822C69.6257 83.3825 70.0472 82.95 70.2443 82.3161L72.5709 74.831L72.6078 74.8424L73.0466 73.4307Z",fill:"#3F3D56"}),t.createElement("path",{d:"M71.6542 73.2705C71.7749 72.8822 71.7124 72.5176 71.5146 72.4561C71.3168 72.3946 71.0586 72.6596 70.9379 73.0479C70.8172 73.4362 70.8797 73.8008 71.0775 73.8623C71.2753 73.9238 71.5335 73.6588 71.6542 73.2705Z",fill:"#D0CDE1"}),t.createElement("path",{d:"M72.1727 77.7805C71.8565 77.5603 71.4958 77.4121 71.1161 77.3463C70.7364 77.2805 70.3469 77.2988 69.975 77.3998C69.6031 77.5009 69.2579 77.6822 68.9637 77.9311C68.6695 78.18 68.4335 78.4904 68.2722 78.8404L62.253 78.6081L61.2197 82.2316L69.7246 82.4402C70.3305 82.6722 71.0005 82.6738 71.6076 82.4449C72.2147 82.2159 72.7166 81.7
35722 73.0184 81.1978C73.3202 80.6234 73.4008 79.9583 73.2449 79.3285C73.089 78.6986 72.7075 78.1479 72.1727 77.7805Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M67.3362 82.8925L60.4243 83.7596L47.9419 85.3253C47.9419 85.3253 42.992 81.7571 39.3428 78.4478V71.9259C39.3424 70.4128 39.6204 68.9125 40.163 67.5C46.6008 67.8525 51.5818 75.962 51.5818 75.962L59.5636 76.7417L65.3213 77.3032L67.3362 82.8925Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M119.147 139.59H0.311904C0.229182 139.59 0.149848 139.557 0.0913544 139.498C0.032861 139.44 0 139.36 0 139.278C0 139.195 0.032861 139.116 0.0913544 139.057C0.149848 138.999 0.229182 138.966 0.311904 138.966H119.147C119.23 138.966 119.31 138.999 119.368 139.057C119.427 139.116 119.459 139.195 119.459 139.278C119.459 139.36 119.427 139.44 119.368 139.498C119.31 139.557 119.23 139.59 119.147 139.59Z",fill:"#CACACA"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_1391_21670"},t.createElement("rect",{width:261,height:139.591,fill:"white"})))),yl=e=>t.createElement("svg",{width:279,height:164,viewBox:"0 0 279 164",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},t.createElement("rect",{x:43.373,y:20.4766,width:235.627,height:143.082,rx:5.36951,fill:"#F3F7FB"}),t.createElement("rect",{x:76,y:91,width:189.512,height:65.6976,rx:4.42195,fill:"white"}),t.createElement("rect",{x:211.975,y:105.054,width:40.7451,height:11.0549,rx:1.10549,fill:"#FFFFFE"}),t.createElement("rect",{x:211.975,y:105.054,width:40.7451,height:11.0549,rx:1.10549,stroke:"#D6DEE8",strokeWidth:.315854}),t.createElement("path",{d:"M229.631 110.122C229.601 109.833 229.346 109.664 228.987 109.664C228.603 109.664 228.361 109.859 228.361 110.126C228.361 110.424 228.685 110.537 228.931 110.597L229.234 110.679C229.635 110.774 230.132 110.994 230.136 111.56C230.132 112.087 229.713 112.476 228.974 112.476C228.275 112.476 227.834 112.126 227.804 111.556H228.279C228.309 111.897 228.607 112.061 228.974 112.061C229.372 112.061 229.661 111.858 229.665 111.552C229.661 111.279 229.406 111.167 229.074 111.081L228.702 110.982C228.201 110.843 227.886 110.589 227.886 110.152C227.886 109.613 228.37 109.254 229 109.254C229.635 109.254 230.08 109.617 230.093 110.122H229.631ZM231.069 111.033V112.424H230.607V109.297H231.06V110.463H231.09C231.203 110.209 231.419 110.049 231.786 110.049C232.269 110.049 232.589 110.347 232.589 110.934V112.424H232.127V110.99C232.127 110.645 231.941 110.446 231.63 110.446C231.306 110.446 231.069 110.658 231.069 111.033ZM234.139 112.471C233.474 112.471 233.042 111.988 233.042 111.262C233.042 110.532 233.474 110.049 234.139 110.049C234.8 110.049 235.232 110.532 235.232 111.262C235.232 111.988 234.8 112.471 234.139 112.471ZM234.139 112.087C234.562 112.087 234.765 111.711 234.765 111.262C234.765 110.813 234.562 110.429 234.139 110.429C233.707 110.429 233.504 110.813 233.504 111.262C233.504 111.711 233.707 112.087 234.139 112.087ZM235.685 112.424V110.079H236.13V110.45H236.156C236.242 110.2 236.475 110.044 236.752 110.044C236.808 110.044 236.899 110.049 236.946 110.053V110.494C236.907 110.485 236.799 110.468 236.704 110.468C236.385 110.468 236.147 110.688 236.147 110.994V112.424H235.685ZM238.527 110.079V110.446H238.047V111.733C238.047 111.996 238.181 112.044 238.328 112.048C238.393 112.048 238.496 112.039 238.561 112.035V112.437C238.496 112.445 238.397 112.454 238.272 112.454C237.909 112.454 237.585 112.255 237.589 111.828V110.446H237.244V110.079H237.589V109.518H238.047V110.079H238.527ZM239.49 109.297V112.424H239.027V109.297H239.49ZM240.051 112.424V110.079H240.513V112.424H240.051ZM240.284 109.716C240.124 109.716 239.99 109.595 239.99 109.444C239.99 109.293 240.124 109.172 240.284 109.172C240.44 109.172 240.573 109.293 240.573 109.444C240.573 109.595 240.44 109.716 240.284 109.716ZM242.391 110.718C242.348 110.532 242.201 110.411 241.947 110.411C241.683 110.411 241.493 110.55 241.498 110.727C241.493 110.865 241.606 110.964 241.865 111.025L242.236 111.111C242.668 111.206 242.875 111.413 242.879 111.746C242.875 112.169 242.521 112.471 241.921 112.471C241.359 112.471 241.023 112.221 240.966 111.785H241.437C241.476 111.996 241.64 112.1 241.916 112.1C242.214 112.1 242.404 111.979 242.409 111.78C242.404 111.629 242.292 111.53 242.046 111.474L241.679 111.396C241.256 111.301 241.035 111.077 241.035 110.753C241.035 110.334 241.398 110.049 241.942 110.049C242.465 110.049 242.789 110.316 242.836 110.718H242.391ZM244.425 110.079V110.446H243.946V111.733C243.946 111.996 244.08 112.044 244.227 112.048C244.292 112.048 244.395 112.039 244.46 112.035V112.437C244.395 112.445 244.296 112.454 244.171 112.454C243.808 112.454 243.484 112.255 243.488 111.828V110.446H243.143V110.079H243.488V109.518H243.946V110.079H244.425Z",fill:"#4E5C6F"}),t.createElement("g",{clipPath:"url(#clip0_1391_21392)"},t.createElement("path",{d:"M220.879 109.194C220.984 108.982 221.285 108.982 221.389 109.194L221.87 110.167L222.944 110.323C223.177 110.357 223.27 110.
35644 223.101 110.808L222.324 111.566L222.508 112.636C222.547 112.868 222.304 113.045 222.095 112.935L221.134 112.43L220.173 112.935C219.965 113.045 219.721 112.868 219.761 112.636L219.944 111.566L219.167 110.808C218.998 110.644 219.091 110.357 219.325 110.323L220.399 110.167L220.879 109.194Z",stroke:"#3B84FB",strokeWidth:.315854})),t.createElement("path",{d:"M104.776 109.897L103.918 109.897L105.491 105.431L106.478 105.431L108.058 109.897L107.2 109.897L106.83 108.793L105.146 108.793L104.776 109.897ZM105.362 108.145L106.614 108.145L106.003 106.344L105.966 106.344L105.362 108.145ZM109.193 106.548L109.871 107.788L110.562 106.548L111.395 106.548L110.383 108.219L111.414 109.897L110.587 109.897L109.871 108.688L109.174 109.897L108.335 109.897L109.359 108.219L108.36 106.548L109.193 106.548ZM112.592 106.548L113.271 107.788L113.961 106.548L114.794 106.548L113.783 108.219L114.813 109.897L113.986 109.897L113.271 108.688L112.573 109.897L111.734 109.897L112.759 108.219L111.759 106.548L112.592 106.548ZM115.183 108.954C115.183 108.201 115.806 107.979 116.429 107.942C116.66 107.926 117.142 107.899 117.287 107.893L117.287 107.627C117.287 107.294 117.071 107.103 116.682 107.103C116.33 107.103 116.114 107.263 116.053 107.504L115.294 107.504C115.349 106.936 115.862 106.505 116.701 106.505C117.336 106.505 118.07 106.764 118.07 107.658L118.07 109.897L117.317 109.897L117.317 109.435L117.293 109.435C117.145 109.719 116.83 109.965 116.306 109.965C115.664 109.965 115.183 109.614 115.183 108.954ZM115.942 108.947C115.942 109.237 116.176 109.385 116.509 109.385C116.984 109.385 117.293 109.071 117.293 108.695L117.293 108.417L116.552 108.466C116.176 108.497 115.942 108.651 115.942 108.947ZM118.81 109.897L118.81 106.548L119.563 106.548L119.563 107.115L119.606 107.115C119.742 106.733 120.081 106.505 120.525 106.505C120.982 106.505 121.303 106.733 121.432 107.115L121.469 107.115C121.617 106.745 121.987 106.505 122.475 106.505C123.085 106.505 123.517 106.899 123.517 107.646L123.517 109.897L122.734 109.897L122.734 107.769C122.734 107.35 122.481 107.165 122.16 107.165C121.771 107.165 121.549 107.43 121.549 107.806L121.549 109.897L120.784 109.897L120.784 107.738C120.784 107.393 120.55 107.165 120.217 107.165C119.878 107.165 119.6 107.442 119.6 107.862L119.6 109.897L118.81 109.897Z",fill:"#37475E"}),t.createElement("rect",{x:103.795,y:114.688,width:68.2244,height:1.89512,rx:.947561,fill:"#D6DEE8"}),t.createElement("rect",{x:103.795,y:124.48,width:146.872,height:1.26341,rx:.631707,fill:"#D6DEE8"}),t.createElement("rect",{x:103.795,y:130.166,width:146.872,height:1.26341,rx:.631707,fill:"#D6DEE8"}),t.createElement("rect",{x:103.795,y:135.852,width:146.872,height:1.26341,rx:.631707,fill:"#D6DEE8"}),t.createElement("g",{clipPath:"url(#clip1_1391_21392)"},t.createElement("rect",{x:89.8975,y:103.634,width:9.15976,height:9.15976,rx:.832705,fill:"white"}),t.createElement("rect",{x:89.7065,y:103.443,width:9.35058,height:9.35058,fill:"white"}),t.createElement("rect",{x:89.8975,y:104.206,width:9.92307,height:8.01479,fill:"url(#pattern0_1391_21392)"})),t.createElement("rect",{x:89.9929,y:103.729,width:8.96893,height:8.96893,rx:.737291,stroke:"#D6DEE8",strokeWidth:.190828}),t.createElement("path",{d:"M48.3695 164C45.404 164 43 161.596 43 158.63L43 28.3695C43 25.404 45.404 23 48.3695 23L65 23L65 164L48.3695 164Z",fill:"#3B84FB"}),t.createElement("g",{filter:"url(#filter0_d_1391_21392)"},t.createElement("rect",{x:2.15793,y:1.15793,width:264.968,height:81.0378,rx:5.36951,fill:"white",stroke:"#E2E8F0",strokeWidth:.315854}),t.createElement("rect",{x:192.318,y:20.6505,width:57.0833,height:15.5222,rx:1.38186,fill:"#FFFFFE"}),t.createElement("rect",{x:192.318,y:20.6505,width:57.0833,height:15.5222,rx:1.38186,stroke:"#E2E8F0",strokeWidth:.394817}),t.createElement("path",{d:"M216.754 27.1141C216.716 26.7525 216.397 26.542 215.949 26.542C215.469 26.542 215.167 26.7849 215.167 27.1195C215.167 27.492 215.572 27.6323 215.879 27.7079L216.257 27.8105C216.759 27.9292 217.38 28.2045 217.385 28.9116C217.38 29.5702 216.856 30.056 215.933 30.056C215.059 30.056 214.508 29.6188 214.47 28.9062H215.064C215.102 29.3327 215.474 29.5378 215.933 29.5378C216.43 29.5378 216.792 29.2841 216.797 28.9008C216.792 28.5608 216.473 28.4204 216.057 28.3125L215.593 28.1883C214.967 28.0156 214.573 27.6971 214.573 27.1519C214.573 26.4772 215.178 26.0292 215.9
3566 26.0292C216.759 26.0292 217.315 26.4826 217.331 27.1141H216.754ZM218.551 28.2531V29.9912H217.974V26.0831H218.54V27.5406H218.578C218.719 27.2221 218.988 27.0224 219.447 27.0224C220.052 27.0224 220.451 27.3948 220.451 28.1289V29.9912H219.874V28.1991C219.874 27.7673 219.642 27.519 219.253 27.519C218.848 27.519 218.551 27.7835 218.551 28.2531ZM222.389 30.0506C221.558 30.0506 221.018 29.446 221.018 28.5392C221.018 27.6269 221.558 27.0224 222.389 27.0224C223.215 27.0224 223.755 27.6269 223.755 28.5392C223.755 29.446 223.215 30.0506 222.389 30.0506ZM222.389 29.5702C222.918 29.5702 223.172 29.1006 223.172 28.5392C223.172 27.9778 222.918 27.4974 222.389 27.4974C221.849 27.4974 221.596 27.9778 221.596 28.5392C221.596 29.1006 221.849 29.5702 222.389 29.5702ZM224.322 29.9912V27.0602H224.878V27.5244H224.91C225.018 27.2113 225.309 27.017 225.655 27.017C225.725 27.017 225.838 27.0224 225.898 27.0278V27.5784C225.849 27.5676 225.714 27.546 225.595 27.546C225.196 27.546 224.899 27.8213 224.899 28.2045V29.9912H224.322ZM227.873 27.0602V27.519H227.274V29.1275C227.274 29.4568 227.442 29.5162 227.625 29.5216C227.706 29.5216 227.836 29.5108 227.917 29.5054V30.0074C227.836 30.0182 227.711 30.029 227.555 30.029C227.102 30.029 226.697 29.7807 226.702 29.2463V27.519H226.27V27.0602H226.702V26.3584H227.274V27.0602H227.873ZM229.077 26.0831V29.9912H228.5V26.0831H229.077ZM229.779 29.9912V27.0602H230.356V29.9912H229.779ZM230.07 26.6067C229.871 26.6067 229.703 26.4556 229.703 26.2667C229.703 26.0777 229.871 25.9266 230.07 25.9266C230.265 25.9266 230.432 26.0777 230.432 26.2667C230.432 26.4556 230.265 26.6067 230.07 26.6067ZM232.705 27.859C232.651 27.6269 232.467 27.4758 232.149 27.4758C231.819 27.4758 231.582 27.6485 231.587 27.8698C231.582 28.0426 231.722 28.1667 232.046 28.2423L232.51 28.3503C233.05 28.469 233.309 28.7281 233.314 29.1437C233.309 29.6727 232.866 30.0506 232.116 30.0506C231.414 30.0506 230.993 29.7375 230.923 29.1923H231.512C231.56 29.4568 231.765 29.5864 232.111 29.5864C232.483 29.5864 232.721 29.4352 232.726 29.1869C232.721 28.998 232.58 28.8738 232.273 28.8037L231.814 28.7065C231.285 28.5878 231.01 28.3071 231.01 27.9022C231.01 27.3786 231.463 27.0224 232.143 27.0224C232.796 27.0224 233.201 27.357 233.26 27.859H232.705ZM235.247 27.0602V27.519H234.648V29.1275C234.648 29.4568 234.815 29.5162 234.999 29.5216C235.08 29.5216 235.209 29.5108 235.29 29.5054V30.0074C235.209 30.0182 235.085 30.029 234.928 30.029C234.475 30.029 234.07 29.7807 234.076 29.2463V27.519H233.644V27.0602H234.076V26.3584H234.648V27.0602H235.247Z",fill:"#4E5C6F"}),t.createElement("g",{clipPath:"url(#clip2_1391_21392)"},t.createElement("path",{d:"M204.644 26.5467C204.775 26.2826 205.151 26.2826 205.282 26.5467L205.882 27.7636L207.225 27.9587C207.516 28.001 207.633 28.3592 207.422 28.5648L206.45 29.512L206.68 30.8494C206.729 31.1397 206.425 31.361 206.164 31.224L204.963 30.5925L203.762 31.224C203.501 31.361 203.196 31.1397 203.246 30.8494L203.476 29.512L202.504 28.5648C202.293 28.3592 202.409 28.001 202.701 27.9587L204.044 27.7636L204.644 26.5467Z",fill:"#0000FF",stroke:"#0000FF",strokeWidth:.394817})),t.createElement("rect",{x:21.4543,y:18.6855,width:12.822,height:12.822,fill:"url(#pattern1_1391_21392)"}),t.createElement("path",{d:"M42.1345 27.4541L41.0627 27.4541L43.029 21.8711L44.2629 21.8711L46.2369 27.4541L45.1651 27.4541L44.7024 26.0738L42.5972 26.0738L42.1345 27.4541ZM42.8671 25.2641L44.4325 25.2641L43.6691 23.0124L43.6228 23.0124L42.8671 25.2641ZM50.0694 23.2669L48.5735 27.4541L47.4939 27.4541L45.9979 23.2669L47.0466 23.2669L48.0105 26.3822L48.0568 26.3822L49.0284 23.2669L50.0694 23.2669ZM50.3702 26.2743C50.3702 25.3335 51.149 25.0559 51.9279 25.0096C52.217 24.9904 52.8185 24.9556 52.9997 24.9479L52.9997 24.6164C52.9997 24.1999 52.7298 23.9609 52.244 23.9609C51.8045 23.9609 51.5346 24.1614 51.4575 24.4621L50.509 24.4621C50.5784 23.7527 51.2184 23.2129 52.2671 23.2129C53.0614 23.2129 53.9791 23.5368 53.9791 24.6549L53.9791 27.4541L53.0383 27.4541L53.0383 26.8758L53.0074 26.8758C52.8224 27.2305 52.4291 27.5389 51.7736 27.5389C50.9717 27.5389 50.3702 27.0994 50.3702 26.2743ZM51.3187 26.2666C51.3187 26.629 51.6117 26.8141 52.0281 26.8141C52.6219 26.8141 53.0074 26.4208 53.0074 25.9504L53.0074 25.6034L52.0821 25.6651C51.6117 25.7036 51.3187 25.8964 51.3187 26.2666ZM55.8914 25.0019L55.8914 27.4541L54.9044 27.4541L54.9044 23.2669L55.8452 23.2669L55.8452 23.9763L55.8992 23.9763C56.0919 23.5059 56.5161 23.2129 57.1407 23.2129C58.012 23.2129 58.5827 23.7835 58.575 24.786L58.575 27.4541L57.5956 27.4541L57.5956 24.9402C57.5956 24.3773 57.2949 24.0457 56.7782 24.0457C56.2539 24.0457 55.8914 24.3927 55.8914 25.0019ZM61.
356055 23.2669L61.6055 24.0226L60.7804 24.0226L60.7804 26.1972C60.7804 26.5982 60.9809 26.683 61.2276 26.683C61.3433 26.683 61.5361 26.6753 61.6595 26.6676L61.6595 27.4695C61.5438 27.4927 61.351 27.5081 61.1043 27.5081C60.364 27.5081 59.7934 27.1457 59.8011 26.3591L59.8011 24.0226L59.1996 24.0226L59.1996 23.2669L59.8011 23.2669L59.8011 22.2644L60.7804 22.2644L60.7804 23.2669L61.6055 23.2669ZM66.1474 23.6524C65.9701 23.0587 65.5074 22.6962 64.8288 22.6962C63.9266 22.6962 63.2788 23.398 63.2788 24.6549C63.2788 25.9273 63.9189 26.629 64.8519 26.629C65.6925 26.629 66.2323 26.1201 66.2477 25.3258L64.9522 25.3258L64.9522 24.5315L67.2193 24.5315L67.2193 25.2024C67.2193 26.6367 66.2323 27.5312 64.8519 27.5312C63.3097 27.5312 62.2687 26.4362 62.2687 24.6626C62.2687 22.8736 63.356 21.794 64.8211 21.794C66.0549 21.794 67.0034 22.5574 67.173 23.6524L66.1474 23.6524ZM69.9414 27.5389C68.6767 27.5389 67.9056 26.6984 67.9056 25.3875C67.9056 24.092 68.6922 23.2129 69.8874 23.2129C70.913 23.2129 71.7998 23.8529 71.7998 25.3258L71.7998 25.6342L68.8772 25.6342C68.8888 26.3475 69.3091 26.7678 69.9491 26.7678C70.3809 26.7678 70.674 26.5827 70.7973 26.336L71.7612 26.336C71.5839 27.0608 70.913 27.5389 69.9414 27.5389ZM68.8849 24.9634L70.859 24.9634C70.8513 24.3927 70.4735 23.9763 69.9028 23.9763C69.3091 23.9763 68.9158 24.4274 68.8849 24.9634ZM73.5503 25.0019L73.5503 27.4541L72.5632 27.4541L72.5632 23.2669L73.504 23.2669L73.504 23.9763L73.558 23.9763C73.7508 23.5059 74.1749 23.2129 74.7995 23.2129C75.6709 23.2129 76.2415 23.7835 76.2338 24.786L76.2338 27.4541L75.2544 27.4541L75.2544 24.9402C75.2544 24.3773 74.9537 24.0457 74.4371 24.0457C73.9127 24.0457 73.5503 24.3927 73.5503 25.0019ZM79.0947 27.4541L79.0947 21.8711L80.0971 21.8711L80.0971 26.6059L82.5647 26.6059L82.5647 27.4541L79.0947 27.4541ZM83.1277 26.2743C83.1277 25.3335 83.9065 25.0559 84.6853 25.0096C84.9745 24.9904 85.576 24.9557 85.7572 24.9479L85.7572 24.6164C85.7572 24.1999 85.4873 23.9609 85.0015 23.9609C84.562 23.9609 84.2921 24.1614 84.2149 24.4621L83.2665 24.4621C83.3359 23.7527 83.9759 23.2129 85.0246 23.2129C85.8189 23.2129 86.7365 23.5368 86.7365 24.6549L86.7365 27.4541L85.7958 27.4541L85.7958 26.8758L85.7649 26.8758C85.5798 27.2305 85.1866 27.5389 84.5311 27.5389C83.7291 27.5389 83.1277 27.0994 83.1277 26.2743ZM84.0761 26.2666C84.0761 26.629 84.3692 26.8141 84.7856 26.8141C85.3793 26.8141 85.7649 26.4208 85.7649 25.9504L85.7649 25.6034L84.8396 25.6651C84.3692 25.7036 84.0761 25.8964 84.0761 26.2666ZM87.7081 27.4541L87.7081 21.8711L88.6952 21.8711L88.6952 23.9532L88.7337 23.9532C88.888 23.6524 89.1887 23.2129 89.929 23.2129C90.9006 23.2129 91.664 23.9686 91.664 25.3643C91.664 26.7447 90.916 27.5312 89.9367 27.5312C89.2118 27.5312 88.888 27.0994 88.7337 26.7909L88.6721 26.7909L88.6721 27.4541L87.7081 27.4541ZM88.6721 25.3566C88.6721 26.174 89.0268 26.7215 89.6591 26.7215C90.3146 26.7215 90.6616 26.1509 90.6616 25.3566C90.6616 24.5778 90.3223 24.0149 89.6591 24.0149C89.0268 24.0149 88.6721 24.547 88.6721 25.3566ZM94.8102 24.4621C94.7485 24.146 94.4864 23.9455 94.0699 23.9455C93.6458 23.9455 93.3374 24.1537 93.3451 24.439C93.3374 24.6549 93.5147 24.8168 93.9389 24.9171L94.6483 25.0636C95.4426 25.241 95.8204 25.6034 95.8281 26.2049C95.8204 26.9914 95.1341 27.5389 94.0391 27.5389C92.9749 27.5389 92.3426 27.0608 92.2424 26.2589L93.2448 26.2589C93.3065 26.6136 93.5841 26.7909 94.0391 26.7909C94.5095 26.7909 94.8257 26.5982 94.8257 26.2897C94.8257 26.0507 94.6329 25.8964 94.2165 25.8039L93.5456 25.
356574C92.7667 25.5032 92.3658 25.0945 92.3658 24.493C92.3658 23.7218 93.0289 23.2129 94.0545 23.2129C95.057 23.2129 95.6739 23.6987 95.7433 24.4621L94.8102 24.4621Z",fill:"#37475E"}),t.createElement("rect",{x:40.9084,y:34.1602,width:95.5021,height:2.65284,rx:1.32642,fill:"#E2E8F0"}),t.createElement("rect",{x:40.9084,y:47.8672,width:205.595,height:1.76856,rx:.884279,fill:"#E2E8F0"}),t.createElement("rect",{x:40.9084,y:55.8262,width:205.595,height:1.76856,rx:.884279,fill:"#E2E8F0"}),t.createElement("rect",{x:40.9084,y:63.7842,width:205.595,height:1.76856,rx:.884279,fill:"#E2E8F0"}),t.createElement("rect",{x:107.671,y:19.1279,width:15.0327,height:11.4956,rx:1.57927,fill:"#7C2D12"}),t.createElement("path",{d:"M111.772 24.1921C111.717 23.822 111.43 23.5953 111.041 23.5953C110.518 23.5953 110.176 23.9978 110.176 24.7011C110.176 25.4229 110.523 25.8069 111.037 25.8069C111.421 25.8069 111.703 25.5941 111.772 25.2332L112.476 25.2378C112.397 25.8578 111.879 26.4222 111.027 26.4222C110.13 26.4222 109.468 25.793 109.468 24.7011C109.468 23.6092 110.144 22.9799 111.027 22.9799C111.8 22.9799 112.383 23.4241 112.476 24.1921L111.772 24.1921ZM112.961 26.376L112.961 23.0262L114.275 23.0262C115.039 23.0262 115.474 23.4565 115.474 24.1181C115.474 24.5762 115.263 24.9093 114.882 25.0712L115.594 26.376L114.826 26.376L114.187 25.1869L113.655 25.1869L113.655 26.376L112.961 26.376ZM113.655 24.6224L114.146 24.6224C114.558 24.6224 114.757 24.4512 114.757 24.1181C114.757 23.7804 114.558 23.5953 114.146 23.5953L113.655 23.5953L113.655 24.6224ZM119.022 24.7011C119.022 25.793 118.342 26.4222 117.459 26.4222C116.566 26.4222 115.89 25.7884 115.89 24.7011C115.89 23.6092 116.566 22.9799 117.459 22.9799C118.342 22.9799 119.022 23.6092 119.022 24.7011ZM118.315 24.7011C118.315 23.9839 117.977 23.5953 117.459 23.5953C116.94 23.5953 116.598 23.9839 116.598 24.7011C116.598 25.4182 116.94 25.8069 117.459 25.8069C117.977 25.8069 118.315 25.4182 118.315 24.7011Z",fill:"#FFFFFE"})),t.createElement("defs",null,t.createElement("pattern",{id:"pattern0_1391_21392",patternContentUnits:"objectBoundingBox",width:1,height:1},t.createElement("use",{xlinkHref:"#image0_1391_21392",transform:"matrix(0.00925926 0 0 0.0114638 0 -0.00440911)"})),t.createElement("filter",{id:"filter0_d_1391_21392",x:0,y:0,width:269.284,height:85.3535,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},t.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),t.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),t.createElement("feOffset",{dy:1}),t.createElement("feGaussianBlur",{stdDeviation:1}),t.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),t.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1391_21392"}),t.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1391_21392",result:"shape"})),t.createElement("pattern",{id:"pattern1_1391_21392",patternContentUnits:"objectBoundingBox",width:1,height:1},t.createElement("use",{xlinkHref:"#image1_1391_21392",transform:"translate(-0.00381679) scale(0.00381679)"})),t.createElement("clipPath",{id:"clip0_1391_21392"},t.createElement("rect",{width:5.05366,height:5.05366,fill:"white",transform:"translate(218.134 108.057)"})),t.createElement("clipPath",{id:"clip1_1391_21392"},t.createElement("rect",{x:89.8975,y:103.634,width:9.15976,height:9.15976,rx:.832705,fill:"white"})),t.createElement("clipPath",{id:"clip2_1391_21392"},t.createElement("rect",{width:7.07423,height:7.07423,fill:"white",transform:"translate(200.962 24.875)"})),t.createElement("image",{id:"image0_1391_21392",width:108,height:88,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABYCAIAAACf74UhAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAbKADAAQAAAABAAAAWAAAAACtesRYAAAn20lEQVR4Ae17V5Qdx5ledU43z9xJwCAQAAEiECCRBjmSYBIpBiUGayXba8vnWA+7bz7HDz5+kY+8x/GsVl7JEi2RokiKBEFEIgxyzjnHmcHEGztHf9UzAIYCSYG7I4vyTqN5753u6uqqr/74/UUmiiIyfPzjEGD/cY8PP00RGAZxCORgGMRhEIcAgSHoYlgSh0EcAgSGoIthSRwGcQgQGIIuhiVxGMQhQGAIuhiWxCEAkR+CPgZ1EQ763f/zi1fpy7a/r/uvxIUvnuNXYohf/UEMgzgEazQM4hCAOAQ28X679sXj+rLtP6u3L9vHH1dW/ri9f9b8/z+8NgziECzqMIhDAOIQ2MTBo+iv1zCDLg22Xvev2JdtP6jjr9DP++f1FRrcn8tQhlgSv3rThiZ8vqB8XqFzsCo9wJQeHMQBvUSJlfn0u5k7rwwZQv8REuFfPHQ2Igxu07/jZ2jTgX6YuFRL/2bQlIuHOlj1+8dO53/36kBxl4nYKH4OnTL0cSZ+HB0yg0ZGS8FM/Ci9/qlOMKr+4+7IB1rSl2E0dAp3X/r5KzDQCb4+ow2exxmQyHIdAOIGThQFUehTcOhL8OPOGaFVwES4SE+WfgY48YPFxTAgOH0fJxMEOKPAD0M/jHwS+vSpMMQnh0uujZ7xVSn3kdAjkUMifAb0YvxWvM/FkOLegU0AgAbeid8M5oATP+j60ltAF23R+b15emHgBhhYPIe7l+mE4vYYJ/EMvdh/p1J1cBlY9lUqd9G8+9D9P/6AJPYD6vqeY9mpVMrzXZ7lMPOBjgZkg6WShnfieryMFFWsAonFMgjpwHGBJb7n4w5tSYjMi/R6PE9elNCC5bmkjB/+QHvaiuKATvvfF0TxmlMJA1pYP4g5FzIcJgrhEiCSDAAFULQ5Fj7+ZIElho0mHM8bAeHRLNaLWEvoK9AUX/jB8wK69DzCCRKaGRF+iPGtP/DxGSD2j4L2TdWBwUp7+CmrHh2HElHhwBEPNP6k6ogjxpGOEIvYf+Bx/OzXKZYFSoIEjDDNWF7oTGLLgAa+F3i277tYH15Q46fDeAX61bz/BfQyZh6LOQCCdNIjJBwTt8KABlCOL0MS6TioQLISL5ZsX+GJS4GmJx1YLL/0a+BgRFGOWGIaXiIpWLiIZgx/ZzJ3Wn3Wdzz/+27cvYrBYg1FUeRE8fj5K0fPXfQZOpGIoHecWDoBKOMMGNZneKw0Pu+eIcMDO3pi2GHkBcQJIttnnIBzIs5FY5anbXiR5QSeF3lFo2OJH8FbAiqDeFe8VvcNEpchhh5Dzl0tXLjS6aMdIIux78eIPgFUIirIssyXfPLxhh3QczSkffbrBEUqfiNEmRXwhOOGh09cP3DoAlYJg/qM19536S5cv38HU1cFGS+DrcEyYhxvvvvBj//b33khNX6WF+Iz4hgX+LFsyLIuw+pOWLEDCCwWH6cT8mWokSATUQ4FmRGlSBACng94pmiRkktslvQZgRFQmAiv2ICBk8oVSzcdO2A9ItqELVpeBS0jYrrUQPAssd0Q4kogsAJ9pOqSN3/z/tvvrcYIHW9gFqHrUoRDapUBK0x7W9HduuvYf/zR31zvqFBzisEzBAsApKhhJpEf+XYQmg5R09J/+vHfbNu5mwoQ8H2A4w8gHS8aFbSL7aXjp85fu3zldk95bENakFnYOg6qyZOSHZ0+e6553ATLpSomuYzjuLIsJzRGksVKAH2LWJYxbNJbsryAUVS5UHITWVHwSeBztkH6fLsmKYtqGo9zWloRqDb1Fg2Wk52QuL6jyRLjuTDMtbm0JvPAK9ZgDmJ1o0Nfu7lVYcPvf/eNcY2a6wRCZEOmqYOiZgBiSEHkVfH42UvtvYX9hw/mV60UOKLFU4dIACu8l2F4iYNwkGKfe+HK9Yrtvdr7xuha8c67vgjLLwARqzDgQSwvat2xp7diRZy07pOt3/32S6JAVBbwAYXgZnvbbz5YHUkp08XiEUmSYOAVWZ4zd+6iBZNEDgoJT0DOXev59Tu/s6ywrrG5s7fIirwfOCoA9s2RNekVS+fPnzEW4ukTQffI4SNn16xbL2kphhPKFT2XSbVdPj+qqf7JJ1ZMnvBQJqUp0DyGAJ0P12w0bD/ggtVr1v/Vv/rGwFzjxad6GnGQOMhXW6d+8uyF+hGjP1q7buK4MTOmjB9AhxpuCC1MB1YLdoWs+Xgdyws9fYXde/fnn1+cGowedeIQ4XvqSwM4rNDgNvf9pibbpzLPbNp+oMcIIlZ95/0NC1uWTH24phoQUSSMBLsunL9w5WqvpbvUPUuSYprmiMYGJdvcsnASXAmdhkvO3eh6f+3OihmMe+iRjs5OmCDTNdOqHFjl5rpUvqFx2rSxHIYDJx6Ri7cL63Yd1Q1XkLS+vkJDbTrB2emkhrVprNGsiMKH2AkC+9bqdZGShf34zYfrfvD9b6REjo/EyNUZlqNuIaLjR3i068Dh1v2H8/ma3UdPv9LVN2bCOJF4aZHnqBUFnmxXoZTJZW51B++t39xVttVkYs3mHcuXL9YSVOpjo34fPHcu3AP1zpX4GyvpukalCpyB+/95f/P2Y5ei9ChHabgJ47LzkBuRSsUT46cbGhte/tZrtofB1xYcRWeySu2Es+c6fvGrD3q7CSIGdGK45H/+/a/VuvEhV1/y0kRpCsWslm40QjUzctK1Tn3Dtn2mTkybQAnPXCn855/+8rbO+qlRltiYaJjisxlZSS1ctODR6RMKZpBkiBUQMyI/+dW6Hp/3lFo+M/JWt71+yykbgLGIdiIf5oMKGwdvVrbJz37zrs9KtpgKs81vfrilijiVuRe+wEnW5DK9Jlm/+9ixa72WWldmkruPXf5g4z6MBzpOD0RGIcJQasAH3BfkIz4+B0RCypWyqKgwchWbbN2+V9Rq4A08NhkwyeNnrvVViCgJHoKUiCgyO2XKlEQ6UzaduqYxps9XbZIaMc4jwq/eWpMT4ArItt3H23squsOJ2Ya+osVLScv2RDXFaxk0diPp8rXbew6clWS67Btbd9sBr+YapUQ
35dEZK2z1cMp76+fuaM6SKD13FlQkW7Ryf7jp9l1YzNSLc6y8ncyI83tnb02rAwRE7A0YcBg3BP4ci6ja1VoJ7ImKFghMqpK+0Hj56P3TSmP+C+gU3JJOu27rI5Wcw0eELK47Wfv/2eHtEFo04PwtAfrsWQDv74HBAZOKmMFYTQml17Tp8+e1HgJQgJzysuEfYcPn781I2MivCOBiAaR6Y9Ur988TzfLMGcB75l+7akiqbrbNre2of1sMn23YdKRbjZgJfE0DdZDkICI0F9IzxgJt9wrb13/ZY9cJqdBt54UDddBNIYNJSbi1w+cltmPTqmOQehRjgPeygrZOvOg1fbuhAYe16AVIgVlU+27Th98RoHHYWZkqH1PF7QVia/W7MBHh9rxWIWrFwomh+v3wyoMQgSwU3RYNAk5PDxS4eOnYQB4QXJ8fxEInvtZvv+IzfRWcAwCO5h2SN89AfQg1D8bBDpFFmWlwXDJ+99tJYRBPgMGkYxgseItzGITdu6qtAV2hMaK4Q8s2pZU0O2r7c9ttFhqQrIwj7d3Hnw1qHjV89cvMkksjBSjmNxEheFrqJwtlVxPVtS1LrGUZyS3Xf03MmLZOPW020dxZCVdMM09YrvG7LgphLcc8+usizPNC3XjcrompB1W7bbIYcIDCYjmaupmA4Udt3WHd0QUtODWocSB2iOnr50+vwlSU6JyZxlejyvjRo7Cbp15MRVYAdPgTQHvRXLZMPGrYblCYoKuYMLLZsmdGX95u1lC/6JlA0EWvGEB8HX//MOiOgP550DPxmO07E4J68cOH5SUbO+G2Fl/JAPuaSUym/ctvfyjRKNtuCjqxYEfv6Mhm+++DQTGEzkqElJUOSQRSQs/ui//+ydNZuvtpcEJYWAHBJam8+Egc6xnolMmWV6+oqdBZ1VcrfL4X/56bu/W7PN8PjAjtK5WqTTyDIEzm6ZNXX86JwsCoKkhBwTcGT7kfYDpy8ayMiRC3FsxPHQ3UzDyF2HTuw+ejFSpDLsFkeKPvnFO+/BegAUQUqyvOYzYnefaVjsO++us33quIGgbpEz5zv2HDiMeCBk5apuJTI16BBruX3voattBRvxHMJSD5JNcfR8qCg94J1x3AGx/9qdT/SLlYTl3ti6s69UdYGHoCCMjkI24GWHlXvK5lvvvg9DAY1OJnELvZNVKxbW1aWpqoJ7YBESM0hdTp69vu/YRUZKeZGA0MGyjHKlp9J5Y9VTyyRNAgKE42G5Qy7hc+mtO4+evXQbMQCRNBolR6Fe7qlJy69/50UaSvQfLEEI/86HH+umD9sC+yFoSd2wEMwbPtNn+B9t3o3gFGeVkEOnb23esVtJZjB+yEFYdUUxaVVtXk7uO3T87MUyDB0kAAr7i1//hpNUWUuncnkiKhXDlBMZiCQsxt7Dx3UHWoTXs/2o3RnKnREBr/sPSCKy+ss3e/YcOpKqqQXxwouq4yANkwQ5hTQ3U9Pw4cfrL17qQyCBzrE6nhs21GeeWLkYgoJM2APrEwROyKRqR7B8WlRykRvykgzls8t9oydNeOXlF6ZPnxxiEZAxcKLHikRIRWLacllJTsMwYWHQuaqKU6dMmDhhdP9qY2BwCIeP3zx47LSUa/AMTC4mxmiOyOsI91npyOnzpy/1Oizp0MnazVvlZAbBWBSJNL8kvG3YqYaRiUyeFbQ16zfD8UIATp7pgxgi+2JEBdaQehuER3EuKyiJT7bvudkByabqSWGEKGHQ8dEPHSirOKTG6AacNzUT6LpoBjv3H2nvKbFiIuQgRFzge5Aw3aikm0ZKqYwTims+2Y5uEb4IEpcS2dokP3vqpKTAqEwk06wZvlargtYSZNOxiMAhzalJ8Gyof/ebT88ezyycNTXyq8RH/BnCEgWirGRyASPyoiKBUHEtYlWbcomVC2c3plkBpBmNiimImFVf2WLhSmrqWE7yK5aqJeBe8o3Nphu1d+ut+07CirX3WvuPnElnGyu67XmRyEmslgITYNs+1KKjtworfOaaW3TIxh37UrUNUHnDcktdBeJFipbSdR0hsJqu3X/4JNbMhY/jWbBwkIPYEdwTPxbQ9eOIu6VSAXf6LAuwQyJ+8eYHhifakRzCyhZ6auq0iJRF4jpGBVmRzWsb9h670kdovAWWBz275GuLHl88eRJTLHMWDGA28GRWVJFPh3Y1meAio4ur3lrwSMNLi6bJIXlm6cyWmRM5GWyl6YaIZMKSXubVVF+hCjKAdaympPjEnOlPzZuZIyTBehrm4JNCmfzq7dWhLyLp88o6Z8NMCJ7t4AnXDcNI1k3uvdXb9ICs/eTg5RtFw+E1NWt29ZpVM0Qg6vtg5OAhtZqRV3qNLYfPnmgja3bsL1qgVkQPSZmcIUTwTBu0CyIELxDVXMPf/fqtgkcsWBIWBrQK09wvg4MkkXpuHH4mk4NEwpBBXt/57RrL5tREvRuio1DKJKvlLpF1eSQLkUudtZwoWsGHG3ZYYF2R/CPs4EhaIsta5gR6xakYIp9QkrWgpxCBEEmIfAdQysR94YkFI3JSiiXNtYmWx6cEVoWJYIFh8QmfSsbrDPsA7sVzyoUlc2emBFjZqAovhLUSyabWQ27AiXIC+sK4QUpSPNPBqclKtWokEjVqMl+qRD/68bYDhy8oSi1LJDDCiXxDOpGEC8gkk1HgVQ26yGU72Lb/6Eebd/QgjGQQWSZZlgsKRU3T/GIfGwQcx8HU6FYAlvbDda14nKYOlGQETvcOEDAxVxGHkXA6jhcoiGxM8vH6bZYH3phD4g+GQ5E436mKXBgFbhjAmgecpCFp3QTPo1MmAp5OArfCkKVLFzY1NbiOBZPCI9iF6Ae+qqp+4JfL5Vwu98ILL6SQeBNSo3KrVixPalIICt1zsDQCN+A/ItDjTJTP186c+ZgmI5NxxUTGIsz1DmPN+k1aJssiy2VCYM2BjIPrRM4R8nA0cCAcn3Q9dvOWXR2dBRgIGlb6rMLLgeMiVvcsXeYZ0ECUy4miE6fOtO7cbdpgvkGHg6UHeQTq3CYCC74dDDQLNixiqrq7+qNPwBiBteUFmabQcSpIvwd+Uf4Y10NE1LLAWRbZu+/MrY6CqGSRZBADfbGOa6gKhm2AMeAYyvx7QSQl0m3dxZ0HT3bp+BO2ltgBGdPIL1rcomqij6jbNnmeejWohut6iqIsX748m0NwB2Q9xK4NteLKpYtUWSB6ibimVa30c6lRELIMu2rVU9lM7LWCEIYXwn7w+OnT5y/Dy3Mc5ocJMq5ZSkpsUpQso4ooxnV9BCKsRFmyStWCobRtF2UJs1KsdnZICMFu31QENpdJh6EHktjxg75iBVDhwVKpBE6jpkbTS50jG2s9y6Sw0vcL0P4zZ64dOHgOMIG6AjMIzO8ebAS3xkBI/X73Z5ihXvFat+0hfMJ0GFnLkFQGa2IVu77+tRWPTBhlGxX4JZDcmdq6ou4g7l27eScCa1milQEweEWbvP76txEM0qibQdiKT6ZarSLWf3jiw/PmzYupEOQ5fOS5GZn8xavfEhDtihyNeaslzA39Q9jx+eqrz2JUCEEUTQl5obMc7Dx0omi68JhlaGwQgvAirr580Zxpk8d6ViUEjwhlgssPUdAhbuDb8E6Mr8mwDcaY0fnvfeclUMZOtRA6pmNayLKTqRzoepq0gMKBC2R8q9z5zJOLHp82kQsCW7fho9lkxvMFQc5s3LS7WKG2i7Ibgw74crhiWlfCJ67zPHvt2q0duw5wXNIFNQfhBvShDwLxuaeX/eX335BF+KII8gUV07GOrHT03JVzV2/ERiIAMkhjsjVMOqNBblGXQ3UKIKJnxKQ8x2ezGUUEwwgC2RDZEMFgTZbBlBiW4TAPWewvPwTIexkmm6WMDgasgw0npHX/UXhbGmMBIU5AgyhwGnLqc08ueOmFFek0OBszZKHStJLCSiyv8oLCKBpj6F3ZBFk4Z8pLz01ZMHdG4Fk93Z2CCA5HsJwAWSoCuGQyBRCQYgLjN159ecWS+U35Wvg38MNw6EBQUDK79hw9fPQ84g0K1iBRxEojqIW3ogjiKJXs1m27YIzxDCJgmFsKIhM99eTy8WNzjz/eOGHcQ4HrS4oCAhoBIidrnZ19GzZvMwJYKDp40FknTl2xXAtekIJE3T89MOdCoXTx4hXAjcswf6CpYUjOn71h2zb+hAAJMByxGaUjZJmzF6z+YQH/Kz32xq17wJwjcnYRofCSIPAQtZmzHp49K7NiacP06WMjpkJYO4zAiLsRbxHeCliD4QyseH1efHL5zLpa8tILT9PKpamnEpASeGQhitNZRH9IkUFvL54/67HJzGMz8i0zZ8Mzug64fNQwJDhX3fR27zkEE4dFROZN0+j4hFhBcxB8wcOIuktu9VW3Hz5V9kD3UzeEW8Szsylt+fw5WYHkWfL0shZV8FTIKChpnpdVjdFS6zZuv3S1A2UynzKw5L3ffXS7q49W5cBzhjwTorBHz1ttXRs3ba6CDfKhvpoXM6Zr1m70HIfjxDCIZEUB3H5EHRfDsR+vW4veYIZAXPZUnK17DkW0JMCAHgfLIGC5PHverClg5GAWWmZMyGdg9GwqEMiXHMO3K45V0Y0Sy/mTJo565KE8yjoLZjaPH1UvJRVaLvMDUZRULeOAi7dNWkYL9Ne/+QKC2qxCZs942LOLJHBR/4AkmXCwrHj26k0YsaJJoyRYQGRwcEP0tkBk02Mcli8H5G9+/u6xtkpZQuZgq/lE6JlyWpsyfszSmROyMFx2+G//Yv7sqSO7rxwnoa7yEThHWUoaNvfLtz8pBcQIyZGT5a3bjyWTDalUnvTCUag4o0AhoZzNNWzbuW/X3vMobhQxU0748OODew+cyNQ0WWUjV9tULdvpTA2mAi4IQztx9tyZy30oXSKB+69//ysumYckIiSGKqWSmds32kc1Nb7y7KysTJSI/OD1paRaAEeERJpg2VDb4SRGUODHZZF/9qnlYxqlWoXkVfIvXnteYvxSXxcWzCjroe8jhoYFL/R2PLNi0bMLRmV4kiBk+YJJEx/KyayXQPZuGbwsOYKw69jx1oNHGE2wOcgZreNQMDkGAugokgbdv3C9fPLyjVTT2BBMYUL0ApP4un37+pMLW0YmSRJKHnlglxbPnjJmVD6RkAIP5iHiYOsE9djp65du0nTi0ImL1YKpG5B5huRqUV9BHRSME4IQcCSAoHXvEUQdeB3Ssks3uwJGgmGS09lyqSrKsmFWqaZKvOV412617dp3EH1evFHevvdgxYD+QSzQm+9Y1Qnjx3zn5efRrxS4YhiiGvL00kU5RZJhlVGygmeirwZHwj88afK0yRNlhiA4TQrksUl
35jpk0ai6CNCfyEJtvViiQynlNtbqxdtrgFfLPKE00kTQ3k+aeXOHpvYOm1tWnTQiDOZ+sa//Znb3b2UZYIto5WcKm9i8uSUBlIB8il9q4iQmOCN4Q+5+rELjWOqFm+YEZcyiSyICosWblo3ujGOglOwzFRZKGxlChfudW5Y99J4Lj34FEukYLbsUwHNBe2MzARuCRkFNiWgFQt0br74MkLFoLKyzcKyO0NmpJBbgCFAWoHJ/IrGnQRtqOruHnH/nNXK7sPnLJQM0ZdRtEgowLPlbvaZM5Zvng25gGTg4wQM3nj9W811GUcAzpo0gJVjCD6qcs3JGgRjKazkkgmTcitWrHIrPahcABvBmeCE3EPBK9l1mMgDhF15sANReTrzy1D/ASexKqUUJvQZK2nu9DTXV6/YTvqdNBouCKoBguyQBWVIlaOJb985/1ELl+83ZnLZgK9KAUGsQrPLp7dnI/9EcpBPAPXN2VcYs70KQmFhyvwfA9RPrRGy9Z9tHHbL99ad+rcxWxNHi4lNHTHNljGxhlFdsQFQEpL57qK1Z/84q1CQLbuOnL+4i3wgyBywDNifaLQSiicC57RNmQ1gZT6yvWet97duHrd9kS6sSY/QhI1V696jpGrUZfMf3TC6P4wm3LDSGsmjE3OmzNDAF3HsyJcnE9ZM6iaafu3u2mSUbIphQUH+OLzi1G3Qd3QMnozGs94psRHj019pCkvyjyRWBDJIZYhnyYrF85BeCezkYgU0PaIL4wfN/XXb30A34I418cWjAg2mWUgmZxAfvr29kBIlJF5aECfSasiYxVH16qvPr8yjczAReJVQrojYqVssmLB7NoUVoiBC6hUKlVoLyPd7Cmv3rRVd4NkrhbZJZ9KIdAGkw2jjLSQ4RhIXFexzMrpjdsPrN3StmbDTgcpLi/TMbgGrJJtlSulbmLpxLJkWQUDhARq7aZ9F64XDJsFI439I2IiqUjM41MffvUbTyNhp8wM1AzJMBwhQ55+YmldFu7FUliJC5Bh8fBgV6+0bdu+F4NQEc0SBO4WwqyvPbMk8nXPLkVeFT/GNtcvmj8XwPX3qYossAHr/S9f/6Zb6uR9Wy8VrKqVztSVC157W2XdhjPwutRsICtAcbjiOCUPHPqmgFU4MQHCBztvUAxLsP5zS1rmTcyhX2S4mXTGt22WDTQuaq7PLZk/F4EWlBQWEUA4oA/lt
35EHFSoY5QxESa+47iHz0psYU/HbEYiEdMPSgTivV4M2311y73iXWj5bStTQGcCxZ4vI1SaRbnMwn6vLVimGjU7W2rxJxApJ6hWEVaD4MMYzN9Gnjx4ygQTqHWIhuxsDGqEhmoappFBKQ2MFXCNhdgzg34No6uvYeOlQwqT7B29coCqKrlcsWpjSOqr9TCnxj+eIFjfkc0n8aqOFk8TgBji2Ppl595bnutmv1mSysGTrs6TOS6fodOw8i8IY5LFYi1oiclCRtaT3aV0V1CCmmhvABvDyih+Z86rknFiJYZl0LQo6oAuoLPLH1Y2SDsnLZIkkAbyVwAmgUMWJllEw5KYlKhj5QH0O2YaxYvmDxornYsUQjblhFJQFeUUzXn7vcxiXqOVFDrRdGlcYljPvMMysenzYFBg6TRCyJaBI8IATIJypdXRZhUBg4TnNj/plVSxIQKtcCgrEDATphpeqmefKNV56vyyUjOCtWEXkJ+3yQHyJHPnb6AoIH5Ks+8ZBnznm0afqjkxBagzyvzWhPrVzaWANSk3ILCOLRG6BEro0M4OVnV40e0RC5TlJNlop6Ta4RCgl+7OQpVHhIIsWwRsD3OmTvoXMFHcUeCewuojfbo1xDU31u5Ihajg0tWwdvjmAK7o4E4EExTTJlYhpslMR5Ig9LT5B1u5ViMpN2PdehcwsF5Lt26S//2YvLF8+U0QyGmuEQvvb2lmpr6uFimppGWoUiJiWASgAHaldef3n5a9/4OiAATYDUT5JEy/XUZA65Ki9ALIABqIpqc312/AjZdx1UawAiogC6PQAV1qRY9cnCSZmGfBqMMIu8ipM9n0P+2ltwWvccxq4w7DDoLnUDICQBK+bPccs9OUUc21A7ZXwK3eM6PDqSV7rxjFZWqH1sqsstaZnT13M7CDwpoUnJjMMIt7tLBxDN2bBtCPB5rvXg1fWfHOL5WseICm23iEq4BIFffe31V0Y215c9XUjJdmgi+kWtDpmjG1bh3CGb/+Hf/bBw+5JX6XP6OvRyF70TuWpChs3KZSSr6+rkKWOmjCRPTMk8tXiO1XULGYZZLIem19PWFRh2d1sbtkuAe8mrSlApvvb8MxPyZElL7SPjm4xCJxvaIrZJBS4nRKBFnGIvAunR9dmszP7w+99OoBQYOGBDsK6ourhg2iit4Qq83Wva//qff9MhZldne7XqJ1PN6dQYJTnqf/92XXvJlcQUaBbYGqQLzy2Z/8oTy/TO9n//1z8EfLhKsyka3UPvkWshb6IbPUY1C19/4UlJgm44mYaam5WiiTwwlX33o7Xnb0UlhDlwV5u27kRNROZEcBtEARPgBF6lZfZjo5uaqHSzKJXEFHy8Oj6PCJ1GmNDOWY9OfO3lrymM29SQk7AzkzhGocssdDblM3bxdn1e/esffBdZACqcX39q2bhRI3jf0tgQ224acsm6jJaWGQleG86k69bE0SOWzZ0JDwtb/uTSBaNG1PLEZjwd22OgCaGnyyrq8Lrd1z7t4ZHNdWkpIhklyYHSAqdMJTHOw1CSJWGCD2dMHptNwQABMtTDwDW4rhOqicz/+Nv/BYQQkAFEvKsmCaWe/OJTy0fX5+JxAibcx5SpQe8/IDSwLc2NNcsWzzH0Hl3v42UIE4ywB/Lmw4/WlcqEvXaptGPzpsitSJHOukXeLXFukXX0JfNbGutzVJ5R4qSEIQgwmvLTrhF/0YiIJBWydOE8ECRmqScjMw1pVeOCXEIEKFax89GHR8+d0YwAE3A/PrV+0dzpQmTyRBciHcwXTp6YfGRi/1Fgl5e1zJ45bSTSRsxv6fzZMyZPCO0y4xtsoEduyTO75LAcGj3l7huvvvg8Kt3g/SrlAvoGfHRLLJ03TkYifFIUcwr5q3/zvYYaJYVivdFeq4VypNeq0sEdO252dMmcBuzpPgCOzJv72Buvv9xQh/AXTgIf8QTjjW0DICJ8IKSpnn9q5UIuMFy9W2FMxC21SU1mmD3btmPM/Orf/ra340ZD00RP7y6jzhtaGrTH11tmTEVYg1chSoDW8LC1MIQQRhqpU1zwwpRMHhpZ/8i4kX0l+9bt60jFWNNIpVTXrDZm5KeXzOWdgE3E1WkLYjth7ZrVyDVsKzTgptEh3TYD28/KCjvn0YkpgbI7CIMac2TxnBnnT58oGxXfs8ACg9JyHD4l8aOaauY8OikhIp8iFSSDlJ/AfxgLOGjIIxgfFvV5GLJZk8fUYCBGr8q6HqKwrpsJNuNZpdZNWx7+3mtg9zELzGXM6LqEUE8nFUsHPrASd6BE+AlPhhfQjSktM6dmlKjilkRPrBb6XEUOguBGT8eurYeZn63e49ge6jKW7V64diXfkAObBH18bvFirBdmhXXA3k14QrqVGrwcB8KPBhUh0i3CoG576Oj585dvmtQjU6Mc71nwsYNr8cL5shCklCDiWYuIiEZ/8vM1iP6cSllTkNlhpzD2hYKYYFWB/fYLi5D/YscbasrYFdbZXUXCh/I52Hmkj6geptREpdi7aM6s6Y+MrlGJo9PCkaRKoNoQ58Q4IgDA/GngjaTHZsiW3adu3+pRlFQJwSkkAMkudcTy155ZhYq2beqZdBpyjEdA00HX6MPxgZwa33gEIwQtggGA+0NG99bvtpR1FwEMyjVpNeEaVqVcHDVqFNNejmSZ6AZB7QXrKAh0TSDtwA5WA6PDJ93uQRXZAIgObYCVR7olwH1hCDQLvl0Z0UQ3oWEcwB2PoxFiLtDXAkurGSargfiljT0CicMWDp9ShuBAaOiDdwFBmllGkRMx2MQoahwlgOA96OohPqZeEuKDrcgo3IoQOjfecI9IEToCIJA2ACWoCJ0+PDVSenBhoH0ZXbexpxFXcWB4tu3VpoWSbokgHAEcfSDGEcYA5h+BR4wgGlPc6TzwSeNRKA6GWsUOI4GgfIK0VcVEaOqHDapcPFueYMcf9hI6gS8jWcJGe1B2iMWpBqOTeAAoj9LdfkAJfwNwPE6pOVCXyeYUZRdjqLHhUEvwaBJaFgfhFX2omAgOgpFAwUSujVVFOVSTxRhEGHRaM1Zp3wQuG9EoBgCnAKagCH9LZw5RdEMnEBUNpahkUosMDxUCGoEEvs+BgUMYRscUI4ivuFQS2QqWB8ZIiRLYKHXnSAio9xMZlT1q4mGdwPlRtxn/A2zgLehscfTLNUZFi2gMvBd4JVEIbHhmN0R4DWgUledLJVQoRWJbJJfEEsEERr6FglnWYzxqXQAf1g4n7Sj+QY031IWCSBUBTKvnMWC9Q/jKuAm9x1dK5VQqCd0mYHb9EnqgsglN5ZgaTTV9I4kAikbTVBJxYA6UisUwA1dSU9Be/Ap4LkHXnr4c8oy9tvS+Z5NIwxf2CeH9vuUjqqACc/8R1/5pBR5QexbK8nHYR9vhiqxhfxY4IZ8VKGQUfbwpnhdt0X/Af1IJogeksn/ONLNG7MOHqizDugt8MoHUm251wkG76D/uDilekH746DWEyrFjoeDFt2jXdFsF7t19pr8LepsOCyjjng+MgC2eitnNTzWP14M+hF7uPEX/xPF7feLKwFv7h9T/SXumpDJLafW7k4iXBms9cPQ/N/A0vXb3DghB/B81tDiEi/c1u28IVHTvjAIDvNvjHRBpN3eOe4AOdIOQ9s49fNPZ0XEDVWoz74194N7d2dJ7tDQQf9OP2Kt/Rvu7DfDj7sgGX/zi34Nf0d+yf2m/+Kn+u7/3LB4cdKV/He+N6PO6hU3/w8enH6bADaz7PXz+cCd/vBafHt6Xfs/vPT7oz1hEHqC/BwLxAfr53CaDxjRIjz63+f/rG58a3j/05V8exC8rfQ/Q/p7C/EOn8ad97s99/H9a9AbejvBt0DgeQGr+6O0HDefP5eewJA7BSg326EPQ3T/NLoYlcQjWHWTMveNBEP1jt783mj+fXw+C25/PbP5EI/3SceKXRf2B2g+OCgZHC38iUL7sax9ojl+2039q7YdBHIIVHwZxCEAcjhOHAMRhSRwGcQgQGIIuhiVxGMQhQGAIuhiWxGEQhwCBIehiWBKHAMT/C9I2czsW83WvAAAAAElFTkSuQmCC"}),t.createElement("image",{id:"image1_1391_21392",width:264,height:262,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQgAAAEGCAYAAACZ/AuPAAAKsmlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUE1kXgN9MekgIkIB0Qm/SWwApoYfem6iEJEAoIQZCsyuLK7gWRESwrOiCiIJrAWStiGJFURH7giwCyrqxACqWf4BDcPc///+f/855531z575775vz7pw7AJBpbKEwA5YDIFOQIwr39aDHxsXTccMAQi4asAb2bE62kBkaGggQmZ3/LuP3EVtE7ppN+fr35/9V5Lm8bA4AUCjCSdxsTibCJ5Ah4QhFOQCgDiB63bwc4RRfQZgmQhJE+MkUp8ywZIqTphmNnraJDPdEWBkAPInNFqUAQNJD9PRcTgrih+SFsKWAyxcgjNwD18zMLC7CSFxghNgIEZ7yz0j6zk/K33wmSX2y2SlSntnLtOC9+NnCDHbB//k6/rdkZohnYxggg5Qq8gtHZiQv6EF6VoCUBUnBIbPM507bT3Oq2C9qljnZnvGzzGV7BUjXZgQHznIy34cl9ZPDipxlXrZ3xCyLssKlsZJFnsxZZovm4orTo6T6VB5L6r8wNTJmlnP50cGznJ0eETBn4ynVi8Th0vx5Al+Pubg+0r1nZn+3Xz5LujYnNdJPunf2XP48AXPOZ3asNDcuz8t7ziZKai/M8ZDGEmaESu15Gb5SfXZuhHRtDnIg59aGSt9hGts/dJaBB+ABAQgDdOANYoANUnsOwBJE5fDyp84o8MwSFoj4Kak5dCZSZTw6S8Axn0+3trS2BWCqZmeOxLvw6VqElM7O6bKQGmKMI3WydU6XVA5ASzES+tGcTm8PAJQiAJrbOWJR7oxuqpwABhABBfkaqABNoAuMgNnUdwE4A3ckU38QAiJBHFgMOCAVZAIRyAPLwRpQDErBFrAdVIG9YD84CI6AY6AFnAYXwGVwHdwGPeAx6AOD4BWQgHEwCUEQDiJDVEgF0oL0IVPIGmJArpA3FAiFQ3FQIpQCCSAxtBxaB5VCZVAVtA+qh36FTkEXoKtQN/QQ6odGoLfQJxgFk2AarAEbwBY
35wA2bCAXAkvAhOgZfChXARvAmuhGvgw3AzfAG+DvfAffAreAwFUDIoJZQ2ygzFQHmiQlDxqGSUCLUSVYKqQNWgGlFtqE7UXVQfahT1EY1FU9F0tBnaGe2HjkJz0EvRK9Eb0VXog+hmdAf6LrofLUF/xZAx6hhTjBOGhYnFpGDyMMWYCkwt5iTmEqYHM4gZx2KxSlhDrAPWDxuHTcMuw27E7sY2Yc9ju7ED2DEcDqeCM8W54EJwbFwOrhi3E3cYdw53BzeI+4CXwWvhrfE++Hi8AL8WX4E/hD+Lv4Mfwk8S5Aj6BCdCCIFLKCBsJhwgtBFuEQYJk0R5oiHRhRhJTCOuIVYSG4mXiE+I72RkZHRkHGXCZPgyq2UqZY7KXJHpl/lIUiCZkDxJCSQxaROpjnSe9JD0jkwmG5DdyfHkHPImcj35IvkZ+YMsVdZcliXLlV0lWy3bLHtH9jWFQNGnMCmLKYWUCspxyi3KqBxBzkDOU44tt1KuWu6UXK/cmDxV3ko+RD5TfqP8Ifmr8sMKOAUDBW8FrkKRwn6FiwoDVBRVl+pJ5VDXUQ9QL1EHaViaIY1FS6OV0o7QumgSRQVFW8VoxXzFasUzin1KKCUDJZZShtJmpWNK95U+zdOYx5zHm7dhXuO8O/MmlNWU3ZV5yiXKTco9yp9U6CreKukqW1VaVJ6qolVNVMNU81T3qF5SHVWjqTmrcdRK1I6pPVKH1U3Uw9WXqe9Xv6E+pqGp4ash1NipcVFjVFNJ010zTbNc86zmiBZVy1WLr1WudU7rJV2RzqRn0CvpHXSJtrq2n7ZYe592l/akjqFOlM5anSadp7pEXYZusm65bruuRE9LL0hvuV6D3iN9gj5DP1V/h36n/oSBoUGMwXqDFoNhQ2VDlmGhYYPhEyOykZvRUqMao3vGWGOGcbrxbuPbJrCJnUmqSbXJLVPY1N6Ub7rbtHs+Zr7jfMH8mvm9ZiQzplmuWYNZv7mSeaD5WvMW89cWehbxFlstOi2+WtpZZlgesHxspWDlb7XWqs3qrbWJNce62vqeDdnGx2aVTavNG1tTW57tHtsHdlS7ILv1du12X+wd7EX2jfYjDnoOiQ67HHoZNEYoYyPjiiPG0cNxleNpx49O9k45Tsec/nI2c053PuQ8vMBwAW/BgQUDLjoubJd9Ln2udNdE159d+9y03dhuNW7P3XXdue617kNMY2Ya8zDztYelh8jjpMeEp5PnCs/zXigvX68Sry5vBe8o7yrvZz46Pik+DT4SXzvfZb7n/TB+AX5b/XpZGiwOq54l8XfwX+HfEUAKiAioCngeaBIoCmwLgoP8g7YFPQnWDxYEt4SAEFbItpCnoYahS0N/C8OGhYZVh70ItwpfHt4ZQY1YEnEoYjzSI3Jz5OMooyhxVHs0JTohuj56IsYrpiymL9YidkXs9TjVOH5cazwuPjq+Nn5soffC7QsHE+wSihPuLzJclL/o6mLVxRmLzyyhLGEvOZ6ISYxJPJT4mR3CrmGPJbGSdiVJOJ6cHZxXXHduOXeE58Ir4w0luySXJQ+nuKRsSxlJdUutSB3le/Kr+G/S/NL2pk2kh6TXpX/LiMloysRnJmaeEigI0gUdWZpZ+VndQlNhsbBvqdPS7UslogBRbTaUvSi7NYeGNEc3xEbiH8T9ua651bkf8qLzjufL5wvybxSYFGwoGCr0KfxlGXoZZ1n7cu3la5b3r2Cu2LcSWpm0sn2V7qqiVYOrfVcfXENck77m5lrLtWVr36+LWddWpFG0umjgB98fGopli0XFveud1+/9Ef0j/8euDTYbdm74WsItuVZqWVpR+nkjZ+O1n6x+qvzp26bkTV2b7Tfv2YLdIthyf6vb1oNl8mWFZQPbgrY1l9PLS8rfb1+y/WqFbcXeHcQd4h19lYGVrTv1dm7Z+bkqtaqn2qO6aZf6rg27JnZzd9/Z476nca/G3tK9n37m//xgn+++5hqDmor92P25+18ciD7Q+Qvjl/pa1drS2i91grq+g+EHO+od6usPqR/a3AA3iBtGDiccvn3E60hro1njvialptKj4Kj46MtfE3+9fyzgWPtxxvHGE/ondp2knixphpoLmiUtqS19rXGt3af8T7W3Obed/M38t7rT2qerzyie2XyWeLbo7LdzhefGzgvPj15IuTDQvqT98cXYi/c6wjq6LgVcunLZ5/LFTmbnuSsuV05fdbp66hrjWst1++vNN+xunLxpd/Nkl31X8y2HW623HW+3dS/oPnvH7c6Fu153L99j3bveE9zTfT/q/oPehN6+B9wHww8zHr55lPto8vHqJ5gnJU/lnlY8U39W87vx70199n1n+r36bzyPeP54gDPw6o/sPz4PFr0gv6gY0hqqH7YePj3iM3L75cKXg6+EryZHi/+U/3PXa6PXJ/5y/+uGJFYy+Eb05tvbje9U3tW9t33fPhY69mw8c3xyouSDyoeDHxkfOz/FfBqazPuM+1z5xfhL29eAr0++ZX77JmSL2NOtAAoZcHIyAG/rACDHAUC9DQBx4UxPPS3QzH/ANIH/xDN997TYA7C/F4DIZQAE3gRgZxXS0iL+KQkAhFIQvTOAbWykY7b/ne7Vp4TQDUAB0j9Fej+W/boI/ENm+vjv8v7nDKa82oJ/zv8CEmUJHJZlxBIAAACKZVhJZk1NACoAAAAIAAQBGgAFAAAAAQAAAD4BGwAFAAAAAQAAAEYBKAADAAAAAQACAACHaQAEAAAAAQAAAE4AAAAAAAAAkAAAAAEAAACQAAAAAQADkoYABwAAABIAAAB4oAIABAAAAAEAAAEIoAMABAAAAAEAAAEGAAAAAEFTQ0lJAAAAU2NyZWVuc2hvdO60un8AAAAJcEhZcwAAFiUAABYlAUlSJPAAAAHWaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjI2MjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4yNjQ8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKdYEIAAAABxpRE9UAAAAAgAAAAAAAACDAAAAKAAAAIMAAACDAAA/hieA3ZgAAD9SSURBVHgB7J0FgF3HdffPw31vQVqRY7Yis8zsyIlBhphRsmXGxA462DTt1/ZL2/Rrk9SJkzRxzMzMzHbMFJPMbMmyYHn34ff7n7tXXm31tG8dyXKkGWkf3Xvnzpw75z+H5kxihYlbVS2UQIFAgUCBhVAgEQBiIVQJPwUKBAo4BQJAhIEQKBAoUJMCASBqkiYcCBQIFAgAEcZAoECgQE0KBICoSZpwIFAgUCAARBgDgQKBAjUpEACiJmnCgUCBQIEAEGEMBAoECtSkQACImqQJBwIFAgUCQIQxECgQKFCTAgEgapImHAgUCBQIABHGQKBAoEBNCgSAqEmacCBQIFAgAEQYA4ECgQI1KRAAoiZpwoFAgUCBABBhDAQKBArUpEAAiJqkCQcCBQIFAkCEMRAoEChQkwIBIGqSJhwIFAgUCAARxkCgQKBATQoEgKhJmnAgUCBQIABEGAOBAoECNSkQAKImacKBQIFAgQAQYQwECgQK1KRAAIiapAkHAgUCBQJAhDEQKBAoUJMCASBqkiYcCBQIFAgAEcZAoECgQE0KBICoSZpwIFAgUCAARBgDgQKBAjUpEACiJmnCgUCBQIEAEGEMBAoECtSkQACImqQJBwIFAgUCQIQxECgQKFCTAgEgapImHAgUCBQIABHGQKBAoEBNCgSAqEmacCBQIFAgAEQYA4ECgQI1KRAAoiZpwoFAgUCBABBhDAQKBArUpEAAiJqkCQcCBQIFAkCEMRAoEChQkwIBIGqSJhwIFAgUCAARxkCgQKBATQoEgKhJmnAgUCBQIABEGAOBAoECNSkQAKImacKBQIFAgQAQYQwECgQK1KRAAIiapAkHAgUCBQJAhDEQKBAoUJMCASBqkiYcCBQIFAgAEcZAoECgQE0KBICoSZpwIFAgUCAARBgDgQKBAjUpEACiJmnCgUCBQIEAEGEMBAoECtSkQACImqQJBwIFAgUCQIQxECgQKFCTAgEgapImHAgUCBQIALEMjoFqtTqMXiUskRjG6eHU5YoCASCWwccd4UN9IJEI6LAMjoDF16UAEIuPln+jNdUvQQxPMvkbJUdo9gIUCACxADmWlS/oDHWqDXWe5oQJALGsjI/6+xEAon5a/c2cGakNw2H9+roWAUR9qkt9NYazPu8UCACxGJ+Qs84CBsLa4rvOrWqar1Z4rVoyGTG0Lq94RdG1/ivnxCKBDum3RDLJqy6vWLFUsnQqTR1Jq5Q5V3VF1fk5g18WPKRvfkPeo+vi4wKE6M8snU57NRXuVy6XuV9q/ncBEmf6d70kElHbPql3/qFl5kO1Sp9T9DrJsysmLVmlzwlokyxZ0lJ85DskSafKvIk+MVUXTQKq8OL1clWZakoJri4nLMtfknpKKeri2fCJcaALMlaiPWU9AsZKWnfjGp1RUTsT0bPjjKjyYbwGgBgGsYY6NWao+DyfyWEe/9c/PqJZWGOHxwtDV0sFhlPFcmk+c06JZ1is8FAZcGl+S1YZYKUiAyF6yNFjZ0hkM9wmYcVCwdrbO62pqclyDTnr7em1inh3kePxE+BS2zTYKqBSMqXhp8JABGRKAE+JBlUZdM3NLQy6lJWKJevp7bbmxibOq1qh0GcpwKLCZ/VNfU4AVl6PA5tXuEy9iA/LlbSVc9CmAXBuy1i+0gAwF60n227ZSqMlCllL8yybG3kesLX+6inpItSHjoVMxRpg/p5sxdoBokx3wsb0po1arbORsVAoWirZaalMHyDVavPKGesu8RSKRWtJAuBcKzgoVDJWTDX7eEhVeuppwgLnBIBYgBx/3ZeBAPEJODj/UfEnM6w/LRipnEw5OCQrRauWGRkqqQxAwUPlYWcyKQCCB93Xx+DjXBhYUoKYt6enx9KZtI0cO
35cIyMGSxUHJpIg9I9AE65UHM6e2J7rDAaxkQEEhkMgIcpJd+CaFSYZAhNaTE7HB7W1s77QJ5BBIusTBLRijgEkWZ6xK0K5PNMnZL3umUJJlltKShT0l8ynNJFHlOsGMiwXNMFcGJJpg7Y6vyDPbo6LB1ir02qgJN6igpRAaNlEKqZI0Ahe7RLbIXzEYUuBfPvyMHkBcLSBQZ67WcPdOYs3ub0vYaE0oBKSMBMnWDNMC7NXdTXzofSZXV/jFWRzviUwJAxJRYDO88T59tB4KDqh0IHAKH+DhDyueWLAOgqSFjY8eOs/auHvto9lwYHCDQbAzjmcCDgaHrxIQCie6uThs9epRNnLi+bb7JJgBM2Yp9RRvR0mwFAYSuiwt8ypXxtwXepS7oiABCn+O2CgQaGhocIPoAqOef/4u99uY7NmtOm0sMsbQQSxoCJLVL1/T0AmgQQ4C2rJac9VihmrKeas7pYdYFmBeZ37PWW26wlWDW7coFO3HGXFujUrCmOsV7qSd6cj1ibqkUPO8idJSEl0UkkCbT5cJK0fLFvM1LNNslI6t23YisvZJuQBXJWQXpoSvVh9pRsNZungO/V1RPrL8M46EEgBgGsYY6VQDBI+RPIKA3Xvixwp8YSp+ln+uh61gJVaJS7LPWlrytO2G8bbbZ5jb9tTfs4UefYCAgwiLeJ2A8qZyyK4gJVY1UgSJMu8rKK9qXJ33Jjj/maBs1YgRgUrbGPAMkvh+XedH188uCUCHVQIcFPkXEUzG52lgulyyLNKDS3t5hDz74gF19/S322FPPWjbXwPEIgDSjxfdTvwQ0BdQe9Vd1Lasll+gECLLWXW60XA5GrrajUpQtUxphc9Mp2xKwmNbbaV/7aDZSITTSM6+jJJFIBNmd1ZK1lBgrgBCEdFsHM4WVU9ickCqSSGkpwOCdTM5+ObbP7s422EzAopn7qxSqfYyXPsvznNKMpQp19GGXGG4JADFcii3ifDFvLYBwzuaoGNGZUA+d2aKrba6NX3UlO/jAfW3XXXazex94yM694GKb097lUkCK8zPo+GXmFTGiimwT0v0bsmlbc/zq9uMffM8232hjG9s6wsHEpQA/M3rxoUk9Cyvzh4wO99ev6yVBJLmv2loCON586y0745yL7Jobb7M+xNsk6oeElKKYAlDQebJVCFgEGgu/28Ja8Lf5WzLVC0BkrK+Ss+aGsuXK3ZZGBagWW62nuWiHdLTZiXPn2sRKOx3EiIhsUU9JQzgZJdtQSRpL2DYEEAB2EWNnBQNoAimAX6QL2jupRru7OW//tWKPfVhoADSarcVGuGEzyfOTFWIepqIUxq2MjJyl+U+7nqb4OQEg6ibV0CcOBgiBgX6TYTFmvliC0Lu8FQnUh6023dC+c9LXbcMNNrQnnn7WLr7sKrvj3gd8YGSxM4jZijCeGyhhPtkexIhlpI+mXNYOO/ggO3CffWzTDSdaqbeHmT9i2OgJLygxDO6FVJEykofAR8ZGtVlFAKFPzuz8JpvHldfdYpddfYM99fTTSBGNPisVkXJiIBFAFJBssthO1L/hD0e/9d/ESwUmLmMNlg8qkekBIJjtmdFLpWZbL9NlR8+dZQe3zbbGHHSsAg7SDeoo7mkABLD4uI0h5wCRsD5UBuRNw3ZJfUh40PehTKtd0TTSLhrXZdWepOVKWSaTBuvKVK2hWLU0Euq8PDYjrkkz2PIacMMsASCGSbBFnT4YIHiUMIoAgtL/bPQ9Ao6q9fUWbMLqq9ieu+xoJx1/jLW2ttpb735gd9xzv536P39Cl2emBhBUyvJm6APfxZBVmLpQ6EUELdvmAMPxRx1hu+882bLoI5IsBnokdNn8EvH//K9ulAQk9C6AkN1DZQEbBt917LFnXrBrb7rdLrjwIleBECNcHI7tD+pkGekijUjtfXSI8eqWuZdyBX8CDzyB9bAt02nZahPPoglGzNpRPW12cMdHtnXPXOvLp5m9eR5ye9ZV5MYoow5ICstYBjCQmtmb7nMmT5eQH5Bc5jSk7Kr8GLugaZQ91dxtub4y6gTt4Tbt8oCUEtbIfUuprHVyXxRdawg2iLqewBI7KQICvUbA4DeC4fxfP2O6+M8pkgDa5s2zKfvtbYdPPdD22HkHPBFF60NnfOGV1+0f/+Xf7Y0337bunj7LIM4nUStkLygzC0j716wvXm6AGbPMZkcfeohNm3KgrbvmF7mfztDfgiVqAq/9bYmO9n+Jf1PzhXT9QFFBhSjiZlWcxeyObrv/kSfs3/79PzBWzgMckGbwmvT0Ffx0GSXT6NpV+hbdPa50wXYsC98SpSZmZGw22CLeaegGMEda3hptRZ7LL2e22Y6FOdaa6EbKwuUpo0GdAJEw3BUARIXYhTKeEGQxgAfXckpei4SlcJ9aMWdPjkjaGaNa7RJsT7I1ZMv6A5yRSDtRRzKoNM3YSFp7s/YxRs2etGxZcnwOrwQJYnj0GvJs8VesTuijZtL4T9/lKZBFGjayHKrAd75xgk3ddy9bY+UvcKwIY6Xsg4/m2MVXXGfX33SLvf7Gm+5urEiCUF0wajItVyKxEQBDBobs6+qwHb+0jU3df19AYn/nf9X/v8pC+DU2NkpCULvVPkkPkiQEZqpMUoz+CoisLwJeZ517nt19/0N4W+a5qtGHOqIAHbk1pRJV1A/6GJk//1crlokfkqUcUgPMnOyyWcQpJLEHrMZsv31ft/3gow5bu4p0B1MadgTRhpf6+o2dIQJ3GRZRFaUWYPAsZIrEV2QwaufsY+59+Vizy0Y025+zzTa6gASIlSOB3SKNytfHZFLGUJqmPaN6Eza7mefKWMkX6mzDgJYGgBhAjMXxUWAQMYceLPwF07jYzu/zGRAmzOdytulGE+3rxx1lk7fb1vJpPTyYipmjvbtoz7/ypv3+j3+yhx5+hPokLURxcGK6BABRgolVUDbcjrHS2FG205cn2U9++AMbPbIZO0R9RjHVrXYKIGR3iEvUDzRs7qtjrooQAyE352NPPmW/O+0Me/6lV2ACGADQKiFlgAyRetGvDsE2cXXL3juBUpbsg4kJVMKtmYM2m0ODo7rabXJnl43WZA2oVgAHGRb1+Osplf5ZPol6oLEg9UIAUcbHmariQi7l7VXu9+uVKvZAPmsfEQcxGvtHH/UryqEqSYVnotGR5Hnkke4KeaROxmEKr8hwSwCI4VJsiPM1DjR3OkiI8UByGewEDhosVVQIGfPGjR1jR02bavvssStqwRpWLXRHjAhTFTB+9fKgTzn193bDTTfbhzNmWJb4AoXSOjAwGGUc051k0c4jiRR7um39tda0n/zoB7bZxuva2NGtghJvS9RkfVtIkZRAERDEbk6XJvhNoBAfE3goUKpAI9pggH/9f7+wu+5/0OYRxdnQ1OwRnSXsD/K6SBlyjlC/l9Eida+QxlBMzEFTX95WQa3ava/LvtvZZq2VPssVAU5sBaV0j08Q9QJEidBthXFnCwAQ9EYsgIJIZNwrWW20D6t5uz+RtVNWTNgbuDyy5RTglHabRS/0LvE5nSQegmeXIB4mWepBRRVAcKxOT8rARxYAYiA1/trPQnsGilyAshwXeMl7SDKzPwxW4YFleFA5gqLWXeuL9u//8BNbb521CMfNIdqjP0o0RKRUXL1mgVvuvNeuuBpV4+ZbLN9CnAM+cgGN3B/S8+PZXWOoj5li7JhxNnmnnezEow+yDdZbk4EpYyZDmfMFDynqH1ikQqiOuouDHMZVQO6SK6+2K6+/ye5/9DFrHtGKBCFDJ5Z39R0XrEoMNHXX/zd0YpmZvgg9SzLUIvHt3tdrR/R12JTeNgyDGHsLjfxhL0h1MJWLxvXRGcGBZ8yz6tIY4PocniHCqVNduL0TLfZEQ7P9vjljDzS2WjuPM4d0EdcdQb2IGE8G/KIfUS/ic3R0OCUAxHCoNeS5zOiSEnhACnYp86DF1K7D+0MjyIWZfgKxC7tO3sm+cdyRPtOLbz0Yyh8k/M9MoNl6+htvY4e4zc5E5+8kMMbZHCaVOK/FUhoGVWb0JOfLdqAoxpVXXsV+/K1jbPtJW9uYMWNgVgJqaEMKYNIQlXSjD8MChrjf6ptAgrY98+J0u/iqq+38Sy6zTC6PTQQbCQCh9SB9uER1p2UZIMR0BehQQc9vKfXakZ3ddhD2hy2rirBMYAvAfqCVVm50FMFjIi76vSIJAtBOyXaBzQeUAYhkBE7arHKT3QmtTxmbtpkVImZ13qcwPC66BQseDQCxID3+ym8wq6QIHqZUAAEEPOPMKQbNYOUvdHfaV7abZEcePs1tD1mhA9c0EDugd5WqX58k7LrX7scGcda559vTL0/HW9DnYFAg/qGByDmxfBnGjGMVxLxaXPWtY6fZvnvtZhsTPFXGM6K1GnI9qnrY28FBtpFhFyrgFljskza7s8euv+VWO/3sc+39D2daL0BExfQV41q/LcMjRod9k7+NC2RX6kMVTAPQm1S67DhUrR2JIG3FYJkiICkNrTwSREw+DFIruKnMs6mwfqKhF+mg3Mu6DLwluVZ7PNFo12B3OGc0gN+HqAE4KUxiSZYAEIuRurItaN1EBuYVOBQURIRO6IzDIBEGNDVkbeqB+9uJXzveVhg1AqaFwTHqNWD994JKUBYXyroAU7/yGlLEzbfaOZdfbh/NmeOzsmwF2WyOuhlI3EOnZ7hedoJZs2bZnpO3s8OmHmT7EjylWuUmlW1A9g+wxwGCi6P7DetV6EAX6Zsmxyeee8Euv/pau/b6G3HHMsshqW
35jdRkND3u9RpV/LagEarA9ajIDmR/d02MGsjVkHKa6TxXbNBCklmPmrrO5MYYcYDqWruE6L2BZ6WZ07or0H+2SP9WDnSOdXsXMb83YxKzkfzidtJOtu8GdhW+gfN0uI0AEgFiNh3dKPoS7fSJQhD6+P2VuioaQHWfgrBDbt+JXt7OCDDrC99tgNCJBr0KEAkOi3ByByyM3okgd2iHZE15emv2I/O+XX9sL06czU8pNzEcNONgbN0r0sjsoS7qz79Pb22tiWHBLEHnb8McfYGquuYg0ylKp+uFuqhSQNhV1JBRjO4BU6yKbRQ78U//DxvHZ7/Oln7D/+85f2wYyPiPbkGG3JIQZ7JOUyDBDlqqJVS7Y26sV/zOyxzSqd1oK4313NWhOgUMW7UUhiIOQpe66IOiktgCijb5aJVG0g7gQRkCjKlL2bX8l+1dpo1xM5244BO5vsoGbFSGCnWIIlAMRiJK4YT8ZDSRA4xsntgDTgUgT2JjiR4Df7FiHVe+y2i6239niYTfYDsTqCP0Y+qQH65kZIPslgqTiFuW0d9rtzz7E777uPNRHv4ObUykutnkQy4HN3dxfSScpBwgGjs9222XILO3zaIbbHrjvbyEas2sx2ug+cG9kR+CzVRHesv0QAUWDWTGUa3Aj79nsf2O/+eBoLzB53kJALNl4z8qmElPobs9TOhIqs4kzZKok+m1zosn+aWbJxVZgZwFAcSxZPAw8U3wPGxSxGa7lEUQfqKZK6qjysJBGQFZaJy47RibpxxcgWuzDfbE9lAF/uXU3PBRwYV8RGLMkSAGIxUzfpnAgSMMuDFw4QChxqwVOx5hqr2t//6Ie2zRabWRO6JLzqIrtUE83MMibqJy8cLDFTa96Xd+C2hx+yyzAK3nf/Q3g5tDaDI7ItZFhe3N3DtQpSQvBFnehom2errryS7bzjDvYtVJnVV1rRchkGqBqkwk1UL5qC32/+PaOji3gFIGgrTaV7kn8MN2eX3X73PawfudKliUy+CSkH3Zl7Lav5IERF+Wm2LXXbYT2dNg1HRRq7UDkBcMoGweJuBSVUmf2rzb3EqRDP4Fl8FkHa+YdUe/Sc+pRDIpG397Mt9rPRCXuMpViziMxMSp1MznNXZlrgswRLAIjFSFwxvNZAyBQh6UF/jYjbXR3zbOUvjLNDCak+FPVi/Gqr+AwjEd+lDjGTPsN5+q7xEa+30HepGx9hBDvngovskktliyBfhARMACIFIMiDIWYUoysWIdlvlFyd5eD/8MPv29abb2pfGNPKPaP63UCJ9KB6XWapEyHcxiJocSkEMZgKpEbNRtX4ze//gNvzRuuR0RQ9XMUlFv+07L0ov8MUXI8nkBBmJXi0oQuJjueQyEuGQILsY5JAKiw1d1mKWd5T0NVDBgU64bfuYu1FhjpmZ0fYn1tG2v9p6bO2glS3vBVJDlMCnDwVQJ2SST23Xtg5ASAWRpW/4jcxn/4VcUtqpWMThiVN3ptttKH98HvftolrTSD/A/H5oIhmYTG3imZ+BVJJWhBCSIcX4PiMjbSAHdtuu+Muj4t44M+PkjUKZscGoVR0MkmkYXiJp324UTOIomVcoUpCM+2Afe2Affa0zTbcgBgFgRf3U8UOTtHHOvHB2xXPblKdooJhEiC8jHiNy6+5zv78xFMeOOU2CNStZbGIXtshMUxt77Y9sRGlWLHZADOnWCtRJbw6Sc4GF8/wYPBEIXf9FE5IZcCW8XFDh+V68/ZkfqRdgTH7KgyVKCvYHgB2BlSZpeU8cJ59/ByWDKUDQCxmukazq8wImvllkyjbhDVWs6/uvJOd/M2TbERjlnRkjAEJ6O5Hl9guUKDw8FX4xX+L3IR8BjRkb3hp+ut26x1325nnXUg0IzmHdJkbKuXwAJYAmBLBWJW0lh3jTeEeG6+3lh13xGH21ck72uhRI2lYtLS7wqBVchKN3fqHr7fMB6Z7RHQl6KQovSefe9GuxdtyFlIOirf3wnURPi1rBS3CvtHdbXt19NqG3VpzQbQkfU6ykpO0TSy/QOdoQJIgdWCiowHQgIlh8HpKgjrkim7LzsXO0Ww3AxDnNDfbc0hlGdydWewccoOmuvCAoc
355WiZFYkiUAxBDUddZ1RqyTkeA4GRCVyzGN96CdpCG7AQ7Tphxg+++5s4v0CqaCU/lDNoXH5P2QxJEmg5MYVmwocImZVxKJYh46SEf32FPP2c9/8d/25jsfWBfLwaVmSHJANgAkqBELeKf0X/5lsWJh6rLjjzjUDj5gP1t/3bU5INUnWpAlY2p8jyHI4IcdHgRmtNfXl/BRXakijcwFsO4lZuPnvzzFPpz1MUvRo2AuSUDxDCogjD/Xc7+leY6ejoyAMWQXYUbRKstvozAc/pwcnV/CtTuCfubKnVZtQq1gXUSig3D07ByrNPM8AY30rBYuwpYkkKijJPBKiE7dibn2chOSQ0OTXZJptllZkhKn8IrIO8KzzXWOciGlnA0AUQdZl9wpbgOAIdzizwiJBnjkCRAbRkW/842XIqOqDLOnmPVzzNDNiPnHHXUkGaP2t/GrrwRvISjKSu3SAmJifxnMPJ/UrBP4JvcXVsW33pthl1x9vV11/c32zvszLc86iB7CfJX0VtGYiqfoQy9VOwUafXg0tp+0jR3ESs9Dp+4fRVZyngdOOfNG5+ouQzFviT4JH1LcKAlNHB3UNvpZ4p5a6XnhpVfYdTfejJ2ElZ5NLcRFkFZVwEf9fSSzUfYpd6/SPpQk6KE6I+ZTG5ZmcSCmLWJl8q94Tsg8qpxWSb7T2ONeqHULGdu7rdEO655pE3BxJjnfg+OY1R1ORBZUBJkGVF9CASMyXItO9RRUTdXzLpPMdSOzdgcpBJ/Gc1EtNmLb0CpN5YZAOsTWo/Em6W1JliBBDEHdCCDE0AKB6M8ftzhFfyr6nX/KMtTHbK7IxSrxChK0J+FuPPqwQ23nHbe35jzuSQablmkPBgivp+YLTAQASJzXTP3si6/ab/7wJ7wGz8Fk3JdmyFMihlW0puwVsgFo6JT7emyVFcfZLjttz9Lyk1jp2WJ5grUiDwOM6ffsf6UfiyqYQnyYixfEGDSK03lHzRF4zfx4rj313PN2KgbLF199A1GYxUoEdWnBmtpSGWCTEODqd0lOAgmBzlIv9Em8XKSDHTy8Rpi7GT2uAbfuh7leawT8N+rN2H5zm2z78kxbgSXdi7vIxNkGtV7jydwyIm2P4KJ+i7yT2UKO6EwmFFSVogCipMTA8kQFL8bifgbDqk8AEc1wYrroUsYQDyeaTfXRf+eFX1iFyRJbXI9whrWQ3PV4pId9dt/NNlh3TWdGqQMCCF2EJqnL6ysAgEKwWfoPSPTaqQDELdgj3n7vfWtg6bgSu2jpthhfGbFBIE/eotlPf5tsuL6dePxxtu1WW9gYrfSk/ZFh03vjbRhKgtCZEr2lVqTVB32jHgGXPDbdfSWb29Fl//3rU1E3HrUPyc6tdSKcRHcVhs15MJvaqv7naHcfQKrNfgYvJOOiz7bQDT0b5W8sA7JtWdzGfFZUZCNSxJwG6f9V+yLGwS+352zlZBsJYgDlOouoVU9Rje2MjA+h2zOki3uDlbpzWZ3ZyOpQl8MEECSPyWBrimIrAkDUQ9cldo7GvwZ4xND+SSOJ/wMeuTM7p/EuiRIuACTSthaLsv757//ec0XKcyHOkkQoIJFu7mHYDhu6xxDFZ2skAkAFY7ndfMd9dikrKpVUpmVkK+CAvRxGU1i1ZvoEdgFXIwCWHtSML7C8fLfJO9o3TvyarTl+DU3neDUWBKh6AEJ1K7w7w4zvQCcy0G/t4wH0EcSVsosuuZL8lTfaw48/Zfl83iND1c20B3hhZBNAULSHhwBDkaOfam2I17KYXuiHACKHmzGFRMR2Eg6ieRwxOSSc2WyQ09NA0hX6ujogMYPZvEd9r6P4aQPHyyKuyXLDNPaKSoE8oNxDeS9TLOlu5Z5STUsc65FhkixTWojBsrBF1PbXHwoqxhA0nA8Qg86bDxD94ODqB7N3Egbpam+ztdZYw/b66q52zBGH2yrEQCjzk5gy4aJ0BDDyIjAMB9Vc6ysaOxO27ACSImbMmm3X3niT/eG0M6yDQCnFPshtWuiPg/AFXFSl2ArlrcwBWMoR8U8//YlN2mYr0uS3OENojUYMDPF7rRZooLs6A1MLfLhUXCX5wP/kGdE5L7z0KhmxrraLr7zGAUAShk6W4VXGW5fK+m0YrmqJNHUyUK22/dW/03ABBDuBAOIYl/E2FulsDhWjBV7UnhK9pHIjWsVayffYzXOsO/+KI0R9LdRCONkgkswCAlypkPpHc5AgAWFJEARkKd+DlEjto7EkSwCIIahbCyDiyyKmEpPpF3kfEJd5eNtv9yU77sgjEOk39wVa2rPC7RgMLB8vvMhOUHcRI/KnGVxrHjR47n/oz3bmOefZo8QeaLgoqrIT91saQ2DMhGLIjFaMMmtX0VuPP+Yo1mkQF7Hx+pgQaCvtjoEhfq/VJrVb9JCKoPyTEUCo1ypSbaLAqV5yU9yM+nPuxZfbSy+9FA1y2iE1RG3TfTzXJQZMLTITSEQL1LyipfIS0QupCp1e0lcnEzO5ooyM9izIgg3VN5hTwdQZPisPRGzBGbLB9NeHx5AnQkUecAJgSqLeaE7RhZ5BW48QCcL/cX+Po+FgpMLVUfGnPCUAxBCE4
351lQIhYYeOqCwBA9fiWi7WVdxJrEPRy03772tWOPxiiobMfMA1SU8iXd1OKcVe+Qie4qSUD31KD0jNMw1atvvGW33H6nnX3+RTaXSEtt26dM2DL4ucoBKGVYM6HcEVojUiRfwRabbmKHHTLF25ejPRqE/ZDl9Q/s4+DPMRXitsSAIuZSkfu0m71B84RbP/viy3YN6s8ll15m3Sxb1voRhr2rEn4d/ZGHQ2qOpB2EoqVa1AfZcDIeV0JGLyZmuROz2HOatayb1vUyg/do4xoYNUXat3qjI2M61dPBNOHZ2ooRUrlLVZ4oN37rmVJBguCrlAdg6Qt0H8YcU8/9B58TAGIwRRby3Yd/PxP4YRh1fp5J/cAxHVYmpc65c+xAXIqHsNx6j1138gQyesg+G/Ai/ds9DK5eLORmNX6KmVLsrCIAaCPUVztx/dd/n2qPP/M8uSx7bETrGGIQWCYsdYZ2yjYg/V6qRJq/RlaMHUiS3GOOPBwbyXikC2a3/r7VM5BFi0/aoq5HHhmfgfvr0TmzWWD22LPP27/+688xpH7gQV0NAIf27dR94sAu6U0+Kw5HmhIBFnNR02UXYo0mYAAz8oPUKflfMjwrua87AIdO9pxgsaaN7JL6UW8jYglz6PO7ZGPQ5hfcrwlTg+6hryXogwADONA+DF0FpMIy52ibvSVZAkDUSd3+se/8KYGRMc5nXjgQzT5yUOEaY0Y86esn2J7YH7RiU0FRbszrv0+ka/OwXdes8+acpvs7NOh+ML8QR/YI7eN5/sVXsOPVLfbSa2/aqLErEG7d6U2TXaJLkX5usNRQR/5ghtp2y83soH33tn1YEq5FZA5e3KMugOD+Aie1f36/qV+/0UqkF+wgLPlWroR3ZsyyP552ut374J9Z6TnLsqTfU0IbFalbWdQUz4CtPi1tgPDWQ2Ha5RGK6o8YEqp7X/nukhttdfsOsQ7+PLw3i+9FibC1HKMTL4oyWitqU6WABKFYqxz2jwbsEz2ZSO5bwgKEBYCI6D+s14iRNDw+AQcxSAtJPiZOmMCS7q/ZtltvYSPZFi2NWOojjYGlwiOHE6PH6iDjv9b5oioAHBk7GbX+10U0n7wF51x4md31wMO4ChDlsTVE9o5Y5WBRFwNfcQgSX1cnxf72pMn/Jh6NVVZcgTRxitioHyAEDKKBz7KyKwCKkQQhmwaJcuS6RN1pp2333P+gnX/RpUSAPgO3MfUyG7sEAvdlpfrggvVkvoj2S7M4aXku2pdGMk2CfmVkDxBgAGQChxTSmGwSjcgYnXCrtshb3KWFUG2gwebkNFYgl98C+wftygAYDbRJINKBR0V5JrLuNlvcrfikvgAQn9BiEZ/6waD/jPnqBYwiYIj/VllxRTtg991t2sEH2tprruaW5rSeMNZxMQVT03xdXLAhA+GwigaLAEJTm18rFaJqs+Z1YhC8wi675np79c23SKkfJY9BdsHgFhkFdX/tepUFV3KIp+uQSfuH3z+ZRWQb2Dh2CVcZSoIQCAw8zzfxoV7Pj0l7JKJr7YnqKQMEfejKbSQ9+cUpv8HjcjMqUa814PaUcVSrTpUjQ1KN+qI8nEuzqGeil1zI/GfrOu23yQceUgG1rEuiPP2XTaKJNRZaLBctrFu8rc5BM0VItgEAaRrTwPPNAgoFRAmlsVP2MaXG/7hR0kWK+Ijg5ly8T2CYtWmhlGZsj/pjYPOsPDBJzKIVjWII6fYNhFRvsfGG9i9/dzK5GFa2lpZmdwXK2q+BpeJvnOtDsH8g+oE6XgQLXmhPlSAZr1eMSNVFZNLb7r7PrgQgbrz1dkT5Zs+srTa6h4D1AgrxVqBSGkbUSs8R7Mi05x572GFT9gIk1uMYVnmYXW30OWwQeg0GB7XFe8UFA4FF56mHKmKgLlKjXY079iriIu7G69LY3ML5qCTQUpAQCcpSMeKr/NKl8qL+6M+fEB88WpR2gesOHGqUjknt0LCICKBfF1+JYVIuVLdBch+9S+1REb30Senx9U2BXUuyBAliKOpqwGv2h7nkihNDKgeDmMIfHOBRQaSeMH48KyZ3sB9881hEdjwHnKO/wcwT327g7/Fvi3rXZKYiF5jS5ysOgcqdoZWX8OVX37Rb77zbTjvjLOvCsKV2ajTLACkQk+TBR9/5qqS1Itgn1lxzLfvmcdNs150m2ajW0b71n9xmSlwTj35N7GqrMz7vdRdJOtCtyAB+9qXp2EhuttPOPtcyDUrHR330Q9v5qW2SPOYbQuq+QTjxs6BAAIghqCwGi1A7csVpJhdQSKxWqLJE5N7OTtY6TCbX5H4kjJ3k0YyaufU3sCxsFh54fFGfdV/xvKYuhU7LxqAiplca+naMkY89+Yz95re/t5feeteDpyQxSCrQu04sEuCkhVOqSGqRAoJOOHIKO4PvbhM3mGgF7QMK0yoaMwqHBhy4z+B++I2HegE4XfqiLu3pedtd99p/nnKKb7SjDNjaHCaDvUT3EUAs9UjKofqznB4PADHEg3fbgdQIz1TNjMhnD3CCP7VRrQxtCqI59qij7ChS2Y9fcdQCUsMQ1dd9WAAhsdazCInDNZtzXxn4tPaiCrO/+fZ7dhnh15ffwErPDz9EWgAMAAJJMlyAB4El2DClpA+pR7Nnz7bddtjWDgHYphx4EKoL+TTpTwajYwURxDFIGDccySHuEfd1qQXAkTfwmRem23kXXQJQ3G2z57YhwWRx+SqsWMlfab+kiFA+dxQIADHEI5GurH0ecmSq1jb30aa5zKowjZhVGX623GxTO/zQabb7LpOtpSESxwdLC8NVKQY3C0hwCcIlmn5J3w2PkigAhyrcPA9j5QsvT7dT/niGPfnsc74QKgptjq5Vm6Nkt7KTs6SZDW5WGjvCk8mcdOKJhISvQJwEKz1Vv27oGBS592SDkW2i7iLRBvqw1gn9WXt6zmOl51/sFCSc6a+9TlBVFFglgIgiSgNA1E3bz/DEABBDENs9FIzmBtbli2dKzHpuYIPZYEsb2dRoxx19JJmqd7OJ6453v7Vb88UgFAFD/Oc/fMqXqDbn2f4asC0wS8uTIBBQ+LXyQyot/m9PP8duv+ceMmC/TYbtHKoFYjxXZZAoFL0o7peKJNWjTHTlphtOtOOPPdZ2mLStjWkd4cY5lx4cICS5oAJwvuChfojgjtBAe4lGe3pW7GM2/v3Vb061+x582D6YOQt7hLYcpB+cJy0olM8fBQJADPVM+jnTg2PgGg3mIoyIdY38Djlfsfl///EfbGNyPirfg6QKlYESxMIAQseHI1X8b4CI7hHZEpKEWPcCXkTfNTfajXfeb1dee73dcdddZH/L+bZ4apU2AO4jFNpDipEIGgmS6mxrsxXHkS9i8o72ddZpTFh9VcKNBQQCHoyVAJxQYWH3Vz9rFbe1ex8/sd0UECeuueEmV4MefORRGzlmLGtHelF3UG1oTyifPwoEgBjymchIh6zAYC9hHNR7AwuOOtvnkWtyddt/7z3tmMOmkbV6BRfNtQ4iBoe46sFAoOP6+zTGv/jaGHT0XZ8FFHz0Ot8ialE7Xp197vls38dekQCHApRkR1GwVLTQRzYGxXEAHNm0rTRurP345O/YdltvCWCMjjw36oDwgeldAMNH/9PPQxVqjvpI22SQlP1Ei7Xe+WAGa0cu9MxTCh+WCiL0GeRVHar6cPwzokAAiCEJLRVBXgDt1k2EIJJDE/aIKoE+k2CmE48/1rbcZCOS0bJZCtKDdPWhiphaZTBwDHWdjsfXxud+UodUDkCM2VgBSnfe+4Cdd+HF9szzL1onC7gUypyUQdAFAu4v9yz90UY3rqbQr2MPPcT222t3748WgDriCBUACIV161oPEotvvoh3SRACCZZnzQcvarBeXKzXEhZ+Hpv+Pv3CS9hOFOWJ+tIveS2iynBoKVAgAMSQRIcr+oNRJEEIIOS9WJXNaPbZ46v2jROOs9EtTfPFcunq9ZR45q/nXJ0z+PwYKAQQfkzsCNPLO5FArXiRDNg33XoHm+1cazNZr6HcBmqb7A5SH7T8vFIBOFKyUZSs1NttX9piEzti6hTbl20BR9In7urNk/QgIURh1LF71Q8s4kXwoOvdOyHxQbIHIKV8B08995JnwD4bAFNuC89RKVEmlM8dBQJADPlI+kVkGCpD+i+mOvv4o49sb8Dh0CkHkql6F18KHOVohBFggLjETBx//2S2j3+p/10qhK6P63B24nbO7PwuPT6SYAg+ghHndRTsOWbof/vPXxB+/Tbp4ACDfnCQXsG8zg7hJLglClPSgZyRefp2OJv7HHv4obb2F8e73K9ApkK/mzeSPuprcyQ/EFLNfRVXoQAsqRgJ8lTOww7yyFPP2t/90z/bDPJYqm/yBoXy+aPAcgkQYlxJ+fAVRUwXPZiBDC21wmdnxq3i80sE98hr0cDvWRTmb5/4ddt3z91trQmrujdBDBcxcH0SxHCHgksJcUP7L+6fl/1b1PZ+wycMJ2Z8b+bHdsGlV9kNSBKvETzVNGKkuza1glLrILRVn1ZdKsw5A4NqFeikrbayKeSy0A7kOboS2SuwJwhUUAViAIyBqlY/JDQooEwAJvCMgCyK5SiiAr3+7vt2xtnn2x333GczPvoYg2mLdXV2sNaMQC1sPAViNrxPtDNB3IbsIOqT2qG2hvLZUGA5BogIIZyp+2ntS7H7kcPjHGAcgQOWB88RUMV70Uwk4ibrr2ffOvFr9uUvbY3nQjq8chzABAxcOT+XelGGa9rewWrKx57+CyHOF5h240qzY3RfH3mStKqT9ioSlDM9hkKfe9mVSwvOdvrKl+373/422/WNtEYllaH/GCyoMwrIUv/qAQhJOZI6ZO+IU8PLToKlxvNFPPTI43bWeRfYM395EftIHk8Mu1QBQlpn4gZhLpV2JyDUloayleh6T9/Hb6EseQos9wARGd00iiVVRJKFD0kYTL9qFlQq+2YlX8WVOK51pB1x8FS8F3vZumut4QFHcabqiGk+DwAhZkbqIcJyTkeP/ZbAqatxLypYSbkh4DKfiQUSZTF91H1+w90IUExce2370fe+a5uz+GzcaOIiYHBOo7gcoA9DAoSYWgChqqXSOMhAU4luLIS0ngIrEtnT83f/80c2/72fFalID/0h3mXdj1PVVsVgyPAa2XaiZ+Kgo3pDWeIUCAAhIOBPA1qDdzBI6HflAlSwcg4PxQbrrmM//eEPbEPeW0c0OVPJtakBHZXPAUAAaOqQ9qqQK/HG2+62K9g38yZWeuZJ2qL+RvET9BtAiBoPWOBhUFasFcaMQn3aw47EqzFxnbXw2LBM2+0vgEl/L4eSIHSeAELOCeZ+B1Ldx4O7OFiibQqgupzEtldcd4PdR5p8rTBVxi0ZTWW4lEdI7fRdx/gsCc0LzymUz4Y
35CyzFARHwxeKD70IsHIANasQoJfH7d7e0ERa0RhSUff5ytQA4FbYargKkkAOFJT7hYy6aXfpGEEM3UWsj1xjvvsYfGXfa7P5zmGaZkR0jh8iyyqY2ycDtA0mdPhwdD5nNZksqsaCd/65uoG9tZa1MeD4bsG/S3f/oeTLfBfRYdaYJLDwLPeNbXPeTuhGiAk9lfnn8Z6eZmO4ukMr5wC5nD78O9dJ36IVDxBDj6gf9RVq7BdwzflwQFlk+AECUZvD4A+z/rTd/nF77oa7SaMWF9XZ02efuv2GG4AXdhlyylkZfR0tPJMdCVcUi4oiXMS73QEElC0tkR1j25yWNPPuU7Xj3zlxcwAOLByDdaJzktlQ0q8jBIjSCtGbo+3UGS6CHp7jF2AKrUphusy0KuSM2Ig7uGAgiBg9rQL5txj4i4ClVXPgiBlPJTduHRuPv+h+x3Z55jr77yqqt0Wdy0Cq4SmOhB6V4D4ySwcYbyGVFguQQIp60GbD8jfULrSFXwASnJgQNyH5bY6n3cqFZE7mkudq84tnX+eoWkRxR5VZyt6z/d6BUzDS6fti71ywttEaOKod5853278Zbb7JwLLvY8lnn2zWwjsWyUV4KkMwBAFslBcRKKtuxisx1FVU478EA7fNqB0ldcCoglgaHapibo3rJzxEXXuD2Bd/W3raPTGtlbdDrZuS+/9ka79IorrJ2duXIkt5WUodWnAnIZKKtIOzJv+kORNyWUz4QCASBiZnJyw+BwgAZyzOYFDJMFUtnvRfDQoZIe2OOyAZVCRjefFTk3Mqop/8OnH7himIEg4W2g7k9V4j6JEalA7sG2jg5A4j37xa9/a48++Sz5IpT+DUaUAZDzExgItVpVqpLUJiXGHTdqpO256y4Egx3v3o0c+epiiWAogFC7o2YsCBBxPIeOK4GtDJEfz2uzJ55/yU4hNd3LbADcR7q3FGHhkiJEAv2VpQ5JzeH5LO0Et2r78lKWX4Dof8IDeIlfogGpQxHD8guM0oQ68Q0S0e6x2y62/trjseor0IiB38+/Ui8kNsfid3/Vw3pbnAARs6Q3D4ZX+7Tas4ts03888zy7/pbb7YXpr9nI0WPJhsWeFRAhyz6inbg5gYhI36d/pI2xrdhH4/CpU23yDtuz0rNlvkRQD0DEBIiBT9fEn3XMGR+QUPj1jDnt7BJ2ut1934P21rvv+yIzX0EqwKZ98hS5iZROuQ0jrjy8L1EKLLcAsQAT+WAVOGgACxwippJxbCSZqtefMMG+f/K3bbNNNrTWFhnsNMvy50XXMGr7jWr9Pw77bYkAhHdG7YTBaJ/Sv91x74N20eVX2y133utp6BMwp+SeNADRjp1Fq6Zkl/DdwpEuVluJDNjbbGsnIUVMWGNVvBmRlFQPQKhPA8+LvztI+LFoZay8GYro1CZAl7Jl330PP0I7SNdHwJRfz7kKb0fcgdb0xa0kwyZxuOBTUGC5BAjGGOUTiNAgjNYYRDOc1jRolyhZ1Sewx+Z+5Ho4/NCDWX8xTpoxEYiySipPEkVqBQO8IpDQ1+jNPw/nxQd+1DC/TG0ayFzDqouTvSrNumoP/YFVSUWftrc/+Ijs1zfahZdd5SsrcwCHYh9KAkVOTiItSYwv4u5MEhfRiHtz/Cor209/9CPbarON2d9z5Pz2LapNUiX0F2WzitojqFJ71CQHYWwMMpAq/Jrkzfb+jNmet1KbEncDXHLBqh+yPeRoR5nFZbIJJT8XnqJF9X7ZObZ8AgQDVwwpP7vEb7nNZD/QPpFa7FRC32X1gPv+J7G/xbdPOMbWX28dG8ECJgGJ9pjwzWsYB7FLTnDjTE597hqV/Exx12E/s4vhdY4Kn3xFKGuwrb23ZO99OMumvzLdxq+2sm224XqI1bLg60QJ1s5S4pS6QCOSGWBGnQ9zzZd26GMn97oLr8GlxB/cSZizZu8UM7X6o5Dr/mZ7+3Sd1mI0s3pVKekO3PurttUmG9Ao6MWJAgCljVNotNPBGxy9OGNz/UC1S7/F9YvzZe+I7Th6Bm2d3XbT7cRsYLC8/5HHAass+CuvEBcqkpO+iBKyAIXy2VBguQUIDTptJKuYfyVa0b6ZStjKqPUUc1XWXkwg7mGvr062bx1/BGsFGsmbgJVfkYiU+Yw+f8RHv4lpYoDQOfquMlAacOlA3EIAUiWds7dnzrP7HnnS7rvvHtuWFZUH77+XjWqKNpkRO8hVGflUvKoF6op+WfC1H1qcjWRDcQbTK7fU8uoXX3mDuIi77ezzzre5StiiWRwDoParkL4vpnUwg0budeD+G2ywAcvBWekJPVqaCbaiPklaAhYBhNoJwrj0IX72opPqKQBFpVrEHVvFNsIq1Dvutd+ffhZqRtYjKEVDRXnGUDkYjOq5RTjn01FguQQIcYr4WhJEH6KspIg0zK/ckw3MWhkYZs6sWbYP0YRT99/bdp+8nTOBL0vuB4TBAKHv+hs4Y8aPJD4mZotT4UuCkLegXE1jwX/FzmZnrHvuudt2/DL6/rFHEKk5AUAi6zOMVwTAlEw2Bpn4Pa5/8HsMEOJP5a2QxKNSkHielq2hx57Fa/CrX59qL73xNjtg9UbrH0hXpzgO9dODqPr7qtm9AfocMWU/DJb72/rrr+tSlqrV5rsqZWIrOM0XW+ldpf/y6MsiXrVnh2weatvczh7A8nH76T//G5v+FjBgFr0teWwkZc6pIOEpxV4onw0FlkuA8BwFjGIBhFyAvupQcQ9ID2JEZapOIlqfxIrNA/fd09Zc7QvOnDFjiuHjz/FjikFAADFQaojP029SNwQQOlff0xgEZ3w8z26/92HWS5xur7/+um20wXrEHuxvRx821RrzcvVFd4jr0beBn+P7D3yPZJbolyoSkqtEVNTH0usku30ruvL9D2faJZdfadffeicrPd9h458G3zJPe36ojQIIwYrckLpfO67IHb60BW3bx6YdMpVAKoCHEwQcwjrFLKitviRebY4waWCzan4eCBAFwitfev1NO+Oc8+2Bhx6hnTOontWmqH9+I+oeqv81bxQODJsCyyVAuGjM7O0Znxl8CuiRFCFwgIuticzOm2ygRK7HMKN/yVryn8xYMRBokA4cqAN/12cVHdfn+Lz4s8BBRlBldH7kiaft2ptutYswGiqycBzrICZtsyVGwe+T+m2M5WnL4CQtcX21nrbu7i3QvRHfvR3cU8FQCWZfuQ872AbvqWeetdPPucgefuwJb48iL7nZfClIEo+kCeVz6Ohot9W+MMZ23mE7+x6p6UaPHIEBM+veBa+f/uieAhR36tRq3EJ+F2C7TQcbidSdj0hu+/jTz9qfzjzbnn72L+6idalBNF/I9eGnJUeB5RYgKrjMUtq3UjM+I1oisrvSEGNXGN1qxx55hO/Qvc6aq3t+xoFMGTP64N9iYIgfl47HTBarHjpHkoT21ygQ4ngZbr2rrr2BzW2ftuZmeQiqttoqK9mPv/9dtvLbwFZcYYyL8QPrHnjf+F4D3x0g/KXfSOiAJaOgapdyw36TgEVnV7fHRdxIvoj33n8fWihYKjpHkkAvQWJ0wXKI9wI1Ldpaf+0v2snf/Y5tTar/FfBoSOrSOfpTkToSL6qqn5nV2OhaLeJSKHgHas9//eoUEu/eYzM/nuP5NEUDNyjHN/OrwsuSpMByCRAMM2iqgSz9WcNY0gD2CCImG9ljc7ONJtrP/vGnbMA73jNX+67YUkEYmPrTQB3MpDEDx8f10PSbmExGvFi1EGAILJTF6a2Zs+23v/8fu4VVlh3dPejvDR5dOKK52XbbeUc78pAp5Ifc0CM3NSvHZfC949/jd8cGf1nQixAf7yUnRB9G2DwxHrfeeZ9dfd3Ndtsdd2CobfDUdFK5GnI562bfDJDB9x0VSChRbyueHEWVnnDU0az0HI8rlH5iqIzdxEW8GvO3JoxvWOe7QAjCujdFdpTLr7rOwfN+VI2m1lGe1l+qT8iAXSdBF8NpyyVAaAJK4APUjKp9GQQOefZomPvxLHI8fNFzMn7t2CMRo1vQ3wUfkdi9MMaMgSF+FgMBQr8VpKsjdutP4KDz9Xlee6dddfs9dtnll9tzzz0HgGRhTsGW3Ks5+8LY0fbdk06wPXbe3lYkcUs0x0Z3WVg74vvH734+9xLTCZDiduldEoxUKontb7zzod102512+plnudrRK2Mj56eRILSHp1qUUfop3uXSbMAWoDT5Pz75u7bjdpNsbGtzv+EQ8MRq+ekkiKjVTksHYGwagM70197wTX/PvfAS6wMxtHxd/Rq4viO6MrwuKQosnwAhpudPu0+XcK0JALThbpGMRpO/MsmOnDbVdthuG5gBxoDJkgTyxCrC4AexMIAQU8ZMLGaMr42lB4HGa2xq88vTz7dHH33EZs/6CDE+796KClvLe+AV3ofjMFRO2eertvUmEyNpR8hGiese3JbB39W2+P4DAULVaBm1jvWQd/6hR59g098z2ZXrVWvDwyEjppaBq8hTkQRMC2y4o3gJBTZpbcqJxx
35xj+++1h0tbCUkNIKlSw0kgU6yjPkSt9WrqfonsEbQNu0Q3O4Pfzq7lp511Hq7Z1z0SVNIJiFR3feHEv44CyyVAYLlj1PMn2wMzE2PRB7PCiqfuvy8AcZCnW0snMOpprMsf38+cg8kdA0R8XN/1N/B7zJwCCKkaM2bM8BRwP/vtGTZr1kxf7yGxueoRhdolC9UE8f4rW2xkU/cminPKviysysOoEdPGdQ9uy8K+x2K7mDVuVwQQ2EDk1cjm7bU337XrbrrFrr7+BnsX74ZCshUhqlWUCDvQhl27WKeRRrLhgHXOnWNf2XprO+SA/ZxeeWJIlDRHaIL84eAbAcTwIULqXKSyQA8knGdfeNmuvP5mu/iKa3DH9nnsCiu3FtbV8NsSoMD/BwAA//8lEyAwAABAAElEQVTtnQeAXMWVrs/0dE8ejbKEBFgiG0wSSORgEDmJIILIYIK92MZ5d9++Xe/z7toYbMyuE8YYMCbnIHLOOQkBEiCyBMozo0md5n3/qb6jlpA0PSwWzeiW1NPdt++tW/fUOX+dVFUVwzcd321rWOm2vHVXdFtlZdISFUnLZLLW3tpm++890Y4+YpLtt+fulrS0pRJ5q6hIcG7KuruXJVNFRQW/VXyKctF5+XzecrmcJRIJf+nETCZjqVTKnn/+ebvuplvtinsesfYlrdwrb8mEWc5Slu1O8kpYBfcbVFNpB3x9B/vRWafbyNGjrbqmxu+3ovsWN0T3Lm5fNpf3n5OVCdNvPIxVGC+an08kbXFLh73+5lv2i1+db6+8NsPa02kzjtMIzlNd4T2b4xttq6ae+mSlTdp/X/v26afZ6BFDLVnF+d0568plLMkzJqAbFCpu1io/i7rdtJMW+n271c7KlM1vXmIvTHvdfvbL8+3Nd9/3vkpVrrKq+MfPkQIV/QUggvx+WoidVhJmPuicbv7lYfg8BySEKQAiIYGBOc8+65sOEptsuC7SmuOabAABAGL5siIh1d3z+W6Eg8q783wWQAhIEpbrrrB0NmfNANEdd91jl191jb3+/keWBTQqOV3nZbIIYyJlFQCXwMUynbbVZpvYsUcdbvtP3M2GDR3idetpcrRXbdB1KtHz61gEUlEb1SYVnRt+k8BTvJ1maQBy3qJm+/NlV9jdDzxsM2a9a6naOoQRoEBQk0nuA90ywhauqU6mrKut1bYbN85OOOZo23fPr1tjPeAFQAhQBIqqu3AXb6dut7Ki5uV4VfoVPBe0U+mGbl388NHH8+23f7rY7n/4Uftw9sdW3zjAOjravd4qwCibzS59Zp5R99cz52i7039lN46P90qBfgQQEn1KkBRnUAmI/wsy5D91w3w5juckWAhwJULbhDCst/ba9s8//oGNH7eV1ddVcS4C6qOnGI7RsYSi+2uwlsBLPGgMLzE7AMErTZXPvfyqXXfjLXbjLbcDP0EQvJ20qaurC2FMWqqqyjLpjH8fNmyobTdhvH3/tGNtkw3Xt+pqBBHm70ZwBDyV3Mzv5M8NOEk4+1LyWerLW3smZ48+/YL97ZobAIlHLFVTZ51dneAceg0ag+6Sl9BDt0ru29G2xEaPHGm777yzfedbZ9raI4dZDW1BsaCoRZzL+SoRUPmXFfwRQICNPAvn0pYKAY36h+PSKVrau+wegOsKQPXp51+ymsZBtgTNS0BcLVpl0w4Quiu3pZ5K+gGAoDMqqafQjBXcOT7UGwX6FUCs8GHhjsCm4VeNoBleaMtWC3N1tLTYmLVG2bFHHmFHHjbJ1hk1HNzI8cIcqKp0M8S5boWVf/qgmFT3CKMg3/iM2CJYMC2/XfiXK+yWqXfZS6+8ihBWF6oOTNzR2elMn2SElqB38j2JxK09epT95KxTbecdJtiI4SMs3ZlGMKoxS8KTuUnhglD8pJ9u2wqPZDNqMaZGyuYtXmJ/uvRyu/RvV1sbAKXncFVfQEr93QAFkusC382ora/rjhpl//yjH9r4rbawYYOb0MYk3FQJ3UvVIEQzQaW3XqO+NAjHOfQRPnYAXnPmLrA/XXyJ066li3tzk8iMkwnkWgPtzfA8+hzuLXAv1Ev9cek7BfoPQOjZfQiJiBC+wDOhwH1BfDAcpEVwcg2jtXSD8VtuaT86+zu26UYbWlMjQss1eUbWBCOibOnoykJNq3zT7fJS/6lE8puVqYIG0oka//G8RfYf55xnjz35NHb/EkvWSFNBCLlIo2wW5tZnMXiqKmU5hFDqc4p2Hn3I3jb50Ek2fpttrKujw2rRJORTUFt1XYLPCQ3BfS05NAgq6cbe78x22533PmhX33CTPfrEUxyVgCJ0mBo1gJk0AglyErDLc10GDaO+tsaOOvxQ2naIjdtiU+umLdI4PgtABFyQzsBdRHeIkeMFPliaQzffertrX488/ZzV1zd4u9P4S6Qx6NkFxdH3CmgYhgb1SFw+KwX6HUDAw16cLWAuCZxLkdhFICEm5z0vboTz1lt3Hdt34h727TPPsAF1NdjX4Twxmzv0OLcSgSi16HbSQNQM2b/yOyQQvo/nLbCHH3vSLmQUnPHmLAQS3wfagUyePI0M5yMaajPDZsT08lFkEIItNhpjJxx7jB10wAHWgFBWAxoa1Wkm7USCeC5Xy/VeamN1nkwp6uiuqAQ4zd54+12798GH7aK/XGrNgFhGvhBqVHtwo+jUMEJz3P0nyPFXMX1OP+Vk/Dd7WmMtmo3q1bm0xT8W3v3LCv6oTnAIWriu5cDq12NGCZAEGbLbXnr5NbvtjrvRcv6Gn0ZaQrhOppaeXdcHx7BoEQBC9I3LZ6dA/wEImEOl2N71I4Xj0W9LmSlvXUvabL+9Jtrkww6xA/b5uiWQBfjQBy8xqKIOKoo89KUIIApo5LZwFkSa9trr9rsLL7ann33eFixuARyo0wdJgRhRFdpZXc0ozbu0BjG6/A2SrXQa30Q+bUcefpgdP2WKbbHpxgaOYcbwkphwkq5TZMafry+NdXQIgpZB85E6P+31N+ycc39lrxLRWNLRabWM1jJ3RBNpVAIxFQGUVPg87TvlhONsyuQj0MLGBo+jt4ULKMV94geW+6PqBBBy7Op53cnLew5wlaNS2lEWsGjBwfv408/af537G/tozmwH3ypopGvlc9C/cEfRIdxEdInLZ6dAvwYIkUXsIV4JTFrQDmAa+QhqEfzTTj7RJk862MassxZedJ3HHxXeI+bqjcHDBdFfCTwMD8NKPZbq+8n8RXb/Q4/aOeedj8B1WRfmhjzsFaCRQq26j1Tj6uoqb6cAogMzooawpsBJv7c1L7IJ225jR6DKn3jMUYZ7BIeeBIIXUho0EYQLYYoeIWpRr+/Ur/bQINeuPiBScP2NN9u1OFPf/+hjaxo02BYsWgQgyClaaV34J1LVKfePqG0drc22PW077OAD7aQpR0FbmVd6hZb0Rj9OdyEP4dTQWl0jOqhDVE/rknainil778PZdsW1N9ltU6faXLSymvpG9+3oXGDWtb0cZk4ENgHte6VAfMJKKNB/AEIPKE7rKQEMioFBP4mhM0QLqmD2HbYbbyced4ztvtOOgEWlVSkZoSBdOk/MVeDxnlp7/yCVligJb246ILBPPvOS3YT9fMXV11lFEr9DYRRGLK0KrUG31AidwJSplOrMrbsYleV7cL8CB3JoM0OHDLKdtptgP8FfMnrEMPwQaCGYFwIFFb8zDe4rQOhZZU7p/jK/mltabfrrM+13hBafeu5F/Cd5ogxS/8PornOc0n5b2kYUYcTgQU7H73/7LBtJ5KWuBkdrOMtBzxu4kj9e19I/fpb6TVqU3vVKA0qihXw3L0x/w/7nt3+wV16djm8CgMSE07MLLmXWqT0OUjI7+kyNlTRyDT3cbwAi6j8xu3hNQiLGksMvfNPIHgQhD7MNGdBo3zjlJNt/n4m20fpfsW4ccSkAwu14robvxG5+KdWUWLhINq8DACMganFre4cnRd1w86323AsvMwpWW4KRUKN+JtPlzj+ZBV0KKXK5AEKjdJTnILaX8KaIWuRo43rrjrbvffNM22H8NrbW8KFoPWgiCAIP6y8JisttiS3WaRFdQp6EXDNZa2nrsD/95XK75c577PWZb1ttwwAf5hWGlHO1E5Al1mOV0Ez3SwBUm2+ykZ1xyim20/ZEW4YMLBkgoqaqHSsqTn7+iA6d6awt7kjbby74rd37wEP23kdznKbKHUHV8H7vpv2CBnV9Xo6TuHxmCvQzgJAtHux5CYxUUwGEgEKjuXwDGpUaUN0323AD++d//LFttsmGNqCeyAUjdCLBeIOwMlQFYRNKUCQ4JRUxuPIKuF5aQjvhuGmvvWGXX
35H6l3XPfg7akvVPiDENXeb5DV7rD1XS1Ue2SWaJ7uYNSbYDJdVyRkJq6BmtrbbUBtVW23x672Ymo8lt/bTOrSclEkfMktFtNcKwoqcG6Q3hxcz4EH4BokON194OP2lXX32w33nqHNQwcTISCZ0M1qquvs+b2JZzTbVVEW5Qr0c2oPQrNYfcddwIkTiZnYz38JIF+on9fip5B/RhdJ+BQF8hZK/dvAq3rxlvvtOvJRr3/4cdcK5P54aYWz+F+pAo9D30eA0RfSP+pc/sPQMCEYkONMq7a81mMrhGZTxxDTYbBFTrceL31ELI97OQTj7MhAxudkWuqUIhhdGdKTzPmGgRWLO7RAt57L+JsefcBKQS8pa0TO/5mu+Hm21CHX7NkdS0AISdfQQAqg1ajegVmDmS0XwIRtV33lzaRxz/gfhO8k0MH1NsPv/0PtvfXd/XsSpkZCtu6Q4/7Sh5LFUnVryKVHOrRfGx5Plag6bz9wWy7eeo9dhFRg/nNLVZBNlNKgEv0hdxFIjHhRhnMoUra0EgodO0Rw+373/2u7bz9eBtOXoTX3QtALNVgAph7SwSWThPRSuAurYDC8+Vow1vvzrarrrvBLgV8u2hXnr7WderDaqV9A9Tqa08Z13Vx+UwU6D8AIaGCBLJTu9AG9E1ZibKrFTYUg3lWIMf22nVnO1kj8FZbOjMp7l7NSMgJgYgwm6Qs8tar3mg00wliWJXoWBBoncVxACINQLSjCr8/+xP7Farw08+9YPMWLGK+AuYF7Ym0GeVZBI2HdrumA19TtycncX+fz0C1OqZMwxSCKZNCac6nHH+sHXbQgTZhmy05QaHIpW0SuERtUztXVQQGKnIqUpFrCbqfAGJJZ8YeefI5u/SKa+yJZ57DT4LvRiM1oCunJmeLTE5XUMwqua6G36ccc4wdvN9Em7DVZoW6pfAHDU7akdoXFS4JZKO2YA6GXxykqFtU1QkeOtZzQSeV5iVddtf9D9hlZFe+/OrrpGSjcVC300wgK5pIs3Kw90viP5+BAv0GILqV2AQBUqif7WQaau6D7HYHCEYSqcASpLVHjbQpRxxiZ550rAOIGDao9MsKVST0eo8+R/Rd+Xe4HabMcO+PPllgTzz7op3z6994DoTyDKSRJAUEMLzAqFTtN8gQpgfXivFbmxe7g3UymZ/HTD4ch6t5VKMSIdfvFcwvQZKi5q7wXc+gIiFXkTLAgwbA4piSu5QePnPWByRPPUB25VX2MSBXAQAIqLoIf+peeh5paTnCoz5iU8+WW2xlUw4/2I6atB9OWPI1aIuAMEsfVGFeqU96RF+YLCAISMCXXoraDQDIv/PqzDdtKm27+PK/WTPaWpLM2CRO4DRt0zluGgpQSq27l1uviT/3G4CQ+u2CBzNmkTxFEcT6VWIamCSPg6+9pdkOPGA/O3LSgZgYO/uIFfkoikfcSHiKj8l0iYBB1+iz/AN66R76HrQBzsOrLu//5VddZ3fc9wCONeYzeE4DzEo9CsPppUSp4nusigFlPrhm4c+Zt3r8KAfss7d9+1unu7OyDg1IQRgMEl5LBXBldUbP2JPMxInu3ANkPOkIamLN2+LWDntt5iw7VzM9Z8xEq5AWUWVdRF0k1FX4QAQM3ZEqQj31+EuOOHg/O+PEo22dddZmVFcrBI58oFMCJAX/kH7pU1E/oCGCBrawdYk9+/Kr9q8/+w+bPXe+R1ochBXVIIciR7p8BRpjyeDTp4asGSf3G4BwNRvhSeDNRsNHLacDESqpnApf+uiKk+vs755lB+y9h208Zu0e4YyENBKaqOuj4/ruMXlVCbdJ49C5Ag0BhHIVenwfjKZKhLp16t32xz9fYu/P+RhNgZRuhArRc1tfI68ci65qlzq68Rxc5C/Z5l2d7TZuy83tuKOPsv323tMG4ZeQ+RGyK6m0F6mInlUA4QLLnwra5cIsOdbzUSOKgc1Fc/jLpZfZnWRYznznfc/X0BR5jdAKxeb4rCLa6NVO5GanCVvbcZMn2d57T7TGujrXUEJquJ5BJ3/GkV0AASApXKyZnu9+NNt+/+eL7dEnn7IPiGjQO1SNlubqGaDtoOnNi/98Bgr0G4DQ6CfOkyCmMdi7YRC392EogUNTfa2tO3ot++H3z7YdJ4xjBmfVMuSSQERCEzF68QkRQBRrHA4Kqh/AEFAIlBKMqM8QzryW+QxXXXuDr7egKdw0xkFEZkLABO4XRLP4Niv9rDa50Eu4AMI0I/gIogY7ksvxve/8gyd61QBObiroXIGRv6+0Sn/eCCCoEtEShPkNhBAAhISYmZtdGXvo0Uftb9fdbA8yRyMnM4bfpGkI5Fx74HzdTvRpJdqyLpPe9txlBzv9tG9A91Gu8Xjbipqj0T7UUXSwt4/cxwcDOStpxaLWdnv0qaftr1dcZU/hJ5FpqVPU9/JH5eWHiMtnpkC/AQjNR5BYyO+glGExfGBevPJ42dcdPdIOP/RgMhEPtQ3GjHKHWjHVisFBx5cXLgFABBw6N/oc1SEAUTIR6oT9mRmRmlj0wkvTPNNPQqZFW5S6LfXc8xYQv+ieUR2rfhfg6QkVkc2SJEVaNs/c1FBr//nv/2bbj9/ahg1qwpQiooAWFTkCl3+O5e8BmRzYJEcpjbaSLpkpCLp+IJbgGaHzFyy0i3FWXkV25ZxPPvE0cMFJBlVeGpTo43NICm1MdGcBiRH24x/+0LbbdpytNWwQo7pgq1C4T1pmFm2VD6PnePT7St/VPl4AQQYNoov7Kz381xf8N1PobyORqg3K0nzqdYCARnH57BToNwAhBtMIJqZV0oz4XKqvpm0rS3L8uC3t//zkx7bemHXRJpjjIAQpKpEgRe9FP/nHSJj1rrRoCYU0B5UIPNpwjr4/d5H96jfn26OPPeGTnZJEA+BUb08WLUeRlWCaSEVHMEqQDImEj5oSI11DfSmeMd3V4VOjjz58EjMqmek5bgtsIeVzLPVtrOx5VKWK6hauuQYhhUGE0xcJOh/lX1Bqtdp99yNP2LWsY3HX3fdYFetFKMdAESOtdBWFkNEnrK6u1ttWR0LVEThSJx8yybZk4Rv3jFC3sEeg6ToUBBAJSiADZ6moxVxJE8EHwABfCXXccNNtdv3Nt9gjjz9l1XX1nKFENX7VM/l18Z/PQoF+AxCyy8UJyhkQVwQ71FjSrcU2Xn8sDr2J9t1vfdNTgOUsKwx0PTRbkSBFoKDfJNR6LwYICbiOq+g3rVlw6/0kF119tc188y0OSmlXc8SlQRVXWnQACOx9GqFm91Z0TwGdgEEzQyuoV2FGOTqVjLTxemMIezLTc7+98UU0uEAUP0/x5xXdyzGBhoa2IFo6UCjSCpSolULzmfHuB3YXC7f87vd/9FFbM1U1iitdXBpcmMXKKl0AsoBFmsFXN9qA+RlTbOJuu5FdWcjGlPgKJEQ/3QsalK5DqG0ABG+hldTB9dOmz/CZnn++7HKfleqmBg9U8LBEjxO/95EC/QYgIkGTXSu1V2p2DdGFtpbF7sSbMvkwlkbbzTUHyaSEu7dSDBCRliBh0+fo+uizzIdXXp9hv/z9Jfbyyy/b4uZmFyqfESpG5X5iatc6ePfp5ooY9NYIfneAIERYqYVkcM7xeEE9p94aIiEJwOMYQrdHH3Gobb3lZgUtQAIfao/ee7uV44Iu4YP8CgF0Cy3kWCu+iGcxm84979f21nsf+PJ5SlDymakSel66JouZo3sm0DrQ5eyYww8nqnGgjd+atglPNfzrfNouf4ZK6VPqBQsBGtRebzPw0tLWbg/jHznvgv+xWe9/6MlTyjsJvim/RfznM1Cg3wBEJMxSrzsIxWl0bkDVbSC779STjrOjWdRkJJOd5Ol3ufEhbNUUU516idkjDSICBl0ZaQJSvz/66CO7lxmb/37+hT4TU5Kv1aCyqOcCAzGypiTLNAkmgK4P3v9Vt0JCQDsAATlgNTGpjRmhMqOSmDjSUbKkPU/Y+mt26EH72UnHTfFIhsQ6AobofcX3iQTOr6A2/QvFn10Pwn89Bx5Ye4+ZntfhgL2NORrvvP+RZzXKhBJNFUGp4pnb0Np4SA6zYteSZtuRRW6OnHSInXTsZDczwg0ACTQMrQClktL095JKaKFaK41Fi/Mo90Fmxmuss3ENmavX4YuYu7DZqllKMK+QaM8TlXSD+KQiCvQrgJAQ+giN8GsVJI1oX995Jzv+mCNtj112ZLRFaOUpc6YPGoSEICorEqTi311QOV8gEYGGNAgBxOOPP243MGfhiqkPYo+zEC3MrxCgbHM3Z7iNFl/RcnLRtZreXGqpAEw0Rit5KY1aX1Nbr6dgfkKHVQIeIwcNsN122s5+8oPv2VBmVmrquIrutaLn8h/1B+9kBAlybMpu1zR1tdOngNNEga3AUMDWQgbjjLdn4Wf5H3vmxZdZhUoOTWBXWhXPo/tm050hJ4H6BGBD6utt7912tR8zC3U4
35k7hSvgI2TlueSQ5b0TOB2VRaWQoQjrpyoMiU4znnL15i02a8ab84/wJW537DndWKnIhOcflsFChrgCgWTn88MftKnjMorTAD/CLBVKy8Hu3hzG+cwqIw5D1s8BWGcEZh5xg3gL2m4nusSJCEHzpHQhISlRBTfea47qmMPmksV197nV19/U02/d05CBgmjoSj4G9wX4PORcikSoc6uboPzCuwky+AKnyyl3wRqkhaiECvgmfbZIP17JtnnEYOwjimXA/x5xPFdG0oumGgoI7oFZy14Xc9f47nkV+gEhrKXNM/BxlVwO/Cg7autF3AdOup99xvb5EXUQMAyAehRDFlWSrHQxEd+QGUep3raLOtN9vUvkXIc6fttrXBAwf4+dKslG4uYFK+SilFLUUfAyadfE4DfxCesot7LiKx67z/ZqYnORtaO6IGLTJbyNNQUpeATv3Y81y6L5XquJB8ZfxVStv64zllDRDuwJI0qRTAIQhxQbL4Tb+qU7VKtZaz74aDk4yCTbW1tsl6Y1mp+ke2OSswNdQxXTovbzwMgZDyh1fvRbfXiCr1OTjvdEclSCFIjFxpPGQzWKbtD6wWdeOttzEhi6jF34HL9NwZQE9VNzQ0+qrOan0tz6kbapXnAQMG2C677GJnn3acbfHVDT0nQkAlm9+BEIGVozPKfZA/V3jJo5VUEHkHRahh9zz4iF3BCtg333anDRwyTFFH6Csth0r1VwfIUtKq2+n2NsKcQ23P3XaxM0871cZ+ZR3XLKowkSJhjUy30L8rb44UBkgPYIce1ArYAkrxhzSJLtbNk/lzDWbQg48+btVNg6y9rc3p1thQj8bFNHWAVmAmUAoL9qCJofW5Y1v1xKWHAl8OgHBwEAMU2i2GKC78roVotSR7HY6pduYqbMBakwfvu6+dyDqOo0cOR8CVGo3qL4Dw0apEgOA+uls4m0+6j6vh4v8kqcdpu+zK68icvNNemf6aJUh5jppZ3MT/7WcJkI9yVKRl8dvb213otey7mFwrUEljGT16tP3jWad5Mtgg8iKUku3ORkZIXwbeR3ilokuI5QZYml/RWxu7yW2QYOXJDP2YVbKuv/l2++NFl5CO3RZAlLq1bF4n4VfPCZEACn0QvlpGb/XDjzGBdhi/LYvfsF4E919KK1GZ770IqM4SBOk6aYsMC3QEIMG9lBynmZ3vfjjHrmam55UkqrWQIxG0RDQh8Q2v6BZZfhPNVIufox+WNojjcSlrgFCniSGk+EWdGvpYR/XiN37QS5a0GKeaUakChtyZvSROO+kE226bcaz3oB2pqMsZietgJoUKSy1+J13mdZDFiONLiTiaY/HOB7N9peqXpk3Hq79EEldqtX06LyQ+6RnCZTnNTuWzGFw+EAm/IgKi2TeOOcwO2ndvGzduKzYG0iQvQECX6YICIfURUfGvvQnl0obqngIW/CAQ++HHnvYl8h9+/AlWnSIJjPkm1Zh1AggBkOgsR6qmXmv+hBKxTphyjE1iFuo2OFW7Ge29bQhl6Gk1b9USSq1BR+EDkOAvgbYeRLdUFq1WwLrznvvsb1dfa88wV8MTx6CB8lcEtN4mbqO9R+RXiaI1URuWPm/8qewBQl3kTCPGgTmdsTWK80HH9VKnS21WWm2OlY7GkNp7yP77ARAnenah+x34Tb4DqcFu82oacIlFTKmwn5yKum8nWoNMiTlMEHrk8aftHCYyfTxvoQtIUMJLrLhPp0lwwv1dExAQcsj9BTy/hECg0Ux4dedttyTseShJSof5BKkUz+2zSBHQbtRrqBZ0dL1TZ3iV0BgN2TqfkTrTXWlvznrf7sPUuPAvlzJfY4HQyieuKSEs5DeoXTIj8EmwYlYO9X5bptgfD0gcSthTEQ+1i/+0RHWXBhA6M4+d4ete8mzOFDrGD/IJVZCH8fK0N+yW2+9gOvi1vnOYiCUTTdmVURTJHch+/5CF4W1WI+LSQ4EvLUCEJwjqsQBCMyOVONSycAHhvgMJax7m29WJp8WgYmyZF7I/A0CUrkHoXlLvBUYOEIw8irFrzsWfL7kce/whsg2zRBbqUK1LC12G9vftr4/etENt0YK2ao/SrvVd0QPRQZvv4G1hrYgD7CwSw0YOG8YS+QgqciQHYhqHqoBFgqvrgVofkUtpCZf7tRq729qZHduV87DnL399vj3/4iu2cPFin3ItByfS6yLvozLt02ifFP0w846ZPJll8k+yMSyfJ+GWo9QnctEItam3EgAihKv1zPSOYwQ1RQ20RaRcP/fCS/bvPz8XZ+VHrvXJNJP/QnRUCT4Hvyq0VSpoXJahwJcLINR0Oreng2GmIOzyviOYAIEiF9/+5hl24D572fpfGe3p1hpk3NbkPfBG0DyWocQqv4QIggRDTCUmm/3JPJt61z1ugy9ktSU028Ko/PfiMglOeHY9v4RQRwR4WRyzytD0vAgEP4eKv9Xmm9lhhxxikw4+yAY2ars+rmYE9cliLlQ8k65D6rW6dinFp9QLoKRBgLmaVq+Zqzey3uZNt93OQrdvkHtQ676gqK0CMLXL20Z/dbJl3/httmZOzMHsZHYoyWzcH3qGBWt6BwiJtr9oh1odAIJjBaEXgnWQJxL6aK5dcsXVds+999kHimgQbZH+pPCtTq/k2X0hIZkoqlSmZymEWIPO+fIAhDpFgMCb+lIldKaEnVWgcdJpJeVttt6KcNqpvqhrHYuVIEFu50qwFVaTFz/UEuro/a+zY3C66Y7UoyMPYX9fd9MtzAG4ldz/Bhca+QBc9nqvtM9nOP+q5TRBo6yAwQufJRxhxSX2qsT0yWJmKRdiyy2YDs7muoOalOKMpgFAaO0K0c1XhJLZBLCEyWO9N8m3xNO9eFWSnKQoiPaqeH3mm3b7nWwnOG2aa1Y5mYCOSGoX94Aoka2f7ezwEOxOO2xnP/jOWTYKx2UteRFB3wjP1ltLvEcEEDy7Xj3gwIX6rBWwtbpUG2uAPvn8i3bxJZfZM6zqRe+4GSRoUR2KaGnzH596L6o4QIg6cYko8KUACJcKWqyucxVUjMFnMQP/9YlVhNp94ZSTjj/ODt5/X1uf9R4kFHLSheuDFiDnorSO0tnA2TGoplynkamT4fPPl/yVGZtTWe7sNatjxWcxnYQuKdf851y8BdSt0TKYBtEq2CGhSRmbEgppUZoz4URBSAc0Nthuu+xiDThpfQdz2qU8DAm4zBKlSEeL3JTSZDkURU75Y2pqat28WUKKs2z/aa+9ZrPee89HaOVrhDCizBpNv1f+htpP5ifXJ2nb+oQ6NU19AtrEyOGDvX1qg/dvCY2JQEHnq+7ounAfOVuY6Yn2smhJp/32D39knsZd9uGcuVaphXtkXkFLutPNUh4oOCoFIH3gjBKa+aU/pawBQtSNACBQujCCqnM5oEQenyQEgzSyHd3Wm3/Nvvfdb5MwNNYGNzXAjNFYoYo4X5LmGkRf2EAXaf1FjTraabrTppOtd9HFl9rjTz1LZiHhRtoDi3mbEn5PLvkci7eA4VoJV+5kQyg0x0NCIlND60QGUyNEGXw2K62VSaDf5JiUmaV1N1uJtIhumtfhcxXQejy6U0J7BQwe5uS+2p/T/Tt81mxOaQ1p7tOFlqL2ul+Bm9bWNngimTI0q3xuhGwT9vgg83PfPXa3KUdNti0337QHWCNB7605EUDovAgUdEx0kK9FmoGAqbKqjg1/77AbSL++76FHcGACEO4jQROkzfLCqGfFT3Sk/saliAJlDhDqtqV2t5jHXwikuFAmg2YNiim0UvXeX9/dzjjtZF9dqTqF5x4O1lqVgWO5hvi9oh2q1RmiiBAr/0gdjIs5TRkkNDpn3gLfBEcMN+OtdxiSU+4519CqtqFjrLyq/8UvSwUi3EdVhdEf2BJgajikiBaal+ApzLxrLw0d0/PKvJCmgRw5UGoIDQaTDvRe9Hy4HYI5QyWeLcqxDBPJkoCPJmeF/Ap1jhR6gASNRv4ZgWtStFIKPJpOPebf2LVHeeLUHrvtjElU2grYamWxxqCedNOOZ6Ep4TfuFjI7oQP3f+PNdwCJO4m2XObhWU0wo0nQRRoX18FHvmo2/MEVvRNiDTqjzAFiqSArTVnfgpodQnoaGZ314Iy9yNI7EsfXHrvvRvhMsX8xsGzgkBvgzkwYVKIgAfFRQxy1khIJpIc2YScBRAeRitdmvG0X/O4P9vwrr7IdXXNBTS8ILdV5Zt9K6vzfHabFNFz/1Gqp62HElNYQJoa5n4Xn1Sa8gU6IKIIqjUGP6vkABSCRNqXjygFYBRmWabLuiZw7TbnYAUJY3U6mpDQbOf1UmUDC+4Z7u8+nYNap5dou0MGDsLP6ST6SQw7c17ZlZ3AXTjWGBwpaAVqKHraoOA34PRosqK3wHLp1gUbcVyUAWqVvXvTAo0/Yb8l2fYsp6+2ApMBR83W0RL60CGkcCULfuiYuSylQ3gDB6C8G1kYzWvZM9n8lQq5NbbvwOWhuhXL9Bw5ssNNPmGInHHWYj5K+UK28/IXOXp6pxHyRWipBUtE5xedHo5RUc+nSiAPrS861+x5+3H52zrmo0zAm7dFS8LUKMTpfy8Mvlo2L6CeaRj4TaTvyTTQ2NPgENm01qDyEcePG2ZGH7E9y16EOeiJ3DpWji/keNThcPfO1QE7VpxL1U+HwKt44vzvj80feePs9u+2eB9jE6GoiL63ksdSQ0EVImJwJ+UWkcTj6qQFx6aFAWQOEVD93jDECCSBkLWoUhEVY5h1lnhEgRyfvNXFPllk/iDUQt/esQmUWRoKvJ10eICJGi951js6PgEPHVYeKGEezMxMw1GNPPst0YkJ6JOAozVomi3agVgzfgYQWxgDhZHNNTZ8kbxFtXeiV+g2tpd4rPXzkyJGer3LWyVNs1OjRvlKWfB1yplZKI+B6JcBJe+nz4C7TAfOnG55Z1NLOTM+37af/dY7NZO6MLyjj2hgDA+fBJWppaDCf4hIoUPYAIcGT062LyIGrqFKtcXjVaM4DjJNidD/rH75p+3x9F9t4LJOA5KGGk4pHmWIgKD4u21xFx8S0Os9teEY/rdug7/JzyMHWjLdeW7397errWdn5XUwL9tygXdIipIMEVg4mgFe6pv9RH0ADaQkR2Aog1D/ark8mn0wTfZ+w9eZ20lGTbLddd7UmJpzRpSR3BYAWWAggdB4X9Y2qBYDQGhppnCcfL2j2jYwefvxJ+2jOJ57UJdNC4CCQF3/FZVkKlDVAKEypLhNAKCknaJiB8YAJq6+ttjFrj7J//qcf2zZ4wpuYsVkMAHrUlYFDBAY6R+Cgl0oEEGF+QwClHIz5wkuv2GUk3dx82x1sO6doAmaFmBYEE0NLhfYGxjzmdIz6QSZYlOUpsJCGpQlmoq/MDL3WWWuY7YX2d+opp7A69zqo/WzOg8DSxYGm+iA69xkg5AsJS/XlGFjayPy8gzka2g7xMVafqiCSo2iQOMoHBL+hNz/+U6BAWQOEPMsqCsnJqcRA7jF4zevvZPu59dZ
35d2w4+cD87FkfXumsN9eXNigFB10ZMFb3rmEoEEMXgEH4Jv+l8Te6R/187ZV3454s9lv7qazMLiVGcJ6CQigP/apRTnf49qmgNfhf9RA+ZEUrekgCqRPMfpBF4shZaXBVOgNHDBtqPfvBD24FJdiOGDuJEJbiFyARk9nMVmelbDgs3BLiFM4qkSAudT+bnX6+82q665lrf8ayK/VLl3NX8EfHC8nyiNq/JpawBQmsFaNDQNnACCP54h2cR3BrCUzuTjfet079hm2/2VRsg7UHMENQM7+ios6P34o7WeZEjUselOWhUixg7crJpOvc7s+faz885x158eZotYYs3OU19aX0BgtpFs3z5M+4fpg8X32lN/QxREE1PtSa64SZCgc4SWEmtDDIt7pPHx5Mif0RAf+iBzPRkT88EpoWwV7WICWTqiQecH3Ss1EIf6X6K2Ci6k+H97vse8Ong97IAb8MAwqtoF0r4SjHwxAC/LGHLGiDEHGIIjdSKYCQxNTSnv6V5kSdDTTpwf18xqrGuhkQbKYpihVAiUIjeo+PF7wIFjRoCA6manobMDQUeeum399iA9+5HnrI//ulCm4Pdqn03xGwZrtHt3MxQ+6hLCUeaE+FMXXyjNfAz5KPQcwWh1rco3CozQ+AvuvuK2MplYaHbcVtuaccedYQdtM9ensuikKgvy+eDA9eIGSh9pa8neKmzqEd5HNPfeNPuuPten0eTI7dF5mtY2r+gsfhd4j9O6+Gbjl8qVWVGE0dzOlSrN2mlam06o+nBC+Z9bIcxXVhTmvffa3cWJpV6qAgHPoFeSrGGEQGEjgkgIjVYjCttQu9PPf+ynX/RX+3pp57ymZJa80CmhxjNcysKsfMYIJYlvGgnxpJ5oc9KaJN5IRqLblHYUxpYUO0xJXHmHDnpYDue7MotWAVMcz80IGi+CBd5fapTumRfisAo4EO4rxzOz7Ke5i/O/Y29MetdZqUyE7ee+TREPPzEvlTez88tbw2iMGJoxNHMQzFWDYktSqs+7ZQTWRRlL9uAGZu+VyMA4Yk8fegwMW6kYeizGFVgoc8CiNmzZ9vU+x6y8/54qaco+4xR6pfnW2DkiUlwrEKvUcq3lliLi7SFYO5JK1P/yQTzuSrQLYQspakpAU19wBwT/ExtbK68PRscHXHwAYD/YVaraeqyM4oAQrTtK4WlQdAg7sM7fazVrrQi95XX3mg3sGTe+2iGMjW0XL87m+MO7KFAWQMEfEWnhpGaMYAVgNLM2Ky2CayUdOqJx9vOLIDayAxOpTfLwJAtWVwibUHHIiCIfo9+i971u17SBCKAePTRR+362+6yv916bwjNcbGAQKOhL4xLA9N89jkGMF2I1/eVfaMW9a/3HroikEid/ntfCixEIYGrch0EuoguGhk5JV3tNgoH5e47bmc/Yk7NyCGDmRTG5DMuUJKVolnSFPtMYTEPd3GHpXwZ3FfrRTzz4jQ2/r2MHcKnuROzokJ8FJdiCqx2gIBPVlqW7xzvV86O1NA0SVFDBzax98OxzNjchx2z1sH+IM7uOiejP91bDAQRk0Y3jH4Ts8Ky1BtmAuqbtAdxolZrkjmj1Ycuu/xylrK/056f+R6Tjmo8cUfg4StJu9ZAxh+gJYBQ0W9ejX/7cv3JFYivyahhrUglIAe7X30WaCchW1UPLn1m7zPZYdAzS4VaL9QTn0hXd4cj32UyapKXHIdKZVfqtTYB2nT9sfYjlsjflt3LhwES8u1omT9NTJNm1+fiHU67cYR63gNmIV1s88io/B1rat557wM264MPHYwUOdHpGih8cOK7nl1aiL6vaWX1A8QqGUwCHjEjAqf5+mIgFgCp5oc6mGPzr25s//nTf7MNxq5r9fUIpsKLPgapI5fVIFbWmRGLe39rRKEGL6i6WRi1tYM9Nj/62H756wtYPv0h2RArZQ49zpeZcSqZwZiFEO2VAgMS0Hj+WtAimWPdSeiSxmTK8fwa7QkUIjxdgVa9/E3lU1aTq7L6dLctqM1bRyU+JMKM9SxmmQMwMsg5mSSWpdosdM/npVEwjZ0U+kFNTbbfxIn2jRNPsM02Hku2dJbcCGkOhX5SVGsVJRoYgjwr+U1aCsAH/8hUVZ9pHw5pMbdMZQXsm26yu+6/n2n7TfhIAC1ArZVVwuUUV1KX9gjRvA33lXCNivs1/FP//rPaAUIqpvp5qVCFbgxkLjAAP+poWmMYn6vpqC46bOOxY0jLnWinn3oy04Wb6ECp9WG+huxYuj1U08vfwl38Ht4YBy3qgou0lP0nCxbb9bdMtRtYKWn6jJk+U7GXKr+0P0uTkvaQxj4XXaoAiGpeKb5ouX8+0lmibBBPCVopRdsQSKOrTwO4WAkZQKGGOGMNqS0OCgBDFc7nNO857u3uAQEFIU+tVbnuWmvZ2d8+y3bfaQe0xkbPmA379nH3XgaCZQFC5glp+jyDfEX6TfdCn/Hnmj5jFqnzt7My+ZXWzDJ6Pg0eQFR4VsVNGngwaBSBBiH8vqy26if3wz+rHyAkhRSpbZHKH9FVneeySmeKL9OaQAOj1eEJz5CWO5FU3BOOOcp23XF7jmkUkVADEIxyKKd8Lx0gJAzhbD7RJqVTyz7oRAV+nenBv/jVb+zV12Zgq7aQcQcz9dMSzUNQr2jZeCG3/4M4Lg5oWCGagGnFmN9dUdoWeV1oDOlEzuoAiIycjFC7JouWQP0ZBwWzGjSKrgQaBRIrA1EahPrCF9alX0854XhTKHtb8iIq6B9FOXxk8cFg1R3iQOCnsCUCdclcUgg6tIS/PKuUx8XsmfHAo4/ZXy7/m704faYvcKtIi5zQwZwUTwaeVXWqN5iSwfRYdSu+/L9+sQABQwgIBAoav4rVNoGHRjZ1jqBgMLtWH3vkZDsVphnO2gHyO+g32bPiqz4DRMRr3Fce9k4mg1UxkWj2J/N9w5Wf/uzn1kaasJKifBT98vf1Cp8gBQgn6YAEpobWmkwjRF34AmQCJBj1K0VfVHTNnO2uIGSZ0BYCvZdMIo3vgenUgEJFvhKNJGnVOdaDUN0AhPq7vjNjGRyDAohuhF7+BfGAfE0daIw7bz+BBW4PtylHHuE7h2l1bgm5NJPlB5cVtqgw2ohHZIhKA6lE+xBIuM0hxzJAMH3mTLvljjvtyhun2lzW+1Ddir4IDGRuyDEdImS0k2q8CEsLH/vz2xcEEHQ0nR11ctAcRHxRf+lvlUzF1QIjHayCtO/EPWCWI7BN90DdDJEv6YoCCal/6sC+hDl1p0hVlNmjhVS0lP3jTz1nV15zgy+Z3k2dWnVJW+n119KJEIuONTkQAUHOIKidIK6EWK7XGsyAatEX1T9Ln2VdG+idGrkEyU+8EvIt8EqyTH6CVwedl0VrEPA0kH+gPAcJaY65LdIO1CfiA8FAHRGMg/bdxxchXnvEMPbVkEgCWJyvEvGPf1nRH+9k+pnL8oCDokxaWdsFW0oB3ar1rxYvaSMfYpb9/Dd/RGt8A//DkoJj3M90UFCGrDQHlSQaRrTOiB/ox39WO0AEEAidqw52QIYhlj8echLoEDq1BoY468wzbJ89v07kYixMRUeLWZxhAsrLBxEiESX2FgwqhxUX0Rh1Pl7tRYvtxltu91z9D9nFuluOLO4txuqvJYsZ4JvuMsIn8poUh3OSfsEykJXuvogqRtEkICHnol6llEpG5xSvsIIXERHqzEDq9qTqACDo+WrAR74OmR/EKEIokz6Veq/ZlXJYbkMkQxrE/ntNtIFsnae+lxYRlVWCBHXTzaqedgBE/KtAG6BXOchLPhCeKwP/fULf/8t//Zrl+1+2hYsWcR0g5fylO6lNmqIeHJxKyVb+hiOHfu7HZbUDxLK0VEcJHHQUxREmil4SdjFIPeHFTTfa0MNeWzFjs55RRaOAJyTRgYVLuX6pRqLaVl3EOcrO1PiBCozzSvzyxNMvsN/kdXYLMzar2OMC/gE4xOTisv5ZPFORRxO9KxnhK2Sb89xZ0UeCxQtyW9JJIKdxaXRIERrRS3SVgCrU2UklCmuqr/VDnnsqagJeeLQq5DrQDs3dUP93ttvIoYNtx/Hj7Wym9I9hcl6N5ksg7FFZJUDoJOrWM9CL/i+PqUTCPs8E/NHBXZhPXQDg7Pnz7V9/fj4b7rBDGn6nyNwNLeURAC0HCIAhMjeiNvTn9y8AICIOC51crDmIacSMEUi0LlrIdO7RNuXoI+2oww9lb8dhbgtr8VVnPKqQeRA0h6jeUrqLC7nO7UtVhCkhHeEPF11aWKl6utUPGMQowagDQ1f0Y4DIsE1dmlG5K8UaGJCiHoGqR3AEvS0cW4Lmn8ZvkGTcTeIUqiT8WUqRmaJ5DgIgrdkh+1+egCYWAqtGPckCRotwNNcRxqgSaCRDnoOASSadRm8N4NyajX+H2D/94Ps+03Pk8EFUpT7hh0Ip/hwd63kXm3GqnJT6p8V/kmiM8kXQuW7efMyuYM+8+JL98oIL7T3yIcQXmjkqk8
35KzMNUOAEK8utQnETspe2j8+X5Qx9JVEDsqESCoJ70bNWrDNMp70N6a3zrzNHbo3sQGNTI1V2tEiHMKRY61aEZldKz3dwGEWAbTgns2s7fDW++8Z7/940X27PMvmTbCSbDIiH5Te/ozQKTIVZBvob0qbYO707ZxZ96+2olQZjTiZ8mPAECIEtXin5Aj09WB3gmM2h5oW6u8A+roquq2NnB94BJ2/yJH4l3A4YlBOC27ABEiR4k8y7/V1TIlO8OIrolzWrAH2GaEb2Iy3qQDDrDDDz6YfU+2QMD7ChAyL8JLmoHclMqDEAtqj9HnX3nFrr7hRrv1rvt9n48kWopzaYFHA38KEDSuCCSURBW+l0CKL/UpX4AGEejVAxBQPSycKmEE1EFvdYBem6w3FttzT+ZdnOQb8NZUCfk5S+FPVzXkyip4tbm2aFBZdafoephPy8bJe/7uB3N8dt8V11zPCDLbTQ6ZF2Ec7d8AUZ1jfwsI11LdZuvmOm3X9pzt2Wa2BSCRw4HZqXAlNK9X8gICgr+xpKKkZYFrHfkE3fg5OqrRSGoSNrC12uZ3V9mzdVV2xciULewiWkXuVSWCKydxhn5Rclwlc25ygIWiJzWYHJtusL6dOGWK7Qc/DGqq9zZEmkP0/qmGiaGkndBmAYTyOtBROaa/0lYr8DstsTvvv58Vr//CgrYfOmgomqKJZfpd2qkSqrS0YORY7+HdT92w/x34AgGCfqLzQieA6fISF4BB4CCgOBBmmHzIQbb/vl+3rKIM2LEp4pvag9Mz+5RRh4DLFBA4CGiiEnXiipinW5l1vLSikBaffYEdoKU9PPnMc9bKTL+qmvqgPcBQGnd8kk9UcT97r8ywADCqf0tVq62b77K927vtcDYpnwhQKHPSKtlfArJWZURgjqENlFLkFNQrgaARo0RHR4OoTlh9W43Ny9fYE/iWfr9WymaAAUuyKauqYG8NgT9goM135dzMskSdgFy7gtcyqk8hijX50ENsi69u6E0o7tvQ9Uv7308QyGsw4Hphhfwf8h9oty/wiGhEpb0wbSY7pN1sl155Be0ka5IIhZCwkx3A3FkKWEhb6CL0qvv5JD2+i3fXhPIFAATCLFSGyJ0dgegpBLWGPR072zvoOCIUgEUt388+/SQ7jCXRhw0d4jFyR3B6xf0ChRGAiryf3F5EoNWBKgIZTeHWdOOIkQQa4TOdSwfnmCD07ocf2x3k4p9DWrWyKJUwJTuzCsYQEzgjLMd3foN+8geRAQKVJZDGF5GysSjg+6F3/+v8ZsKQi7DRcVbisK0mZ0HjcHEUw0djaCO5Xr4IEyAemgPzJ+irJBmv5FOSVk19Rr5JRb3dze5cfxpYYW/SZ8M7WLmcX/JKqQYkUlzPgtT0Eb4AjuVzaRu3xWY2ad+97YwTjtO4wICge1ArofDg2FTfy3dQ0BRccwjt8GQvNVSgz+/oAyBE0i689Gq7/tbb7LmXX2GmMOuMAiAqAQCkZegb2pADQvRdx9aMstoBQoT2jDZG/y72kAwTsRg1+KcO176Smim5/Q6sUTjlMNt1+219J+uA3N5bdFbgyEjw1VXLHxNg6KXr9Jte0WeBkHc428Jpv4Trbr6ddQpvsVq20NNwI4BIYndzkp/H337LDUGU0JLw7bQmqmwwArI9ZsF3FzbbVh0t1lCBlx9/QBU+CQjiUBIRQ/RXj6wQIBBCkW0Js22rsEuqAGxDQ8m45Fdbq9Xb08k6u5DV5Z7hnAxaRS2ZlTk0FEU8wCKPquRAgjTf84zgo4YPsT123tF+8K3TbQR5ET6VHA1FES1t4iNpDqyx1D+gZDu1T3kX/kEn8L+NxLg58xfZ+b+/0O5lx61PFizyXciKtdDoOdfk99UOEJ6VhoagnHflu7uDkQ7TaF/H/hI5TAntKXn66afZvrvvYBuxUrVswggMlgcCdd7yx4q/63OkXagefdZOTAqpdXD/v155LSrmbTbtjZlWyya8CnmKh9yzwQeZGD5/pN9yCcLFcyagxxKAoBqUXg+6HESo72gmya2HXyJbkWZsZ3SFLi5oBVoIHjTCrhAgJIWUJZgG1UQ+UloUEoDIJpWHwJJ9VmevV9bZ9QO67a76KptWVW+jOhn90TQ6SLCSppFCw9MuWJqTk2Dpv2o0Cy0kc/qJU2wHBpDBzMfJMZtWM22Bh6AZ+KCgRWkcB7ie9vGb9ib1I/5e4YDwIKtb/+XyK+0lkqOkUSi0qnPjspQCqx0gNHFGoJDU7tASQO833nECpRgJqmGoDXBO/sfP/p1pv19hrUnibIUiYdfLRy5xQKFI6IuP6buKHEzR5+h3OZ9k33ZxvxlvzmJj1wtZ6fh+1GuSgti3UTP+xCXO9N64/g0QciUqxyElX0AdCUtIWgNgsXF7u/3f9qzt3oVDItdszUlmOnJelWz6QnGtL/rScyx8UO6IzJNOhLyGtMxKLQiZB2hSrKXhyfO1tqii1h6p67arG1J2NSs6jenE/sfn0I7W0kFyhBYnlqTLZKjhtu34h4YOabJ9dt/Rzjz9dFt/7Bh8mGlyZWpd+9R2CFp8NpkiBzRiD/WlN4n705/yPygB7s1Z79i5F/y3Pczq1nPZIc21xwLfFB4lfoMCqx0gpEGo0xVmkhhLnZdpUS2HYUebbbj+GNKqJ9opJ51oIwYPcMdk1FPFmkGkUei34uP6XgwYEUCEXAlMGABCo9LCliV2+RVX+p6Nr7OhSqqmTmFxb1tPCEs+iMJIqHr7Y1EKcpJhtpZ8hPY6pmXTF9LGm1D3v9vVYYe3N9tYTI10AltAI7kcAxQJnWsQ/i38CYIYPncj4PJXYAAAEAi6h4UwVwAIdBFuImcg+2aCOtcTxvxdw0AHbvWrNDb0FubBACz0SZJrq6pqfG6MPCajBzfaT378Qybt7WjDBg/yeTnh3gIhQMAbF5kZwYgSj8gJzghg8xcutseeesb+4xfn2CcLF3moU3NuYJyip4k/igKrHSAkcKEzCW9JIPWi4Clwb/Weu+1MOOsYm7DtOLa0w7SAW8U0EQjo3Egb0OflSwQOOh5dE4GJHJf6rPUeXn/7HTvnvPNsOjM2W9o6WIyWtSZRrdUcAYQcoj4vQO0t5vzlb/gl/54mjCmAqO9iY9+aDI5CzD2SmCpJvT4gu9iOASAOauFoHv8MI3uuIqwHEfVhRJroPSKHNAilVHdTVyoLQLiuj1lHQlQVBFXWJiqGNRMZub+63i5uGGov1KWZ3ZlEUwlhRpqAsxJNAu2ju54cCRgmI79V5xL7xqkn26EHHcimO19z08c1vvDHTUh1WhgU4B/+KTU6g5lTSZTi2RdeYQPmqWyCdI07QbXbt59F5y//HNHzrKnvqx0gImHT1GKFJ7VKkEJRmr23wZh1fSHaU0841poa6gqd9WmTQp0VCX1xxwkQpCFEDs0ILHSuPkcrV88icnHPw0/Y+Rf8Jix3DjhIe1CSDlW4JzuYJ3JmYp8z4PXX0kEylBKgGgCIPMKraGZWozthx7W759sR7a32vcU5iujylAAAE7ZJREFUG8DvRl5EPlG0YAx0lUCtSKgEEPLfCBg0x4OL+U9UQ/fjgmrlbOtnnKOvpRrtjoa17OIBLTaXBLUUDssKFJU8DsskoF1FLLqtgZmkSl7DR9XVvMB22n47wp6T7ahDDyUEShsk3NwzhL0LWio3gsu8T+UCSQMwWRym11x/o/31iqvs9ZlvWSV+L0XVFL2KfRCf5vIvACDoKbqtG6bU0vE1bFySR6jnfjzbjjrsYDr9MNt/z91hKvkKdOqKJ2FF2oEeKQILgYAiI/JuRyaFfnOzgt9U5Kh88Iln7E+XX2MPPfSQ9AOWXq9x8BBLB+2BqArXyfzxqEs/BwgRuj4DAEjAnCIKTdYQ1VhouxE9+FFrhW3XohTlToQ0mBiipWikLuopCGlPCU4c0EZ1oi0IZcmb7hRw8BvDAhO1uIC+X5RosNdrRtjPmhbaK5iaHUQ4qgQSugSfQgI/w6Ia7kWURatQVeLI1N6skw7Y37516jds7LqjVTVtCREytcHzMLgHMSn6lrwa2pBHO5n59vt20SWX+e5a3ib5qTjPMyy5YcRLPc+xhn9Y7QCBMQrJ5RoDtWGQpEYMQmvKkPzOmd9gxajd7avrj4FXNQ1ZCTMr7rSVAYSWpI8W/NA5QdDDQrTSLD744AO7Yeq9dvHVN9q8efP4ndsIRBipfPt62iXQWDp7D6bTkNdPS6aS/AQAIsVaDRL3BALswov6Pw/1fz20u8NJvz4eW300UYhKB5FADJ0v+nkpBgc/UPgBAec0MAJpRxiVceEcwDHpFRWaRo7Yz0s22EX1absLs3JGsh5XQRMgQU8ABlliHp3kQmjauCIbSbIs25oX24SttrQpRxwOz+xhA4l8aY0Qbw/Obh9cEH1pEAIIzf3opCnafPkGZuw++8KLVo1zU/M+Il5SqDR6HH+E+M/q90HISx2kUhOk6D6iCQMaGm2zTTay75xxKp3+NRtE2EuMIYeSg4RGmqIigY46VYcj1JcGIT9DsYkhTULn6qXj99xzj11501S79f7HHUikm2r0UGalL6IKUyoMmiLKIo94uK7/sk23ZzRBRDcDWEmJEGOKDMokQtWSaCTsmbRNu9vtX+bNti0Vgg6S54IkgOiRqGW7yPtNP3az10SFpmsKZKVFYHIIgOUoFu0r5TiE/hl+e5DEqctrk3YvgpuuHcKCMkQlAIc2Qixahi7JmJEgsSFP3kTnkha26xtmu203wf7hdLSIdUb7+hGav6EFcsF5+EIAk4EnlPeQs4/mLrJzf/Nbe/yZF2yu8h5YIT2j3b/xc4k3FMbtvz1dJEB9+PgFaBDB6ajt9GAPfABttvaotXzO/5GTDrD11x4B07BAqMYZtAudEwl4BAR6jz5HzxphSDSiCSj0kjah38QE4uFf/+rXdsOd99m0d+ZYA+sLwEfhN34XQMhPkUalrcYvoVwJ3TupoamfFsG06IP+hHQok1ArM7DrtqcWj0I4OZZstnMWvG97tmdsHeKgGmdFSwcI0UVSpQM9h
35QNof/ohn+0CIBgKGNXdZmCFKZdeaRN8rJQJwiQx7AibnxxqvyfkeWljtS2sHWoNrWgOgNXiuqwNT1RbEsDIMLGrDcCpxYxMAuRrDx9q//aP/4izcktCoAPdp0HPc7/gaLYs2brw0cfzFtuTz71s/3neBfbuR3OY68Eq5eS8dJBSDUKRcctgJK/5Ms/R80Br7IfVDhDatETZatoQJQcTNpDkssP4beyHZ3+X+f6jrKkxCG0WkFAHui9hRZ0WIUGh6+T0lKNc7Cd+FddLM5C2onUHWthT8+33PrT//Pk59vTzLxDaQp1m1PBz4QrdQu0SICjuHmke4pjlwUjV95fi9reeXq4CqKHp2QpAK7GoEsCASPRVt42lP761eI5Nbl3EMZadwwQJejwU9NwRaWnUprB1UmtRUaQFUo9oGAjNufqqL4Hw4TsjvUKimrdx64B6u6JxoD2WHUgGJzILcEgLGJytJ8LRbe0ARj7bTjJdo2VYElALBx1y4AG+JICvXclzuBlUMB0YZhwgXnhlul182ZV2530PEi5lAKhlvg1t0/J2Wl+iioFE838KDVQj4wIFVjtAaI0ACZ+YsHXhAtsC0+Lg/fe1b552qtVqMRiEVszjm9AgsKWmvrraCvMJFNyLIB6UwFMZ07LsnQ9ms+7g3Swnd529+/6Hvv5kzAEBF1xmERaBgwRYqrboLk1Bi8y6bU6fndQ6145ta2ZSF1Ef6JtQcps0APUZA7DvhY4GlpL24ADgNfdKZgd3zqpE+KdX19ltdU2EPZtsIVpHxn0iOWvMsPQfjdMaltJ3fMYl91Kbx35lXTsD/tl3r4k2iOhXSmADQAgANN/mk/kL2L7gEfvDny+x9z6cg3Mcn0thLxMtia9QugYsDQ5xWZYCqx8gUPc0clfSgQKIg1lz8NgjD7d9Ju7qo783j36CL70U3pZt9Qq+qWvVv1o2XbDgE7sY/eTkbCFl+NkXXrZfXfBbe43QlmZsplBR4wLNIkKLeP4Ksi26CyD0T2AhsN2DrMpD2jttt07U/Sr2KkF9r2YUl2jnmanZSVZTitG5Mq9sWUAioWSo3guWAn4fch6YEr4YX8hTqVo7b+0BNhOnZCut8LkWqP9VBFDUplyN5vHg26CfNbEvj0l44rFT7AhmemrdkBRQEq2ArcTux55+jryH2+2aG25mbQr9qsgFwCcN0p8ZzUeN0HP23tw16ozVDhCkuThSa5WhgfX1dsbJJxLePMRGj2ClIJHeJZ2+6qPZHzoWLmM08CKwUF2YKW+9+4FNvec++/kvf82M3qA2hxuFU9fkvwKIHqGQsKjw1nMsHPG/X8Ne37e1y05uTpACvwRNgTTstJKoWPgFx2IGU6OWSVDZXDvXK1+ysejqlX9U4LRDZ1ejXeJMnE0X3jikwS4nR+G9iiprwJxpAZBq01r8NkFOBLdFexBwScNZQkRjZ/IijoSPTpgy2R2jcnnIROUsu+jSy+2a6270QWLQsBHualBSnDsmuV7AqHyMngzalTd1jftltQOEVjBOp5mxCUBM3HUXO/5o9rlg4g1rwbinWv3lI5lzKQdXxKkr6iaNAGglXlCHpS5mGXVk0tx9/0N27U232tS772UX50bAhxFP4be4+KgpMvSQPaKJy00AjEj1HgaNt2Pa9zcXZm2j5GJrTLQy8rPbVr6WyAGb2wAKlVqiqaIDzUTvpaG8R7Pop2pvRKe10Y/vME/j34Y12WOszZFj1auuKtZnQLuozMlpjRmpPmYE0MbN0haGDBxgE3ff1X7yg7Otqb7GJ/7JyfzOnHn237/7vd17/4OsHNbOqlUNpGZgqmAeRbzm5pTzTGFwiWgQv69+H4Q2udHCoY2kzp5x8kl2AHbjRuuNxWHZwUQtVFKFqFyN4M17UN9LKAIHhSsBBmXGybRIYx/PYyLOZVcy5//m2+z92XN9GXv9TiNKqHRNOSXQ2AfTwiMLGgrw4GCrw9rbYkMCDlNYJn7P9CJbt3sJCUoZHIc1RBQamLWJ1iBboZKEKmaA+kIxhfpW9Ra8HfSZokapDqZ7E71I19h5Q0baLfVN9hbJUwQ26VMcHeQzJBFujf7aRFmv2mrMBpyNW2BenHXm6TZhmy1tOHt6Lly82O544BH2WL3CXp3+utUyIUwuEwUrFBJ34INflPOijF6F3KOnXlV716TfVrsGUUFIq6G2mr01x9oPvnOWjdv8a2yK00gKbSdRTRhAwuvaQwEYCnH3XjvFcQWvtBxXsi0Jo3YQEnuaNSb/9JdLcVI9bDU4vrT/hYps17gECggIChDhHwIw0AtRFyBEKrlsA9GESpvQvdhOZpn4HQD1RpyGneQoJLLkOGp0J6SZSLBencIiUUV+9cr/RLGkdvmPquCDKiZ15
35avsscQYu7Z+oN0wAJOGvtTaEDkGmAQTvpTl6pOv0Aa0ylhH2xIbwQrYe6CVnsUaphusN8befucd+/n5/2NPPPm0LVrcYgMGDrR2FinSQ8pHJZCQb0XaiF6qs+RGr/xx+tUvqx0gWhfPt002XM8OO+QQO/aoyTZq2FCfpOXiKoYsMGV450vEpb2RnY4WP4YuxvvNMPExuyQprfZO/A+z3nvfBg0d7gwixpKNGhfIWxB+0SKEcyGMyO4HChQqCHobpkQWOjfWL7LvfdJmk1vStpFHMQQGJDUBFh01aSIOWtCyls4ozQeBHxHE7rZWsmDrmBBWqWnizORsbx1lt1U12AVDzGbjwMxwD3VbkqxKZb6qWb5TFiaGTEaFPIcNGmT/76f/15cMeHX6dPvpz8+15mZMIZ7T97LgmggQFM6W9iAa5KhPuROBBpwUF6fAageIJJ25Mz6HE4871rYfvy0JL0pQIYuRUUCrVavTlZUQOjP40UvpK5kWwhJpBqzkbgsWtdj0N2bY7/74J3vl1dc8clHX0EBijGxmlniPNQgna8AHUT0AgwRQJcLlyIWp41l8AF0IckdDi500P2NHNOdtF7CAmSykxjPRS6YBu/M2Eckw/Abd+BFKKQQrLEe9abI3tbGf5lVk+Z7pbLBHiWhc2sQK2E0J1okgcgHw5wEfxyyN/mgVckYi5R7BkpmpmZ6jRo6wWbNm2V9ZiFjLyMkk6ejo8DC6QEFAoKULtbapEuoyaJZJFsyJAWLZHlvtANE0oMl23G47O2j//Wwoc/m105GcizVksrmQ0/XSAnyDFTzW2sillNJNUo7gRStVyQk1Z+58NkF51W6beqfNJQ6uuhVeVaakmD42MUqhajhH9FIvpOiLHCbEgpoO27Gt23ZpT9i2RBaaCDOmAAiZF2mixzWa9IAE50sEYQl7noHD74OPQWtAkATNIjV5/A/V9lSy0R5sZP5FZTvgztyMzloXZs+fgFmShKx1bZa+zeAAn7DtNp4lu3DhQnuZ1aKS8IQPHGgowSEpbYkmwicOFIBKFk1IJm4MEMvyxWoHCM3jGzxoiI0aMZxFals9SaUKdVI7aLWxk1YWwNCipb7/IesA5LUSUQmlUgk0gISWsUuR09+OpvDJ/IWuMahOcYRGC6mXGm08y7KEevv9KZIUXsoHWMbcKJDd4bnwuY6hXkI1j5QoaXxN5BQMJvpQK4BgNIa4lkbI2uQFBOZTRRO7VkVHpVunujAf6qutU4tAgC/DmKw3t6EZmAAMOobbB52svp1qgzdaiWSQf0Efa7mATvb3VLZnlKsBzpDjgs3Cu55HeQ9dhGfl+65n341OtAg9U+SD0DkCBfFFMGBW1dI177fVDhCad59EJazR+pN4oFXUWUtnT9KzYlg6TMwoYS6taAQCUDjdPdyMCop1y850bikwQc8IUXK9pd29355VRH65CiR4WiNSdNQOVSnetacFvcWPSmtnJOejf3N06Z0yCfpIdYDgnsSki6sBnC7Wp+AXzAqAg4kbeTQULVoT9udUuBMY0nW0QfeObhf6WC3QYa4rRKyUpStzws/TNVTg7fTzoqv9qvhPgQKrHSD6sulp8YjWW4+5vNPH6uYIBMI7jBMOFhhIXwrM01ul8e+fmQKCa23YW0qR9hIAppSz43NWJwVWO0BIWktjGwd4aFGaMDtAcG4EDiJi8ecAHRFpl1Wno6Px++dHgaDPldbT0vyCe/rzu39c0+dDgdUOEC60JY4skQpY8qP26IvLwYFjTGlAU/K94hNXSQGJfE8oZJVn8qM7KOP+6Y1MX8Tvqx0g+vqQpbLN8mPVMtf5l2Bv6v46d1ntoq+tis/vlQIefVq+V1Z2FR0k72Jcyo4Cqx0g+uJX6Bu1Cr4GLgrmxvJXBwbU3xgglqfN3+E7ANEHeIgB4u/QBZ9HlasdID6PRvdex1KwWNG5kb9iRb/Fxz4nCkgpKLEqh+5STy6xzvi0z4cCXxBA/D24IWgInyLLCpyiMUB8ikqf/4EYID5/mn4BNfYrgPi0+VKsSRSD0krA5AvogH59y76Qubh7+jVRvlwP9wUBxOdPpFVrBcVA8fnfO67x0xToCzbo6hgfPk3DcjjSbwDCibl8+NS5tK+sWg7d8uVvg6heKuUFDjFAlGef9y+AKE8ar5GtKhUcIuLEABFRorzeY4Aor/6IWxNToKwoEANEWXVH3JiYAuVFgRggyqs/4tbEFCgrCsQAUVbdETcmpkB5USAGiPLqj7g1MQXKigIxQJRVd8SNiSlQXhSIAaK8+iNuTUyBsqJADBBl1R1xY2IKlBcFYoAor/6IWxNToKwoEANEWXVH3JiYAuVFgRggyqs/4tbEFCgrCsQAUVbdETcmpkB5USAGiPLqj7g1MQXKigIxQJRVd8SNiSlQXhSIAaK8+iNuTUyBsqJADBBl1R1xY2IKlBcFYoAor/6IWxNToKwoEANEWXVH3JiYAuVFgRggyqs/4tbEFCgrCsQAUVbdETcmpkB5USAGiPLqj7g1MQXKigIxQJRVd8SNiSlQXhSIAaK8+iNuTUyBsqJADBBl1R1xY2IKlBcFYoAor/6IWxNToKwoEANEWXVH3JiYAuVFgRggyqs/4tbEFCgrCsQAUVbdETcmpkB5USAGiPLqj7g1MQXKigIxQJRVd8SNiSlQXhSIAaK8+iNuTUyBsqJADBBl1R1xY2IKlBcFYoAor/6IWxNToKwoEANEWXVH3JiYAuVFgRggyqs/4tbEFCgrCsQAUVbdETcmpkB5USAGiPLqj7g1MQXKigIxQJRVd8SNiSlQXhSIAaK8+iNuTUyBsqJADBBl1R1xY2IKlBcF/j8/876sccDNnQAAAABJRU5ErkJggg=="}))),xl=e=>t.createElement("svg",{width:258,height:135,viewBox:"0 0 258 135",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("g",{clipPath:"url(#clip0_1391_20786)"},t.createElement("path",{d:"M217.618 127.395C229.886 121.13 239.653 108.57 239.384 94.7979C227.914 104.433 213.407 109.702 198.427 109.67C192.65 109.637 186.228 108.999 181.739 112.635C178.945 114.897 177.48 118.48 177.047 122.048C176.614 125.617 177.1 129.226 177.586 132.787L177.284 133.632C191.027 134.575 205.35 133.659 217.618 127.395Z",fill:"#F0F0F0"}),t.createElement("path",{d:"M239.097 94.7644C233.753 104.7 225.201 112.993 215.005 117.862C212.801 118.915 210.473 119.791 208.04 120.109C205.665 120.402 203.255 120.053 201.061 119.099C198.997 118.251 196.985 117.144 194.75 116.812C192.396 116.462 190.145 117.233 188.319 118.722C186.085 120.542 184.639 123.057 183.309 125.566C181.834 128.351 180.345 131.267 177.739 133.17C177.423 133.401 177.799 133.877 178.115 133.647C182.649 130.337 183.741 124.371 187.454 120.366C189.186 118.498 191.492 117.14 194.114 117.35C196.406 117.533 198.483 118.673 200.565 119.55C202.751 120.471 204.968 120.98 207.352 120.792C209.79 120.6 212.156 119.813 214.378 118.821C219.398 116.535 224.028 113.473 228.098 109.748C232.766 105.523 236.677 100.531 239.662 94.9865C239.846 94.6433 239.28 94.4235 239.097 94.7644Z",fill:"white"}),t.createElement("path",{d:"M218.402 116.454C219.471 118.062 221.076 119.238 222.932 119.771C224.787 120.305 226.771 120.161 228.531 119.367C228.886 119.205 228.651 118.645 228.295 118.807C226.658 119.55 224.81 119.683 223.083 119.183C221.356 118.683 219.865 117.581 218.879 116.078C218.665 115.752 218.189 116.13 218.402 116.454Z",fill:"white"}),t.createElement("path",{d:"M202.051 119.667C202.796 115.792 204.974 112.339 208.151 109.999C208.466 109.767 208.09 109.29 207.775 109.522C204.474 111.964 202.214 115.561 201.448 119.595C201.375 119.98 201.978 120.049 202.051 119.667Z",fill:"white"}),t.createElement("path",{d:"M232.033 105.19C231.49 104.655 231.089 103.992 230.865 103.263C230.641 102.533 230.602 101.76 230.751 101.011C230.829 100.628 230.225 100.559 230.148 100.94C229.987 101.767 230.031 102.622 230.277 103.428C230.522 104.235 230.962 104.969 231.556 105.566C231.608 105.627 231.68 105.666 231.759 105.676C231.839 105.685 231.918 105.664 231.982 105.617C232.045 105.567 232.086 105.494 232.095 105.414C232.105 105.334 232.082 105.254 232.033 105.19Z",fill:"white"}),t.createElement("path",{d:"M202.87 65.7832C202.814 66.0213 202.759 66.2593 202.699 66.4994C201.939 69.6963 200.921 72.8262 199.655 75.8582C199.561 76.0942 199.462 76.3319 199.361 76.5647C196.232 83.837 191.779 90.4652 186.231 96.1122C184.021 98.3573 181.643 100.431 179.118 102.315C175.632 104.917 171.644 107.461 169.29 110.96C169.04 111.323 168.813 111.7 168.61 112.09L176.277 133.199C176.318 133.238 176.355 133.279 176.397 133.319L176.664 134.176C176.801 134.088 176.941 133.993 177.078 133.905C177.158 133.854 177.236 133.799 177.316 133.748C177.368 133.713 177.421 133.677 177.47 133.648C177.488 133.637 177.505 133.625 177.518 133.615C177.568 133.586 177.61 133.554 177.655 133.527C178.44 133.002 179.223 132.47 180.003 131.933C180.008 131.931 180.008 131.931 180.011 131.924C185.947 127.811 191.592 123.166 196.353 117.812C196.496 117.651 196.644 117.488 196.784 117.317C198.916 114.892 200.847 112.296 202.556 109.557C203.488 108.053 204.342 106.504 205.117 104.914C207.11 100.803 208.445 96.4037 209.071 91.8777C210.319 82.855 208.666 73.5337 203.286 66.3296C203.148 66.1454 203.012 65.9657 202.87 65.7832Z",fill:"#F0F0F0"}),t.createElement("path",{d:"M202.619 65.9271C204.334 77.0775 202.499 88.8481 197.29 98.8741C196.163 101.042 194.832 103.143 193.081 104.862C191.361 106.525 189.227 107.698 186.901 108.257C184.742 108.822 182.469 109.15 180.485 110.23C178.394 111.369 177.061 113.34 176.499 115.627C175.812 118.426 176.171 121.305 176.62 124.108C177.119 127.22 177.686 130.445 176.751 133.534C176.638 133.908 177.225 134.062 177.338 133.688C178.966 128.315 176.246 122.894 176.799 117.461C177.058 
35114.926 178.081 112.454 180.301 111.043C182.241 109.809 184.585 109.469 186.776 108.916C189.076 108.335 191.153 107.407 192.943 105.822C194.773 104.2 196.189 102.147 197.366 100.017C199.998 95.169 201.852 89.937 202.858 84.5128C204.042 78.3287 204.159 71.9877 203.204 65.7642C203.145 65.379 202.56 65.5444 202.619 65.9271Z",fill:"white"}),t.createElement("path",{d:"M199.154 95.7049C200.976 96.3453 202.965 96.3175 204.768 95.6265C206.57 94.9354 208.068 93.6261 208.995 91.9324C209.181 91.5891 208.656 91.2835 208.47 91.6273C207.61 93.2061 206.214 94.4256 204.534 95.0656C202.855 95.7057 201.001 95.7242 199.309 95.1178C198.941 94.9865 198.789 95.5744 199.154 95.7049Z",fill:"white"}),t.createElement("path",{d:"M188.033 108.115C186.294 104.573 185.955 100.505 187.082 96.7232C187.194 96.3486 186.607 96.1945 186.495 96.5686C185.329 100.506 185.691 104.739 187.508 108.421C187.682 108.772 188.205 108.464 188.033 108.115Z",fill:"white"}),t.createElement("path",{d:"M203.256 78.5041C202.5 78.4032 201.781 78.116 201.163 77.6683C200.545 77.2206 200.048 76.6265 199.716 75.9393C199.547 75.5864 199.024 75.8945 199.192 76.2451C199.562 77.0027 200.111 77.6582 200.793 78.1543C201.474 78.6504 202.267 78.9721 203.102 79.0912C203.179 79.109 203.261 79.0966 203.33 79.0564C203.399 79.0163 203.45 78.9514 203.472 78.8749C203.493 78.7971 203.481 78.7145 203.441 78.6451C203.4 78.5756 203.334 78.525 203.256 78.5041Z",fill:"white"}),t.createElement("path",{d:"M181.716 81.0842C181.673 80.3174 181.359 79.5908 180.831 79.0333C180.302 78.4757 179.594 78.1233 178.831 78.0384L131.863 72.7387C131.413 72.6873 130.957 72.7307 130.524 72.8661L119.75 76.2395L113.568 78.1769L102.159 81.7481C101.471 81.9645 100.873 82.4034 100.461 82.9958C100.048 83.5883 99.8444 84.3009 99.8806 85.0218L101.806 130.798C101.847 131.541 102.141 132.249 102.638 132.804C103.136 133.358 103.808 133.727 104.543 133.848L152.498 133.953C152.724 133.989 152.952 134.002 153.18 133.989C153.512 133.973 153.839 133.906 154.151 133.791L182.253 133.596C182.908 133.355 183.467 132.909 183.849 132.325C184.23 131.741 184.413 131.049 184.37 130.353L181.716 81.0842Z",fill:"white"}),t.createElement("path",{d:"M104.995 131.034L152.951 131.138C153.021 131.149 153.093 131.143 153.159 131.118L181.258 130.925C181.34 130.896 181.411 130.84 181.459 130.767C181.506 130.693 181.529 130.606 181.523 130.519L178.872 81.2496C178.866 81.1542 178.826 81.0641 178.761 80.9946C178.695 80.9252 178.607 80.8807 178.512 80.8688L178.196 80.8316L131.543 75.573C131.522 75.5702 131.5 75.5696 131.479 75.5712C131.443 75.5722 131.409 75.5777 131.375 75.5877L105.096 83.8172L103.01 84.4685C102.925 84.4964 102.851 84.5514 102.8 84.6251C102.749 84.6989 102.723 84.7873 102.727 84.877L104.653 130.651C104.658 130.744 104.695 130.833 104.757 130.903C104.819 130.972 104.903 131.019 104.995 131.034Z",fill:"#3B84FB"}),t.createElement("path",{d:"M105.096 83.8172L131.375 75.5877C131.409 75.5777 131.444 75.5722 131.479 75.5712C131.5 75.5696 131.522 75.5702 131.543 75.573L178.196 80.8316L166.961 84.4878L162.755 85.854L150.789 89.7451C150.754 89.7545 150.718 89.7616 150.682 89.7666C150.659 89.7646 150.636 89.7627 150.608 89.7612L105.096 83.8172Z",fill:"#2F2E41"}),t.createElement("path",{d:"M104.543 133.851L152.498 133.955C152.723 133.991 152.952 134.001 153.18 133.987C153.513 133.971 153.841 133.906 154.153 133.793L182.252 133.6C182.907 133.358 183.466 132.912 183.848 132.327C184.23 131.742 184.413 131.05 184.371 130.353L181.716 81.0845C181.682 80.5074 181.496 79.9495 181.177 79.4674C181.133 79.4037 181.089 79.3399 181.041 79.2812C180.711 78.8493 180.276 78.5091 179.777 78.2929C179.476 78.1609 179.157 78.0753 178.831 78.0389L178.775 78.0315L131.866 72.738C131.674 72.7189 131.482 72.7133 131.29 72.7213C131.029 72.7392 130.772 72.7887 130.523 72.8687L119.75 76.2381L113.569 78.1788L102.158 81.7495C101.691 81.8951 101.264 82.1447 100.907 82.4797C100.879 82.5017 100.852 82.5262 100.828 82.5529C100.811 82.5704 100.795 82.5891 100.78 82.6089
35C100.474 82.9286 100.237 83.3071 100.083 83.7213C99.9282 84.1356 99.8597 84.577 99.8813 85.0186L101.804 130.798C101.845 131.542 102.139 132.25 102.637 132.805C103.135 133.361 103.807 133.729 104.543 133.851ZM100.693 84.9808C100.671 84.523 100.78 84.0683 101.007 83.67C101.074 83.543 101.154 83.4232 101.246 83.3124C101.495 83.0055 101.815 82.7641 102.179 82.6094C102.25 82.5781 102.324 82.5513 102.399 82.5292L121.611 76.5159L130.767 73.6434C130.829 73.6225 130.888 73.6112 130.945 73.5955C131.086 73.5625 131.23 73.543 131.374 73.5372C131.506 73.5266 131.639 73.5299 131.77 73.547L178.735 78.8479C178.773 78.8528 178.805 78.8582 178.843 78.8631C179.273 78.9269 179.677 79.1074 180.012 79.3852C180.275 79.5964 180.49 79.8607 180.644 80.1609C180.798 80.461 180.886 80.7902 180.904 81.1269L183.555 130.401C183.587 130.923 183.45 131.441 183.165 131.879C182.88 132.317 182.461 132.652 181.971 132.834L153.869 133.027C153.471 133.173 153.043 133.214 152.626 133.146L104.671 133.047C104.12 132.955 103.617 132.678 103.245 132.262C102.872 131.847 102.652 131.317 102.62 130.759L100.693 84.9808Z",fill:"#3F3D56"}),t.createElement("path",{d:"M153.326 134.076C153.218 134.082 153.113 134.045 153.033 133.973C152.953 133.901 152.905 133.801 152.899 133.694L150.256 89.3807C150.249 89.2729 150.286 89.1669 150.358 89.0862C150.429 89.0054 150.53 88.9564 150.638 88.9499L150.642 88.9497C150.749 88.9443 150.854 88.9815 150.934 89.0531C151.014 89.1247 151.062 89.225 151.069 89.3322L153.712 133.645C153.718 133.753 153.681 133.859 153.61 133.94C153.538 134.021 153.437 134.07 153.329 134.076L153.326 134.076Z",fill:"#3F3D56"}),t.createElement("path",{d:"M169.905 131.08L165.304 131.049L160.938 85.5879C160.938 85.5879 166.465 83.3274 166.707 83.712C166.855 83.9411 169.888 130.798 169.905 131.08Z",fill:"#3F3D56"}),t.createElement("path",{d:"M180.251 79.7727L179.919 79.5008C179.577 79.2196 179.16 79.0443 178.72 78.9962L131.755 73.6955C131.496 73.667 131.234 73.6815 130.98 73.7384L130.804 73.7819L130.769 73.0793L138.557 64.4632C139.021 63.9525 139.597 63.5557 140.239 63.3037C140.881 63.0518 141.573 62.9515 142.26 63.0107L174.01 65.8197C174.959 65.9005 175.856 66.2838 176.57 66.9132C177.284 67.5426 177.777 68.3848 177.977 69.3156L180.251 79.7727Z",fill:"#3F3D56"}),t.createElement("path",{d:"M109.265 114.443C109.315 114.435 109.366 114.433 109.416 114.436L123.871 115.312C124.052 115.323 124.221 115.405 124.342 115.541C124.462 115.677 124.523 115.854 124.512 116.035C124.501 116.216 124.419 116.386 124.283 116.506C124.148 116.626 123.97 116.687 123.789 116.677L109.334 115.8C109.166 115.79 109.008 115.719 108.89 115.599C108.771 115.48 108.701 115.321 108.693 115.153C108.684 114.985 108.738 114.82 108.843 114.689C108.949 114.558 109.099 114.471 109.265 114.443Z",fill:"white"}),t.createElement("path",{d:"M109.507 119.522C109.557 119.513 109.608 119.511 109.659 119.514L124.113 120.39C124.294 120.401 124.464 120.483 124.584 120.619C124.704 120.755 124.766 120.933 124.755 121.114C124.744 121.294 124.661 121.464 124.526 121.584C124.39 121.704 124.212 121.766 124.031 121.755L109.576 120.879C109.408 120.868 109.25 120.797 109.132 120.677C109.014 120.558 108.944 120.399 108.935 120.231C108.926 120.063 108.98 119.898 109.086 119.767C109.191 119.636 109.341 119.549 109.507 119.522Z",fill:"white"}),t.createElement("path",{d:"M178.645 58.8886L150.762 74.0696L139.307 53.0296L167.189 37.8486L178.645 58.8886Z",fill:"white"}),t.createElement("path",{d:"M178.645 58.8886L150.762 74.0696L139.307 53.0296L167.189 37.8486L178.645 58.8886ZM150.996 73.2775L177.852 58.655L166.955 38.6407L140.099 53.2632L150.996 73.2775Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M166.632 45.5816L146.104 56.7578L146.85 58.1263L167.377 46.9501L166.632 45.5816Z",fill:"#0000FF"}),t.createElement("path",{d:"M168.866 49.6861L148.339 60.8623L149.084 62.2308L169.612 51.0546L168.866 49.6861Z",fill:"#0000FF"}),t.createElement("path",{d:"M171.102 53.7915L150.575 64.9678L151.32 66.3363L171.847 55.16L171.102 53.7915Z",fill:"#0000FF"}),t.createElement("path",{d:"M115.107 40.3472C114.819 40.0245 114.721 39.9916 114.618 40.0621L98.7513 51.0096C98.6502 51.0794 98.6442 51.1825 98.8405 51.5619C99.3591 52.3646 99.993 53.3125 100.687 54.318L121.102 83.9069C123.015 86.6804 124.678 88.864 124.807 88.7746L140.674 77.8271C140.804 77.7377 139.353 75.4083 137.439 72.6349L117.024 43.046C116.332 42.0427 115.672 41.1159 115.107 40.3472Z",fill:"white"}),t.createElement("path",{d:"M117.221 43.1167C116.86 42.6109 116.516 42.142 116.209 41.7334C115.839 41.2438 115.537 40.8558 115.307 40.5784C115.231 40.4881 115.166 40.4106 115.107 40.3472C114.819 40.0245 114.721 39.9916 114.618 40.0621L98.7513 51.0096C98.6502 51.0794 98.6442 51.1825 98.8405 51.5619C98.8808 51.6397 98.9305 51.7312 98.9896 51.8363C99.1665 52.1487 99.4217 52.5696 99.749 53.0901C100.297 53.9567 101.017 55.0395 101.776 56.1405L121.163 84.2387C122.043 85.5147 122.897 86.6984 123.566 87.5734C124.68 89.0301 124.762 88.9737 124.886 88.8883L140.753 77.9407C140.877 77.8553 
35140.958 77.7988 139.992 76.2401C139.412 75.304 138.608 74.0858 137.728 72.8099L118.341 44.7116C117.961 44.1606 117.582 43.6206 117.221 43.1167ZM102.004 55.9837C101.246 54.8861 100.528 53.8056 99.9833 52.9435C99.6573 52.4272 99.4047 52.0078 99.231 51.7C99.1326 51.5372 99.0467 51.3672 98.974 51.1914L114.709 40.3348C114.848 40.4652 114.976 40.6059 115.093 40.7556C115.207 40.8917 115.339 41.0555 115.49 41.2471C115.639 41.4392 115.805 41.657 115.989 41.9004C116.602 42.7154 117.356 43.7697 118.114 44.8684L137.5 72.9666C139.34 75.6333 140.4 77.3908 140.531 77.7582L124.794 88.6163C124.497 88.3633 123.23 86.7486 121.39 84.0819L102.004 55.9837Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M111.714 49.4478L108.71 51.5205C108.56 51.6245 108.456 51.7841 108.423 51.9641C108.39 52.1441 108.43 52.3299 108.534 52.4806L110.329 55.0825C110.433 55.2329 110.593 55.3359 110.773 55.3689C110.953 55.4019 111.139 55.3623 111.289 55.2586L114.293 53.1859C114.444 53.0816 114.547 52.9221 114.58 52.7422C114.613 52.5623 114.573 52.3767 114.47 52.2259L112.674 49.624C112.57 49.4735 112.411 49.3705 112.231 49.3375C112.051 49.3045 111.865 49.3442 111.714 49.4478Z",fill:"#0000FF"}),t.createElement("path",{d:"M119.199 52.3103L108.729 59.5342C108.695 59.5576 108.666 59.5874 108.644 59.6219C108.621 59.6565 108.606 59.6951 108.598 59.7356C108.591 59.776 108.592 59.8176 108.6 59.8578C108.609 59.898 108.625 59.9362 108.649 59.9701C108.672 60.0039 108.702 60.0329 108.736 60.0552C108.771 60.0776 108.81 60.0929 108.85 60.1003C108.891 60.1077 108.932 60.1071 108.972 60.0985C109.013 60.0899 109.051 60.0734 109.085 60.05L119.555 52.8262C119.589 52.8028 119.617 52.773 119.64 52.7384C119.662 52.7039 119.677 52.6653 119.685 52.6248C119.692 52.5843 119.692 52.5428 119.683 52.5025C119.674 52.4623 119.658 52.4242 119.635 52.3903C119.611 52.3564 119.581 52.3275 119.547 52.3051C119.512 52.2828 119.474 52.2675 119.433 52.26C119.393 52.2526 119.351 52.2532 119.311 52.2619C119.271 52.2705 119.233 52.287 119.199 52.3103Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M113.539 57.9998L109.563 60.7435C109.529 60.7669 109.5 60.7967 109.477 60.8312C109.455 60.8658 109.44 60.9044 109.432 60.9449C109.425 60.9854 109.426 61.0269 109.434 61.0671C109.443 61.1074 109.459 61.1455 109.483 61.1794C109.506 61.2133 109.536 61.2422 109.57 61.2645C109.605 61.2869 109.644 61.3022 109.684 61.3096C109.725 61.3171 109.766 61.3165 109.806 61.3078C109.847 61.2992 109.885 61.2827 109.919 61.2594L113.895 58.5156C113.964 58.4684 114.011 58.396 114.026 58.3142C114.041 58.2325 114.022 58.1481 113.975 58.0797C113.928 58.0113 113.856 57.9645 113.774 57.9495C113.692 57.9345 113.608 57.9526 113.539 57.9998Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M119.475 60.6959L116.471 62.7686C116.32 62.8726 116.217 63.0321 116.184 63.2121C116.151 63.3922 116.191 63.5779 116.295 63.7286L118.09 66.3305C118.194 66.481 118.354 66.584 118.534 66.617C118.714 66.65 118.899 66.6103 119.05 66.5067L122.054 64.434C122.204 64.3297 122.307 64.1701 122.34 63.9903C122.373 63.8104 122.334 63.6247 122.23 63.4739L120.435 60.872C120.331 60.7216 120.171 60.6186 119.992 60.5856C119.812 60.5526 119.626 60.5922 119.475 60.6959Z",fill:"#0000FF"}),t.createElement("path",{d:"M126.959 63.5593L116.489 70.7832C116.421 70.8304 116.374 70.9028 116.359 70.9846C116.344 71.0663 116.362 71.1507 116.409 71.2191C116.457 71.2875 116.529 71.3344 116.611 71.3493C116.693 71.3643 116.777 71.3463 116.845 71.2991L127.315 64.0752C127.349 64.0518 127.378 64.022 127.401 63.9875C127.423 63.9529 127.438 63.9143 127.446 63.8738C127.453 63.8333 127.452 63.7918 127.444 63.7516C127.435 63.7113 127.419 63.6732 127.395 63.6393C127.372 63.6054 127.342 63.5765 127.308 63.5541C127.273 63.5318 127.234 63.5165 127.194 63.509C127.154 63.5016 127.112 63.5022 127.072 63.5109C127.031 63.5195 126.993 63.536 126.959 63.5593Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M121.3 69.2478L117.323 71.9916C117.255 72.0387 117.208 72.1112 117.193 72.1929C117.178 72.2747 117.196 72.359 117.243 72.4274C117.291 72.4958 117.363 72.5427 117.445 72.5577C117.527 72.5727 117.611 72.5546 117.679 72.5074L121.656 69.7637C121.69 69.7403 121.719 69.7105 121.741 69.6759C121.764 69.6414 121.779 69.6028 121.786 69.5623C121.794 69.5218 121.793 69.4803 121.784 69.44C121.776 69.3998 121.759 69.3617 121.736 69.3278C121.713 69.2939 121.683 69.265 121.648 69.2426C121.614 69.2203 121.575 69.205 121.535 69.1975C121.494 69.1901 121.453 69.1907 121.412 69.1994C121.372 69.208 121.334 69.2244 121.3 69.2478Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M127.236 71.9449L124.232 74.0176C124.082 74.1216 123.978 74.2811 123.945 74.4612C123.912 74.6412 123.952 74.827 124.056 74.9777L125.851 77.5796C125.955 77.73 126.115 77.833 126.295 77.866C126.475 77.899 126.661 77.8593 126.811 77.7557L129.815 75.683C129.966 75.5787 130.069 75.4192 130.102 75.2393C130.135 75.0594 130.095 74.8738 129.992 74.7229L128.196 72.121C128.092 71.9706 127.933 71.8676 127.753 71.8346C127.573 71.8016 127.387 71.8412 127.236 71.9449Z",fill:"#0000FF"}
35),t.createElement("path",{d:"M134.72 74.8084L124.25 82.0322C124.216 82.0556 124.187 82.0854 124.165 82.12C124.143 82.1545 124.127 82.1931 124.12 82.2336C124.112 82.2741 124.113 82.3156 124.122 82.3559C124.13 82.3961 124.147 82.4342 124.17 82.4681C124.194 82.502 124.223 82.5309 124.258 82.5533C124.292 82.5756 124.331 82.5909 124.372 82.5984C124.412 82.6058 124.454 82.6052 124.494 82.5965C124.534 82.5879 124.572 82.5715 124.606 82.5481L135.076 75.3242C135.145 75.277 135.191 75.2046 135.206 75.1228C135.221 75.0411 135.203 74.9567 135.156 74.8883C135.109 74.8199 135.036 74.7731 134.955 74.7581C134.873 74.7431 134.789 74.7612 134.72 74.8084Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M129.061 80.4968L125.085 83.2406C125.051 83.2639 125.022 83.2938 124.999 83.3283C124.977 83.3629 124.962 83.4015 124.954 83.442C124.947 83.4824 124.948 83.524 124.956 83.5642C124.965 83.6044 124.981 83.6426 125.005 83.6765C125.028 83.7103 125.058 83.7393 125.092 83.7616C125.127 83.784 125.166 83.7993 125.206 83.8067C125.246 83.8141 125.288 83.8135 125.328 83.8049C125.369 83.7963 125.407 83.7798 125.441 83.7564L129.417 81.0127C129.486 80.9655 129.532 80.893 129.547 80.8113C129.562 80.7296 129.544 80.6452 129.497 80.5768C129.45 80.5084 129.378 80.4615 129.296 80.4466C129.214 80.4316 129.13 80.4496 129.061 80.4968Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M162.367 53.5553C162.304 52.0153 162.208 51.0225 162.097 51.0225H121.607C121.497 51.0225 121.401 52.0153 121.338 53.5553C121.296 54.6289 121.27 55.9686 121.27 57.4189V85.6304L121.434 85.6513L128.091 86.5185L135.028 87.4276L138.198 87.8403L144.977 88.7254L150.608 89.4611C150.635 89.4641 150.659 89.4641 150.683 89.4671C150.719 89.4611 150.755 89.4551 150.788 89.4461L153.004 88.7254L155.56 87.8941L162.271 85.7111L162.435 85.6573V57.4189C162.435 55.9686 162.408 54.6289 162.367 53.5553Z",fill:"white"}),t.createElement("path",{d:"M162.501 52.8889C162.48 52.4882 162.459 52.1652 162.435 51.908C162.419 51.6393 162.381 51.3723 162.322 51.1096C162.256 50.8584 162.181 50.8584 162.097 50.8584H121.607C121.524 50.8584 121.449 50.8584 121.383 51.1096C121.325 51.3856 121.287 51.6654 121.269 51.9469C121.249 52.1981 121.228 52.5091 121.207 52.8889C121.141 54.1 121.105 55.7088 121.105 57.4193V85.6068L121.269 85.6308L121.434 85.6517V57.4193C121.434 55.9301 121.461 54.6682 121.5 53.6724C121.507 52.8393 121.574 52.0078 121.7 51.1843H162.008C162.134 52.0068 162.201 52.8373 162.208 53.6694C162.244 54.6652 162.271 55.9271 162.271 57.4193V85.7115L162.6 85.6038V57.4193C162.6 55.7088 162.564 54.1 162.501 52.8889Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M134.05 59.623H128.886C128.758 59.6228 128.631 59.6478 128.512 59.6966C128.394 59.7455 128.286 59.8172 128.195 59.9078C128.104 59.9983 128.032 60.1059 127.983 60.2243C127.934 60.3427 127.908 60.4697 127.908 60.5979V65.0716C127.908 65.2 127.933 65.3273 127.982 65.446C128.031 65.5647 128.103 65.6726 128.194 65.7635C128.285 65.8543 128.393 65.9263 128.512 65.9754C128.63 66.0245 128.758 66.0496 128.886 66.0494H134.05C134.31 66.0493 134.558 65.9463 134.742 65.7629C134.925 65.5795 135.028 65.3309 135.028 65.0716V60.5979C135.028 60.3391 134.924 60.0911 134.741 59.9083C134.558 59.7256 134.309 59.623 134.05 59.623Z",fill:"#0000FF"}),t.createElement("path",{d:"M155.354 61.3555H137.352C137.234 61.3555 137.122 61.4021 137.039 61.4851C136.956 61.5681 136.909 61.6807 136.909 61.7981C136.909 61.9154 136.956 62.028 137.039 62.111C137.122 62.194 137.234 62.2406 137.352 62.2406H155.354C155.471 62.2406 155.584 62.194 155.667 62.111C155.75 62.028 155.797 61.9154 155.797 61.7981C155.797 61.6807 155.75 61.5681 155.667 61.4851C155.584 61.4021 155.471 61.3555 155.354 61.3555Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M144.188 63.4336H137.352C137.234 63.4336 137.122 63.4802 137.039 63.5632C136.956 63.6462 136.909 63.7588 136.909 63.8762C136.909 63.9936 136.956 64.1061 137.039 64.1891C137.122 64.2721 137.234 64.3187 137.352 64.3187H144.188C144.305 64.3187 144.418 64.2721 144.501 64.1891C144.584 64.1061 144.63 63.9936 144.63 63.8762C144.63 63.7588 144.584 63.6462 144.501 63.5632C144.418 63.4802 144.305 63.4336 144.188 63.4336Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M134.05 72.8652H128.886C128.627 72.8653 128.378 72.9684 128.195 73.1518C128.011 73.3351 127.908 73.5838 127.908 73.8431V78.3167C127.908 78.5761 128.011 78.8247 128.195 79.0081C128.378 79.1914 128.627 79.2945 128.886 79.2946H134.05C134.31 79.294 134.558 79.1908 134.741 79.0075C134.925 78.8243 135.028 78.5759 135.028 78.3167V73.8431C135.028 73.5839 134.925 73.3356 134.741 73.1523C134.558 72.9691 134.31 72.8658 134.05 72.8652Z",fill:"#0000FF"}),t.createElement("path",{d:"M155.354 74.5957H137.352C137.234 74.5957 137.121 74.6425 137.038 74.7258C136.954 74.8091 136.908 74.922 136.908 75.0398C136.908 75.1576 136.954 75.2705 137.038 75.3538C137.121 75.4371 137.234 75.4839 137.352 75.4839H155.354C155.472 75.4839 155.585 75.4371 155.668 75.3538C155.751 75.2705 155.798 75.1576 155.798 75.0398C155.798 74.922 155.751 74.8091 155.668 74.7258C155.585 74.6425 155.472 74.5957 155.354 74.5957Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M144.188 76.6748H137.352C137.234 76.6748 137.121 76.7216 137.038 76.8049C136.954 76.8882 136.908 77.0011 136.908 77.1189C136.908 77.2367 136.954 77.3496 137.038 77.4329C137.121 77.5162 137.234 77.563 137.352 77.563H144.188C144.306 77.563 144.419 77.5162 144.502 7
357.4329C144.585 77.3496 144.632 77.2367 144.632 77.1189C144.632 77.0011 144.585 76.8882 144.502 76.8049C144.419 76.7216 144.306 76.6748 144.188 76.6748Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M134.888 86.5849C134.802 86.4397 134.679 86.3196 134.532 86.2362C134.386 86.1528 134.22 86.1091 134.051 86.1094H128.886C128.731 86.109 128.577 86.146 128.439 86.2173C128.3 86.2886 128.181 86.3921 128.091 86.5191L135.029 87.4282V87.0843C135.029 86.908 134.98 86.7351 134.888 86.5849Z",fill:"#0000FF"}),t.createElement("path",{d:"M155.354 87.8409H138.198L144.977 88.726H153.004L155.561 87.8947C155.498 87.8584 155.427 87.8398 155.354 87.8409Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M180.578 80.0415C180.545 80.0626 180.51 80.0797 180.473 80.0923L178.987 80.5738L166.96 84.4882L162.755 85.8518L162.6 85.9027L162.271 86.0103L155.56 88.1933L153.003 89.0247L150.787 89.7453C150.755 89.7543 150.719 89.7603 150.683 89.7663C150.659 89.7633 150.635 89.7633 150.608 89.7603L144.977 89.0247L138.198 88.1395L135.028 87.7268L128.09 86.8178L121.434 85.9505L121.269 85.9296L121.105 85.9057L101.246 83.313L101.078 83.2891C101.039 83.2855 101.002 83.2743 100.967 83.2562C100.887 83.2202 100.821 83.1596 100.778 83.0832C100.735 83.0068 100.717 82.9186 100.728 82.8315C100.736 82.7586 100.764 82.6892 
35100.809 82.6312C100.827 82.6133 100.842 82.5953 100.86 82.5804C100.875 82.5714 100.893 82.5534 100.911 82.5445C100.991 82.4891 101.089 82.4657 101.186 82.4787L102.179 82.6103L121.105 85.0833L121.269 85.1042L121.434 85.1252L131.239 86.4081L134.888 86.8835L144.49 88.1395L150.623 88.9409L153.09 88.1395L160.937 85.5887L162.271 85.1551L162.435 85.1012L162.6 85.0474L166.705 83.7137L178.918 79.7395L180.013 79.3836L180.225 79.3148C180.316 79.286 180.415 79.2902 180.504 79.3269C180.592 79.3635 180.665 79.4302 180.709 79.5152C180.72 79.5353 180.729 79.5563 180.736 79.578C180.763 79.662 180.762 79.7525 180.734 79.8359C180.705 79.9194 180.65 79.9915 180.578 80.0415Z",fill:"#3F3D56"}),t.createElement("path",{d:"M139.283 108.164C139.021 108.164 138.758 108.143 138.499 108.103L108.474 103.414C107.443 103.25 106.486 102.776 105.73 102.056C104.975 101.336 104.455 100.403 104.242 99.3809L100.891 83.1162L101.097 83.1413L151.29 89.2088L143.951 105.177C143.538 106.068 142.88 106.822 142.053 107.351C141.226 107.88 140.265 108.162 139.283 108.164Z",fill:"#3F3D56"}),t.createElement("path",{d:"M257.695 134.363H37.7409C37.6602 134.363 37.5829 134.331 37.526 134.274C37.469 134.217 37.437 134.139 37.437 134.059C37.437 133.978 37.469 133.901 37.526 133.843C37.5829 133.786 37.6602 133.754 37.7409 133.754H257.695C257.776 133.754 257.853 133.786 257.91 133.843C257.967 133.9 258 133.978 258 134.059C258 134.14 257.967 134.217 257.91 134.274C257.853 134.331 257.776 134.363 257.695 134.363Z",fill:"#E2E8F0"}),t.createElement("path",{d:"M95.8138 24.9966L94.4336 26.7281L89.5527 23.8409L90.9326 22.1094L95.8138 24.9966Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M100.907 32.4365L102.126 34.2556L96.9981 36.806L95.7793 34.9873L100.907 32.4365Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M106.214 24.5283L108.65 24.6146L108.408 29.7113L105.972 29.6253L106.214 24.5283Z",fill:"#E4E4E4"}),t.createElement("path",{d:"M219.786 91.5725C221.325 91.5725 222.572 90.3251 222.572 88.7863C222.572 87.2474 221.325 86 219.786 86C218.247 86 217 87.2474 217 88.7863C217 90.3251 218.247 91.5725 219.786 91.5725Z",fill:"#E6E6E6"}),t.createElement("path",{d:"M138.137 30.051C139.676 30.051 140.924 28.8036 140.924 27.2648C140.924 25.726 139.676 24.4785 138.137 24.4785C136.599 24.4785 135.351 25.726 135.351 27.2648C135.351 28.8036 136.599 30.051 138.137 30.051Z",fill:"#F59E0B"}),t.createElement("path",{d:"M66.2388 132.169L68.8247 132.169L70.0548 122.194L66.2383 122.195L66.2388 132.169Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M75.0984 132.111C75.1789 132.246 75.2214 132.684 75.2214 132.842C75.2214 133.327 74.8285 133.719 74.3438 133.719H66.3356C66.0049 133.719 65.7368 133.451 65.7368 133.121V132.787C65.7368 132.787 65.3407 131.785 66.1563 130.55C66.1563 130.55 67.17 131.517 68.6847 130.003L69.1314 129.193L72.3648 131.558L74.157 131.779C74.5491 131.827 74.8967 131.771 75.0984 132.111Z",fill:"#2F2E41"}),t.createElement("path",{d:"M48.3799 132.169L50.9658 132.169L52.1959 122.194L48.3794 122.195L48.3799 132.169Z",fill:"#FFB6B6"}
35),t.createElement("path",{d:"M57.2395 132.111C57.32 132.246 57.3625 132.684 57.3625 132.842C57.3625 133.327 56.9696 133.719 56.4849 133.719H48.4767C48.146 133.719 47.8779 133.451 47.8779 133.121V132.787C47.8779 132.787 47.4818 131.785 48.2974 130.55C48.2974 130.55 49.3111 131.517 50.8258 130.003L51.2725 129.193L54.5059 131.558L56.2981 131.779C56.6902 131.827 57.0378 131.771 57.2395 132.111Z",fill:"#2F2E41"}),t.createElement("path",{d:"M67.0117 85.0617L67.97 86.3223C67.97 86.3223 68.0568 86.9108 69.5103 91.7067L70.3078 127.753H65.4835L59.0363 98.9116L52.3442 128.331L48.1627 128.578L48.3588 95.1393C48.3588 95.1393 47.9185 93.9757 48.2931 92.6121C49.7267 87.393 49.644 88.769 49.7028 86.9824C49.7774 84.7171 67.0117 85.0617 67.0117 85.0617Z",fill:"#2F2E41"}),t.createElement("path",{d:"M59.4075 54.772C62.203 54.772 64.4693 52.5058 64.4693 49.7102C64.4693 46.9147 62.203 44.6484 59.4075 44.6484C56.6119 44.6484 54.3457 46.9147 54.3457 49.7102C54.3457 52.5058 56.6119 54.772 59.4075 54.772Z",fill:"#FEB8B8"}),t.createElement("path",{d:"M56.6861 55.7241L53.8852 57.2721C51.5484 57.4413 49.8725 58.063 48.3833 58.8127L50.0255 73.2111L49.7267 87.3939C49.7267 87.3939 59.0401 93.7741 67.9706 86.3229V67.052L67.5513 59.3884C67.5025 58.4948 66.7122 57.8015 65.825 57.9189C65.3184 57.986 64.7349 57.973 64.139 57.7743L62.2852 55.623L56.6861 55.7241Z",fill:"#FB923C"}),t.createElement("path",{d:"M72.5225 43.8448C72.805 44.4818 72.9201 45.1298 72.8827 45.6916L75.9568 51.5902L73.1072 52.9709L70.2957 46.8386C69.8542 46.4892 69.4513 45.9688 69.1688 45.3317C68.5236 43.8764 68.7512 42.3638 69.6773 41.9532C70.6034 41.5426 71.8773 42.3895 72.5225 43.8448Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M64.1392 57.7732L64.9871 58.161C65.7651 57.3246 68.1088 57.4562 69.2459 57.5646L74.2429 58.0411L71.9094 50.7408L75.4224 49.3271L79.62 57.4056C79.8739 58.7761 79.3042 60.1686 78.1626 60.9682L67.4529 67.0502L66.208 58.7193L64.1392 57.7732Z",fill:"#FB923C"}),t.createElement("path",{d:"M38.2405 92.0162C38.2939 91.3214 38.4997 90.6962 38.799 90.2194L38.8891 83.5684L42.0527 83.7038L41.6207 90.436C41.8437 90.953 41.9517 91.6022 41.8983 92.297C41.7765 93.8843 40.8588 95.1082 39.8487 95.0306C38.8387 94.953 38.1187 93.6034 38.2405 92.0162Z",fill:"#FFB6B6"}),t.createElement("path",{d:"M50.7278 60.632L49.274 58.4238C49.274 58.4238 46.9031 58.8764 45.6433 60.6641C44.3835 62.4518 39.6215 73.4154 39.6215 73.4154L38.707 85.792L42.249 85.0625L43.958 75.6762L49.4534 68.1668L50.7278 60.632Z",fill:"#FB923C"}),t.createElement("path",{d:"M64.4691 50.3808C64.6592 49.416 61.7253 48.0116 61.7305 48.0132C62.1859 48.1586 61.4696 48.993 61.0018 48.8946C61.0018 48.8946 60.3144 49.2443 60.689 49.5451C59.3978 49.4344 57.6726 48.2074 56.3814 48.0967C55.862 48.0513 55.6609 49.3036 55.3345 49.7094C54.8408 50.3309 54.3455 49.095 54.5283 50.7415H54.4545C54.1849 50.0917 53.9153 49.4305 53.8273 48.7324C53.7422 48.0343 53.8614 47.2823 54.3069 46.7374C54.4545 46.5529 53.8747 45.9457 54.0308 45.7698C54.5275 45.1994 55.4903 44.8872 55.933 44.277C56.519 43.4688 57.1857 44.0393 58.4058 43.3595C58.7251 43.1817 59.2799 43.1177 59.6335 43.21L60.4593 43.4257C60.2983 43.6672 60.4975 43.9857 60.7851 43.9466L61.8612 43.8003C62.267 43.9308 62.6529 44.1238 62.8345 44.4955C62.9452 44.7169 62.9651 44.9751 63.0502 45.2078C63.2063 45.6363 63.5752 45.9457 63.8703 46.2919C64.6637 46.5229 64.7063 47.116 64.7063 48.1106C65.4457 48.5253 64.6742 49.4528 64.4691 50.3808Z",fill:"#2F2E41"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_1391_20786"},t.createElement("rect",{width:257.675,height:134.415,fill:"white",transform:"translate(0.324707)"})))),bl=[{title:"Welcome to the Cromatic Sourcerer!",description:"Your intelligent research assistant will guide you through the complex vendor selection process quickly and accurately.",image:i.jsx(xl,{})},{title:"Effortless multi-service searches",description:"Sit back as AI technology extracts ke
35y information from your request for proposal and matches your project needs with the most qualified CROs or CDMOs in our extensive database.",image:i.jsx(fl,{})},{title:"Unparalleled visibility into vendor diversity",description:"Shortlist qualified partners from our vast curated database by specific criteria like location, company size, and annual revenue.",image:i.jsx(yl,{})},{title:"Project efficiency and cost savings",description:"Focus on your core scientific endeavors while leveraging our knowledge of available options to secure competitive pricing and favorable timelines for your outsourced projects.",image:i.jsx(gl,{})}],vl=()=>{const e=localStorage.getItem(k.SOURCERER_ONBOARDING_TOUR_COMPLETED),[n,r]=t.useState(!e),[a,o]=t.useState(0),l=()=>{localStorage.setItem(k.SOURCERER_ONBOARDING_TOUR_COMPLETED,"true"),r(!1)};return i.jsx(On,{open:n,onOpenChange:l,children:i.jsx(_n,{children:i.jsxs(Pn,{dataTestIdForCloseButton:"onboarding-tour-modal:close",className:"border-none max-w-[775px] h-[calc(100dvh-56px)] md:h-[525px] p-6 md:p-12 top-[56px] translate-y-0 rounded-xl",closeClassName:"top-3 right-3 md:right-[33px] md:top-[33px]",onInteractOutside:e=>{e.preventDefault()},children:[i.jsxs("div",{className:"w-full h-full flex flex-col items-center",children:[i.jsx("div",{className:"mb-10 md:mb-0 md:h-[220px] overflow-hidden md:flex items-center",children:bl[a].image}),i.jsxs("div",{className:"flex flex-col items-center text-gray-700 text-lg space-y-2 text-center max-w-[538px]",children:[i.jsx("p",{className:"font-semibold text-xl md:text-2xl",children:bl[a].title}),i.jsx("p",{className:"font-normal wrap mt-1 leading-7 text-lg",children:bl[a].description})]})]}),i.jsxs(In,{className:"relative",children:[a>0&&i.jsx(En,{onClick:()=>{a>0&&o(a-1)},className:"absolute left-0 bottom-0 !bg-white text-primary hover:!bg-transparent border-primary border font-bold py-2 px-4 rounded h-9 md:w-32 flex justify-center hover:!bg-primary hover:text-white focus:outline-none focus:ring-0",children:i.jsxs("div",{className:"flex flex-row items-center font-medium text-base gap-4",children:[i.jsx(ml,{className:"rotate-90 w-4 h-4"}),i.jsx("span",{className:"hidden md:block",children:"Previous"})]})}),i.jsx("div",{className:"absolute bottom-2 left-1/2 -translate-x-1/2 flex space-x-2",children:bl.map((e,t)=>i.jsx("button",{type:"button",onClick:()=>o(t),className:"focus:outline-none focus:ring-0","aria-label":`Go to step ${t+1}`,children:i.jsx("div",{className:s("h-2 w-2 rounded-full",a===t?"bg-blue-500":"bg-gray-400")})},t))}),i.jsx(En,{onClick:()=>{a<bl.length-1?o(a+1):l()},className:"absolute right-0 bottom-0 !bg-white text-primary hover:!bg-transparent border-primary border font-bold py-2 px-4 rounded h-9 md:w-32 flex justify-center hover:!bg-primary hover:text-white focus:outline-none focus:ring-0",children:a<bl.length-1?i.jsxs("div",{className:"flex flex-row items-center font-medium text-base gap-4",children:[i.jsx("span",{className:"hidden md:block",children:"Next"}),i.jsx(ml,{className:"-rotate-90 w-4 h-4"})]}):"Done"})]})]})})})},wl=(e,n)=>{t.useEffect(()=>{function t(t){e.current&&!e.current.contains(t.target)&&n()}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,n])};const jl=({name:e,size:t="md",className:n})=>{const r=e?function(e){const t=e.split(" ");return(t[0]?t[0][0]:"")+(t.length>1&&t[t.length-1].length>0?t[t.length-1][0]:"")}(e):void 0,a=e?function(e){let t,n=0;for(t=0;t<e.length;t+=1)n=e.charCodeAt(t)+((n<<5)-n);let r="#";for(t=0;t<3;t+=1)r+=`00${(n>>8*t&255).toString(16)}`.slice(-2);return r}(e):"bg-hoki-100";return i.jsx("div",{style:{backgroundColor:a},className:s("flex rounded-full text-powder font-medium flex-shrink-0","md"===t&&"w-[40px] h-[40px] text-sm","sm"===t&&"w-[26px] h-[26px] text-[10.5px]",n),children:r?i.jsx("span",{className:"m-auto uppercase",children:r}):null})};jl.AvatarPlus=({className:e,size:t="md",children:n})=>i.jsx("div",{className:s("flex rounded-full text-primary font-medium flex-shrink-0","md"===t&&"w-[38px] h-[38px] text-sm","sm"===t&&"w-[26px] h-[26px] text-[10.5px]",e),children:i.jsx("span",{className:"m-auto uppercase",children:n})});const Cl=e=>t.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("g",{clipPath:"url(#clip0_2720_5781)"},t.createElement("path",{d:"M4.63501 3.91327C3.12512 3.91327 1.88501 5.15338 1.88501 6.66327V18.1633C1.88501 19.6732 3.12512 20.9133 4.63501 20.9133H20.135C21.6449 20.9133 22.885 19.6732 22.885 18.1633V6.66327C22.885 5.15338 21.6449 3.91327 20.135 3.91327H4.63501ZM4.63501 5.41327H9.38501V10.6027L8.16528 9.383C8.09537 9.311 8.01173 9.25377 7.9193 9.21469C7.82688 9.1756 7.72755 9.15546 7.6272 9.15546C7.47794 9.15549 7.33208 9.20006 7.20829 9.28346C7.0845 9.36685 6.98841 9.48529 6.93231 9.6236C6.8762 9.76192 6.86264 9.91383 6.89336 10.0599C6.92408 10.206 6.99767 10.3395 7.10474 10.4435L8.32446 11.6633H3.38501V6.66327C3.38501 5.96416 3.9359 5.41327 4.63501 5.41327ZM10.885 5.41327H20.135C20.8341 5.41327 21.385 5.96416 21.385 6.66327V11.6633H11.9456L13.1653 10.4435C13.2373 10.3744 13.2947 10.2917 13.3343 10.2001C13.3739 10.1085 13.3948 10.0099 13.3958 9.91011C13.3968 9.81033 13.3779 9.71135 13.3402 9.61897C13.3025 9.52659 13.2467 9.44266 13.1762 9.3721C13.1056 9.30154 13.0217 9.24577 12.9293 9.20806C12.8369 9.17034 12.7379 9.15144 12.6382 9.15245C12.5384 9.15346 12.4398 9.17438 12.3482 9.21396C12.2566 9.25355 12.1738 9.31102 12.1047 9.383L10.885 10.6027V5.41327ZM3.38501 13.1633H8.32446L7.10474 14.383C7.03276 14.4521 6.97529 14.5349 6.93571 14.6265C6.89612 14.7181 6.87521 14.8166 6.87419 14.9164C6.87318 15.0162 6.89208 15.1152 6.9298 15.2076C6.96751 15.2999 7.02329 15.3839 7.09384 15.4544C7.1644 15.525 7.24833 15.5808 7.34071 15.6185C7.43309 15.6562 7.53207 15.6751 7.63185 15.6741C7.73163 15.6731 7.83021 15.6522 7.9218 15.6126C8.0134 15.573 8.09617 15.5155 8.16528 15.4435L9.38501 14.2238V19.4133H4.63501C3.9359 19.4133 3.38501 18.8624 3.38501 18.1633V13.1633ZM11.9456 13.1633H21.385V18.1633C21.385 18.8624 20.8341 19.4133 20.135 19.4133H10.885V14.2238L12.1047 15.4435C12.1738 15.5155 12.2566 15.573 12.3482 15.6126C12.4398 15.6522 12.5384 15.6731 12.6382 15.6741C12.7379 15.6751 12.8369 15.6562 12.9293 15.6185C13.0217 15.5808 13.1056 15.525 13.1762 15.4544C13.2467 15.3839 13.3025 15.2999 13.3402 15.2076C13.3779 15.1152 13.3968 15.0162 13.3958 14.9164C13.3948 14.8166 13.3739 14.7181 13.3343 14.6265C13.2947 14.5349 13.2373 14.4521 13.1653 14.383L11.9456 13.1633Z",fill:"currentColor"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_2720_5781"},t.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0.506836 0.557678)"}
35)))),Nl=e=>t.createElement("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M12.513 2.25c.734.008 1.465.093 2.182.253a.75.75 0 0 1 .582.649l.17 1.527a1.384 1.384 0 0 0 1.927 1.116l1.4-.615a.75.75 0 0 1 .85.174 9.793 9.793 0 0 1 2.205 3.792.75.75 0 0 1-.272.825l-1.241.916a1.38 1.38 0 0 0 0 2.226l1.243.915a.75.75 0 0 1 .272.826 9.798 9.798 0 0 1-2.204 3.792.75.75 0 0 1-.848.175l-1.407-.617a1.38 1.38 0 0 0-1.926 1.114l-.17 1.526a.75.75 0 0 1-.571.647 9.518 9.518 0 0 1-4.406 0 .75.75 0 0 1-.572-.647l-.169-1.524a1.382 1.382 0 0 0-1.925-1.11l-1.406.616a.75.75 0 0 1-.85-.175 9.798 9.798 0 0 1-2.203-3.796.75.75 0 0 1 .272-.826l1.243-.916a1.38 1.38 0 0 0 0-2.226l-1.243-.914a.75.75 0 0 1-.272-.826A9.793 9.793 0 0 1 5.38 5.355a.75.75 0 0 1 .85-.174l1.4.615a1.387 1.387 0 0 0 1.93-1.118l.17-1.526a.75.75 0 0 1 .583-.65 10.72 10.72 0 0 1 2.201-.252Zm0 1.5a9.135 9.135 0 0 0-1.354.117l-.11.977A2.886 2.886 0 0 1 7.027 7.17l-.899-.394A8.293 8.293 0 0 0 4.78 9.092l.798.587a2.881 2.881 0 0 1 .001 4.643l-.799.588c.32.842.776 1.626 1.348 2.322l.905-.397a2.882 2.882 0 0 1 4.017 2.318l.109.984c.89.15 1.798.15 2.688 0l.109-.984a2.88 2.88 0 0 1 4.019-2.322l.904.396a8.299 8.299 0 0 0 1.348-2.318l-.798-.588a2.88 2.88 0 0 1-.001-4.643l.797-.587a8.293 8.293 0 0 0-1.348-2.317l-.897.393a2.884 2.884 0 0 1-4.023-2.324l-.109-.976a8.991 8.991 0 0 0-1.334-.117Zm-.012 4.5a3.75 3.75 0 1 1 0 7.5 3.75 3.75 0 0 1 0-7.5Zm0 1.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z",fill:"currentColor"})),kl=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("g",{clipPath:"url(#clip0_2723_9213)"},t.createElement("path",{d:"M5.89258 3C4.38269 3 3.14258 4.24011 3.14258 5.75V18.25C3.14258 19.7599 4.38269 21 5.89258 21H14.8926C16.4025 21 17.6426 19.7599 17.6426 18.25C17.644 18.1506 17.6256 18.0519 17.5886 17.9597C17.5515 17.8675 17.4965 17.7836 17.4267 17.7128C17.3569 17.642 17.2738 17.5858 17.1821 17.5474C17.0904 17.5091 16.992 17.4893 16.8926 17.4893C16.7932 17.4893 16.6948 17.5091 16.6031 17.5474C16.5114 17.5858 16.4282 17.642 16.3585 17.7128C16.2887 17.7836 16.2337 17.8675 16.1966 17.9597C16.1595 18.0519 16.1412 18.1506 16.1426 18.25C16.1426 18.9491 15.5917 19.5 14.8926 19.5H5.89258C5.19347 19.5 4.64258 18.9491 4.64258 18.25V5.75C4.64258 5.05089 5.19347 4.5 5.89258 4.5H14.8926C15.5917 4.5 16.1426 5.05089 16.1426 5.75C16.1412 5.84938 16.1595 5.94806 16.1966 6.04028C16.2337 6.13251 16.2887 6.21645 16.3585 6.28723C16.4282 6.358 16.5114 6.41421 16.6031 6.45257C16.6948 6.49093 16.7932 6.51068 16.8926 6.51068C16.992 6.51068 17.0904 6.49093 17.1821 6.45257C17.2738 6.41421 17.3569 6.358 17.4267 6.28723C17.4965 6.21645 17.5515 6.13251 17.5886 6.04028C17.6256 5.94806 17.644 5.84938 17.6426 5.75C17.6426 4.24011 16.4025 3 14.8926 3H5.89258ZM16.8848 7.74219C16.7355 7.74222 16.5896 7.78679 16.4659 7.87019C16.3421 7.95358 16.246 8.07202 16.1899 8.21033C16.1338 8.34865 16.1202 8.50056 16.1509 8.64662C16.1816 8.79269 16.2552 8.92627 16.3623 9.03027L18.582 11.25H7.89258C7.79319 11.2486 7.69452 11.267 7.6023 11.304C7.51007 11.3411 7.42613 11.3961 7.35535 11.4659C7.28457 11.5357 7.22837 11.6188 7.19001 11.7105C7.15165 11.8022 7.1319 11.9006 7.1319 12C7.1319 12.0994 7.15165 12.1978 7.19001 12.2895C7.22837 12.3812 7.28457 12.4643 7.35535 12.5341C7.42613 12.6039 7.51007 12.6589 7.6023 12.696C7.69452 12.733 7.79319 12.7514 7.89258 12.75H18.582L16.3623 14.9697C16.2903 15.0388 16.2329 15.1216 16.1933 15.2132C16.1537 15.3048 16.1328 15.4034 16.1318 15.5032C16.1307 15.6029 16.1496 15.7019 16.1874 15.7943C16.2251 15.8867 16.2809 15.9706 16.3514 16.0412C16.422 16.1117 16.5059 16.1675 16.5983 16.2052C16.6907 16.2429 16.7896 16.2618 16.8894 16.2608C16.9892 16.2598 17.0878 16.2389 17.1794 16.1993C17.271 16.1597 17.3537 16.1023 17.4229 16.0303L20.9229 12.5303C21.0635 12.3896 21.1424 12.1989 21.1424 12C21.1424 11.8011 21.0635 11.6104 20.9229 11.4697L17.4229 7.96973C17.3529 7.89773 17.2693 7.8405 17.1769 7.80142C17.0844 7.76233 16.9851 7.74219 16.8848 7.74219Z",fill:"currentColor"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_2723_9213"},t.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0.189453)"})))),Sl=({fullName:e,firstName:n})=>{const{logout:r}=S(),{isMd:a}=Un("md"),s=Be(),o=Ue(),l=cl(),c=C(N),{canAccessBigBrain:u}=Sa(),d=ir(l)&&c&&u;return i.jsxs(Ht,{as:"div",className:"relative z-10",children:[i.jsxs(Ht.Button,{className:"inline-flex w-full items-center gap-3 p-2 rounded-lg hover:bg-hoki-100",disabled:!a,"data-testid":"dropdown:user-menu",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(jl,{name:e,size:"sm"}),i.jsxs("p",{className:"text-sm font-semibold whitespace-nowrap text-primary",children:[i.jsx("span",{className:"hidden sm:inline",children:e||""}),i.jsx("span",{className:"sm:hidden",children:n||""})]})]}),a&&i.jsx(zn,{className:"text-minsk-600"})]}),i.jsx(zt,{as:t.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:i.jsx(Ht.Items,{className:"absolute md:right-0 origin-top-right mt-2 divide-y divide-hoki-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none overflow-hidden w-52",children:i.jsx(Ht.Item,{children:({close:e})=>i.jsxs(i.Fragment,{children:[o&&d&&i.jsx(Bn,{to:b.Profile,onClick:e,children:i.jsxs("span",{className:"flex items-center gap-4",children:[i.jsx(ol,{width:24}),"Company Profile"]})}),i.jsx(Bn,{to:b.Settings_Profile,onClick:e,children:i.jsxs("span",{className:"flex items-center gap-4",children:[i.jsx(Nl,{width:24}),"Settings"]})}),s&&i.jsx(Bn,{to:b.Perks,onClick:e,children:i.jsxs("span",{className:"flex items-center gap-4",children:[i.jsx(Cl,{width:24}),"Perks"]})}),i.jsx(Bn,{to:b.SignIn,onClick:async()=>{e(),await r()},replace:!0,children:i.jsxs("span",{className:"flex items-center gap-4",children:[i.jsx(kl,{width:24}),"Logout"]})})]})})})})]})};function El(e){const n=Al(e),r=t.forwardRef((e,r)=>{const{children:a,...s}=e,o=t.Children.toArray(a),l=o.find(_l);if(l){const e=l.props.children,a=o.map(n=>n===l?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return i.jsx(n,{...s,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return i.jsx(n,{...s,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}
vendor: 21,903 bytes, line 35
35function Al(e){const n=t.forwardRef((e,n)=>{const{children:r,...a}=e;if(t.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{const t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(a,r.props);return r.type!==t.Fragment&&(i.ref=n?c(n,e):e),t.cloneElement(r,i)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Ol=Symbol("radix.slottable");function _l(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ol}function Pl(e){const t=e+"CollectionProvider",[r,a]=jt(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{const{scope:t,children:r}=e,a=n.useRef(null),o=n.useRef(new Map).current;return i.jsx(s,{scope:t,itemMap:o,collectionRef:a,children:r})};c.displayName=t;const u=e+"CollectionSlot",d=El(u),p=n.forwardRef((e,t)=>{const{scope:n,children:r}=e,a=o(u,n),s=l(t,a.collectionRef);return i.jsx(d,{ref:s,children:r})});p.displayName=u;const h=e+"CollectionItemSlot",m="data-radix-collection-item",f=El(h),g=n.forwardRef((e,t)=>{const{scope:r,children:a,...s}=e,c=n.useRef(null),u=l(t,c),d=o(h,r);return n.useEffect(()=>(d.itemMap.set(c,{ref:c,...s}),()=>{d.itemMap.delete(c)})),i.jsx(f,{[m]:"",ref:u,children:a})});return g.displayName=h,[{Provider:c,Slot:p,ItemSlot:g},function(t){const r=o(e+"CollectionConsumer",t),a=n.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${m}]`)),n=Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return n},[r.collectionRef,r.itemMap]);return a},a]}var Il=t.createContext(void 0);function Ml(e){const n=t.useContext(Il);return e||n||"ltr"}var Tl="rovingFocusGroup.onEntryFocus",Rl={bubbles:!1,cancelable:!0},Ll="RovingFocusGroup",[Dl,Fl,ql]=Pl(Ll),[Bl,Ul]=jt(Ll,[ql]),[zl,Hl]=Bl(Ll),Vl=t.forwardRef((e,t)=>i.jsx(Dl.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Dl.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx($l,{...e,ref:t})})}));Vl.displayName=Ll;var $l=t.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:s=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:h=!1,...m}=e,f=t.useRef(null),g=l(n,f),y=Ml(o),[x,b]=Nt({prop:c,defaultProp:u??null,onChange:d,caller:Ll}),[v,w]=t.useState(!1),j=Ct(p),C=Fl(r),N=t.useRef(!1),[k,S]=t.useState(0);return t.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(Tl,j),()=>e.removeEventListener(Tl,j)},[j]),i.jsx(zl,{scope:r,orientation:a,dir:y,loop:s,currentTabStopId:x,onItemFocus:t.useCallback(e=>b(e),[b]),onItemShiftTab:t.useCallback(()=>w(!0),[]),onFocusableItemAdd:t.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>S(e=>e-1),[]),children:i.jsx(vt.div,{tabIndex:v||0===k?-1:0,"data-orientation":a,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:St(e.onMouseDown,()=>{N.current=!0}),onFocus:St(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(Tl,Rl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=C().filter(e=>e.focusable);Kl([e.find(e=>e.active),e.find(e=>e.id===x),...e].filter(Boolean).map(e=>e.ref.current),h)}}N.current=!1}),onBlur:St(e.onBlur,()=>w(!1))})})}),Wl="RovingFocusGroupItem",Ql=t.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:s=!1,tabStopId:o,children:l,...c}=e,u=kt(),d=o||u,p=Hl(Wl,r),h=p.currentTabStopId===d,m=Fl(r),{onFocusableItemAdd:f,onFocusableItemRemove:g,currentTabStopId:y}=p;return t.useEffect(()=>{if(a)return f(),()=>g()},[a,f,g]),i.jsx(Dl.ItemSlot,{scope:r,id:d,focusable:a,active:s,children:i.jsx(vt.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:St(e.onMouseDown,e=>{a?p.onItemFocus(d):e.preventDefault()}),onFocus:St(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:St(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Zl[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>Kl(n))}}),children:"function"==typeof l?l({isCurrentTabStop:h,hasTabStop:null!=y}):l})})});Ql.displayName=Wl;var Zl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kl(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Gl=Vl,Yl=Ql;function Jl(e){const n=t.forwardRef((e,n)=>{const{children:r,...a}=e;if(t.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{const t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(a,r.props);return r.type!==t.Fragment&&(i.ref=n?c(n,e):e),t.cloneElement(r,i)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Xl=Symbol("radix.slottable");function ec(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Xl}var tc=["Enter"," "],nc=["ArrowUp","PageDown","End"],rc=["ArrowDown","PageUp","Home",...nc],ac={ltr:[...tc,"ArrowRight"],rtl:[...tc,"ArrowLeft"]},ic={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sc="Menu",[oc,lc,cc]=Pl(sc),[uc,dc]=jt(sc,[cc,Ma,Ul]),pc=Ma(),hc=Ul(),[mc,fc]=uc(sc),[gc,yc]=uc(sc),xc=e=>{const{__scopeMenu:n,open:r=!1,children:a,dir:s,onOpenChange:o,modal:l=!0}=e,c=pc(n),[u,d]=t.useState(null),p=t.useRef(!1),h=Ct(o),m=Ml(s);return t.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),i.jsx(Ka,{...c,children:i.jsx(mc,{scope:n,open:r,onOpenChange:h,content:u,onContentChange:d,children:i.jsx(gc,{scope:n,onClose:t.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:m,modal:l,children:a})})})};xc.displayName=sc;var bc=t.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=pc(n);return i.jsx(Ga,{...a,...r,ref:t})});bc.displayName="MenuAnchor";var vc="MenuPortal",[wc,jc]=uc(vc,{forceMount:void 0}),Cc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=fc(vc,t);return i.jsx(wc,{scope:t,forceMount:n,children:i.jsx(Et,{present:n||s.open,children:i.jsx(At,{asChild:!0,container:a,children:r})})})};Cc.displayName=vc;var Nc="MenuContent",[kc,Sc]=uc(Nc),Ec=t.forwardRef((e,t)=>{const n=jc(Nc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=fc(Nc,e.__scopeMenu),o=yc(Nc,e.__scopeMenu);return i.jsx(oc.Provider,{scope:e.__scopeMenu,children:i.jsx(Et,{present:r||s.open,children:i.jsx(oc.Slot,{scope:e.__scopeMenu,children:o.modal?i.jsx(Ac,{...a,ref:t}):i.jsx(Oc,{...a,ref:t})})})})}),Ac=t.forwardRef((e,n)=>{const r=fc(Nc,e.__scopeMenu),a=t.useRef(null),s=l(n,a);return t.useEffect(()=>{const e=a.current;if(e)return Ot(e)},[]),i.jsx(Pc,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:St(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Oc=t.forwardRef((e,t)=>{const n=fc(Nc,e.__scopeMenu);return i.jsx(Pc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_c=function(e){const n=Jl(e),r=t.forwardRef((e,r)=>{const{children:a,...s}=e,o=t.Children.toArray(a),l=o.find(ec);if(l){const e=l.props.children,a=o.map(n=>n===l?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return i.jsx(n,{...s,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return i.jsx(n,{...s,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}("MenuContent.ScrollLock"),Pc=t.forwardRef((e,n)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:f,onDismiss:g,disableOutsideScroll:y,...x}=e,b=fc(Nc,r),v=yc(Nc,r),w=pc(r),j=hc(r),C=lc(r),[N,k]=t.useState(null),S=t.useRef(null),E=l(n,S,b.onContentChange),A=t.useRef(0),O=t.useRef(""),_=t.useRef(0),P=t.useRef(null),I=t.useRef("right"),M=t.useRef(0),T=y?_t:t.Fragment,R=y?{as:_c,allowPinchZoom:!0}:void 0,L=e=>{const t=O.current+e,n=C().filter(e=>!e.disabled),r=document.activeElement,a=n.find(e=>e.ref.current===r)?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),a=r?t[0]:t,i=n?e.indexOf(n):-1;let s=function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(e,Math.max(i,0));1===a.length&&(s=s.filter(e=>e!==n));const o=s.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return o!==n?o:void 0}(n.map(e=>e.textValue),t,a),s=n.find(e=>e.textValue===i)?.ref.current;!function e(t){O.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout(()=>e(""),1e3))}(t),s&&setTimeout(()=>s.focus())};t.useEffect(()=>()=>window.clearTimeout(A.current),[]),Pt();const D=t.useCallback(e=>I.current===P.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const e=t[i],o=t[s],l=e.x,c=e.y,u=o.x,d=o.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}(n,t)}(e,P.current?.area),[]);return i.jsx(kc,{scope:r,searchRef:O,onItemEnter:t.useCallback(e=>{D(e)&&e.preventDefault()},[D]),onItemLeave:t.useCallback(e=>{D(e)||(S.current?.focus(),k(null))},[D]),onTriggerLeave:t.useCallback(e=>{D(e)&&e.preventDefault()},[D]),pointerGraceTimerRef:_,onPointerGraceIntentChange:t.useCallback(e=>{P.current=e},[]),children:i.jsx(T,{...R,children:i.jsx(It,{asChild:!0,trapped:s,onMountAutoFocus:St(o,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:i.jsx(Mt,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:f,onDismiss:g,children:i.jsx(Gl,{asChild:!0,...j,dir:v.dir,orientation:"vertical",loop:a,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:St(d,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Ya,{role:"menu","aria-orientation":"vertical","data-state":ru(b.open),"data-radix-menu-content":"",dir:v.dir,...w,...x,ref:E,style:{outline:"none",...x.style},onKeyDown:St(x.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&L(e.key));const a=S.current;if(e.target!==a)return;if(!rc.includes(e.key))return;e.preventDefault();const i=C().filter(e=>!e.disabled).map(e=>e.ref.current);nc.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)}),onBlur:St(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:St(e.onPointerMove,su(e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";I.current=t,M.current=e.clientX}}))})})})})})})});Ec.displayName=Nc;var Ic=t.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(vt.div,{role:"group",...r,ref:t})});Ic.displayName="MenuGroup";var Mc=t.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(vt.div,{...r,ref:t})});Mc.displayName="MenuLabel";var Tc="MenuItem",Rc="menu.itemSelect",Lc=t.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:a,...s}=e,o=t.useRef(null),c=yc(Tc,e.__scopeMenu),u=Sc(Tc,e.__scopeMenu),d=l(n,o),p=t.useRef(!1);return i.jsx(Dc,{...s,ref:d,disabled:r,onClick:St(e.onClick,()=>{const e=o.current;if(!r&&e){const t=new CustomEvent(Rc,{bubbles:!0,cancelable:!0});e.addEventListener(Rc,e=>a?.(e),{once:!0}),Tt(e,t),t.defaultPrevented?p.current=!1:c.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:St(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:St(e.onKeyDown,e=>{const t=""!==u.searchRef.current;r||t&&" "===e.key||tc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Lc.displayName=Tc;var Dc=t.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:a=!1,textValue:s,...o}=e,c=Sc(Tc,r),u=hc(r),d=t.useRef(null),p=l(n,d),[h,m]=t.useState(!1),[f,g]=t.useState("");return t.useEffect(()=>{const e=d.current;e&&g((e.textContent??"").trim())},[o.children]),i.jsx(oc.ItemSlot,{scope:r,disabled:a,textValue:s??f,children:i.jsx(Yl,{asChild:!0,...u,focusable:!a,children:i.jsx(vt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...o,ref:p,onPointerMove:St(e.onPointerMove,su(e=>{if(a)c.onItemLeave(e);else if(c.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:St(e.onPointerLeave,su(e=>c.onItemLeave(e))),onFocus:St(e.onFocus,()=>m(!0)),onBlur:St(e.onBlur,()=>m(!1))})})})}),Fc=t.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return i.jsx(Wc,{scope:e.__scopeMenu,checked:n,children:i.jsx(Lc,{role:"menuitemcheckbox","aria-checked":au(n)?"mixed":n,...a,ref:t,"data-state":iu(n),onSelect:St(a.onSelect,()=>r?.(!!au(n)||!n),{checkForDefaultPrevented:!1})})})});Fc.displayName="MenuCheckboxItem";var qc="MenuRadioGroup",[Bc,Uc]=uc(qc,{value:void 0,onValueChange:()=>{}}),zc=t.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,s=Ct(r);return i.jsx(Bc,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(Ic,{...a,ref:t})})});zc.displayName=qc;var Hc="MenuRadioItem",Vc=t.forwardRef((e,t)=>{const{value:n,...r}=e,a=Uc(Hc,e.__scopeMenu),s=n===a.value;return i.jsx(Wc,{scope:e.__scopeMenu,checked:s,children:i.jsx(Lc,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":iu(s),onSelect:St(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Vc.displayName=Hc;var $c="MenuItemIndicator",[Wc,Qc]=uc($c,{checked:!1}),Zc=t.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,s=Qc($c,n);return i.jsx(Et,{present:r||au(s.checked)||!0===s.checked,children:i.jsx(vt.span,{...a,ref:t,"data-state":iu(s.checked)})})});Zc.displayName=$c;var Kc=t.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(vt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Kc.displayName="MenuSeparator";var Gc=t.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=pc(n);return i.jsx(Ja,{...a,...r,ref:t})});Gc.displayName="MenuArrow";var[Yc,Jc]=uc("MenuSub"),Xc="MenuSubTrigger",eu=t.forwardRef((e,n)=>{const r=fc(Xc,e.__scopeMenu),a=yc(Xc,e.__scopeMenu),s=Jc(Xc,e.__scopeMenu),o=Sc(Xc,e.__scopeMenu),l=t.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,p={__scopeMenu:e.__scopeMenu},h=t.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return t.useEffect(()=>h,[h]),t.useEffect(()=>{const e=u.current;return()=>{window.clearTimeout(e),d(null)}},[u,d]),i.jsx(bc,{asChild:!0,...p,children:i.jsx(Dc,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":ru(r.open),...e,ref:c(n,s.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:St(e.onPointerMove,su(t=>{o.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||l.current||(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:St(e.onPointerLeave,su(e=>{h();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,a="right"===n,i=a?-5:5,s=t[a?"left":"right"],l=t[a?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:St(e.onKeyDown,t=>{const n=""!==o.searchRef.current;e.disabled||n&&" "===t.key||ac[a.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});eu.displayName=Xc;var tu="MenuSubContent",nu=t.forwardRef((e,n)=>{const r=jc(Nc,e.__scopeMenu),{forceMount:a=r.forceMount,...s}=e,o=fc(Nc,e.__scopeMenu),c=yc(Nc,e.__scopeMenu),u=Jc(tu,e.__scopeMenu),d=t.useRef(null),p=l(n,d);return i.jsx(oc.Provider,{scope:e.__scopeMenu,children:i.jsx(Et,{present:a||o.open,children:i.jsx(oc.Slot,{scope:e.__scopeMenu,children:i.jsx(Pc,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:p,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:St(e.onFocusOutside,e=>{e.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:St(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:St(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=ic[c.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});function ru(e){return e?"open":"closed"}function au(e){return"indeterminate"===e}function iu(e){return au(e)?"indeterminate":e?"checked":"unchecked"}function su(e){return t=>"mouse"===t.pointerType?e(t):void 0}nu.displayName=tu;var ou=xc,lu=bc,cu=Cc,uu=Ec,du=Ic,pu=Mc,hu=Lc,mu=Fc,fu=zc,gu=Vc,yu=Zc,xu=Kc,bu=Gc,vu=eu,wu=nu,ju="DropdownMenu",[Cu]=jt(ju,[dc]),Nu=dc(),[ku,Su]=Cu(ju),Eu=e=>{const{__scopeDropdownMenu:n,children:r,dir:a,open:s,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,u=Nu(n),d=t.useRef(null),[p,h]=Nt({prop:s,defaultProp:o??!1,onChange:l,caller:ju});return i.jsx(ku,{scope:n,triggerId:kt(),triggerRef:d,contentId:kt(),open:p,onOpenChange:h,onOpenToggle:t.useCallback(()=>h(e=>!e),[h]),modal:c,children:i.jsx(ou,{...u,open:p,onOpenChange:h,dir:a,modal:c,children:r})})};Eu.displayName=ju;var Au="DropdownMenuTrigger",Ou=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,s=Su(Au,n),o=Nu(n);return i.jsx(lu,{asChild:!0,...o,children:i.jsx(vt.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:c(t,s.triggerRef),onPointerDown:St(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(s.onOpenToggle(),s.open||e.preventDefault())}),onKeyDown:St(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&s.onOpenToggle(),"ArrowDown"===e.key&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Ou.displayName=Au;var _u=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Nu(t);return i.jsx(cu,{...r,...n})};_u.displayName="DropdownMenuPortal";var Pu="DropdownMenuContent",Iu=t.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,s=Su(Pu,r),o=Nu(r),l=t.useRef(!1);return i.jsx(uu,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...a,ref:n,onCloseAutoFocus:St(e.onCloseAutoFocus,e=>{l.current||s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:St(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.modal&&!r||(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Iu.displayName=Pu;t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(du,{...a,...r,ref:t})}).displayName="DropdownMenuGroup";var Mu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(pu,{...a,...r,ref:t})});Mu.displayName="DropdownMenuLabel";var Tu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(hu,{...a,...r,ref:t})});Tu.displayName="DropdownMenuItem";var Ru=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(mu,{...a,...r,ref:t})});Ru.displayName="DropdownMenuCheckboxItem";t.forwardRef((e,t)=>
35{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(fu,{...a,...r,ref:t})}).displayName="DropdownMenuRadioGroup";var Lu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(gu,{...a,...r,ref:t})});Lu.displayName="DropdownMenuRadioItem";var Du=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(yu,{...a,...r,ref:t})});Du.displayName="DropdownMenuItemIndicator";var Fu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(xu,{...a,...r,ref:t})});Fu.displayName="DropdownMenuSeparator";t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(bu,{...a,...r,ref:t})}).displayName="DropdownMenuArrow";var qu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(vu,{...a,...r,ref:t})});qu.displayName="DropdownMenuSubTrigger";var Bu=t.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Nu(n);return i.jsx(wu,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Bu.displayName="DropdownMenuSubContent";var Uu=_u,zu=Iu,Hu=Mu,Vu=Tu,$u=Ru,Wu=Lu,Qu=Du,Zu=Fu,Ku=qu,Gu=Bu;const Yu=Eu,Ju=Ou;t.forwardRef(({className:e,inset:t,children:n,...r},a)=>i.jsxs(Ku,{ref:a,className:s("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,i.jsx(ze,{className:"ml-auto h-4 w-4"})]})).displayName=Ku.displayName;t.forwardRef(({className:e,...t},n)=>i.jsx(Gu,{ref:n,className:s("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=Gu.displayName;const Xu=t.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(Uu,{children:i.jsx(zu,{ref:r,sideOffset:t,className:s("DropdownMenuContent","z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xu.displayName=zu.displayName;const ed=t.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(Vu,{ref:r,className:s("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ed.displayName=Vu.displayName;t.forwardRef(({className:e,children:t,checked:n,...r},a)=>i.jsxs($u,{ref:a,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(Qu,{children:i.jsx(He,{className:"h-4 w-4"})})}),t]})).displayName=$u.displayName;t.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Wu,{ref:r,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(Qu,{children:i.jsx(jr,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=Wu.displayName;const td=t.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(Hu,{ref:r,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));td.displayName=Hu.displayName;const nd=t.forwardRef(({className:e,...t},n)=>i.jsx(Zu,{ref:n,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));nd.displayName=Zu.displayName;const rd=e=>t.createElement("svg",{width:22,height:21,viewBox:"0 0 22 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M3.50048 3.93759C3.38469 3.93595 3.26973 3.95737 3.16229 4.00061C3.05484 4.04384 2.95705 4.10803 2.87459 4.18945C2.79213 4.27086 2.72666 4.36787 2.68196 4.47485C2.63727 4.58182 2.61426 4.69663 2.61426 4.81259C2.61426 4.92855 2.63727 5.04335 2.68196 5.15033C2.72666 5.2573 2.79213 5.35431 2.87459 5.43573C2.95705 5.51714 3.05484 5.58133 3.16229 5.62457C3.26973 5.66781 3.38469 5.68923 3.50048 5.68759H19.2284C19.3442 5.68923 19.4591 5.66781 19.5666 5.62457C19.674 5.58133 19.7718 5.51714 19.8543 5.43573C19.9367 5.35431 20.0022 5.2573 20.0469 5.15033C20.0916 5.04335 20.1146 4.92855 20.1146 4.81259C20.1146 4.69663 20.0916 4.58182 20.0469 4.47485C20.0022 4.36787 19.9367 4.27086 19.8543 4.18945C19.7718 4.10803 19.674 4.04384 19.5666 4.00061C19.4591 3.95737 19.3442 3.93595 19.2284 3.93759H3.50048ZM3.50048 9.62509C3.38469 9.62345 3.26973 9.64487 3.16229 9.68811C3.05484 9.73134 2.95705 9.79553 2.87459 9.87695C2.79213 9.9583
356 2.72666 10.0554 2.68196 10.1623C2.63727 10.2693 2.61426 10.3841 2.61426 10.5001C2.61426 10.616 2.63727 10.7309 2.68196 10.8378C2.72666 10.9448 2.79213 11.0418 2.87459 11.1232C2.95705 11.2046 3.05484 11.2688 3.16229 11.3121C3.26973 11.3553 3.38469 11.3767 3.50048 11.3751H19.2284C19.3442 11.3767 19.4591 11.3553 19.5666 11.3121C19.674 11.2688 19.7718 11.2046 19.8543 11.1232C19.9367 11.0418 20.0022 10.9448 20.0469 10.8378C20.0916 10.7309 20.1146 10.616 20.1146 10.5001C20.1146 10.3841 20.0916 10.2693 20.0469 10.1623C20.0022 10.0554 19.9367 9.95836 19.8543 9.87695C19.7718 9.79553 19.674 9.73134 19.5666 9.68811C19.4591 9.64487 19.3442 9.62345 19.2284 9.62509H3.50048ZM3.50048 15.3126C3.38469 15.3109 3.26973 15.3324 3.16229 15.3756C3.05484 15.4188 2.95705 15.483 2.87459 15.5644C2.79213 15.6459 2.72666 15.7429 2.68196 15.8498C2.63727 15.9568 2.61426 16.0716 2.61426 16.1876C2.61426 16.3035 2.63727 16.4184 2.68196 16.5253C2.72666 16.6323 2.79213 16.7293 2.87459 16.8107C2.95705 16.8921 3.05484 16.9563 3.16229 16.9996C3.26973 17.0428 3.38469 17.0642 3.50048 17.0626H19.2284C19.3442 17.0642 19.4591 17.0428 19.5666 16.9996C19.674 16.9563 19.7718 16.8921 19.8543 16.8107C19.9367 16.7293 20.0022 16.6323 20.0469 16.5253C20.0916 16.4184 20.1146 16.3035 20.1146 16.1876C20.1146 16.0716 20.0916 15.9568 20.0469 15.8498C20.0022 15.7429 19.9367 15.6459 19.8543 15.5644C19.7718 15.483 19.674 15.4188 19.5666 15.3756C19.4591 15.3324 19.3442 15.3109 19.2284 15.3126H3.50048Z",fill:"#4E5C6F"})),ad=({isActive:e,leftIcon:t,rightElement:n,to:r,label:a,onClick:l})=>i.jsx(ed,{asChild:!0,className:"rounded-lg",children:i.jsxs(o,{to:r||"",className:s("py-2.5 text-hoki-600",e&&"bg-bleu-50"),onClick:l,children:[t&&i.jsx("span",{className:s("mx-1 text-sm",e&&"text-hoki-800"),children:t}),i.jsx("span",{className:s("mx-1 text-sm",e&&"font-semibold"),children:a}),n&&i.jsx("span",{className:"mx-1",children:n})]})}),id=E("\n  query MobileDropdownMenuQuery {\n    user {\n      id\n      first_name\n      full_name\n    }\n  }\n"),sd=()=>{const e=ul(),{pathname:t}=f(),{logout:r}=S(),a=m(),{data:o}=d(id),l=o?.user?.full_name,c=o?.user?.first_name;return i.jsxs(Yu,{children:[i.jsx(Ju,{className:"active:bg-hoki-100 p-1 rounded-lg md:hidden",children:i.jsx(rd,{width:21})}),i.jsxs(Xu,{sideOffset:0,className:"w-screen bg-white px-4 py-2 md:hidden flex flex-col gap-2 rounded-t-none overflow-y-auto max-h-[calc(90dvh-60px)]",children:[i.jsxs("div",{className:"flex items-center gap-3 border border-hoki-200 px-4 py-4 rounded-md",children:[l&&i.jsx(jl,{name:l,size:"sm"}),i.jsxs("p",{className:"text-sm font-semibold whitespace-nowrap text-primary",children:[i.jsx("span",{className:"hidden sm:inline",children:l||""}),i.jsx("span",{className:"sm:hidden",children:c||""})]})]}),[...e,{id:"settings",label:"Settings",to:b.Settings_Profile,leftIcon:i.jsx(Nl,{width:24})},{id:"logout",label:"Log out",to:b.SignIn,leftIcon:i.jsx(kl,{width:24}),onClick:async()=>{await r(),a(b.SignIn)}}].map(e=>i.jsxs(n.Fragment,{children:["object"==typeof e&&"separator"in e&&e.separator?.top&&i.jsx(nd,{}),"object"==typeof e&&"items"in e&&e.items&&i.jsx(Ce,{children:({open:n})=>i.jsxs(i.Fragment,{children:[i.jsxs(Ce.Button,{className:"inline-flex items-center w-full px-2 py-1.5 rounded-lg text-hoki-600 hover:bg-bleu-50",children:[e.leftIcon&&i.jsx("span",{className:"mx-1",children:e.leftIcon}),i.jsx("span",{className:s("mx-1 text-sm font-medium"),children:e.label}),i.jsx("div",{className:"ml-auto",children:i.jsx(Ne,{width:16,className:s("mx-1 transition",n?"":"rotate-180")})})]}),i.jsx(Ce.Panel,{children:i.jsx("ul",{className:s("w-5/6 ml-auto mr-3 space-y-1"),children:e.items.map(e=>{const n=e.isActiveRegex?e.isActiveRegex.test(t):e.to===t;return i.jsx(ad,{isActive:n,label:e.label,leftIcon:e.leftIcon,to:e.to,onClick:e.onClick},e.id)})})})]})}),"object"==typeof e&&"to"in e&&i.jsx(ad,{isActive:e.isActiveRegex?e.isActiveRegex.test(t):e.to===t,label:e.label,leftIcon:e.leftIcon,to:e.to,onClick:e.onClick},e.id),"object"==typeof e&&"separator"in e&&e.separator?.bottom&&i.jsx("div",{className:"h-px bg-hoki-200 my-2"})]},e.id))]})]})},od=E("\n  mutation markNotificationAsReadMutation($id: String!) {\n    markNotificationAsRead(id: $id) {\n      id\n      message\n      notification_type\n      read_at\n      params\n      recipient_id\n      sender_id\n      created_at\n      url\n    }\n  }
35\n"),ld=E("\n  query NotificationItem_UnreadNotification($unreadOnly: Boolean) {\n    notifications(unread_only: $unreadOnly) {\n      id\n      notification_type\n      params\n    }\n  }\n"),cd=E("\n  fragment NotificationItem_NotificationFragment on Notification {\n    id\n    message\n    created_at\n    url\n    read_at\n  }\n"),ud=e=>{const{onClick:t,notificationFragment:n}=e,r=$n(cd,n),a=null===r?.read_at,[s]=p(od,{update(e,{data:t}){const n=t?.markNotificationAsRead;if(n){const t=e.readQuery({query:ld,variables:{unreadOnly:!0}});if(t?.notifications){const r=t.notifications.filter(e=>e.id!==n.id);e.writeQuery({query:ld,variables:{unreadOnly:!0},data:{notifications:r}})}const r=e.readQuery({query:ld,variables:{unreadOnly:!1}});if(r&&r.notifications){const t=r.notifications.map(e=>e?.id===n.id?{...e,read_at:new Date}:e);e.writeQuery({query:ld,variables:{unreadOnly:!1},data:{notifications:t}})}e.modify({id:e.identify({__typename:"Notification",id:n.id}),fields:{read_at:()=>n.read_at}})}}});return i.jsx(o,{className:"\n        cursor-pointer flex flex-col\n        hover:bg-hoki-100\n      ",to:r.url,onClick:async()=>{t&&t(),await s({variables:{id:r.id}})},children:i.jsxs("div",{className:"flex items-center justify-between px-4 gap-5 "+(a?"":"opacity-50"),children:[i.jsxs("div",{className:"py-1 md:py-3",children:[i.jsx("div",{className:"text-hoki-900 text-xs md:text-sm mb-1 md:mb-1.5",children:i.jsx(Wn,{disallowedElements:["a","img"],unwrapDisallowed:!0,children:r.message})}),i.jsx("div",{className:"text-xs md:text-sm text-hoki-500",children:Vn(r.created_at).format("MMM D, YYYY h:mm A")})]}),i.jsx("div",{className:"w-2",children:null===r?.read_at&&i.jsx("div",{className:"flex flex-shrink-0 w-2 h-2 rounded-full bg-primary"})})]})})},dd=["CONTACTS_FOUND_NOTIFICATION"],pd=(e,t)=>null===e||e.has(t??""),hd=E("\n  query Notifications_Query($first: Int, $after: String) {\n    notificationsConnection(first: $first, after: $after) {\n        edges {\n          cursor\n          node {\n            id\n            message\n            notification_type\n            created_at\n            url\n            read_at\n            ...NotificationItem_NotificationFragment\n          }\n        }\n        pageInfo {\n          hasPreviousPage\n          hasNextPage\n          endCursor\n        }\n      }\n  }\n"),md=E("\n  subscription NewNotification {\n    newNotification {\n      id\n      message\n      params\n      notification_type\n      created_at\n      url\n      read_at\n    }\n  }\n"),fd=E("\n  query UnreadNotificationsQuery {\n    notifications(unread_only: true) {\n      id\n      params\n      notification_type\n    }\n  }\n"),gd=E("\n  fragment BiddingSessionNotification_BiddingSession on BiddingSession {\n    has_unread_messages\n  }\n"),yd=E("\n  fragment SourcingSessionNotification_SourcingSession on SourcingSession {\n    has_unread_messages\n  }\n"),xd=({allowedTypes:e=null})=>{const{data:t,fetchMore:r,subscribeToMore:a}=d(hd),s=(t?.notificationsConnection?.edges||[]).filter(t=>
35pd(e,t?.node?.notification_type)),l=t?.notificationsConnection?.pageInfo,c=n.useRef(null),[u,p]=n.useState(!1),h=A();n.useEffect(()=>a({document:md,updateQuery:(e,{subscriptionData:t})=>{if(!t.data)return e;const{newNotification:n}=t.data,{cache:r}=h;if(n?.id){if(n.params?.bidding_session_id){const e=n.params.bidding_session_id;r.writeFragment({id:r.identify({__typename:"BiddingSession",id:e}),fragment:gd,data:{has_unread_messages:!0}})}if(n.params?.sourcing_session_id){const e=n.params.sourcing_session_id;r.writeFragment({id:r.identify({__typename:"SourcingSession",id:e}),fragment:yd,data:{has_unread_messages:!0}})}return{...e,notificationsConnection:{...e.notificationsConnection||{},edges:[{cursor:n.id,node:n},...e?.notificationsConnection?.edges||[]],startCursor:n.id}}}return e}}),[a,h]),n.useEffect(()=>{null===e||u||s.length>=10||l?.hasNextPage&&(p(!0),r({variables:{after:l.endCursor,first:15}}).finally(()=>p(!1)))},[e,u,s.length,l,r]);const m=n.useCallback(async()=>{if(c.current){const{scrollTop:e,scrollHeight:t,clientHeight:n}=c.current;e+n>=t&&l?.hasNextPage&&(p(!0),await r({variables:{after:l.endCursor,first:15}}),p(!1))}},[l,r]),[f,g]=n.useState(!1),{data:y,subscribeToMore:x}=d(fd),v=y?.notifications,w=v?.filter(t=>
35pd(e,t?.notification_type));return n.useEffect(()=>x({document:md,updateQuery:(e,{subscriptionData:t})=>{if(!t.data)return e;const{newNotification:n}=t.data;return n?.id?{...e,notifications:[n,...e?.notifications||[]]}:e}}),[x]),i.jsxs(ki,{modal:!0,open:f,onOpenChange:g,children:[i.jsx(Si,{className:"h-full px-3",children:i.jsxs("div",{className:"relative",children:[i.jsx(Er,{className:"text-primary"}),w&&w?.length>0&&i.jsx("div",{className:"bg-bittersweet-400 rounded-3xl px-[5px] flex items-center absolute -top-2 -end-2.5",children:i.jsx("span",{className:"text-sm text-white font-semibold",children:w.length>=99?99:w.length})})]})}),i.jsxs(Ei,{className:"bg-white w-screen sm:w-96 h-[calc(100dvh-60px)] flex flex-col p-0",sideOffset:0,children:[i.jsxs("div",{className:"flex justify-between p-4",children:[i.jsx("p",{className:"text-left text-hoki-700 font-semibold text-sm",children:"Notifications"}),i.jsx("p",{className:"text-right text-xs text-hoki-500",children:"Newest on top"})]}),i.jsxs("div",{className:"overflow-auto",ref:c,onScroll:m,children:[s.map(e=>i.jsx(ud,{notificationFragment:e?.node,onClick:()=>g(!1)},e?.cursor)),u&&i.jsx("div",{className:"flex justify-center p-4",children:i.jsx(O,{})}),!1===l?.hasNextPage&&i.jsx("p",{className:"py-4 text-center text-hoki-500 text-xs",children:"You're all caught up!"})]}),null===e&&i.jsx("div",{className:"p-4 mt-auto",children:i.jsx(En,{as:o,color:"hoki",to:b.Notifications,fullWidth:!0,onClick:()=>g(!1),children:"View more"})})]})]})},bd=E("\n    query TopNavLayoutUser_Query {\n      user {\n        id\n        full_name\n        first_name\n        email\n        user_type\n      }\n    }\n  "),vd=()=>{const{data:e}=d(bd),{isMobileMenuOpen:n,toggleMobileMenu:r,canAccessProjects:a,canAccessBigBrain:s}=Sa(),l=(({canAccessProjects:e,reveEnabled:t,canAccessBigBrain:n})=>{if(e)return{visible:!0,allowedTypes:null};const r=[...n?dd:[]];return{visible:r.length>0,allowedTypes:new Set(r)}})({canAccessProjects:a,reveEnabled:br(),canAccessBigBrain:s}),c=t.useRef(null);return wl(c,()=>{n&&r()}),i.jsx("div",{className:"sticky top-0 z-40",ref:c,children:i.jsxs("div",{className:" h-[56px] flex gap-3 px-4 bg-white border-b border-b-hoki-200",children:[i.jsx("div",{className:"flex items-center gap-3 md:hidden",children:i.jsx(o,{to:b.App,"aria-label":"Cromatic logo",children:i.jsx(_,{width:100})})}),l.visible?i.jsx("div",{className:"ml-auto z-10 flex items-center",children:i.jsx(xd,{allowedTypes:l.allowedTypes})}):i.jsx("div",{className:"ml-auto"}),i.jsx("div",{className:"w-[2px] bg-hoki-300 my-4 hidden md:block"}),i.jsx("div",{className:"items-center hidden md:flex",children:i.jsx(Sl,{fullName:e?.user?.full_name||"Hello",firstName:e?.user?.first_name||"Hello"})}),i.jsx(sd,{})]})})},wd=E("\n  mutation AgreeTerms {\n    agreeTerms {\n      id\n      has_agreed_terms\n    }\n  }\n"),jd=({isBiotech:e,open:t,setOpen:r})=>{const[a]=(()=>{const[e,t]=p(wd);return[n.useCallback(()=>e(),[e]),t]})(),[s,l]=n.useState(null);n.useEffect(()=>{const e=document.createElement("div");return e.setAttribute("id","terms-of-service-modal-container"),document.body.appendChild(e),l(e),()=>{e&&document.body.contains(e)&&document.body.removeChild(e)}},[]),n.useEffect(()=>{const e=()=>{s&&document.body.lastChild!==s&&document.body.appendChild(s)};e();const t=new MutationObserver(e);return t.observe(document.body,{childList:!0}),()=>{t.disconnect()}},[s]);const[c,u]=n.useState(0);(e=>{const t=n.useCallback(t=>{t instanceof HTMLDivElement&&"dialog"===t.getAttribute("role")&&e(t)},[e]);n.useEffect(()=>{const e=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(t)})});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()},[t])})(()=>{u(e=>e+1)});const d=e?b.TermOfService:b.VendorTerms;return i.jsx(Ve,{open:t,onOpenChange:r,children:s&&i.jsx($e,{container:s,children:i.jsxs(We,{className:"border-none p-10 max-w-[775px]",onEscapeKeyDown:e=>{e.preventDefault()},children:[i.jsxs("div",{className:"text-hoki-800 w-full overflow-hidden relative",children:[i.jsx("div",{className:"text-2xl font-semibold",children:"Updated terms of service"}),i.jsxs("div",{className:"text-base mt-[9px]",children:["We updated our"," ",i.jsxs("a",{href:d,target:"_blank",rel:"noreferrer",className:"underline",children:[e?"Client":"Vendor"," ","Terms of Service"]})," ","and"," ",i.jsx("a",{href:b.PrivacyPolicy,target:"_blank",rel:"noreferrer",className:"underline",children:"Privacy Statement"})," ",'. By clicking "Agree and continue", you confirm that you have read and agree to our updated terms.']})]}),i.jsxs(Qe,{className:"text-base mt-7 !gap-x-[19px] items-center",children:[i.jsx(o,{to:b.CalendlyMeet,className:"focus:outline-none",target:"_blank",children:"Contact us"}),i.jsx(yn,{onClick:async()=>{a(),r(!1)},className:"h-[48px] w-[182px]","data-testid":"button:agree",children:"Agree and continue"})]})]})},c)})},Cd=()=>i.jsx("div",{className:"bg-amber-50 border-b border-amber-200 py-3 px-8",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(Ze,{className:"text-amber-600 w-5 h-5 mr-2"}),i.jsx("span",{className:"text-amber-800",children:"For security purposes, please set your password to continue using all features."})]}),i.jsx(o,{to:`${b.Settings_Profile}?set-password=true`,className:"bg-primary hover:bg-primary-dark text-white font-medium py-1.5 px-4 roun
35ded-md text-sm transition-colors",children:"Set Password"})]})}),Nd=E("\n  query TokenBalanceQuery {\n    tokenBalance\n  }\n"),kd=E("\n  query TokenPackagesQuery {\n    tokenPackages {\n      type\n      tokens\n      price_usd\n      label\n      description\n      badge\n      popular\n      stripe_price_id\n    }\n  }\n"),Sd=E("\n  mutation CreateTokenPurchaseSession(\n      $input: CreateTokenPurchaseSessionInput!\n  ) {\n    createTokenPurchaseSession(input: $input)\n  }\n"),Ed=E("\n  mutation VerifyTokenPurchase(\n    $input: VerifyTokenPurchaseInput!\n  ) {\n    verifyTokenPurchase(input: $input) {\n      success\n      tokens_awarded\n      new_balance\n    }\n  }\n"),Ad=()=>{const{data:e,loading:t,error:n,refetch:r}=d(Nd),{data:a,loading:i}=d(kd),[s,{loading:o}]=p(Sd),[l,{loading:c}]=p(Ed);return{balance:e?.tokenBalance??0,loading:t,error:n,refetch:r,packages:a?.tokenPackages??[],packagesLoading:i,purchaseTokens:async(e,t,n)=>{const r=await s({variables:{input:{package_type:e,success_url:t,cancel_url:n}}}),a=r.data?.createTokenPurchaseSession;if(a)return a;throw new Error("Unable to create payment session")},purchaseLoading:o,verifyTokenPurchase:async e=>{const t=await l({variables:{input:{session_id:e}},refetchQueries:[{query:Nd}],awaitRefetchQueries:!0});return t.data?.verifyTokenPurchase},verifyLoading:c}},Od=({onTopUp:e,isCollapsed:t})=>{const{balance:n}=Ad();return t?i.jsx("div",{className:"m-4",children:i.jsx("button",{type:"button",onClick:e,className:"w-full p-3 bg-hoki-50 border border-hoki-200 rounded-lg hover:bg-hoki-100 transition-colors group",title:`Available Tokens: ${n}`,children:i.jsxs("div",{className:"flex flex-col items-center gap-1",children:[i.jsx("div",{className:"w-6 h-6 bg-primary rounded flex items-center justify-center",children:i.jsx("span",{className:"text-white text-xs font-semibold",children:"$"})}),i.jsx("span",{className:"text-xs font-semibold text-hoki-700",children:n>=1e3?`${Math.round(n/1e3)}k`:n})]})})}):i.jsx("div",{className:"m-4",children:i.jsxs("div",{className:"p-4 bg-hoki-50 border border-hoki-200 rounded-lg",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-xs font-medium text-hoki-600 uppercase tracking-wide",children:"Available Tokens"}),i.jsx("div",{className:"text-lg font-semibold text-hoki-900",children:n})]}),i.jsx("button",{type:"button",onClick:e,className:"whitespace-nowrap px-3 py-1.5 bg-primary text-white text-xs font-medium rounded hover:bg-primary-dark transition-colors",children:"Top Up"})]}),n<3&&i.jsxs("div",{className:"mt-2 p-2 bg-red-50 border border-red-200 rounded text-xs text-red-700",children:[i.jsx("strong",{children:"Low balance:"})," ","Consider topping up to continue unlocking quotes."]})]})})},_d=({isOpen:e,onClose:n})=>{const{balance:r,refetch:a,packages:o,purchaseTokens:l,verifyTokenPurchase:c,purchaseLoading:u}=Ad(),{toastError:d,toastSuccess:p}=v(),[h,m]=P(),f=t.useRef(!1),[g,y]=t.useState(I.Medium);t.useEffect(()=>{const e=h.get("session_id"),t=h.get("success"),n=h.get("cancelled");if(!e&&!n||f.current)return;f.current=!0;const r=new URLSearchParams(h);r.delete("session_id"),r.delete("success"),r.delete("cancelled"),m(r,{replace:!0}),e&&t?c(e).then(e=>{if(!e?.success)throw new Error("Payment verification failed");p(`Successfully purchased ${e.tokens_awarded} tokens. Your new balance is ${e.new_balance} tokens.`),a()}).catch(()=>{d("Failed to verify purchase. Please contact support if tokens are missing.")}):d("Payment was cancelled. No charges were made.")},[h,m,c,a,d,p]);const x=o.find(e=>e.type===g);return e?i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4 max-h-[90vh] overflow-y-auto",children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-hoki-900 mb-2",children:"Add Tokens"}),i.jsx("p",{className:"text-sm text-hoki-600",children:"Choose a Token package to continue unlocking quotes:"})]}),i.jsx("div",{className:"space-y-3 mb-6",children:o.map(e=>{return i.jsxs("button",{type:"button",className:s("w-full text-left border-2 rounded-lg p-4 transition-all",g===e.type?"border-primary bg-primary-50":"border-hoki-200 hover:border-hoki-300"),onClick:()=>y(e.type),"aria-pressed":g===e.type,disabled:u,children:[i.jsxs("div",{className:"flex justify-between items-center mb-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-semibold text-hoki-900",children:e.label}),e.badge&&i.jsx("span",{className:s("px-2 py-1 text-xs font-medium rounded",e.popular?"bg-green-100 text-green-800":"bg-orange-100 text-orange-800"),children:e.badge})]}),i.jsx("span",{className:"text-hoki-600 font-medium",children:(t=e.price_usd,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(t))})]}),i.jsx("div",{className:"text-xs text-hoki-600",children:e.description})]},e.type);var t})}),x&&i.jsxs("div",{className:"bg-hoki-50 border border-hoki-200 rounded-lg p-3 mb-6",children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-hoki-600",children:"Current Balance:"}),i.jsxs("span",{className:"font-medium text-hoki-900",children:[r," ","tokens"]})]}),i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-hoki-600",children:"Adding:"}),i.jsxs("span",{className:"font-medium text-hoki-900",children:[x.tokens," ","tokens"]})]}),i.jsx("div",{className:"border-t border-hoki-200 pt-1 mt-2",children:i.jsxs("div",{className:"flex justify-between text-sm font-semibold",children:[i.jsx("span",{className:"text-hoki-900",children:"New Balance:"}),i.jsxs("span",{className:"text-hoki-900",children:[r+x.tokens," ","tokens"]})]})})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx("button",{type:"button",onClick:n,disabled:u,className:"flex-1 px-4 py-2 border border-hoki-300 text-hoki-700 rounded-lg hover:bg-hoki-50 transition-colors disabled:opacity-50",children:"Cancel"}),i.jsx("button",{type:"button",onClick:async()=>{try{const e=new URL(window.location.href);e.searchParams.delete("session_id"),e.searchParams.delete("success"),e.searchParams.delete("cancelled");const t=`${e.toString()}?session_id={CHECKOUT_SESSION_ID}&success=true`,n=`${e.toString()}
35?cancelled=true`,r=await l(g,t,n);if(!r)throw new Error("Unable to create payment session");if(!window.open(r,"_blank","noopener,noreferrer"))throw new Error("Please allow popups to complete your purchase")}catch(e){const t=e instanceof Error?e.message:"Purchase failed";d(t)}},disabled:u||!x,className:"flex-1 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors disabled:opacity-50 flex items-center justify-center gap-2",children:u?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Processing..."]}):"Purchase Tokens"})]}),i.jsx("p",{className:"text-xs text-hoki-500 mt-3 text-center",children:"You'll be redirected to Stripe to complete your purchase securely."})]})}):null},Pd=e=>t.createElement("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{fill:"#4285f4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),t.createElement("path",{fill:"#34a853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),t.createElement("path",{fill:"#fbbc05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),t.createElement("path",{fill:"#ea4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})),Id=e=>t.createElement("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{fill:"#0078d4",d:"M1 1h10.5v10.5H1V1zm11.5 0H23v10.5H12.5V1zM1 12.5h10.5V23H1V12.5zm11.5 0H23V23H12.5V12.5z"})),Md=993,Td=465,Rd=e=>void 0!==e&&e>=1&&e<=65535,Ld=(e,t)=>void 0===e?t:Math.max(1,Math.min(65535,e));var Dd=(e=>(e.MICROSOFT="microsoft",e.GOOGLE="google",e))(Dd||{});const Fd="custom",qd="platform",Bd={google:"Gmail",microsoft:"Outlook",[qd]:"Big Brain"},Ud=(e,t="email")=>Bd[e?.toLowerCase()??""]??t,zd=(e,t)=>{if(0===e.length)return null;const n=e.map(e=>Ud(e,e===Fd?"SMTP":e)).join(" and "),r=`Your ${n} account was disconnected because only one email provider can be active at a time.`;if(0===t)return r;return`${r} ${1===t?"1 campaign sending from it was paused.":`${t} campaigns sending from it were paused.`}`};var Hd=(e=>(e.GMAIL="gmail",e.OUTLOOK="outlook",e.SMTP="smtp",e))(Hd||{});const Vd=e=>e.map(e=>({value:e.name,label:e.display_name,smtpHost:e.smtp_host,isPrivate:!e.is_public})),$d=(e,t)=>{const n=async(e,t)=>{const n=await e(),r=n.data?.[t];r&&window.open(r,"_blank")};return{onClickConnectGoogle:async()=>{await n(()=>e({variables:{redirect_url:window.location.href}}),"googleOauthAuthorizationUri")},onClickConnectMicrosoft:async()=>{await n(()=>t({variables:{redirect_url:window.location.href}}),"microsoftOauthAuthorizationUri")}}},Wd=(e={})=>{const{connectedProviders:t=[],smtpProviderOptions:n=[],emailByProvider:r={},onClickConnectGoogle:a,onClickConnectMicrosoft:i,onClickConnectSmtp:s,loadingGoogle:o=!1,loadingMicrosoft:l=!1,loadingSmtp:c=!1}=e,u=n.find(e=>t.includes(e.value));return[{key:"gmail",name:"Gmail",description:"Google account",icon:Pd,isOAuth:!0,connect:a,loading:o,isConnected:t.includes("google"),connectedProvider:"google",connectedEmail:r.google},{key:"outlook",name:"Outlook",description:"Microsoft account",icon:Id,isOAuth:!0,connect:i,loading:l,isConnected:t.includes("microsoft"),connectedProvider:"microsoft",connectedEmail:r.microsoft},{key:"smtp",name:u?.label||"Other",description:"Email account",icon:bs,isOAuth:!1,connect:s,loading:c,isConnected:void 0!==u,connectedProvider:u?.value,connectedEmail:u?r[u.value]:void 0}]};window.global=window;const Qd=()=>{const{isDesktopSidebarOpen:e,toggleDesktopSidebar:n,hasAgreedTerms:r,hasSetPassword:a}=Sa(),{isMd:l}=Un("md"),{isLg:c}=Un("lg"),u=t.useRef(null),d=Be();(()=>{const[e,n]=P(),{toastWarning:r}=v(),a=t.useRef(!1);t.useEffect(()=>{const t=e.get("replaced");if(!t||a.current)return;a.current=!0;
35const i=zd(t.split(",").filter(Boolean),Number(e.get("paused"))||0);i&&r(i,{autoDismiss:!1}),n(e=>{const t=new URLSearchParams(e);return t.delete("replaced"),t.delete("paused"),t},{replace:!0})},[e,n,r])})();const[p,h]=t.useState(!1),[m,f]=t.useState(!r),g=s("w-[237px] bg-white border-r border-hoki-200 top-0 left-0 max-h-screen transition",l&&!e&&"w-[80px]",l?"h-full fixed":"sticky w-full top-[56px]",!l&&!e&&"hidden"),y=s("flex flex-col relative transition-all min-h-screenWithoutNav",e?"md:ml-[237px]":"md:ml-[80px]");return i.jsxs("div",{className:"relative bg-hoki-100 min-h-screenWithoutNav",children:[i.jsxs("div",{className:y,children:[i.jsx(vd,{}),i.jsxs("div",{className:"min-h-screenWithoutNav",children:[!a&&i.jsx(Cd,{}),i.jsx(M,{})]})]}),i.jsx("div",{className:g,children:i.jsxs("div",{ref:u,className:"h-full max-h-screen flex flex-col gap-1",children:[i.jsxs("div",{className:s("flex flex-row items-end",e?"gap-x-[35px]":""),children:[e?i.jsx(o,{className:"pt-[19px] pl-[22.455px] hidden md:flex",to:"/app",children:i.jsx(_,{height:35.1})}):i.jsxs("button",{className:"relative group pt-[19px] pl-[22.455px] hidden md:flex",type:"button",onClick:()=>n(),children:[i.jsx(_,{height:35.1,size:"small",className:"opacity-100 group-hover:opacity-0 transition-opacity"}),i.jsx("div",{className:"absolute bottom-0 right-0 flex items-center justify-center",children:i.jsx(Mn,{className:"w-[35.1px] h-[35.1px] transition-opacity opacity-0 group-hover:opacity-100"})})]}),c&&e&&i.jsx("button",{type:"button",className:"relative p-1.5 z-10 bg-white hover:bg-white hover:text-primary transition-all ",onClick:n,children:i.jsx(Tn,{className:"transition text-hoki-700 w-6 h-6"})})]}),i.jsx("div",{className:"mt-9 hidden md:block flex-1 min-h-0",children:i.jsx(hl,{})}),d&&i.jsx("div",{className:"hidden md:block",children:i.jsx(Od,{onTopUp:()=>h(!0),isCollapsed:!e})})]})}),d&&i.jsx(vl,{}),i.jsx(jd,{isBiotech:d,open:!r&&m,setOpen:f}),d&&i.jsx(_d,{isOpen:p,onClose:()=>h(!1)})]})},Zd=E("\n  query onboardingQuery {\n    user {\n      id\n      has_completed_onboarding\n    }\n  }\n"),Kd=()=>{const{data:e}=d(Zd),t=e?.user?.has_completed_onboarding;return!0===t?i.jsx(M,{}):!1===t?i.jsx(T,{to:b.Onboarding,replace:!0}):null},Gd=({isOpen:e,loading:n=!1,onClose:r,onPasswordChanged:a,hasSetPassword:o=!1})=>{const[l,c]=t.useState(""),[u,d]=t.useState(""),[p,h]=t.useState(""),[m,f]=t.useState(!1),[g,y]=t.useState(null),x=t.useMemo(()=>o?Boolean(l&&m&&u===p):Boolean(m&&u===p),[l,u,p,m,o]);return i.jsx(no,{isOpen:e,onClose:r,title:o?"Change your account password":"Set your account password",titleClassName:"text-2xl font-medium text-black p-1",children:i.jsxs("div",{className:"w-full flex flex-col gap-3",children:[o&&i.jsxs(fn,{isInvalid:!!g?.oldPassword,isRequired:o,children:[i.jsx(fn.Label,{children:"Old password"}),i.jsx(Kn,{value:l,onChange:e=>c(e.target.value),placeholder:"Old password",required:o}),i.jsx(fn.ErrorMessage,{children:g?.oldPassword})]}),i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"New password"}),i.jsx(Kn,{value:u,onChange:e=>d(e.target.value),placeholder:"New password",required:!0}),i.jsx(Gn,{password:u,isPasswordValid:e=>f(e)})]}),i.jsxs(fn,{isInvalid:!!g?.confirmPassword,isRequired:!0,children:[i.jsx(fn.Label,{children:"Confirm password"}),i.jsx(Kn,{value:p,onChange:e=>h(e.target.value),placeholder:"Confirm password",required:!0}),i.jsx(fn.ErrorMessage,{children:g?.confirmPassword})]}),i.jsx("div",{className:"flex justify-end items-center gap-4 sm:gap-6 mt-5",children:i.jsxs("div",{className:"space-x-5",children:[i.jsx(En,{onClick:r,color:"hoki",variant:"text",className:"text-base",children:"Cancel"}),i.jsx("button",{type:"button",className:s("min-w-[120px] text-base disabled:opacity-60 py-2 px-3 my-3 rounded",x?"bg-primary hover:shadow-button text-white":"border border-primary text-primary hover:bg-bleu-50"),onClick:()=>{const e={};o&&!l&&(e.oldPassword="Old password is required"),u!==p&&(e.confirmPassword="Passwords do not match"),Object.keys(e).length>0?y(e):(y({}),a({oldPassword:l,newPassword:u}),c(""),d(""),h(""))},disabled:n,children:i.jsx("span",{className:"whitespace-nowrap mx-1",children:"Save"})})]})})]})})};E("\n  query userTypeQuery {\n    user {\n      id\n      user_t
35ype\n    }\n  }\n");const Yd=E("\n  mutation updateUserInfoMutation($firstName: String!, $lastName: String!, $email: String!, $phoneNumber: String, $countryCode: String) {\n    updateUserInfo(first_name: $firstName, last_name: $lastName, email: $email, phone_number: $phoneNumber, country_code: $countryCode) {\n      id\n      first_name\n      last_name\n      full_name\n      email\n      phone_number\n      country_code\n    }\n  }\n"),Jd=E("\n  mutation changePasswordMutation($oldPassword: String!, $newPassword: String!) {\n    changePassword(old_password: $oldPassword, new_password: $newPassword)\n  }\n"),Xd=E("\n  query customerPersonalInfo {\n    user {\n      id\n      email\n      first_name\n      last_name\n      has_set_password\n      customer {\n        team\n        job_title\n        has_setup_profile\n        biotech {\n          address\n          address1\n          address2\n          city\n          state\n          country\n          zipcode\n        }\n      }\n      phone_number\n      country_code\n    }\n  }\n"),ep=E("\n  mutation updateCustomerPersonalInfo(\n    $hasSetupProfile: Boolean,\n    $address: String\n    $address1: String\n    $address2: String\n    $city: String\n    $state: String\n    $country: String\n    $zipcode: String\n    $jobTitle: String,\n    $team: String,\n    $timezone: String\n  ) {\n    updateCustomer(\n      has_setup_profile: $hasSetupProfile,\n      address: $address,\n      address1: $address1,\n      address2: $address2,\n      city: $city,\n      state: $state,\n      country: $country,\n      zipcode: $zipcode,\n      job_title: $jobTitle,\n      team: $team,\n      timezone: $timezone\n    ) {\n      id\n    }\n  }\n"),tp=R({firstName:L().min(1),lastName:L().min(1),email:L().email(),team:L().min(1),job_title:L().min(1),address:R({formatted_address:L().min(1),address1:L().optional(),address2:L().optional(),city:L().optional(),state:L().optional(),country:L().optional(),zipcode:L().optional()}).refine(({formatted_address:e})=>e.trim().length>0,{message:"Please select an address suggested from the dropdown."}),phoneNumber:L().optional().superRefine((e,t)=>{if(e){const n=Ke(e);if(!(Xe(e)&&n&&n?.nationalNumber&&n?.countryCallingCode))return t.addIssue({code:D.custom,message:"Invalid phone number"}),F}})}),np=()=>{const[e,n]=t.useState(""),{toastSuccess:r,toastError:a,toastCatchError:s}=v(),{control:o,handleSubmit:l,setValue:c}=xn({resolver:bn(tp)}),{data:u,loading:h}=d(Xd,{onError:()=>{a("Something went wrong")},onCompleted:e=>{const t="",r="",a="",i="",s="";if(e.user){const{user:o}=e;c("firstName",o?.first_name||t),c("lastName",o?.last_name||r),c("email",o?.email||a),c("team",o?.customer?.team||i),c("job_title",o?.customer?.job_title||s);const l=e.user?.customer?.biotech;l?.address&&(n(l?.address||""),c("address",{formatted_address:l?.address||"",address1:l?.address1||"",address2:l?.address2||"",city:l?.city||"",state:l?.state||"",country:l?.country||"",zipcode:l?.zipcode||""})),o?.phone_number&&c("phoneNumber",`+${o.country_code}${o.phone_number}`)}}}),[m,{loading:f}]=p(Yd),[g,{loading:y}]=p(ep),[x,{loading:b}]=p(Jd),{isOpen:w,onClose:j,onOpen:C}=ut(),N=t.useCallback(async e=>{try{const t=e.phoneNumber?Ke(e.phoneNumber):{nationalNumber:"",countryCallingCode:""};await m({variables:{firstName:e.firstName,lastName:e.lastName,email:e.email,countryCode:t.countryCallingCode,phoneNumber:t.nationalNumber}}),await g({variables:{hasSetupProfile:!0,team:e.team,jobTitle:e.job_title,address:e.address.formatted_address,address1:e.address.address1,address2:e.address.address2,city:e.address.city,state:e.address.state,country:e.address.country,zipcode:e.address.zipcode}}),r("Personal info updated successfully.")}catch(t){t instanceof Error&&s(t)}},[m,g,s,r]),k=e=>{const t=et(e);n(t.formatted_address),c("address",t)};return!u||h?i.jsx("div",{className:"flex justify-center mt-10 text-center",children:i.jsx(O,{})}):i.jsxs("div",{className:"flex flex-col bg-white max-w-[631px] w-full h-full gap-10 sm:px-5",children:[i.jsxs("div",{className:"bg-white rounded-lg w-full gap-5",children:[i.jsx("div",{className:"hidden sm:block",children:i.jsx("p",{className:"text-xl font-semibold text-left",children:"Profile info"})}),i.jsxs("form",{id:"biotech-profile.personal-info-form",className:"flex flex-col sm:mt-4 gap-6 sm:gap-10",onSubmit:l(N),children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-5 gap-y-6 sm:gap-y-[30px]",children:[i.jsx(vn,{control:o,name:"firstName",render:({field:e,fieldState:{error:t,invali
35d:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"First name"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your first name",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})}),i.jsx(vn,{control:o,name:"lastName",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Last name"}),i.jsx(gn,{...e,id:e.name,defaultValue:u?.user?.last_name||"",placeholder:"Enter your first name",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})}),i.jsx("div",{className:"sm:col-span-2",children:i.jsx(vn,{control:o,name:"email",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Email"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your email",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})}),i.jsxs("div",{className:"sm:col-span-2 sm:flex sm:gap-8 space-y-6 sm:space-y-0",children:[i.jsx("div",{className:"sm:w-3/5",children:i.jsx(vn,{control:o,name:"job_title",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Role in organization"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your role in organization",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})}),i.jsx("div",{className:"sm:w-2/5",children:i.jsx(vn,{control:o,name:"team",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Dept / Team"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your department or team",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})})]}),i.jsx("div",{className:"sm:col-span-2",children:i.jsx(vn,{control:o,name:"address",render:({fieldState:{error:t,invalid:r}})=>i.jsxs(fn,{isInvalid:r,children:[i.jsxs(fn.Label,{className:"flex items-center",children:["Company Address",i.jsx(qe,{placement:"top",tooltip:"Providing your company address ensures vendor quotes are routed to the appropriate technical or sales department, helping expedite responses, streamline logistics, and avoid delays in procurement",children:i.jsx("div",{className:"flex items-center cursor-pointer ml-2",children:i.jsx(Ge,{})})})]}),i.jsx(Ye,{value:e,onChange:e=>{c("address",{formatted_address:"",address1:"",address2:"",city:"",state:"",country:"",zipcode:""}),n(e.target.value)},placeholder:"345 Spear St, San Francisco, CA 94105",onPlaceSelected:k,"data-testid":"text-input:address",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})}),i.jsx("div",{className:"sm:col-span-2",children:i.jsx(vn,{control:o,name:"phoneNumber",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Phone number"}),i.jsx(Je,{...e,id:e.name}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})})]}),i.jsx("div",{className:"self-end sm:self-start",children:i.jsx(En,{type:"submit",color:"bleu",isLoading:f||y,children:"Save and update"})})]})]}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsxs(fn,{children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-2",children:"Password"}),i.jsx("div",{className:"flex flex-row gap-5 items-center",children:u?.user?.has_set_password?i.jsxs(i.Fragment,{children:[i.jsx(gn,{type:"password",value:"*********",placeholder:"Password",disabled:!0}),i.jsx("button",{type:"button",onClick:C,className:"text-primary hover:underline underline-offset-2",children:"Change"})]}):i.jsx("button",{type:"button",onClick:C,className:"text-primary hover:underline underline-offset-2",children:"Set new password"})})]}),i.jsx(Gd,{isOpen:w,onClose:j,onPasswordChanged:async({oldPassword:e,newPassword:t})=>{try{await x({variables:{oldPassword:e,newPassword:t}}),r("Password changed successfully."),j()}catch(n){n instanceof Error&&s(n)}},loading:b,hasSetPassword:u?.user?.has_set_password??!1})]})},rp=({checked:e,onChange:t,disabled:n=!1,id:r="toggle-switch"})=>i.jsxs("label",{htmlFor:r,className:"relative inline-flex items-center "+(n?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[i.jsx("input",{id:r,type:"checkbox",checked:e,onChange:t,disabled:n,className:"sr-only peer","aria-label":"toggle switch"}),i.jsx("div",{className:"w-11 h-6 bg-gray-200 rounded-full peer peer-checked:after:translate-x-full after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]}
35),ap=E("\n  query vendorMemberPersonalInfo {\n    user {\n      id\n      email\n      first_name\n      last_name\n      phone_number\n      country_code\n      has_set_password\n      vendor_member {\n        id\n        title\n        department\n        has_setup_profile\n        notify_team_on_bids\n        use_platform_email\n        cc_self_on_platform_email\n        platform_email_disabled_at\n      }\n    }\n    connectedEmailProviders\n  }\n"),ip=E("\n  mutation updateVendorPersonalInfo($department: String, $title: String, $timezone: String, $bcc_emails: [String!], $email_signature: String, $email_prompt_guidelines: String, $use_crm_context_in_emails: Boolean) {\n    updateVendorMember (department: $department, title: $title, timezone: $timezone, bcc_emails: $bcc_emails, email_signature: $email_signature, email_prompt_guidelines: $email_prompt_guidelines, use_crm_context_in_emails: $use_crm_context_in_emails) {\n      id\n      title\n      department\n      bcc_emails\n      email_signature\n      email_prompt_guidelines\n      use_crm_context_in_emails\n    }\n  }\n"),sp=E("\n  mutation updateNotifyTeamOnBids($enabled: Boolean!) {\n    updateNotifyTeamOnBids(enabled: $enabled) {\n      id\n      notify_team_on_bids\n    }\n  }\n"),op=E("\n  query vendorProfile {\n    user {\n      id\n      email\n      first_name\n      last_name\n      vendor {\n        id\n        email\n        company_name\n      }\n      vendor_member {\n        id\n        bcc_emails\n        email_signature\n        email_prompt_guidelines\n        use_crm_context_in_emails\n        use_platform_email\n        cc_self_on_platform_email\n        platform_email_disabled_at\n      }\n    }\n  }\n"),lp=({notifyTeamOnBids:e})=>{const{toastSuccess:n,toastCatchError:r}=v(),[a,s]=t.useState(e),[o]=p(sp);t.useEffect(()=>{s(e)},[e]);return i.jsxs("div",{children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-4",children:"Notifications"}),i.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 border border-hoki-200 rounded-lg",children:[i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-hoki-900",children:"Notify team on bid messages"}),i.jsx("div",{className:"text-sm text-hoki-600 mt-1",children:"When enabled, all teammates on your company account will receive notifications when you send bid chat messages. When disabled, only chat participants will be notified."})]}),i.jsx("div",{className:"shrink-0 pt-0.5",children:i.jsx(rp,{id:"notify-team-on-bids-toggle",checked:a,onChange:async()=>{const e=!a;s(e);try{await o({variables:{enabled:e}}),n(e?"Team notifications enabled":"Team notifications disabled")}catch(t){s(!e),r(t)}}})})]})]})},cp=R({firstName:L().min(1),lastName:L().min(1),email:L().email(),title:L().min(1),department:L().min(1),phoneNumber:L().optional().superRefine((e,t)=>{if(e){const n=Ke(e);if(!(Xe(e)&&n&&n?.nationalNumber&&n?.countryCallingCode))return t.addIssue({code:D.custom,message:"Invalid phone number"}),F}})}),up=()=>{const{toastSuccess:e,toastError:n,toastCatchError:r}=v(),{isOpen:a,onClose:s,onOpen:o}=ut(),[l,c]=P(),{data:u,loading:h}=d(ap,{onError:()=>{n("Something went wrong")}}),m=t.useMemo(()=>{const e=u?.user;return{firstName:e?.first_name||"",lastName:e?.last_name||"",email:e?.email||"",title:e?.vendor_member?.title||"",department:e?.vendor_member?.department||"",phoneNumber:e?.phone_number?`+${e.country_code}${e.phone_number}`:""}},[u]),{control:f,handleSubmit:g}=xn({resolver:bn(cp),values:m,resetOptions:{keepDirtyValues:!0}});t.useEffect(()=>{"true"===l.get("set-password")&&o()},[l,o]);const[y,{loading:x}]=p(Yd),[b,{loading:w}]=p(ip),{canAccessProjects:j}=Sa(),[C,{loading:N}]=p(Jd,{update:e=>{const t=e.readQuery({query:q});t?.user?.id&&e.writeQuery({query:q,data:{...t,user:{...t.user,has_set_password:!0}}}),c({})}}),k=t.useCallback(async t=>{try{const n=t.phoneNumber?Ke(t.phoneNumber):{nationalNumber:"",countryCallingCode:""};await y({variables:{firstName:t.firstName,lastName:t.lastName,email:t.email,countryCode:n.countryCallingCode,phoneNumber:n.nationalNumber}}),await b({variables:{title:t.title,department:t.department}}),e("Personal info updated successfully.")}catch(n){n instanceof Error&&r(n)}},[y,b,r,e]);return!u||h?i.jsx("div",{className:"flex justify-center mt-10 text-center",children:i.jsx(O,{})}):i.jsxs("div",{className:"flex flex-col bg-white max-w-[631px] w-full h-full gap-10 sm:px-5",children:[i.jsxs("div",{className:"bg-white rounded-lg w-full gap-5",children:[i.jsx("div",{className:"hidden sm:block",children:i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-2",children:"Profile Info"})}),i.jsxs("form",{id:"vendor-profile.personal-info-form",className:"flex flex-col sm:mt-4 gap-6 sm:gap-10",onSubmit:g(k),children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-5 gap-y-6 sm:gap-y-[30px]",children:[i.jsx(vn,{control:f,name:"firstName",render:({field:e,fieldState:{error:t,invali
35d:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"First name"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your first name",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})}),i.jsx(vn,{control:f,name:"lastName",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Last name"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your first name",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})}),i.jsx("div",{className:"sm:col-span-2",children:i.jsx(vn,{control:f,name:"email",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Email"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your email",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})}),i.jsxs("div",{className:"sm:col-span-2 sm:flex sm:gap-8 space-y-6 sm:space-y-0",children:[i.jsx("div",{className:"sm:w-3/5",children:i.jsx(vn,{control:f,name:"title",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Role in organization"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your role in organization",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})}),i.jsx("div",{className:"sm:w-2/5",children:i.jsx(vn,{control:f,name:"department",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Dept / Team"}),i.jsx(gn,{...e,id:e.name,placeholder:"Enter your department or team",required:!0}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})})]}),i.jsx("div",{className:"sm:col-span-2",children:i.jsx(vn,{control:f,name:"phoneNumber",render:({field:e,fieldState:{error:t,invalid:n}})=>i.jsxs(fn,{isInvalid:n,children:[i.jsx(fn.Label,{htmlFor:e.name,children:"Phone number"}),i.jsx(Je,{...e,id:e.name}),i.jsx(fn.ErrorMessage,{children:t?.message})]})})})]}),i.jsx("div",{className:"self-end sm:self-start",children:i.jsx(En,{type:"submit",color:"bleu",isLoading:x||w,children:"Save and update"})})]})]}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsxs(fn,{children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-2",children:"Password"}),i.jsx("div",{className:"flex flex-row gap-5 items-center",children:u?.user?.has_set_password?i.jsxs(i.Fragment,{children:[i.jsx(gn,{type:"password",value:"*********",placeholder:"Password",disabled:!0}),i.jsx("button",{type:"button",onClick:o,className:"text-primary hover:underline underline-offset-2",children:"Change"})]}):i.jsx("button",{type:"button",onClick:o,className:"text-primary hover:underline underline-offset-2",children:"Set new password"})})]}),j&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsx(lp,{notifyTeamOnBids:u?.user?.vendor_member?.notify_team_on_bids??!1})]}),i.jsx(Gd,{isOpen:a,onClose:()=>{s(),c({})},onPasswordChanged:async({oldPassword:t,newPassword:n})=>{try{await C({variables:{oldPassword:t,newPassword:n}}),e("Password changed successfully."),s()}catch(a){a instanceof Error&&r(a)}},loading:N,hasSetPassword:u?.user?.has_set_password??!1})]})},dp=()=>{const e=Ue();return Be()?i.jsx(np,{}):e?i.jsx(up,{}):null};var pp,hp="https://js.stripe.com/v3",mp=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,fp=function(e){var t=document.createElement("script");t.src="".concat(hp).concat("");var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(t),t},gp=null,yp=null,xp=null,bp=function(e){return null!==gp?gp:(gp=new Promise(function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(hp,'"]')),t=0;t<e.length;t++){var n=e[t];if(mp.test(n.src))return n}return null}();if(r&&e);else if(r){if(r&&null!==xp&&null!==yp){var a;r.removeEventListener("load",xp),r.removeEventListener("error",yp),null===(a=r.parentNode)||void 0===a||a.removeChild(r),r=fp()}}else r=fp();xp=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}}(t,n),yp=function(e){return function(){e(new Error("Failed to load Stripe.js"))}}(n),r.addEventListener("load",xp),r.addEventListener("error",yp)}catch(i){return void n(i)}else t(null)}
35),gp.catch(function(e){return gp=null,Promise.reject(e)}))},vp=function(){return pp||(pp=bp(null).catch(function(e){return pp=null,Promise.reject(e)}))};Promise.resolve().then(function(){return vp()}).catch(function(e){});function wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wp(Object(n),!0).forEach(function(t){Np(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cp(e){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cp(e)}function Np(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,a,i=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(l){o=!0,a=l}finally{try{s||null==n.return||n.return()}finally{if(o)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ep=function(e,t,r){var a=!!r,i=n.useRef(r);n.useEffect(function(){i.current=r},[r]),n.useEffect(function(){if(!a||!e)return function(){};var n=function(){i.current&&i.current.apply(i,arguments)};return e.on(t,n),function(){e.off(t,n)}},[a,t,e,i])},Ap=function(e){var t=n.useRef(e);return n.useEffect(function(){t.current=e},[e]),t.current},Op=function(e){return null!==e&&"object"===Cp(e)},_p="[object Object]",Pp=function e(t,n){if(!Op(t)||!Op(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var a=Object.prototype.toString.call(t)===_p;if(a!==(Object.prototype.toString.call(n)===_p))return!1;if(!a&&!r)return t===n;var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;for(var o={},l=0;l<i.length;l+=1)o[i[l]]=!0;for(var c=0;c<s.length;c+=1)o[s[c]]=!0;var u=Object.keys(o);if(u.length!==i.length)return!1;var d=t,p=n;return u.every(function(t){return e(d[t],p[t])})},Ip=function(e,t,n){return Op(e)?Object.keys(e).reduce(function(r,a){var i=!Op(t)||!Pp(e[a],t[a]);return n.includes(a)?r:i?jp(jp({},r||{}),{},Np({},a,e[a])):r},null):null},Mp="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Tp=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mp;if(null===e||Op(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;throw new Error(n)},Rp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mp;if(function(e){return Op(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return Tp(e,t)})};var n=Tp(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},Lp=n.createContext(null);Lp.displayName="ElementsContext";var Dp=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},Fp=function(e){var t=e.stripe,r=e.options,a=e.children,i=n.useMemo(function(){return Rp(t)},[t]),s=kp(n.useState(function(){return{stripe:"sync"===i.tag?i.stripe:null,elements:"sync"===i.tag?i.stripe.elements(r):null}}),2),o=s[0],l=s[1];n.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}})};return"async"!==i.tag||o.stripe?"sync"!==i.tag||o.stripe||t(i.stripe):i.stripePromise.then(function(n){n&&e&&t(n)}),function(){e=!1}},[i,o,r]);var c=Ap(t);n.useEffect(function(){},[c,t]);var u=Ap(r);return n.useEffect(function(){if(o.elements){var e=Ip(r,u,["clientSecret","fonts"]);e&&o.elements.update(e)}},[r,u,o.elements]),n.useEffect(function(){var e;
35(e=o.stripe)&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.8.1"}),e.registerAppInfo({name:"react-stripe-js",version:"2.8.1",url:"https://stripe.com/docs/stripe-js/react"}))},[o.stripe]),n.createElement(Lp.Provider,{value:o},a)};Fp.propTypes={stripe:B.any,options:B.object};var qp=function(){var e,t;return(e="calls useElements()",t=n.useContext(Lp),Dp(t,e)).elements};B.func.isRequired;var Bp=n.createContext(null);Bp.displayName="CustomCheckoutSdkContext";n.createContext(null).displayName="CustomCheckoutContext",B.any,B.shape({clientSecret:B.string.isRequired,elementsOptions:B.object}).isRequired;var Up=function(e){var t=n.useContext(Bp),r=n.useContext(Lp);if(t&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CustomCheckoutProvider> and <Elements> providers."));return t?function(e,t){if(!e)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CustomCheckoutProvider> provider."));return e}(t,e):Dp(r,e)},zp=function(e,t){var r,a="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),i=t?function(e){Up("mounts <".concat(a,">"));var t=e.id,r=e.className;return n.createElement("div",{id:t,className:r})}:function(t){var r,i=t.id,s=t.className,o=t.options,l=void 0===o?{}:o,c=t.onBlur,u=t.onFocus,d=t.onReady,p=t.onChange,h=t.onEscape,m=t.onClick,f=t.onLoadError,g=t.onLoaderStart,y=t.onNetworksChange,x=t.onConfirm,b=t.onCancel,v=t.onShippingAddressChange,w=t.onShippingRateChange,j=Up("mounts <".concat(a,">")),C="elements"in j?j.elements:null,N="customCheckoutSdk"in j?j.customCheckoutSdk:null,k=kp(n.useState(null),2),S=k[0],E=k[1],A=n.useRef(null),O=n.useRef(null);Ep(S,"blur",c),Ep(S,"focus",u),Ep(S,"escape",h),Ep(S,"click",m),Ep(S,"loaderror",f),Ep(S,"loaderstart",g),Ep(S,"networkschange",y),Ep(S,"confirm",x),Ep(S,"cancel",b),Ep(S,"shippingaddresschange",v),Ep(S,"shippingratechange",w),Ep(S,"change",p),d&&(r="expressCheckout"===e?d:function(){d(S)}),Ep(S,"ready",r),n.useLayoutEffect(function(){if(null===A.current&&null!==O.current&&(C||N)){var t=null;N?t=N.createElement(e,l):C&&(t=C.create(e,l)),A.current=t,E(t),t&&t.mount(O.current)}},[C,N,l]);var _=Ap(l);return n.useEffect(function(){if(A.current){var e=Ip(l,_,["paymentRequest"]);e&&"update"in A.current&&A.current.update(e)}},[l,_]),n.useLayoutEffect(function(){return function(){if(A.current&&"function"==typeof A.current.destroy)try{A.current.destroy(),A.current=null}catch(e){}}},[]),n.createElement("div",{id:i,className:s,ref:O})};return i.propTypes={id:B.string,className:B.string,onChange:B.func,onBlur:B.func,onFocus:B.func,onReady:B.func,onEscape:B.func,onClick:B.func,onLoadError:B.func,onLoaderStart:B.func,onNetworksChange:B.func,onConfirm:B.func,onCancel:B.func,onShippingAddressChange:B.func,onShippingRateChange:B.func,options:B.object},i.displayName=a,i.__elementType=e,i},Hp="undefined"==typeof window;n.createContext(null).displayName="EmbeddedCheckoutProviderContext";zp("auBankAccount",Hp);var Vp=zp("card",Hp);zp("cardNumber",Hp),zp("cardExpiry",Hp),zp("cardCvc",Hp),zp("fpxBank",Hp),zp("iban",Hp),zp("idealBank",Hp),zp("p24Bank",Hp),zp("epsBank",Hp),zp("payment",Hp),zp("expressCheckout",Hp),zp("currencySelector",Hp),zp("paymentRequestButton",Hp),zp("linkAuthentication",Hp),zp("address",Hp),zp("shippingAddress",Hp),zp("paymentMethodMessaging",Hp),zp("affirmMessage",Hp),zp("afterpayClearpayMessage",Hp);const $p=({variants:e,...t})=>i.jsx("div",{className:s("title"===e&&"text-sm font-normal text-hoki-600","description"===e&&"text-base font-medium text-black"),...t}),Wp=e=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 34",...e},t.createElement("path",{d:"M146 0H3.73A3.73 3.73 0 0 0 0 3.73v26.54A3.73 3.73 0 0 0 3.73 34H146a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4m3 30a3 3 0 0 1-3 3H3.73A2.74 2.74 0 0 1 1 30.27V3.73A2.74 2.74 0 0 1 3.73 1H146a3 3 0 0 1 3 3Z"}),t.createElement("path",{d:"M17.07 11.24h-4.3V22h1.92v-4.16h2.38c2.4 0 3.9-1.16 3.9-3.3s-1.5-3.3-3.9-3.3m-.1 5h-2.28v-3.3H17c1.38 0 2.11.59 2.11 1.65s-.76 1.6-2.11 1.6ZM25.1 14a3.77 3.77 0 0 0-3.8 4.09 3.81 3.81 0 1 0 7.59 0A3.76 3.76 0 0 0 25.1 14m0 6.67c-1.22 0-2-1-2-2.58s.76-2.58 2-2.58 2 1 2 2.58-.79 2.57-2 2.57Zm11.68-1.32-1.41-5.22h-1.48l-1.4 5.22-1.42-5.22h-1.85l2.37 7.88h1.56l1.44-5.16 1.44 5.16h1.56l2.37-7.88h-1.78zM44 14a3.83 3.83 0 0 0-3.75 4.09 3.79 3.79 0 0 0 3.83 4.09A3.47 3.47 0 0 0 47.49 20L46 19.38a1.78 1.78 0 0 1-1.83 1.26A2.12 2.12 0 0 1 42 18.47h5.52v-.6C47.54 15.71 46.32 14 44 14m-1.93 3.13A1.92 1.92 0 0 1 44 15.5a1.56 1.56 0 0 1 1.69 1.62Zm8.62-1.83v-1.17h-1.8V22h1.8v-4.13a1.89 1.89 0 0 1 2-2 5 5 0 0 1 .66 0v-1.8h-.51a2.29 2.29 0 0 0-2.15 1.23m6.79-1.3a3.83 3.83 0 0 0-3.75 4.09 3.79 3.79 0 0 0 3.83 4.09A3.47 3.47 0 0 0 60.93 20l-1.54-.59a1.78 1.78 0 0 1-1.83 1.26 2.12 2.12 0 0 1-2.1-2.17H61v-.6c0-2.19-1.24-3.9-3.52-3.9m-1.93 3.13a1.92 1.92 0 0 1 1.92-1.62 1.56 1.56 0 0 1 1.69 1.62ZM67.56 15a2.85 2.85 0 0 0-2.26-1c-2.21 0-3.47 1.85-3.47 4.09s1.26 4.09 3.47 4.09a2.82 2.82 0 0 0 2.26-1V22h1.8V11.24h-1.8Zm0 3.35a2 2 0 0 1-2 2.28c-1.31 0-2-1-2-2.52s.7-2.52 2-2.52c1.11 0 2 .81 2 2.29ZM79.31 14A2.88 2.88 0 0 0 77 15v-3.76h-1.8V22H77v-.83a2.86 2.86 0 0 0 2.27 1c2.2 0 3.46-1.86 3.46-4.09S81.51 14 79.31 14M79 20.6a2 2 0 0 1-2-2.28v-.47c0-1.48.84-2.29 2-2.29 1.3 0 2 1 2 2.52s-.75 2.52-2 2.52m7.93-.94L85 14.13h-1.9l2.9 7.59-.3.74a1 1 0 0 1-1.14.79 4 4 0 0 1-.6 0v1.51a4.6 4.6 0 0 0 .73.05 2.67 2.67 0 0 0 2.78-2l3.24-8.62h-1.89ZM125 12.43a3 3 0 0 0-2.13.87l-.14-.69h-2.39v12.92l2.72-.59v-3.13a3 3 0 0 0 1.93.7c1.94 0 3.72-1.59 3.72-5.11 0-3.22-1.8-4.97-3.71-4.97m-.65 7.63a1.61 1.61 0 0 1-1.28-.52v-4.11a1.64 1.64 0 0 1 1.3-.55c1 0 1.68 1.13 1.68 2.58s-.69 2.6-1.7 2.6m9.38-7.63c-2.62 0-4.21 2.26-4.21 5.11 0 3.37 1.88 5.08 4.56 5.08a6.1 6.1 0 0 0 3-.73v-2.25a5.8 5.8 0 0 1-2.7.62c-1.08 
350-2-.39-2.14-1.7h5.38v-1c.09-2.87-1.27-5.13-3.89-5.13m-1.47 4.07c0-1.26.77-1.79 1.45-1.79s1.4.53 1.4 1.79ZM113 13.36l-.17-.82h-2.32v9.71h2.68v-6.58a1.87 1.87 0 0 1 2.05-.58v-2.55a1.8 1.8 0 0 0-2.24.82m-13.54 2.1c0-.44.36-.61.93-.61a5.9 5.9 0 0 1 2.7.72v-2.63a7 7 0 0 0-2.7-.51c-2.21 0-3.68 1.18-3.68 3.16 0 3.1 4.14 2.6 4.14 3.93 0 .52-.44.69-1 .69a6.8 6.8 0 0 1-3-.9V22a7.4 7.4 0 0 0 3 .64c2.26 0 3.82-1.15 3.82-3.16-.05-3.36-4.21-2.76-4.21-4.02m7.82-5.22-2.65.58v8.93a2.77 2.77 0 0 0 2.82 2.87 4.16 4.16 0 0 0 1.91-.37V20c-.35.15-2.06.66-2.06-1v-4h2.06v-2.34h-2.06Zm8.97 1.46 2.73-.57V8.97l-2.73.57zm0 .91h2.73v9.64h-2.73z"})),Qp=E("\n  query StripeSetupIntent {\n    stripeSetupIntent\n  }\n"),Zp=({isOpen:e,setIsOpen:t})=>{const r=Up("calls useStripe()").stripe,a=qp(),[s]=An(Qp,{fetchPolicy:"network-only"}),{toastCatchError:o,toastSuccess:l}=v(),c=A(),[u,d]=n.useState(void 0),[p,h]=n.useState(!1),[m,f]=n.useState(!1),g=n.useCallback(async()=>{try{if(f(!0),!p)return;if(r&&a){const e=a.getElement(Vp);if(!e)throw new Error("Missing card element");const{data:n}=await s(),i=n?.stripeSetupIntent;if(!i)throw new Error("Missing setup intent");await r.confirmCardSetup(i,{payment_method:{card:e}}),await c.refetchQueries({include:["BillingInfoQuery"]}),l("Successfully updated payment method."),t(!1)}}catch(e){o(e)}finally{f(!1)}},[r,a,s,o,l,t,p,c]);return i.jsx(On,{open:e,onOpenChange:t,children:i.jsx(_n,{children:i.jsxs(Pn,{className:"max-w-sm",children:[i.jsx(Rn,{children:i.jsx(Ln,{children:"Update card"})}),i.jsxs("form",{id:"update-card-form",onSubmit:e=>{e.preventDefault(),g()},children:[i.jsx(Vp,{onChange:e=>{d(e.error),h(e.complete)},className:"border border-hoki-300 rounded-lg p-3",options:{style:{base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}}}}),u&&i.jsx("p",{className:"text-bittersweet-600 text-sm",children:u.message})]}),i.jsx("div",{className:"h-px bg-hoki-300"}),i.jsxs(In,{className:"flex flex-row justify-between sm:justify-between items-center",children:[i.jsx("a",{href:"https://stripe.com",target:"_blank",rel:"noreferrer",children:i.jsx(Wp,{className:"h-[34px]"})}),i.jsx(yn,{form:"update-card-form",disabled:!r||!a||!p,type:"submit",className:"px-10",isLoading:m,children:"Save card"})]})]})})})};function Kp(e,t){return"function"==typeof e?e(t):e}function Gp(e,t){return n=>{t.setState(t=>({...t,[e]:Kp(n,t[e])}))}}function Yp(e){return e instanceof Function}function Jp(e,t,n){let r,a=[];return i=>{let s;n.key&&n.debug&&(s=Date.now());const o=e(i),l=o.length!==a.length||o.some((e,t)=>a[t]!==e);if(!l)return r;let c;if(a=o,n.key&&n.debug&&(c=Date.now()),r=t(...o),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){Math.round(100*(Date.now()-s)),Math.round(100*(Date.now()-c))}return r}}function Xp(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const eh="debugHeaders";function th(e,t,n){var r;let a={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(a),e},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(a,e)}),a}const nh={createTable:e=>{e.getHeaderGroups=Jp(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>{var i,s;const o=null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],l=null!=(s=null==a?void 0:a.map(e=>n.find(t=>t.id===e)).filter(Boolean))?s:[];return rh(t,[...o,...n.filter(e=>!(null!=r&&r.includes(e.id)||null!=a&&a.includes(e.id))),...l],e)},Xp(e.options,eh)),e.getCenterHeaderGroups=Jp(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>rh(t,n=n.filter(e=>!(null!=r&&r.includes(e.id)||null!=a&&a.includes(e.id))),e,"center"),Xp(e.options,eh)),e.getLeftHeaderGroups=Jp(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var a;const i=null!=(a=null==r?void 0:r.map(e=>n.find(t=>
35t.id===e)).filter(Boolean))?a:[];return rh(t,i,e,"left")},Xp(e.options,eh)),e.getRightHeaderGroups=Jp(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var a;const i=null!=(a=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return rh(t,i,e,"right")},Xp(e.options,eh)),e.getFooterGroups=Jp(()=>[e.getHeaderGroups()],e=>[...e].reverse(),Xp(e.options,eh)),e.getLeftFooterGroups=Jp(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),Xp(e.options,eh)),e.getCenterFooterGroups=Jp(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),Xp(e.options,eh)),e.getRightFooterGroups=Jp(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),Xp(e.options,eh)),e.getFlatHeaders=Jp(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),Xp(e.options,eh)),e.getLeftFlatHeaders=Jp(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),Xp(e.options,eh)),e.getCenterFlatHeaders=Jp(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),Xp(e.options,eh)),e.getRightFlatHeaders=Jp(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),Xp(e.options,eh)),e.getCenterLeafHeaders=Jp(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),Xp(e.options,eh)),e.getLeftLeafHeaders=Jp(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),Xp(e.options,eh)),e.getRightLeafHeaders=Jp(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),Xp(e.options,eh)),e.getLeafHeaders=Jp(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,a,i,s,o,l;return[...null!=(r=null==(a=e[0])?void 0:a.headers)?r:[],...null!=(i=null==(s=t[0])?void 0:s.headers)?i:[],...null!=(o=null==(l=n[0])?void 0:l.headers)?o:[]].map(e=>e.getLeafHeaders()).flat()},Xp(e.options,eh))}};function rh(e,t,n,r){var a,i;let s=0;const o=function(e,t){void 0===t&&(t=1),s=Math.max(s,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&o(e.columns,t+1)},0)};o(e);let l=[];const c=(e,t)=>{const a={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach(e=>{const s=[...i].reverse()[0];let o,l=!1;if(e.column.depth===a.depth&&e.column.parent?o=e.column.parent:(o=e.column,l=!0),s&&(null==s?void 0:s.column)===o)s.subHeaders.push(e);else{const a=th(n,o,{id:[r,t,o.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter(e=>e.column===o).length}`:void 0,depth:t,index:i.length});a.subHeaders.push(e),i.push(a)}a.headers.push(e),e.headerGroup=a}),l.push(a),t>0&&c(i,t-1)},u=t.map((e,t)=>th(n,e,{depth:s,index:t}));c(u,s-1),l.reverse();const d=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:a}=e;t+=n,r.push(a)})):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return d(null!=(a=null==(i=l[0])?void 0:i.headers)?a:[]),l}const ah=(e,t,n,r,a,i,s)=>{let o={id:t,index:r,original:n,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(o._valuesCache.hasOwnProperty(t))return o._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(o._valuesCache[t]=n.accessorFn(o.original,r),o._valuesCache[t]):void 0},getUniqueValues:t=>{if(o._uniqueValuesCache.hasOwnProperty(t))return o._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(o._uniqueValuesCache[t]=n.columnDef.getUniqueValues(o.original,r),o._uniqueValuesCache[t]):(o._uniqueValuesCache[t]=[o.getValue(t)],o._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=o.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>function(e,t){const n=[],r=e=>{e.forEach(e=>{n.push(e);const a=t(e);null!=a&&a.length&&r(a)})};return r(e),n}(o.subRows,e=>e.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let e=[],t=o;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Jp(()=>[e.getAllLeafColumns()],t=>t.map(t=>function(e,t,n,r){const a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=a.getValue())?t:e.options.renderFallbackValue},getContext:Jp(()=>[e,n,t,a],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),Xp(e.options,"debugCells"))};
35return e._features.forEach(r=>{null==r.createCell||r.createCell(a,n,t,e)},{}),a}(e,o,t,t.id)),Xp(e.options,"debugRows")),_getAllCellsByColumnId:Jp(()=>[o.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),Xp(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const t=e._features[l];null==t||null==t.createRow||t.createRow(o,e)}return o},ih={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},sh=(e,t,n)=>{var r,a;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(a=e.getValue(t))||null==(a=a.toString())||null==(a=a.toLowerCase())?void 0:a.includes(i))};sh.autoRemove=e=>gh(e);const oh=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};oh.autoRemove=e=>gh(e);const lh=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};lh.autoRemove=e=>gh(e);const ch=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};ch.autoRemove=e=>gh(e);const uh=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});uh.autoRemove=e=>gh(e)||!(null!=e&&e.length);const dh=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});dh.autoRemove=e=>gh(e)||!(null!=e&&e.length);const ph=(e,t,n)=>e.getValue(t)===n;ph.autoRemove=e=>gh(e);const hh=(e,t,n)=>e.getValue(t)==n;hh.autoRemove=e=>gh(e);const mh=(e,t,n)=>{let[r,a]=n;const i=e.getValue(t);return i>=r&&i<=a};mh.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,a="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,s=null===n||Number.isNaN(a)?1/0:a;if(i>s){const e=i;i=s,s=e}return[i,s]},mh.autoRemove=e=>gh(e)||gh(e[0])&&gh(e[1]);const fh={includesString:sh,includesStringSensitive:oh,equalsString:lh,arrIncludes:ch,arrIncludesAll:uh,arrIncludesSome:dh,equals:ph,weakEquals:hh,inNumberRange:mh};function gh(e){return null==e||""===e}const yh={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Gp("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?fh.includesString:"number"==typeof r?fh.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?fh.equals:Array.isArray(r)?fh.arrIncludes:fh.weakEquals},e.getFilterFn=()=>{var n,r;return Yp(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:fh[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,a;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(a=t.options.enableFilters)||a)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{const r=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),i=Kp(n,a?a.value:void 0);var s;if(xh(r,i,e))return null!=(s=null==t?void 0:t.filter(t=>t.id!==e.id))?s:[];const o={id:e.id,value:i};var l;return a?null!=(l=null==t?void 0:t.map(t=>t.id===e.id?o:t))?l:[]:null!=t&&t.length?[...t,o]:[o]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var r;return null==(r=Kp(t,e))?void 0:r.filter(e=>{const t=n.find(t=>
35t.id===e.id);if(t){if(xh(t.getFilterFn(),e.value,t))return!1}return!0})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function xh(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const bh={sum:(e,t,n)=>n.reduce((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,a;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=a=n):(r>n&&(r=n),a<n&&(a=n)))}),[r,a]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let a=t.getValue(e);null!=a&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(t=>t.getValue(e));if(!function(e){return Array.isArray(e)&&e.every(e=>"number"==typeof e)}(n))return;if(1===n.length)return n[0];const r=Math.floor(n.length/2),a=n.sort((e,t)=>e-t);return n.length%2!=0?a[r]:(a[r-1]+a[r])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},vh={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Gp("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?bh.sum:"[object Date]"===Object.prototype.toString.call(r)?bh.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Yp(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:bh[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const wh={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Gp("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Jp(e=>[Ah(t,e)],t=>t.findIndex(t=>t.id===e.id),Xp(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Ah(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const a=Ah(t,n);return(null==(r=a[a.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Jp(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let a=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&a.push(n.splice(r,1)[0])}a=[...a,...n]}else a=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter(e=>!t.includes(e.id));return"remove"===n?r:[...t.map(t=>e.find(e=>
35e.id===t)).filter(Boolean),...r]}(a,t,n)},Xp(e.options,"debugTable"))}},jh={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Gp("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,a,i,s,o,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(s=null==e?void 0:e.right)?s:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,a;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(a=t.options.enableColumnPinning)?a:t.options.enablePinning)||r)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(e=>e.id),{left:r,right:a}=t.getState().columnPinning,i=n.some(e=>null==r?void 0:r.includes(e)),s=n.some(e=>null==a?void 0:a.includes(e));return i?"left":!!s&&"right"},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();return a?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[a])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Jp(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},Xp(t.options,"debugRows")),e.getLeftVisibleCells=Jp(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>{const n=(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"}));return n},Xp(t.options,"debugRows")),e.getRightVisibleCells=Jp(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>{const n=(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"}));return n},Xp(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var a,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(a=r.left)?void 0:a.length)||(null==(i=r.right)?void 0:i.length))},e.getLeftLeafColumns=Jp(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),Xp(e.options,"debugColumns")),e.getRightLeafColumns=Jp(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),Xp(e.options,"debugColumns")),e.getCenterLeafColumns=Jp(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},Xp(e.options,"debugColumns"))}};const Ch={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nh={getDefaultColumnDef:()=>Ch,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Gp("columnSizing",e),onColumnSizingInfoChange:Gp("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,a;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Ch.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:Ch.size),null!=(a=e.columnDef.maxSize)?a:Ch.maxSize)},e.getStart=Jp(e=>[e,Ah(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),Xp(t.options,"debugColumns")),e.getAfter=Jp(e=>[e,Ah(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>
35e+t.getSize(),0),Xp(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),a=null==r?void 0:r.getCanResize();return i=>{if(!r||!a)return;if(null==i.persist||i.persist(),Sh(i)&&i.touches&&i.touches.length>1)return;const s=e.getSize(),o=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],l=Sh(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,a;const i="rtl"===t.options.columnResizeDirection?-1:1,s=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,o=Math.max(s/(null!=(a=null==e?void 0:e.startSize)?a:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*o,0))/100}),{...e,deltaOffset:s,deltaPercentage:o}}),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing(e=>({...e,...c})))},d=e=>u("move",e),p=e=>{u("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||("undefined"!=typeof document?document:null);const m={moveHandler:e=>d(e.clientX),upHandler:e=>{null==h||h.removeEventListener("mousemove",m.moveHandler),null==h||h.removeEventListener("mouseup",m.upHandler),p(e.clientX)}},f={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==h||h.removeEventListener("touchmove",f.moveHandler),null==h||h.removeEventListener("touchend",f.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),p(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof kh)return kh;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return kh=e,kh}()&&{passive:!1};Sh(i)?(null==h||h.addEventListener("touchmove",f.moveHandler,g),null==h||h.addEventListener("touchend",f.upHandler,g)):(null==h||h.addEventListener("mousemove",m.moveHandler,g),null==h||h.addEventListener("mouseup",m.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}};let kh=null;function Sh(e){return"touchstart"===e.type}const Eh={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Gp("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>
35({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const a=e.columns;return null==(n=a.length?a.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Jp(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),Xp(t.options,"debugRows")),e.getVisibleCells=Jp(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],Xp(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>Jp(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),Xp(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(0,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(0,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(0,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(0,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function Ah(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Oh={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Gp("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,a;if(t){if(null!=(r=null!=(a=e.options.autoResetAll)?a:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}}else e._queue(()=>{t=!0})},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some(e=>!e.getIsExpanded())},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{const n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var a;const i=!0===r||!(null==r||!r[e.id]);let s={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{s[e]=!0}):s=r,n=null!=(a=n)?a:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=s;return n}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,a;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(a=e.subRows)||
35!a.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},_h={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Gp("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,a;if(t){if(null!=(r=null!=(a=e.options.autoResetAll)?a:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}}else e._queue(()=>{t=!0})},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>Kp(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination(n=>{let r=Kp(t,n.pageIndex);const a=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,a)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{const n=Math.max(1,Kp(t,e.pageSize)),r=e.pageSize*e.pageIndex,a=Math.floor(r/n);return{...e,pageIndex:a,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let a=Kp(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof a&&(a=Math.max(-1,a)),{...n,pageCount:a}}),e.getPageOptions=Jp(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map((e,t)=>t)),t},Xp(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();
35return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},Ph={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:Gp("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,a)=>{const i=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],s=a?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],o=new Set([...s,e.id,...i]);t.setRowPinning(e=>{var t,r,a,i,s,l;return"bottom"===n?{top:(null!=(a=null==e?void 0:e.top)?a:[]).filter(e=>!(null!=o&&o.has(e))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter(e=>!(null!=o&&o.has(e))),...Array.from(o)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter(e=>!(null!=o&&o.has(e))),...Array.from(o)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter(e=>!(null!=o&&o.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=o&&o.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=o&&o.has(e)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:a}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:a)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:a}=t.getState().rowPinning,i=n.some(e=>null==r?void 0:r.includes(e)),s=n.some(e=>null==a?void 0:a.includes(e));return i?"top":!!s&&"bottom"},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();if(!a)return-1;const i=null==(n="top"===a?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var a,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(a=r.top)?void 0:a.length)||(null==(i=r.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var a;return(null==(a=e.options.keepPinnedRows)||a?(null!=n?n:[]).map(t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=Jp(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Xp(e.options,"debugRows")),e.getBottomRows=Jp(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Xp(e.options,"debugRows")),e.getCenterRows=Jp(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},Xp(e.options,"debugRows"))}},Ih={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Gp("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):a.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),a={...n};return e.getRowModel().rows.forEach(t=>{Mh(a,t.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Jp(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Th(e,n):{rows:[],flatRows:[],rowsById:{}},Xp(e.options,"debugTable")),e.getFilteredSelectedRowModel=Jp(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Th(e,n):{rows:[],flatRows:[],rowsById:{}},Xp(e.options,"debugTable")),e.getGroupedSelectedRowModel=Jp(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Th(e,n):{rows:[],flatRows:[],rowsById:{}},Xp(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const a=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=void 0!==n?n:!a,e.getCanSelect()&&a===n)return i;const o={...i};return Mh(o,e.id,n,null==(s=null==r?void 0:r.selectChildren)||s,t),o})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Rh(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===Lh(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===Lh(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},Mh=(e,t,n,r,a)=>{var i;const s=a.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=s.subRows)&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(t=>Mh(e,t.id,n,r,a))};function Th(e,t){const n=e.getState().rowSelection,r=[],a={},i=function(e,t){return e.map(e=>{var t;
35const s=Rh(e,n);if(s&&(r.push(e),a[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),s)return e}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:a}}function Rh(e,t){var n;return null!=(n=t[e.id])&&n}function Lh(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let a=!0,i=!1;return e.subRows.forEach(e=>{if((!i||a)&&(e.getCanSelect()&&(Rh(e,t)?i=!0:a=!1),e.subRows&&e.subRows.length)){const n=Lh(e,t);"all"===n?i=!0:"some"===n?(i=!0,a=!1):a=!1}}),a?"all":!!i&&"some"}const Dh=/([0-9]+)/gm;function Fh(e,t){return e===t?0:e>t?1:-1}function qh(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Bh(e,t){const n=e.split(Dh).filter(Boolean),r=t.split(Dh).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),a=parseInt(e,10),i=parseInt(t,10),s=[a,i].sort();if(isNaN(s[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>i)return 1;if(i>a)return-1}}return n.length-r.length}const Uh={alphanumeric:(e,t,n)=>Bh(qh(e.getValue(n)).toLowerCase(),qh(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Bh(qh(e.getValue(n)),qh(t.getValue(n))),text:(e,t,n)=>Fh(qh(e.getValue(n)).toLowerCase(),qh(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Fh(qh(e.getValue(n)),qh(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),a=t.getValue(n);return r>a?1:r<a?-1:0},basic:(e,t,n)=>Fh(e.getValue(n),t.getValue(n))},zh={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Gp("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return Uh.datetime;if("string"==typeof n&&(r=!0,n.split(Dh).length>1))return Uh.alphanumeric}return r?Uh.text:Uh.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Yp(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:Uh[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const a=e.getNextSortingOrder(),i=null!=n;t.setSorting(s=>{const o=null==s?void 0:s.find(t=>t.id===e.id),l=null==s?void 0:s.findIndex(t=>t.id===e.id);let c,u=[],d=i?n:"desc"===a;var p;(c=null!=s&&s.length&&e.getCanMultiSort()&&r?o?"toggle":"add":null!=s&&s.length&&l!==s.length-1?"replace":o?"toggle":"replace","toggle"===c&&(i||a||(c="remove")),"add"===c)?(u=[...s,{id:e.id,desc:d}],u.splice(0,u.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))):u="toggle"===c?s.map(t=>t.id===e.id?{...t,desc:d}:t):"remove"===c?s.filter(t=>t.id!==e.id):[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,a;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?!!(s===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(a=t.options.enableMultiRemove)&&!a)&&("desc"===s?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Hh=[nh,Eh,wh,jh,ih,yh,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>
35{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Gp("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,a,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(a=t.options.enableFilters)||a)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>fh.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Yp(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:fh[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},zh,vh,Oh,_h,Ph,Ih,Nh];function Vh(e){var t,n;const r=[...Hh,...null!=(t=e._features)?t:[]];let a={_features:r};const i=a._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(a)),{});let s={...null!=(n=e.initialState)?n:{}};a._features.forEach(e=>{var t;s=null!=(t=null==e.getInitialState?void 0:e.getInitialState(s))?t:s});const o=[];let l=!1;const c={_features:r,options:{...i,...e},initialState:s,_queue:e=>{o.push(e),l||(l=!0,Promise.resolve().then(()=>{for(;o.length;)o.shift()();l=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{a.setState(a.initialState)},setOptions:e=>{const t=Kp(e,a.options);var n;a.options=(n=t,a.options.mergeOptions?a.options.mergeOptions(i,n):{...i,...n})},getState:()=>a.options.state,setState:e=>{null==a.options.onStateChange||a.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==a.options.getRowId?void 0:a.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?a.getPrePaginationRowModel():a.getRowModel()).rowsById[e];if(!n&&(n=a.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:Jp(()=>[a.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...a._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},Xp(e,"debugColumns")),_getColumnDefs:()=>a.options.columns,getAllColumns:Jp(()=>[a._getColumnDefs()],e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{const i=function(e,t,n,r){var a,i;const s={...e._getDefaultColumnDef(),...t},o=s.accessorKey;let l,c=null!=(a=null!=(i=s.id)?i:o?"function"==typeof String.prototype.replaceAll?o.replaceAll(".","_"):o.replace(/\./g,"_"):void 0)?a:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?l=s.accessorFn:o&&(l=o.includes(".")?e=>{let t=e;for(const r of o.split(".")){var n;t=null==(n=t)?void 0:n[r]}return t}:e=>e[s.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:l,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Jp(()=>[!0],()=>{var e;return[u,...null==(e=u.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},Xp(e.options,"debugColumns")),getLeafColumns:Jp(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=u.columns)&&t.length?e(u.columns.flatMap(e=>e.getLeafColumns())):[u]},Xp(e.options,"debugColumns"))};for(const d of e._features)null==d.createColumn||d.createColumn(u,e);return u}(a,e,r,n),s=e;return i.columns=s.columns?t(s.columns,i,r+1):[],i})};return t(e)},Xp(e,"debugColumns")),getAllFlatColumns:Jp(()=>[a.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),Xp(e,"debugColumns")),_getAllFlatColumnsById:Jp(()=>[a.getAllFlatColumns()],e=>e.reduce((e,t)=>
35(e[t.id]=t,e),{}),Xp(e,"debugColumns")),getAllLeafColumns:Jp(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),Xp(e,"debugColumns")),getColumn:e=>a._getAllFlatColumnsById()[e]};Object.assign(a,c);for(let u=0;u<a._features.length;u++){const e=a._features[u];null==e||null==e.createTable||e.createTable(a)}return a}function $h(){return e=>Jp(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,a,i){void 0===a&&(a=0);const s=[];for(let l=0;l<t.length;l++){const c=ah(e,e._getRowId(t[l],l,i),t[l],l,a,0,null==i?void 0:i.id);var o;if(n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),e.options.getSubRows)c.originalSubRows=e.options.getSubRows(t[l],l),null!=(o=c.originalSubRows)&&o.length&&(c.subRows=r(c.originalSubRows,a+1,c))}return s};return n.rows=r(t),n},Xp(e.options,"debugTable",0,()=>e._autoResetPageIndex()))}function Wh(e,n){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?t.createElement(e,n):e:null;var r}function Qh(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=t.useState(()=>({current:Vh(n)})),[a,i]=t.useState(()=>r.current.initialState);return r.current.setOptions(t=>({...t,...e,state:{...a,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),r.current}const Zh=z("text-sm font-normal",{variants:{status:{[U.PAID]:"text-hoki-800",[U.OPEN]:"text-hoki-800",[U.FAILED]:"text-bittersweet-600"}}}),Kh=z("",{variants:{status:{[U.PAID]:"Paid",[U.OPEN]:"Pending payment",[U.FAILED]:"Payment failed"}}}),Gh=E("\n  fragment InvoiceTable_QueryFragment on Query {\n    billingInvoices {\n      number\n      date\n      description\n      amount\n      status\n      invoice_url\n    }\n  }\n"),Yh={accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e},Jh=({queryFragment:e})=>{const t=$n(Gh,e),r=n.useMemo(()=>(t?.billingInvoices||[]).map(e=>({id:`${e.date}-${e.number}`,number:e.number,date:e.date,description:e.description,amount:tt(e.amount),status:e.status,invoiceUrl:e.invoice_url})),[t?.billingInvoices]),a=n.useMemo(()=>[Yh.accessor("date",{cell:e=>{const t=e.getValue();return i.jsx("span",{className:"text-sm font-normal text-hoki-800",children:Vn(t).format("MMMM D, YYYY")})},header:"Date"}),Yh.accessor("description",{cell:e=>{const t=e.row.original,{number:n,description:r}=t;return i.jsxs("span",{className:"text-sm font-normal text-hoki-800",children:[i.jsx("span",{className:"text-hoki-600 text-xs whitespace-nowrap",children:n})," ",i.jsx("span",{children:r})]})},header:"Description"}),Yh.accessor("amount",{cell:e=>{const t=e.getValue();return i.jsx("span",{className:"text-sm font-normal text-hoki-800",children:t})},header:"Invoice total"}),Yh.accessor("status",{cell:e=>{const t=e.getValue();return i.jsx("span",{className:s(Zh({status:t})),children:Kh({status:t})})},header:"Status"}),Yh.display({id:"actions",cell:e=>{const t=e.row.original,n=[U.OPEN,U.FAILED].includes(t.status);return i.jsx("div",{children:i.jsx(o,{className:"text-primary text-sm hover:underline",to:t.invoiceUrl,target:"_blank",children:n?"Pay Now":"View"})})}})],[]),l=Qh({data:r,columns:a,getCoreRowModel:$h()});return i.jsx("div",{className:"border rounded-lg overflow-x-auto shadow-sm",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:l.getHeaderGroups().map(e=>i.jsx("tr",{children:e.headers.map(e=>i.jsx("th",{className:"text-sm font-normal text-left px-5 py-3 text-hoki-600 border-b border-hoki-300",children:e.isPlaceholder?null:Wh(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),i.jsx("tbody",{className:"divide-y divide-[#EDF2F6]",children:l.getRowModel().rows.length>0?l.getRowModel().rows.map(e=>i.jsx("tr",{className:"bg-white ",children:e.getVisibleCells().map(e=>i.jsx("td",{className:"px-5 py-3",children:Wh(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):i.jsx("tr",{children:i.jsx("td",{colSpan:4,className:"align-middle text-center h-30",children:i.jsx("span",{className:"text-hoki-600 text-sm",children:"No invoice found"})})})})]})})},Xh=e=>{switch(e){case"month":return"Monthly";case"year":return"Yearly";default:return e}},em=e=>{switch(e){case"visa":return"Visa";case"mastercard":return"Mastercard";case"unionpay":return"UnionPay";case"amex":return"Amex";case"discover":return"Discover";case"jcb":return"JCB";default:return null}},tm=({className:e,...t})=>i.jsx("div",{...t,className:s("col-span-4 md:col-span-2 lg:col-span-1 flex flex-col gap-y-1.5",e)}),nm=E("\n  query SourcererVendorBilling_Query {\n    vendorBillingInfo {\n      id\n      plan_id\n      plan\n      payment_method {\n        id\n        type\n        last_4\n        display_brand\n      }\n      bill_cycle\n      upcoming_bill_date\n      upcoming_bill_amount\n      status\n    }\n  }\n"),rm=E("\n  query VendorInvoiceTable_Query {\n    ...InvoiceTable_QueryFragment\n  }\n"),am=()=>{const e=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];0;var r=Date.now();return vp().then(function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"3.4.1",startTime:t})}(r,n),r}(e,t,r)})}("pk_live_51LdN8FFCPw5SimmnbQbGG1k8DkYHqPo3GrtLrAnx698ECGL7XEVZpRZr2HbXgBaOamGQsOwLMxfzUcSWoLS4ySmg00GBCwzrDF"),r=m(),{data:a,loading:s}=d(nm);t.useEffect(()=>{a?.vendorBillingInfo&&(a.vendorBillingInfo?.plan_id||r(b.Settings_Billing_Plan))},[a?.vendorBillingInfo,r]);const l=a?.vendorBillingInfo,c={plan:l?.plan||"-",paymentMethod:l?.payment_method,cycle:l?.bill_cycle||"-",nextBill:l?.upcoming_bill_date?Vn(l.upcoming_bill_date).format("MMMM D, YYYY"):"-",amount:l?.upcoming_bill_amount?tt(l.upcoming_bill_amount):"-",status:l?.status},[u,p]=n.useState(!1),{data:h,loading:f}=d(rm),g=t.useCallback(()=>i.jsx(o,{className:"border-primary border inline-flex self-start lg:self-end px-3 py-1.5 rounded-lg text-primary bg-powder hover:bg-hoki-50 font-medium",to:b.Settings_Billing_Plan,children:"Manage plan"}),[]);return i.jsxs(Fp,{stripe:e,children:[i.jsxs("div",{className:"sm:px-5",children:[i.jsx("div",{className:"text-xl font-medium text-hoki-800",children:"Plan details"}),i.jsx("div",{className:"grid grid-cols-5 border rounded-lg shadow-sm p-[30px] gap-y-7 gap-x-10 mt-3",children:s?i.jsxs(i.Fragment,{children:[i.jsxs(tm,{className:"order-1",children:[i.jsx($p,{variants:"title",children:"Current plan"}),i.jsx(Yn,{width:100})]}),i.jsxs(tm,{className:"order-2",children:[i.jsx($p,{variants:"title",children:"Payment method"}),i.jsx(Yn,{width:150})]}),i.jsx(tm,{className:"md:items-end md:!col-span-1 lg:!col-span-3 order-7 md:order-3",children:i.jsx(Yn,{width:100,height:36})}),i.jsxs(tm,{className:"order-4",children:[i.jsx($p,{variants:"title",children:"Cycle"}),i.jsx(Yn,{width:80})]}),i.jsxs(tm,{className:"order-5",children:[i.jsx($p,{variants:"title",children:"Next bill"}),i.jsx(Yn,{width:120})]}),i.jsxs(tm,{className:"order-6",children:[i.jsx($p,{variants:"title",children:"Amount"}),i.jsx(Yn,{width:80})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs(tm,{className:"order-1",children:[i.jsx($p,{variants:"title",children:"Current plan"}),i.jsx($p,{variants:"description",children:c.plan})]}),i.jsxs(tm,{className:"order-2",children:[i.jsx($p,{variants:"title",children:"Payment method"}),c.paymentMethod&&i.jsxs($p,{variants:"description",children:[i.jsx("div",{className:"flex gap-x-2",children:i.jsxs("div",{children:[i.jsx("span",{className:"font-semibold",children:em(c.paymentMethod.display_brand)})," ",i.jsx("span",{className:"font-normal",children:"ending in"})," ",i.jsx("span",{className:"font-semibold",children:c.paymentMethod?.last_4})]})}),i.jsx("button",{type:"button",onClick:()=>p(!0),className:"inline-flex items-center text-primary hover:underline",children:"Update card"})]})]}),i.jsx(tm,{className:"md:items-end md:!col-span-1 lg:!col-span-3 order-7 md:order-3",children:g()}),i.jsxs(tm,{className:"order-4",children:[i.jsx($p,{variants:"title",children:"Cycle"}),i.jsx($p,{variants:"description",children:Xh(c.cycle)})]}),i.jsxs(tm,{className:"order-5",children:[i.jsx($p,{variants:"title",children:"Next bill"}),i.jsx($p,{variants:"description",children:c.nextBill})]}),i.jsxs(tm,{className:"order-6",children:[i.jsx($p,{variants:"title",children:"Amount"}),i.jsx($p,{variants:"description",children:c.amount})]})]})}),i.jsx("div",{className:"text-xl font-medium text-hoki-800 mt-14",children:"Invoices"}),i.jsx("div",{className:"mt-3",children:f?i.jsx("div",{className:"h-[162px] col-span-4 flex justify-center items-center",children:i.jsx(O,{})}):i.jsx(Jh,{queryFragment:h})})]}),i.jsx(Zp,{isOpen:u,setIsOpen:p})]})};
35function im(e,n,r={leading:!1}){const[a,i]=t.useState(e),s=t.useRef(!1),o=t.useRef(null),l=t.useRef(!1),c=()=>window.clearTimeout(o.current);return t.useEffect(()=>{s.current&&(!l.current&&r.leading?(l.current=!0,i(e)):(c(),o.current=window.setTimeout(()=>{l.current=!1,i(e)},n)))},[e,r.leading,n]),t.useEffect(()=>(s.current=!0,c),[]),[a,c]}const sm=({onChange:e,value:r,inputValidation:a,classNames:o,placeholder:l,suggestions:c=[],...u})=>{const[d,p]=function({value:e,defaultValue:n,finalValue:r,onChange:a=()=>{}}){const[i,s]=t.useState(void 0!==n?n:r);return void 0!==e?[e,a,!0]:[i,(e,...t)=>{s(e),a?.(e,...t)},!1]}({value:r,defaultValue:[],onChange:e}),[h,m]=n.useState(""),[f,g]=n.useState(!1),y=h.trim().toLowerCase(),x=c.filter(e=>!d.includes(e)&&e.includes(y)),b=n.useRef(null),w=function(e,n,r){const a=t.useRef(null);return t.useEffect(()=>{const t=a.current;if(t)return t.addEventListener(e,n,r),()=>t?.removeEventListener(e,n,r)},[n,r]),a}("click",n.useCallback(()=>{b.current?.focus()},[b])),{toastError:j}=v(),C=n.useCallback(e=>{p(d.filter(t=>e!==t))},[p,d]),N=n.useCallback(e=>{p([...new Set([...d,e])]),m("")},[p,d]);return i.jsxs("div",{ref:w,className:s("relative flex flex-wrap items-start p-4 rounded-lg border gap-3 cursor-text",o?.container),children:[d.map(e=>i.jsxs("div",{className:s("px-3 py-1 rounded-lg flex items-center text-hoki-700 gap-x-3",o?.chip),children:[i.jsx("span",{className:"text-sm text-hoki-800",children:e}),i.jsx("button",{type:"button",onClick:()=>C(e),onKeyDown:t=>{" "!==t.key&&"Enter"!==t.key||C(e)},children:i.jsx(Me,{className:"w-3 h-3"})})]},`value:${e}`)),i.jsx("input",{ref:b,className:s("ring-0 outline-none py-1 flex-1 text-sm",o?.input),value:h,onChange:e=>m(e.target.value),onKeyDown:e=>{if(h&&"Enter"===e.key){e.preventDefault();const t=a?.(h)??{valid:!0};t.valid?N(h):t.message&&j(t.message)}},onFocus:()=>g(!0),onBlur:()=>{if(g(!1),h){const e=a?.(h)??{valid:!0};e.valid?N(h):e.message&&j(e.message)}},placeholder:l,...u}),f&&x.length>0&&i.jsx("ul",{className:"absolute left-0 top-full z-10 mt-1 min-w-[220px] py-1 bg-white border border-gray-200 rounded-lg shadow-sm",children:x.map(e=>i.jsx("li",{children:i.jsx("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>N(e),className:"w-full px-3 py-1.5 text-left text-sm text-gray-700 hover:bg-gray-50",children:e})},e))})]})},om=E("\n  mutation InviteTeamMembersMutation(\n    $emails: [String!]!\n    $message: String\n  ) {\n    inviteCollaborators(\n      emails: $emails\n      message: $message\n    ) {\n      id\n      email\n      first_name\n      last_name\n    }\n  }\n"),lm=L().email({message:"Please enter a valid email"}),cm=({open:e,teamMemberCount:t=0,setOpen:r})=>{const a=Ue(),s=C(N),{toastCatchError:o,toastSuccess:l}=v(),c=((e,t,n)=>R({emails:H(L({required_error:"Please enter at least one email"}).email({message:"Please enter a valid email"})).min(1,{message:"Please enter at least one email"}),message:L().optional()}).refine(r=>!(t&&!n)||r.emails.length+e<=3,{message:`You can only invite up to ${3-e} more member(s) with your current plan.`,path:["emails"]}))(t,a,s),{control:u,handleSubmit:d,reset:h}=xn({resolver:bn(c),defaultValues:{message:"I'm inviting you to Cromatic to collaborate in new projects."}}),[m,{loading:f}]=p(om,{refetchQueries:["Team_MembersQuery"]}),g=n.useCallback(async e=>{try{await m({variables:{emails:e.emails,message:e.message}}),r(!1),h(),l("Invitation sent!")}catch(t){o(t)}},[o,m,r,h,l]);return i.jsx(On,{open:e,onOpenChange:r,children:i.jsx(_n,{children:i.jsxs(Pn,{className:"w-[775px] text-hoki-800",children:[i.jsx(Rn,{className:"text-xl font-semibold",children:"Invite team members"}),i.jsx("p",{children:"All invited members will be able to create new projects and manage existing projects."}),i.jsxs("form",{id:"invite-team-member-form",className:"flex flex-col gap-8",onSubmit:d(g),children:[i.jsx(vn,{control:u,name:"emails",render:({field:{value:e,onChange:t},fieldState:{invalid:n,error:r}})=>i.jsxs(fn,{isInvalid:n,isRequired:!0,children:[i.jsx(fn.Label,{children:"Enter email addresses"}),i.jsx(sm,{onChange:t,value:e,inputValidation:e=>{const t=lm.safeParse(e);return t.success?{valid:!0}:{valid:!1,message:t.error.issues?.[0]?.message}},classNames:{container:"bg-hoki-100 min-h-[100px] border-hoki-400",chip:"bg-white",input:"bg-hoki-100"},placeholder:"Type and press Enter to add","data-testid":"multi-text-input:emails"}),i.jsx(fn.ErrorMessage,{children:r?.message})]})}),i.jsx(vn,{control:u,name:"message",render:({field:e})=>i.jsxs(fn,{children:[i.jsx(fn.Label,{children:"Custom message"}),i.jsx(Lt,{...e,minRows:3,"data-testid":"text-area:message"})]})})]}),i.jsxs(In,{children:[i.jsx(yn,{className:"h-[48px] text-hoki-800",variant:"link",onClick:()=>r(!1),children:"Cancel"}),i.jsx(yn,{form:"invite-team-member-form",className:"h-[48px] w-[152px]",isLoading:f,"data-testid":"button:submit",children:"Send invites"})]})]})})})}
35,um=n.createContext(null),dm={orange:{label:"text-orange-600 bg-orange-100",badge:"bg-orange-600"},blue:{label:"text-primary bg-bleu-100",badge:"bg-bleu-600"},green:{label:"text-shamrock-800 bg-shamrock-100",badge:"bg-shamrock-800"},yellow:{label:"text-yellow-800 bg-yellow-100",badge:"bg-yellow-800"},purple:{label:"text-melrose-800 bg-melrose-100",badge:"bg-melrose-800"},red:{label:"text-bittersweet-800 bg-bittersweet-100",badge:"bg-bittersweet-800"},pink:{label:"text-cerise-800 bg-cerise-50",badge:"bg-cerise-800"},default:{label:"text-hoki-600 bg-hoki-100",badge:"bg-hoki-100"}},pm=({children:e,color:t="default",showBadge:n=!1,className:r})=>{const a=s("px-2.5 py-0.5 rounded relative text-xs font-medium select-none",dm[t].label,r),o=s("absolute -top-2 -right-2 w-4 h-4 rounded-full border-2 border-white",dm[t].badge);return i.jsxs("div",{className:"inline-flex relative",children:[i.jsx("span",{className:a,children:e}),n&&i.jsx("div",{className:o})]})},hm=E("\n  mutation ResendInvitation_Mutation($userId: String!) {\n    resendInvitation(user_id: $userId) {\n      id\n    }\n  }\n"),mm=E("\n  mutation RemoveCollaborator_Mutation($userId: String!) {\n    removeCollaborator(user_id: $userId) {\n      id\n    }\n  }\n"),fm=E("\n  query CollaboratorActiveCampaigns_Query($userId: String!) {\n    collaboratorActiveCampaigns(user_id: $userId) {\n      id\n      name\n    }\n  }\n"),gm=({userId:e,userStatus:t,userName:r,isCurrentUser:a=!1})=>{const{toastCatchError:o,toastSuccess:l}=v(),{isOpen:c,onClose:u,onOpen:d}=ut(),[h,m]=n.useState(!1),[f,{data:g,loading:y}]=An(fm),x=g?.collaboratorActiveCampaigns??[],[b]=p(hm),[w,{loading:j}]=p(mm,{refetchQueries:["Team_MembersQuery"]}),C=n.useCallback(async()=>{try{await w({variables:{userId:e}}),l("Successfully removed the user."),m(!1)}catch(t){o(t)}},[w,e,m,l,o]),N=n.useCallback(async()=>{try{await b({variables:{userId:e}}),l("Successfully resent the invitation.")}catch(t){o(t)}},[b,e,l,o]),k=n.useCallback(async()=>{try{await w({variables:{userId:e}}),u(),l("Successfully canceled the invitation.")}catch(t){o(t)}},[w,e,u,o,l]),S=t===V.PendingInvitation,E=t===V.Joined,A=n.useMemo(()=>[...S?[{label:"Resend invitation",onClick:N},{label:"Cancel invitation",onClick:d}]:[],...E&&!a?[{label:"Remove from team",onClick:()=>{f({variables:{userId:e}}),m(!0)}}]:[]],[S,E,N,f,e,m,d,a]);return 0===A.length?null:i.jsxs(i.Fragment,{children:[i.jsxs(Yu,{children:[i.jsx(Ju,{children:i.jsx(Nr,{})}),i.jsx(Xu,{className:"bg-white",align:"end",alignOffset:-20,children:A.map(e=>i.jsx(ed,{children:i.jsx("button",{type:"button",className:s("px-3 py-2 min-w-[150px] text-sm text-left hover:bg-hoki-50 font-medium text-hoki-900"),onClick:e.onClick,children:e.label})},e.label))})]}),i.jsxs(no,{title:"Cancel invitation",isOpen:c,onClose:u,disableOnClose:j,children:[i.jsx("div",{className:"text-hoki-600",children:"By canceling the invitation, this user will no longer be able to join your team. They will need a new invitation if you want to add them in the future."}),i.jsxs("div",{className:"flex items-center gap-2 justify-end mt-5",children:[i.jsx(yn,{className:"h-[48px] font-medium text-hoki-800",variant:"link",onClick:u,children:"Cancel"}),i.jsx(yn,{onClick:k,isLoading:j,children:"Confirm"})]})]}),i.jsx(On,{open:h,onOpenChange:m,children:i.jsx(_n,{children:i.jsxs(Pn,{className:"text-hoki-800 max-w-[775px] p-8",children:[i.jsx(Rn,{children:i.jsx(Ln,{children:"Remove from team?"})}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsxs("div",{children:[i.jsx("span",{className:"font-bold",children:r})," ","will no longer have access to project information on Cromatic."]}),x.length>0&&i.jsxs("div",{children:[1===x.length?"This active campaign":`These ${x.length} active campaigns`," ","will be paused and handed to you, so nothing keeps sending under their name:"," ",i.jsx("span",{className:"font-bold",children:x.map(e=>e.name).join(", ")}),". Review and stop them from the Campaigns page."]})]}),i.jsxs(In,{children:[i.jsx(yn,{className:"h-[48px] font-medium text-hoki-800",variant:"link",onClick:()=>m(!1),children:"Cancel"}),i.jsx(yn,{className:"h-[48px] font-medium",onClick:C,isLoading:j||y,children:"Confirm"})]})]})})})]})},ym=({getValue:e,row:t,userId:n})=>{const r=e(),{status:a}=t.original,o=n===r.userId,l=a===V.Deactivated;return i.jsxs("div",{className:"flex items-center gap-x-3",children:[i.jsx(jl,{name:r.name}),i.jsxs("div",{className:"flex flex-col",children:[i.jsxs("div",{className:s("text-base font-semibold",l?"text-hoki-500":"text-hoki-900"),children:[r.name,o?i.jsx("span",{className:"font-normal",children:" (You)"}):null]}),i.jsx("div",{className:s("text-sm font-normal",l?"text-hoki-500":"text-hoki-900"),children:r.title||"-"})]})]})},xm=({getValue:e})=>i.jsx("span",{className:"font-medium text-hoki-900",children:e()}),bm=({getValue:e})=>{const t=e(),n={[V.Joined]:"green",[V.PendingInvitation]:"yellow",[V.PendingDeactivation]:"red",[V.Deactivated]:"red"},r={[V.Joined]:"Joined",[V.PendingInvitation]:"Pending Invitation",[V.PendingDeactivation]:"Pending Deactivation",[V.Deactivated]:"Deactivated"};return i.jsx(pm,{color:n[t],children:r[t]})},vm=({row:e,userId:t})=>{const n=e.original,r=t===n.identity.userId;return i.jsx("div",{className:"flex px-2",children:i.jsx(gm,{userId:n.identity.userId,userStatus:n.status,userName:n.identity.name??"this",isCurrentUser:r})})},wm=E("\n  query TeamTab_UserQuery {\n    user {\n      id\n    }\n  }\n"),jm=E("\n  query Team_MembersQuery {\n    collaborators {\n      id\n      email\n      full_name\n      company_name\n      has_setup_profile\n      customer {\n        job_title\n      }\n      vendor_member {\n        title\n      }\n      status\n    }\n  }\n"),Cm={accessor:(e,t)=>
35"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e},Nm=({setTeamMemberCount:e,isVendorTeamMemberLimitHit:r=!1})=>{const{data:a,loading:l}=d(wm),c=a?.user,{data:u,loading:p}=d(jm),h=t.useMemo(()=>u?.collaborators||[],[u]),m=t.useMemo(()=>h.map(e=>({identity:{userId:e.id,name:e?.full_name,title:e?.customer?.job_title||e?.vendor_member?.title},email:e.email,status:e.status})),[h]);t.useEffect(()=>{e&&e(h.length)},[h,e]);const f=n.useCallback(e=>i.jsx(ym,{...e,userId:c?.id}),[c?.id]),g=n.useCallback(e=>i.jsx(xm,{...e}),[]),y=n.useCallback(e=>i.jsx(bm,{...e}),[]),x=n.useCallback(e=>i.jsx(vm,{...e,userId:c?.id}),[c?.id]),v=Qh({data:m,columns:t.useMemo(()=>[Cm.accessor("identity",{cell:f,header:"Name & Role"}),Cm.accessor("email",{cell:g,header:"Email"}),Cm.accessor("status",{cell:y,header:"Status"}),Cm.display({id:"actions",cell:x,header:"Actions"})],[f,g,y,x]),getCoreRowModel:$h()}),{isOpenInviteTeamMemberDialog:w,setIsOpenInviteTeamMemberDialog:j}=(()=>{const e=n.useContext(um);if(!e)throw new Error("useTeamSettingContext has to be used within <TeamSettingContext.Provider>");return e})();return l||p?i.jsx("div",{className:"flex justify-center mt-10 text-center",children:i.jsx(O,{})}):i.jsxs("div",{className:s("bg-white min-h-screenWithoutNav overflow-hidden sm:px-5",r&&"-mt-2"),children:[r&&i.jsxs("p",{className:"mb-5",children:["Free tier limit reached — you can add up to 3 members."," ",i.jsx(o,{to:b.Settings_Billing_Plan,className:"text-bleu-600 font-semibold",children:"Subscribe to add more"})]}
35),i.jsx("div",{className:"flex flex-col gap-4 rounded-lg overflow-hidden  border border-hoki-100 shadow",children:i.jsxs("table",{className:"w-full","data-testid":"table:team",children:[i.jsx("thead",{children:v.getHeaderGroups().map(e=>i.jsx("tr",{children:e.headers.map(e=>i.jsx("th",{className:s("text-left sticky top-0 z-10 bg-hoki-100 px-5 py-3","font-semibold text-sm text-mischka-600","border-b border-b-[#E5E7EB]"),children:e.isPlaceholder?null:Wh(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),i.jsx("tbody",{className:"divide-y",children:v.getRowModel().rows.map(e=>{const t=e.original.status===V.Deactivated;return i.jsx("tr",{className:s("bg-white",t?"text-hoki-500":""),children:e.getVisibleCells().map(e=>i.jsx("td",{className:"px-5 py-3",children:Wh(e.column.columnDef.cell,e.getContext())},e.id))},e.id)})})]})}),i.jsx(cm,{teamMemberCount:h.length,open:w,setOpen:j})]})},km=E("\n  query UserIsOauthConnectedQuery {\n    user {\n      id\n      vendor {\n        id\n      }\n      vendor_member {\n        email_signature\n        bcc_emails\n        use_platform_email\n        cc_self_on_platform_email\n        platform_email_disabled_at\n      }\n    }\n    connectedEmailProviders\n  }\n"),Sm=E("\n  query SmtpConnectionOptionsQuery {\n    smtpConnectionOptions {\n      name\n      display_name\n      smtp_host\n      is_public\n    }\n  }\n"),Em=E("\n  query GoogleOauthAuthorizationUriQuery($redirect_url: String) {\n    googleOauthAuthorizationUri(redirect_url: $redirect_url)\n  }\n"),Am=E("\n  query MicrosoftOauthAuthorizationUriQuery($redirect_url: String) {\n    microsoftOauthAuthorizationUri(redirect_url: $redirect_url)\n  }\n"),Om=E("\n  query ConnectedEmailProvidersWithScopes {\n    connectedEmailProvidersWithScopes {\n      provider\n      hasCampaignScopes\n      needsReconnect\n      email\n    }\n  }\n"),_m=E("\n  query DefaultCampaignEmailProvider {\n    defaultCampaignEmailProvider\n  }\n"),Pm=E("\n  query CampaignEmailProviderOptions {\n    campaignEmailProviderOptions {\n      provider\n      label\n    }\n  }\n"),Im=E("\n  query ActiveCampaignCountForProvider($provider: String!) {\n    activeCampaignCountForProvider(provider: $provider)\n  }\n"),Mm=E("\n  query GoogleCampaignOauthAuthorizationUri($redirect_url: String) {\n    googleCampaignOauthAuthorizationUri(redirect_url: $redirect_url)\n  }\n"),Tm=E("\n  query MicrosoftCampaignOauthAuthorizationUri($redirect_url: String) {\n    microsoftCampaignOauthAuthorizationUri(redirect_url: $redirect_url)\n  }\n"),Rm=E("\n  mutation DisconnectEmailMutation($provider: String!) {\n    disconnectEmail(provider: $provider)\n  }\n"),Lm=E("\n  mutation ConnectSmtpEmailMutation($credentials: SmtpCredentialsInput!) {\n    connectSmtpEmailAccount(credentials: $credentials) {\n      replacedProviders\n      pausedCampaigns\n    }\n  }\n"),Dm=E("\n  mutation UpdatePlatformEmailSettingsMutation($input: UpdatePlatformEmailSettingsInput!) {\n    updatePlatformEmailSettings(input: $input) {\n      use_platform_email\n      cc_self_on_platform_email\n    }\n  }\n"),Fm=e=>d(km,e),qm=()=>d(Sm),Bm=()=>An(Em),Um=()=>An(Am),zm=()=>An(Mm),Hm=()=>An(Tm),Vm=e=>d(Om,{fetchPolicy:"network-only",...e}),$m=()=>d(_m,{fetchPolicy:"network-only"}),Wm=()=>d(Pm,{fetchPolicy:"network-only"}),Qm=()=>p(Lm),Zm=()=>{const[e,n]=t.useState(""),[r,a]=t.useState(""),[i,s]=t.useState(""),[o,l]=t.useState(""),[c,u]=t.useState(Td),[d,p]=t.useState(""),[h,m]=t.useState(void 0),f=i===Fd,g=!(d.trim().length>0)||Rd(h),y=!!(e.trim()&&r.trim()&&i&&(!f||o.trim()&&Rd(c)&&g));return{email:e,password:r,selectedProvider:i,smtpHost:o,smtpPort:c,imapHost:d,imapPort:h,setEmail:n,setPassword:a,setSelectedProvider:s,setSmtpHost:l,setSmtpPort:u,setImapHost:p,setImapPort:m,reset:()=>{n(""),a(""),s(""),l(""),u(Td),p(""),m(void 0)},isValid:y}},Km=e=>i.jsx(Dt,{...e,theme:e=>({...e,borderRadius:0}),classNames:{control:({isDisabled:e})=>e?"!bg-gray-100":"",singleValue:()=>"text-sm",placeholder:()=>"text-sm"},styles:{control:e=>({...e,borderRadius:"0.5rem"}),menu:e=>({...e,borderRadius:"0.5rem",overflow:"hidden"}),menuList:e=>({...e,padding:0}),singleValue:e=>({...e,color:"black"})}}),Gm=({email:e,password:t,selectedProvider:n,providerOptions:r,smtpHost:a="",smtpPort:s=465,imapHost:o="",imapPort:l,onEmailChange:c,onPasswordChange:u,onProviderChange:d,onSmtpHostChange:p,onSmtpPortChange:h,onImapHostChange:m,onImapPortChange:f})=>{const g=n===Fd;return i.jsxs("div",{className:"space-y-4",children:[i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"Email Provider"}),i.jsx(Km,{value:r.find(e=>e.value===n)||null,onChange:e=>e&&d(e.value),options:r,formatOptionLabel:e=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:e.label}),e.smtpHost&&i.jsxs("span",{className:"text-gray-400",children:["(",e.smtpH
35ost,")"]}),e.isPrivate&&i.jsx(qe,{className:"z-50",tooltip:"Only visible to your company",placement:"top",children:i.jsx(xs,{className:"w-3.5 h-3.5 text-gray-400"})})]})})]}),g&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"SMTP Host"}),i.jsx(gn,{value:a,onChange:e=>p?.(e.target.value),placeholder:"smtp.example.com",className:"text-sm"})]}),i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"SMTP Port"}),i.jsx(gn,{value:s.toString(),onChange:e=>h?.(Ld(parseInt(e.target.value,10),Td)),placeholder:"465",type:"number",className:"text-sm"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs(fn,{children:[i.jsx(fn.Label,{children:"IMAP Host (optional)"}),i.jsx(gn,{value:o,onChange:e=>m?.(e.target.value),placeholder:"imap.example.com",className:"text-sm"})]}),i.jsxs(fn,{children:[i.jsx(fn.Label,{children:"IMAP Port (optional)"}),i.jsx(gn,{value:l?.toString()??"",onChange:e=>{const t=e.target.value.trim();f?.(t?Ld(parseInt(t,10),993):void 0)},placeholder:"993",type:"number",className:"text-sm"})]})]}),i.jsx("p",{className:"text-xs text-hoki-500",children:"IMAP is used to save sent emails to your Sent folder."})]}),i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"Email"}),i.jsx(gn,{value:e,onChange:e=>c(e.target.value),placeholder:"[email protected]",type:"email",className:"text-sm"})]}),i.jsxs(fn,{isRequired:!0,children:[i.jsx(fn.Label,{children:"Password"}),i.jsx(Kn,{value:t,onChange:e=>u(e.target.value),placeholder:"Enter your password",className:"text-sm"})]})]})},Ym=E("\n  query PlatformEmailSenderDomainQuery {\n    platformEmailSenderDomain\n  }\n"),Jm=()=>{const{data:e}=d(Ym);return e?.platformEmailSenderDomain||""},Xm=e=>e.replace("@",".").replace("+","."),ef=({usePlatformEmail:e,ccSelfOnPlatformEmail:n,userEmail:r,platformEmailDisabledAt:a,blockedByOtherProvider:s=!1,onSettingsUpdate:o})=>{const l=Boolean(a),{toastSuccess:c,toastCatchError:u}=v(),d=Jm(),[h,m]=t.useState(e),[f,g]=t.useState(n),[y]=p(Dm),x=Xm(r||""),b=l||s&&!h,w=l||s&&!f;t.useEffect(()=>{l?(m(!1),g(!1)):(m(e),g(n))},[e,n,l]);if(0===d.length)return null;const j=l?"This feature has been disabled for your account":s?"Only one email provider can be active at a time. You can still create campaigns using this email provider.":"Send emails without connecting your email account";return i.jsxs("div",{className:"p-4 border border-hoki-200 rounded-lg "+(l?"opacity-50":""),children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center shadow-sm border shrink-0",children:i.jsx(us,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-hoki-900",children:"Send via Big Brain"}),i.jsx("div",{className:"text-sm text-hoki-600",children:j})]})]}),i.jsx(rp,{id:"platform-email-toggle",checked:h,onChange:async()=>{if(b)return;const e=!h;m(e),g(e);try{await y({variables:{input:{use_platform_email:e,cc_self_on_platform_email:e}}}),c(e?"Enabled send via Big Brain":"Disabled send via Big Brain"),o()}catch(t){m(!e),u(t)}},disabled:b})]}),h&&x&&!l&&i.jsxs("div",{className:"mt-4 pt-4 border-t border-hoki-200 space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 bg-blue-50 border border-blue-200 rounded-lg p-3",children:[i.jsx(ms,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}),i.jsxs("div",{className:"text-sm text-blue-800",children:["Your emails will be sent via our platform on your behalf, from the email address"," ",i.jsx("span",{className:"font-medium",children:`${x}@${d}`}),". Replies will automatically go to your email address"," ",i.jsx("span",{className:"font-medium",children:r}),"."]})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-hoki-50 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Yi,{className:"w-4 h-4 text-hoki-600"}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm font-medium text-hoki-900",children:"Send me a copy"}),i.jsx("div",{className:"text-xs text-hoki-600",children:"CC yourself on emails sent via Big Brain"})]})]}),i.jsx(rp,{id:"cc-self-platform-email-toggle",checked:f,onChange:async()=>
35{if(w)return;const e=!f;g(e);try{await y({variables:{input:{use_platform_email:h,cc_self_on_platform_email:e}}}),c(e?"Enabled send me a copy":"Disabled send me a copy"),o()}catch(t){g(!e),u(t)}},disabled:w})]})]})]})},tf=({config:e,isAnyLoading:t,onDisconnectClick:n})=>i.jsx("button",{type:"button",onClick:()=>{e.connectedProvider&&n(e.key,e.connectedProvider)},disabled:t,className:"px-4 py-2 text-sm font-medium rounded-lg transition-colors disabled:opacity-50 text-red-600 hover:text-red-700 hover:bg-red-50",children:"Disconnect"}),nf=({config:e,needsReconnect:t,isAnyLoading:n,isBlockedByOtherProvider:r,onDisconnectClick:a})=>e.isConnected?t?i.jsxs(i.Fragment,{children:[i.jsx(tf,{config:e,isAnyLoading:n,onDisconnectClick:a}),i.jsxs("button",{type:"button",onClick:e.connect,disabled:n,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors disabled:opacity-50 flex items-center gap-2 text-sm font-medium",children:[i.jsx(Zs,{className:"w-4 h-4"}),"Reconnect"]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[i.jsx(Nn,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:"Connected"})]}),i.jsx(tf,{config:e,isAnyLoading:n,onDisconnectClick:a})]}):i.jsx("button",{type:"button",onClick:e.connect,disabled:n||r,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:bg-gray-400 flex items-center gap-2 text-sm font-medium",children:e.loading?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Connecting..."]}):i.jsxs(i.Fragment,{children:[i.jsx(Zs,{className:"w-4 h-4"}),"Connect"]})}),rf=({connectedProviders:e,onAccountUpdate:n,usePlatformEmail:r=!1,ccSelfOnPlatformEmail:a=!0,userEmail:s,platformEmailDisabledAt:o})=>{const{toastCatchError:l,toastSuccess:c,toastWarning:u}=v(),[d,h]=t.useState(null),{data:m}=qm(),f=t.useMemo(()=>Vd(m?.smtpConnectionOptions||[]),[m?.smtpConnectionOptions]),{data:g,refetch:y}=Vm(),x=t.useCallback(()=>{y().catch(()=>{}),n()},[y,n]);t.useEffect(()=>(window.addEventListener("focus",x),()=>window.removeEventListener("focus",x)),[x]);const{needsReconnectByProvider:b,emailByProvider:w}=t.useMemo(()=>{const e={},t={};return(g?.connectedEmailProvidersWithScopes??[]).forEach(n=>{e[n.provider.toLowerCase()]=n.needsReconnect,t[n.provider.toLowerCase()]=n.email}),{needsReconnectByProvider:e,emailByProvider:t}},[g?.connectedEmailProvidersWithScopes]),[j,C]=t.useState(!1),N=Zm(),[k,{loading:S}]=Bm(),[E,{loading:A}]=Um(),[O,{loading:_}]=p(Rm),[P,{loading:I}]=Qm(),[M]=An(Im),[T,R]=t.useState(0),[L,D]=t.useState(null),{onClickConnectGoogle:F,onClickConnectMicrosoft:q}=$d(k,E),B=async(e,t)=>{try{const{data:n}=await M({variables:{provider:t},fetchPolicy:"network-only"});R(n?.activeCampaignCountForProvider??0),D(t),h(e)}catch{R(0),D(t),h(e)}},U=()=>{C(!1),N.reset()},z=Wd({connectedProviders:e,smtpProviderOptions:f,emailByProvider:w,onClickConnectGoogle:F,onClickConnectMicrosoft:q,onClickConnectSmtp:()=>{C(!0)},loadingGoogle:S,loadingMicrosoft:A,loadingSmtp:I}),H=z.some(e=>e.isConnected),V=r&&!o,$=S||A||_||I,W=({option:e})=>{const t=z.find(t=>t.key===e);if(!t||!L)return null;const{isConnected:n}=t;if(!n)return null;const r=T>0,a=1===T?"campaign":"campaigns",s=r?"Disconnect & Pause":"Disconnect";return i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:`w-10 h-10 ${r?"bg-amber-100":"bg-red-100"} rounded-full flex items-center justify-center`,children:i.jsx(nt,{className:"w-5 h-5 "+(r?"text-amber-600":"text-red-600")})}),i.jsx("div",{children:i.jsxs("h3",{className:"text-lg font-semibold text-hoki-900",children:["Disconnect"," ",t.name,"?"]})})]}),r?i.jsxs("p",{className:"text-sm text-hoki-600 mb-6",children:["You have"," ",i.jsxs("span",{className:"font-semibold text-hoki-900",children:[T," ","active"," ",a]})," ","sending from this account. Disconnecting will pause"," ",1===T?"it":"them",". You can resume after reconnecting."]}):i.jsxs("p",{className:"text-sm text-hoki-600 mb-6",children:["This will disconnect your"," ",t.name," ","account",t.connectedEmail?` (${t.connectedEmail})`:"",". You won't be able to send emails through this account until you reconnect it."]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx("button",{type:"button",onClick:()=>{h(null),D(null),R(0)},disabled:_,className:"flex-1 px-4 py-2.5 border border-hoki-300 text-hoki-700 rounded-lg hover:bg-hoki-50 transition-colors disabled:opacity-50 font-medium",children:"Cancel"}),i.jsx("button",{type:"button",onClick:()=>(async e=>{try{await O({variables:{provider:e}}
35),x(),h(null),D(null),R(0),T>0&&c(`Disconnected — ${T} campaign${1===T?"":"s"} paused`)}catch{l("Failed to disconnect account")}})(L),disabled:_,className:"flex-1 px-4 py-2.5 text-white rounded-lg transition-colors disabled:opacity-50 flex items-center justify-center gap-2 font-medium "+(r?"bg-amber-600 hover:bg-amber-700":"bg-red-600 hover:bg-red-700"),children:_?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Disconnecting..."]}):s})]})]})})};return i.jsxs(i.Fragment,{children:[i.jsxs(fn,{children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-4",children:"Email Accounts"}),i.jsx("p",{className:"text-sm text-hoki-600 mb-6",children:"Connect your email accounts to send emails directly from our platform."}),i.jsxs("div",{className:"space-y-4",children:[z.map(e=>{const t=e.icon,n=!e.isConnected&&(H||V),r=Boolean(e.isConnected&&e.connectedProvider&&b[e.connectedProvider.toLowerCase()]);let a=`Connect your ${e.description}`;if(e.isConnected){const t=e.connectedEmail??"";a=r?t?`Connection expired — ${t}`:"Connection expired":t}else n&&(a="Only one email provider can be active at a time");let s="border-hoki-200";return r?s="border-amber-300 bg-amber-50":n&&(s="border-hoki-100 bg-hoki-50/50"),i.jsxs("div",{className:`flex items-center justify-between p-4 border rounded-lg ${s}`,children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 bg-white rounded-full flex items-center justify-center shadow-sm border "+(n?"opacity-50":""),children:i.jsx(t,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium "+(n?"text-hoki-500":"text-hoki-900"),children:e.name}),a&&i.jsxs("div",{className:"text-sm flex items-center gap-1.5 "+(r?"text-amber-700":"text-hoki-600"),children:[r&&i.jsx(nt,{className:"w-3.5 h-3.5 shrink-0"}),a]})]})]}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(nf,{config:e,needsReconnect:r,isAnyLoading:$,isBlockedByOtherProvider:n,onDisconnectClick:B})})]},e.key)}),i.jsx(ef,{usePlatformEmail:r,ccSelfOnPlatformEmail:a,userEmail:s,platformEmailDisabledAt:o,blockedByOtherProvider:H||$,onSettingsUpdate:n})]}),i.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:i.jsxs("p",{className:"text-sm text-blue-800",children:[i.jsx("strong",{children:"Secure:"})," ","We use OAuth 2.0 for authentication. We never store your passwords."]})})]}),d&&i.jsx(W,{option:d}),j&&i.jsx(no,{isOpen:j,onClose:U,title:"Connect Email Account",hideHeaderBorder:!0,children:i.jsxs("div",{className:"w-full flex flex-col gap-3",children:[i.jsx(Gm,{email:N.email,password:N.password,selectedProvider:N.selectedProvider,providerOptions:f,smtpHost:N.smtpHost,smtpPort:N.smtpPort,imapHost:N.imapHost,imapPort:N.imapPort,onEmailChange:N.setEmail,onPasswordChange:N.setPassword,onProviderChange:N.setSelectedProvider,onSmtpHostChange:N.setSmtpHost,onSmtpPortChange:N.setSmtpPort,onImapHostChange:N.setImapHost,onImapPortChange:N.setImapPort}),i.jsx("div",{className:"p-3 bg-blue-50 border border-blue-200 rounded-lg",children:i.jsxs("p",{className:"text-sm text-blue-800",children:[i.jsx("strong",{children:"Secure:"})," ","Your information is securely encrypted with industry-standard methods."," ","You can delete it anytime by disconnecting your email account."]})}),i.jsxs("div",{className:"gap-3 flex justify-end mt-8",children:[i.jsx("button",{type:"button",className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",onClick:U,children:"Cancel"}),i.jsx("button",{type:"button",className:"px-4 py-2 text-sm font-medium text-white bg-primary disabled:bg-gray-300 disabled:cursor-not-allowed rounded-lg transition-colors",onClick:async()=>{if(N.isValid)try{const e=N.selectedProvider===Fd,t=N.smtpHost.trim(),n=N.imapHost.trim(),{data:r}=await P({variables:{credentials:{email:N.email.trim(),password:N.password,provider:N.selectedProvider,...e&&{smtpHost:t,smtpPort:N.smtpPort,...n&&{imapHost:n,imapPort:Ld(N.imapPort,993)}}}}});c("Email connected successfully");const a=r?.connectSmtpEmailAccount,i=a?zd(a.replacedProviders,a.pausedCampaigns):null;i&&u(i,{autoDismiss:!1}),U(),x()}catch(e){l(e),N.setPassword("")}},disabled:I||!N.isValid,children:I?"Connecting...":"Connect"})]})]})})]})},af=({bccEmails:e=[],onBccEmailsChange:n,className:r})=>{const[a,o]=t.useState(""),l=()=>{const t=a.trim();t&&(e=>!(!e||e.length>254)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e))(t)&&(e.includes(t)||n([...e,t]),o(""))},c=t=>
35{const r=e.filter((e,n)=>n!==t);n(r)};return i.jsx("div",{className:s("space-y-3",r),children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-1.5 sm:mb-2",children:[i.jsx("div",{className:"flex items-center gap-1",children:i.jsx("div",{className:"block text-xs font-medium text-gray-600",children:"BCC EMAILS"})}),e.length>0&&i.jsx("button",{type:"button",onClick:()=>{n([]),o("")},className:"text-xs text-gray-500 hover:text-red-600 transition-colors",children:"Clear All"})]}),i.jsxs("div",{className:s(e.length?"py-1.5 sm:py-2 px-2.5 sm:px-3":"","w-full border border-gray-200 rounded-lg text-xs sm:text-sm focus-within:ring-1 focus-within:ring-gray-300 min-h-[36px] flex flex-wrap gap-1 items-center"),children:[e.map((e,t)=>i.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-gray-100 text-gray-700 rounded text-xs",children:[e,i.jsx("button",{type:"button",onClick:()=>c(t),className:"text-gray-400 hover:text-gray-600 ml-1",children:"×"})]},e)),i.jsx("input",{id:"bcc-emails",type:"email",value:a,onChange:e=>o(e.target.value),onKeyDown:t=>{"Enter"!==t.key&&","!==t.key||(t.preventDefault(),l()),"Backspace"===t.key&&""===a&&e.length&&c(e.length-1)},onBlur:l,placeholder:e.length?"Add email...":"[email protected]",className:"flex-1 min-w-[120px] border-0 focus:ring-0 outline-none bg-transparent text-xs sm:text-sm"})]}),i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Press Enter or comma to add emails for CRM integration"})]})})},sf=e=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:2500,height:1750,viewBox:"0.5 0.5 999 699.242",...e},t.createElement("path",{fill:"#00A1E0",d:"M416.224 76.763c32.219-33.57 77.074-54.391 126.682-54.391 65.946 0 123.48 36.772 154.12 91.361 26.626-11.896 56.098-18.514 87.106-18.514 118.94 0 215.368 97.268 215.368 217.247 0 119.993-96.428 217.261-215.368 217.261a213.735 213.735 0 0 1-42.422-4.227c-26.981 48.128-78.397 80.646-137.412 80.646-24.705 0-48.072-5.706-68.877-15.853-27.352 64.337-91.077 109.448-165.348 109.448-77.344 0-143.261-48.939-168.563-117.574-11.057 2.348-22.513 3.572-34.268 3.572C75.155 585.74.5 510.317.5 417.262c0-62.359 33.542-116.807 83.378-145.937-10.26-23.608-15.967-49.665-15.967-77.06C67.911 87.25 154.79.5 261.948.5c62.914 0 118.827 29.913 154.276 76.263"}),t.createElement("path",{fill:"#FFF",d:"M145.196 363.11c-.626 1.637.228 1.979.427 2.263 1.878 1.366 3.786 2.349 5.707 3.444 10.189 5.407 19.81 6.986 29.871 6.986 20.492 0 33.214-10.9 33.214-28.447v-.341c0-16.224-14.358-22.115-27.835-26.37l-1.75-.569c-10.161-3.302-18.927-6.147-18.927-12.836v-.355c0-5.721 5.123-9.934 13.064-9.934 8.823 0 19.297 2.932 26.042 6.66 0 0 1.978 1.281 2.704-.64.398-1.025 3.814-10.218 4.17-11.214.384-1.082-.299-1.879-.996-2.306-7.699-4.682-18.344-7.884-29.358-7.884l-2.049.014c-18.756 0-31.848 11.328-31.848 27.565v.342c0 17.119 14.444 22.669 27.978 26.54l2.177.669c9.862 3.031 18.358 5.635 18.358 12.58v.342c0 6.347-5.521 11.071-14.43 11.071-3.458 0-14.487-.071-26.398-7.6-1.438-.84-2.277-1.451-3.387-2.12-.583-.37-2.049-1.011-2.689.925l-4.045 11.215zM445.194 363.11c-.626 1.637.228 1.979.427 2.263 1.878 1.366 3.786 2.349 5.706 3.444 10.189 5.407 19.811 6.986 29.871 6.986 20.492 0 33.215-10.9 33.215-28.447v-.341c0-16.224-14.359-22.115-27.836-26.37l-1.75-.569c-10.161-3.302-18.928-6.147-18.928-12.836v-.355c0-5.721 5.123-9.934 13.064-9.934 8.823 0 19.297 2.932 26.043 6.66 0 0 1.978 1.281 2.703-.64.398-1.025 3.814-10.218 4.17-11.214.385-1.082-.299-1.879-.996-2.306-7.699-4.682-18.344-7.884-29.358-7.884l-2.05.014c-18.756 0-31.848 11.328-31.848 27.565v.342c0 17.119 14.444 22.669 27.978 26.54l2.177.669c9.862 3.031 18.373 5.635 18.373 12.58v.342c0 6.347-5.536 11.071-14.445 11.071-3.457 0-14.486-.071-26.397-7.6-1.438-.84-2.291-1.423-3.372-2.12-.371-.242-2.107-.911-2.705.925l-4.042 11.215zM649.995 328.74c0 9.919-1.85 17.731-5.493 23.253-3.601 5.465-9.051 8.126-16.649 8.126-7.613 0-13.035-2.647-16.579-8.126-3.587-5.507-5.407-13.334-5.407-23.253 0-9.904 1.82-17.703 5.407-23.168 3.544-5.407 8.966-8.04 16.579-8.04 7.599 0 13.049 2.633 16.664 8.04 3.629 5.464 5.478 13.263 5.478 23.168m17.106-18.386c-1.
3568-5.679-4.298-10.688-7.784-14.857-3.487-4.184-7.898-7.542-13.136-9.99-5.223-2.433-11.398-3.671-18.328-3.671-6.945 0-13.121 1.238-18.344 3.671-5.237 2.448-9.648 5.807-13.149 9.99-3.472 4.184-6.091 9.193-7.784 14.857-1.665 5.649-2.505 11.825-2.505 18.386s.84 12.751 2.505 18.386c1.693 5.664 4.298 10.674 7.799 14.857 3.486 4.184 7.912 7.528 13.135 9.904 5.236 2.377 11.398 3.586 18.344 3.586 6.93 0 13.092-1.209 18.328-3.586 5.223-2.376 9.648-5.721 13.136-9.904 3.486-4.17 6.104-9.179 7.784-14.857 1.68-5.649 2.519-11.84 2.519-18.386s-.841-12.737-2.52-18.386M807.568 357.47c-.569-1.665-2.177-1.039-2.177-1.039-2.49.954-5.138 1.836-7.955 2.277-2.861.44-6.006.669-9.379.669-8.281 0-14.856-2.462-19.566-7.329-4.725-4.867-7.372-12.736-7.344-23.381.029-9.691 2.362-16.978 6.561-22.527 4.17-5.521 10.517-8.354 18.984-8.354 7.059 0 12.438.811 18.072 2.59 0 0 1.352.583 1.992-1.181 1.494-4.156 2.604-7.13 4.198-11.698.456-1.295-.654-1.85-1.053-2.007-2.22-.868-7.457-2.276-11.413-2.874-3.7-.569-8.026-.868-12.836-.868-7.188 0-13.591 1.224-19.069 3.672-5.465 2.433-10.104 5.791-13.775 9.976-3.672 4.184-6.461 9.192-8.325 14.856-1.85 5.649-2.789 11.854-2.789 18.415 0 14.188 3.828 25.657 11.385 34.054 7.57 8.425 18.941 12.708 33.77 12.708 8.766 0 17.76-1.778 24.221-4.326 0 0 1.238-.598.697-2.034l-4.199-11.599zM837.497 319.238c.811-5.507 2.334-10.09 4.682-13.661 3.544-5.422 8.951-8.396 16.551-8.396s12.623 2.988 16.223 8.396c2.391 3.571 3.43 8.354 3.843 13.661h-41.299zm57.592-12.111c-1.451-5.479-5.052-11.015-7.414-13.548-3.729-4.013-7.371-6.816-10.986-8.382-4.725-2.021-10.389-3.358-16.593-3.358-7.229 0-13.79 1.21-19.112 3.714-5.336 2.505-9.818 5.921-13.334 10.176-3.516 4.24-6.162 9.292-7.842 15.027-1.693 5.707-2.547 11.926-2.547 18.485 0 6.675.883 12.894 2.633 18.486 1.765 5.636 4.582 10.602 8.396 14.714 3.799 4.142 8.695 7.387 14.558 9.648 5.821 2.249 12.894 3.416 21.019 3.401 16.722-.057 25.53-3.785 29.159-5.792.641-.355 1.253-.981.483-2.774l-3.785-10.603c-.568-1.579-2.177-.996-2.177-.996-4.142 1.537-10.032 4.298-23.766 4.27-8.979-.014-15.64-2.661-19.81-6.803-4.283-4.24-6.375-10.474-6.745-19.268l57.905.057s1.522-.028 1.68-1.509c.057-.624 1.993-11.895-1.722-24.945M373.762 319.238c.825-5.507 2.334-10.09 4.682-13.661 3.543-5.422 8.951-8.396 16.55-8.396s12.623 2.988 16.237 8.396c2.376 3.571 3.415 8.354 3.828 13.661h-41.297zm57.577-12.111c-1.451-5.479-5.037-11.015-7.399-13.548-3.729-4.013-7.372-6.816-10.986-8.382-4.725-2.021-10.388-3.358-16.593-3.358-7.215 0-13.79 1.21-19.112 3.714-5.336 2.505-9.819 5.921-13.334 10.176-3.515 4.24-6.162 9.292-7.841 15.027-1.679 5.707-2.547 11.926-2.547 18.485 0 6.675.882 12.894 2.633 18.486 1.765 5.636 4.583 10.602 8.396 14.714 3.8 4.142 8.695 7.387 14.558 9.648 5.821 2.249 12.893 3.416 21.019 3.401 16.721-.057 25.53-3.785 29.159-5.792.641-.355 1.252-.981.484-2.774l-3.771-10.603c-.584-1.579-2.191-.996-2.191-.996-4.141 1.537-10.019 4.298-23.78 4.27-8.965-.014-15.625-2.661-19.795-6.803-4.284-4.24-6.375-10.474-6.746-19.268l57.905.057s1.522-.028 1.679-1.509c.055-.624 1.99-11.895-1.738-24.945M248.601 357.153c-2.263-1.808-2.576-2.263-3.344-3.43-1.139-1.779-1.722-4.312-1.722-7.528 0-5.095 1.679-8.752 5.166-11.214-.042.015 4.981-4.34 16.792-4.184 8.296.114 15.71 1.338 15.71 1.338v26.327h.014s-7.357 1.579-15.639 2.077c-11.783.712-17.02-3.4-16.977-3.386m23.039-40.686c-2.348-.171-5.394-.271-9.037-.271-4.966 0-9.762.626-14.259 1.836-4.525 1.209-8.595 3.103-12.096 5.606a27.927 27.927 0 0 0-8.396 9.549c-2.049 3.814-3.088 8.311-3.088 13.349 0 5.123.882 9.577 2.647 13.221 1.765 3.657 4.312 6.702 7.556 9.051 3.216 2.348 7.187 4.069 11.797 5.108 4.54 1.039 9.691 1.565 15.327 1.565 5.934 0 11.854-.483 17.589-1.466 5.678-.968 12.651-2.377 14.586-2.817a146.25 146.25 0 0 0 4.056-1.039c1.438-.355 1.324-1.893 1.324-1.893l-.029-52.952c0-11.613-3.102-20.223-9.207-25.559-6.077-5.322-15.028-8.013-26.597-8.013-4.341 0-11.328.599-15.512 1.438 0 0-12.651 2.448-17.86 6.518 0 0-1.138.712-.512 2.306l4.099 11.015c.512 1.423 1.893.939 1.893.939s.441-.171.954-.47c11.143-6.062 25.231-5.877 25.231-5.877 6.262 0 11.072 1.252 14.316 3.742 3.159 2.419 4.767 6.076 4.767 13.789v2.448c-4.981-.711-9.549-1.123-9.549-1.123M738.669 28
356.631c.44-1.31-.484-1.936-.869-2.078-.981-.384-5.905-1.423-9.705-1.665-7.271-.441-11.312.783-14.928 2.405-3.586 1.622-7.57 4.24-9.791 7.215v-7.044c0-.982-.697-1.765-1.665-1.765h-14.843c-.967 0-1.664.782-1.664 1.765v86.366c0 .968.797 1.765 1.764 1.765h15.213a1.76 1.76 0 0 0 1.75-1.765v-43.147c0-5.792.641-11.569 1.922-15.198 1.252-3.587 2.96-6.461 5.066-8.525 2.12-2.049 4.525-3.486 7.158-4.297 2.689-.826 5.663-1.096 7.77-1.096 3.031 0 6.361.782 6.361.782 1.109.128 1.736-.555 2.105-1.565.997-2.647 3.815-10.574 4.356-12.153"}),t.createElement("path",{fill:"#FFF",d:"M595.874 246.603c-1.85-.569-3.529-.954-5.721-1.366-2.221-.398-4.867-.598-7.869-.598-10.475 0-18.729 2.96-24.52 8.794-5.764 5.807-9.678 14.644-11.642 26.271l-.712 3.913h-13.148s-1.594-.057-1.936 1.68l-2.148 12.053c-.157 1.139.342 1.864 1.878 1.864h12.794l-12.979 72.463c-1.011 5.835-2.178 10.631-3.473 14.273-1.267 3.587-2.504 6.276-4.041 8.24-1.48 1.879-2.875 3.273-5.295 4.084-1.992.669-4.297.982-6.816.982-1.395 0-3.258-.229-4.639-.513-1.366-.271-2.092-.569-3.131-1.011 0 0-1.494-.568-2.092.926-.47 1.238-3.885 10.615-4.298 11.769-.398 1.152.171 2.049.896 2.319 1.708.598 2.974.996 5.294 1.551 3.217.755 5.934.797 8.481.797 5.322 0 10.189-.754 14.217-2.205 4.042-1.466 7.57-4.014 10.701-7.457 3.373-3.729 5.493-7.628 7.515-12.964 2.006-5.266 3.729-11.812 5.094-19.439l13.05-73.815h19.069s1.607.057 1.936-1.693l2.162-12.039c.143-1.152-.341-1.864-1.893-1.864h-18.514c.1-.412.939-6.931 3.06-13.063.911-2.604 2.618-4.725 4.056-6.177 1.424-1.423 3.06-2.433 4.854-3.017 1.835-.598 3.928-.882 6.219-.882 1.736 0 3.457.199 4.752.469 1.793.385 2.49.584 2.961.727 1.893.569 2.148.014 2.519-.896l4.426-12.153c.455-1.312-.669-1.867-1.067-2.023M337.194 371.834c0 .968-.697 1.751-1.665 1.751h-15.355c-.968 0-1.651-.783-1.651-1.751v-123.58c0-.967.683-1.75 1.651-1.75h15.355c.968 0 1.665.783 1.665 1.75v123.58z"})),of=({label:e,tokenBased:t,note:n,loading:r,onConfirm:a,onCancel:s})=>i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-full flex items-center justify-center",children:i.jsx(nt,{className:"w-5 h-5 text-red-600"})}),i.jsx("div",{children:i.jsx("h3",{className:"text-lg font-semibold text-hoki-900",children:`Disconnect ${e}?`})})]}),i.jsxs("p",{className:"text-sm text-hoki-600 mb-6",children:[t?`This will remove the ${e} token stored in Cromatic.`:`This will revoke access to your ${e} data.`," ","Contact sync will stop. You can reconnect anytime.",n&&` ${n}`]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx("button",{type:"button",onClick:s,disabled:r,className:"flex-1 px-4 py-2.5 border border-hoki-300 text-hoki-700 rounded-lg hover:bg-hoki-50 transition-colors disabled:opacity-50 font-medium",children:"Cancel"}),i.jsx("button",{type:"button",onClick:a,disabled:r,className:"flex-1 px-4 py-2.5 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50 flex items-center justify-center gap-2 font-medium",children:r?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Disconnecting..."]}):i.jsxs(i.Fragment,{children:[i.jsx(Hs,{className:"w-4 h-4"}),"Disconnect"]})})]})]})}),lf=({tokenConnect:e,label:n,disabled:r})=>{const{toastSuccess:a,toastCatchError:s}=v(),[o,l]=t.useState(""),[c,u]=t.useState(!1);return i.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),o.trim()&&!c&&!r){u(!0);try{await e.connect(o.trim()),l(""),a(`${n} connected successfully! Initial sync is running in the background.`)}catch(i){s(i)}finally{u(!1)}}},className:"mt-3 pt-3 border-t border-hoki-100 space-y-3",children:[i.jsx("div",{className:"text-sm text-hoki-600",children:e.help}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"password",autoComplete:"off",value:o,onChange:e=>l(e.target.value),placeholder:e.placeholder,"aria-label":`${n} API token`,disabled:r,className:"flex-1 px-3 py-2 border border-hoki-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary disabled:opacity-50 disabled:bg-hoki-50 disabled:cursor-not-allowed"}),i.jsx("button",{type:"submit",disabled:!o.trim()||c||r,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",children:c?"Connecting...":"Connect"})]})]})},cf=({binding:e,disabled:n=!1,disabledHint:r,onConnectedChange:a})=>{const{label:s,Icon:o,oauthSuccessParam:l,oauthErrorParam:c,connected:u,connectedAt:d,lastSyncedAt:p,accountLabel:h,loadingConnection:m,loadingAuthUri:f,loadingDisconnect:g,loadingSync:y,fetchAuthUri:x,tokenConnect:b,disconnectNote:w,disconnect:j,refetchLastSyncedAt:C,sync:N}
35=e,{toastSuccess:k,toastError:S,toastCatchError:E}=v(),[A,O]=t.useState(!1),[_,I]=t.useState(!1),[M,T]=P(),R=t.useRef(!1),L=t.useRef(null);t.useEffect(()=>{if(R.current)return;const e=M.get("oauth"),t=M.get("error");l&&e===l?(R.current=!0,k(`${s} connected successfully! Initial sync is running in the background.`),M.delete("oauth"),T(M,{replace:!0})):c&&t===c&&(R.current=!0,S(`${s} connection failed. Please try again.`),M.delete("error"),T(M,{replace:!0}))},[M,T,k,S,s,l,c]),t.useEffect(()=>{m||a?.(u)},[m,u,a]);const D=t.useCallback(async()=>{if(x)try{const e=await x();e?window.location.assign(e):S(`Failed to generate ${s} authorization URL`)}catch(e){E(e)}},[x,s,S,E]),F=t.useCallback(async()=>{try{await j(),O(!1),k(`${s} disconnected`)}catch(e){E(e)}},[j,s,k,E]),q=t.useCallback(()=>{L.current&&(clearTimeout(L.current),L.current=null),I(!1)},[]);t.useEffect(()=>()=>q(),[q]);const B=t.useCallback(async()=>{try{const e=await N();if(e?.success){k(`Syncing ${s} data in the background...`),I(!0);const e=p?new Date(p).getTime():0,t=Date.now(),n=9e4,r=async()=>{try{const r=await C();if((r?new Date(r).getTime():0)>e)return q(),void k(`${s} data synced successfully`);if(Date.now()-t>n)return q(),void S("Sync is taking longer than expected. It will continue in the background.")}catch{return void q()}L.current=setTimeout(r,5e3)};L.current=setTimeout(r,5e3)}else S(e?.message||"Sync failed"),e?.message?.includes("reconnect")&&await C()}catch(e){E(e)}},[N,C,p,s,k,S,E,q]),U=f||g||y||_;return m?i.jsxs("div",{className:"flex items-center justify-between p-4 border border-hoki-200 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 bg-white rounded-full flex items-center justify-center shadow-sm border",children:i.jsx(o,{className:"w-6 h-6"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-hoki-900",children:s}),i.jsx("div",{className:"text-sm text-hoki-500",children:"Checking connection..."})]})]}),i.jsx("div",{className:"w-4 h-4 border-2 border-hoki-300 border-t-transparent rounded-full animate-spin"})]}):i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"p-4 border rounded-lg transition-colors "+(u?"border-green-200 bg-green-50/30":"border-hoki-200"),children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 bg-white rounded-full flex items-center justify-center shadow-sm border",children:i.jsx(o,{className:"w-6 h-6"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-hoki-900",children:s}),u?i.jsx("div",{className:"text-sm text-hoki-600",children:"Contacts & outreach activity synced"}):i.jsx("div",{className:"text-sm text-hoki-600",children:"Sync contacts and outreach history from your CRM"})]})]}),i.jsx("div",{className:"flex items-center gap-2",children:u?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-1.5 text-green-600 mr-1",children:[i.jsx(Nn,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:"Connected"})]}),i.jsx("button",{type:"button",onClick:B,disabled:U,title:_?"Syncing...":`Re-sync ${s} data`,className:"p-2 text-hoki-500 hover:text-hoki-700 hover:bg-hoki-100 rounded-md transition-colors disabled:opacity-50",children:i.jsx(_s,{className:"w-4 h-4 "+(y||_?"animate-spin":"")})}),i.jsx("button",{type:"button",onClick:()=>O(!0),disabled:U,className:"px-3 py-1.5 text-sm text-red-600 hover:text-red-700 hover:bg-red-50 rounded-md transition-colors disabled:opacity-50",children:"Disconnect"})]}):!b&&i.jsx("button",{type:"button",onClick:D,disabled:U||n,title:n?r:void 0,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:bg-gray-400 flex items-center gap-2 text-sm font-medium",children:f?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Connecting..."]}):i.jsxs(i.Fragment,{children:[i.jsx(Zs,{className:"w-4 h-4"}),"Connect"]})})})]}),b&&!u&&i.jsx(lf,{tokenConnect:b,label:s,disabled:n||U}),u&&i.jsx("div",{className:"mt-3 pt-3 border-t border-green-100",children:i.jsxs("div",{className:"flex items-center gap-4 text-xs text-hoki-500",children:[d&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Zi,{className:"w-3 h-3"}),"Connected"," ",new Date(d).toLocaleDateString()]}),h&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(rs,{className:"w-3 h-3"}),h]})]})})]}),n&&!u&&r&&i.jsx("p",{className:"text-xs text-hoki-400",children:r}),A&&i.jsx(of,{label:s,tokenBased:Boolean(b),note:w,loading:g,onConfirm:F,onCancel:()=>O(!1)})]})},uf=e=>{const t=(()=>{const{data:e,loading:t,refetch:n}=dt(),[r,{loading:a}]=pt(),[i,{loading:s}]=ht(),[o,{loading:l}]=mt(),c=e?.salesforceConnection;return{label:"Salesforce",Icon:sf,oauthSuccessParam:"salesforce_success",oauthErrorParam:"SalesforceAuthenticationFailed",connected:c?.connected??!1,connectedAt:c?.connectedAt,lastSyncedAt:c?.lastSyncedAt,accountLabel:c?.instanceUrl?.replace("https://","").replace(".my.salesforce.com",""),loadingConnection:t,loadingAuthUri:a,loadingDisconnect:s,loadingSync:l,fetchAuthUri:async()=>{const e=await r({variables:{redirect_url:window.location.href,forceLogin:!0}});return e.data?.salesforceOauthAuthorizationUri??void 0},disconnect:async()=>{await i(),await n()},refetchLastSyncedAt:async()=>{const{data:e}=await n();return e?.salesforceConnection?.lastSyncedAt},sync:async()=>{const e=await o();return e.data?.syncSalesforceData}}})();return i.jsx(cf,{binding:t,...e})},df=e=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"#FF7A59",...e},t.createElement("path",{d:"M23.9 11.35V8.2a2.42 2.42 0 0 0 1.4-2.18v-.07a2.43 2.43 0 0 0-2.42-2.42h-.
3507a2.43 2.43 0 0 0-2.42 2.42v.07a2.42 2.42 0 0 0 1.4 2.18v3.15a6.86 6.86 0 0 0-3.26 1.43l-8.63-6.72a2.72 2.72 0 1 0-1.27 1.63l8.49 6.6a6.87 6.87 0 0 0 .1 7.75l-2.58 2.58a2.22 2.22 0 0 0-.64-.1 2.24 2.24 0 1 0 2.24 2.24 2.2 2.2 0 0 0-.1-.64l2.55-2.55a6.88 6.88 0 1 0 5.29-12.19zm-1.05 10.32a3.53 3.53 0 1 1 3.53-3.53 3.53 3.53 0 0 1-3.53 3.53z"})),pf=e=>{const t=(()=>{const{data:e,loading:t,refetch:n}=ft(),[r,{loading:a}]=gt(),[i,{loading:s}]=yt(),[o,{loading:l}]=xt(),c=e?.hubspotConnection;return{label:"HubSpot",Icon:df,oauthSuccessParam:"hubspot_success",oauthErrorParam:"HubspotAuthenticationFailed",connected:c?.connected??!1,connectedAt:c?.connectedAt,lastSyncedAt:c?.lastSyncedAt,accountLabel:c?.portalUrl?.replace("https://",""),loadingConnection:t,loadingAuthUri:a,loadingDisconnect:s,loadingSync:l,fetchAuthUri:async()=>{const e=await r({variables:{redirect_url:window.location.href,forceLogin:!0}});return e.data?.hubspotOauthAuthorizationUri??void 0},disconnect:async()=>{await i(),await n()},refetchLastSyncedAt:async()=>{const{data:e}=await n();return e?.hubspotConnection?.lastSyncedAt},sync:async()=>{const e=await o();return e.data?.syncHubspotData}}})();return i.jsx(cf,{binding:t,...e})},hf=()=>{const{toastSuccess:e,toastCatchError:n}=v(),[r,a]=t.useState([]),[s,o]=t.useState(null),[l,c]=t.useState(null),[u,h]=t.useState(null),[m,f]=t.useState(null),[g,y]=t.useState(null),x=[l&&"Salesforce",u&&"HubSpot",m&&"Pipeline"].find(Boolean)||null,b=null!==x,w=e=>x&&x!==e?x:null;d(op,{onCompleted:e=>{e.user?.vendor_member?.bcc_emails&&a(e.user.vendor_member.bcc_emails),o(Boolean(e.user?.vendor_member?.use_crm_context_in_emails))}});const[j,{loading:C}]=p(ip);return i.jsxs(fn,{children:[i.jsxs("div",{className:"mb-5",children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left",children:"CRM Integration"}),i.jsx("p",{className:"text-sm text-hoki-600 mt-1",children:"Connect your CRM to sync contacts and track outreach activity."})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsx(uf,{onConnectedChange:c,disabled:Boolean(w("Salesforce")),disabledHint:`Disconnect ${w("Salesforce")} to connect Salesforce.`}),i.jsx(pf,{onConnectedChange:h,disabled:Boolean(w("HubSpot")),disabledHint:`Disconnect ${w("HubSpot")} to connect HubSpot.`}),false,!b&&i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-sm text-hoki-600",children:["Click Connect and sign in with your usual CRM work account — we’ll bring you back here when it’s done."," ","You can connect one CRM at a time."]}),i.jsx("div",{className:"p-3 bg-blue-50 border border-blue-200 rounded-lg",children:i.jsxs("p",{className:"text-sm text-blue-800",children:[i.jsx("strong",{children:"What we access:"})," ","Companies, contacts, and completed outreach activities (emails & calls) only. We never access deals, contracts, opportunities, or other confidential data."]})})]}),i.jsx("div",{className:"border-t border-hoki-100"})]}),i.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 border border-hoki-200 rounded-lg",children:[i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-hoki-900",children:"Use CRM history for Big Brain emails"}),i.jsx("div",{className:"text-sm text-hoki-600 mt-1",children:"When enabled, AI-generated drafts use your CRM history as context."})]}),i.jsx("div",{className:"shrink-0 pt-0.5",children:i.jsx(rp,{id:"use-crm-context-in-emails-toggle",checked:!0===s&&b,disabled:!b||null===s||C,onChange:async()=>{if(null===s||C)return;const t=!s;o(t);try{const{data:n}=await j({variables:{use_crm_context_in_emails:t}}),r=n?.updateVendorMember?.use_crm_context_in_emails??t;o(r),e(r?"AI emails will use your CRM history":"AI emails will no longer use your CRM history")}catch(r){o(!t),n(r)}}})})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-hoki-900",children:"BCC Email Forwarding"}),i.jsx("p",{className:"text-sm text-hoki-600 mt-0.5",children:"Auto-log emails to your CRM via BCC addresses."})]}),r.length>0&&i.jsxs("div",{className:"flex items-center gap-1.5 text-green-600",children:[i.jsx(Nn,{className:"w-3.5 h-3.5"}),i.jsx("span",{className:"text-xs font-medium",children:"Active"})]})]}),i.jsx(af,{bccEmails:r,onBccEmailsChange:async t=>{a(t);try{await j({variables:{bcc_emails:t}}),e("BCC emails updated successfully")}catch{n("Failed to update BCC emails. Please check your email addresses and try again.")}}})]})]})]})};var mf,ff,gf,yf,xf,bf,vf,wf,jf,Cf,Nf,kf,Sf,Ef,Af,Of,_f,Pf,If,Mf,Tf,Rf,Lf,Df,Ff,qf,Bf,Uf,zf,Hf,Vf,$f,Wf,Qf,Zf,Kf,Gf,Yf,Jf,Xf,eg,tg,ng,rg,ag,ig,sg,og,lg,cg,ug,dg,pg,hg,mg,fg,gg,yg,xg,bg,vg,wg,jg,Cg,Ng,kg,Sg,Eg,Ag,Og,_g,Pg,Ig,Mg,Tg,Rg,Lg,Dg,Fg,qg,Bg,Ug,zg,Hg,Vg,$g,Wg,Qg,Zg,Kg,Gg,Yg,Jg,Xg,ey,ty,ny,ry,ay,iy,sy,oy,ly,cy,uy,dy,py,hy,my,fy,gy,yy;function xy(){if(yf)return gf;return yf=1,gf=function(e,t){return e===t||e!=e&&t!=t}}function by(){if(bf)return xf;bf=1;var e=xy();return xf=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1},xf}function vy(){if(Of)return Af;Of=1;var e=ff?mf:(ff=1,mf=function(){this.__data__=[],this.size=0}),t=function(){if(wf)return vf;wf=1;var e=by(),t=Array.prototype.splice;return vf=function(n){var r=this.__data__,a=e(r,n);return!(a<0||(a==r.length-1?r.pop():t.call(r,a,1),--this.size,0))},vf}(),n=function(){if(Cf)return jf;Cf=1;var e=by();return jf=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]},jf}(),r=function(){if(kf)return Nf;kf=1;var e=by();return Nf=function(t){return e(this.__data__,t)>-1}
vendor: 6,005 bytes, line 35
35}(),a=function(){if(Ef)return Sf;Ef=1;var e=by();return Sf=function(t,n){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,n])):r[a][1]=n,this},Sf}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Af=i}function wy(){if(qf)return Ff;qf=1;var e=Fo(),t=Mo();return Ff=function(n){if(!t(n))return!1;var r=e(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function jy(){if(Hf)return zf;Hf=1;var e,t=function(){if(Uf)return Bf;Uf=1;var e=Ro()["__core-js_shared__"];return Bf=e}(),n=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return zf=function(e){return!!n&&n in e}}function Cy(){if($f)return Vf;$f=1;var e=Function.prototype.toString;return Vf=function(t){if(null!=t){try{return e.call(t)}catch(Fr){}try{return t+""}catch(Fr){}}return""}}function Ny(){if(Yf)return Gf;Yf=1;var e=function(){if(Qf)return Wf;Qf=1;var e=wy(),t=jy(),n=Mo(),r=Cy(),a=/^\[object .+?Constructor\]$/,i=Function.prototype,s=Object.prototype,o=i.toString,l=s.hasOwnProperty,c=RegExp("^"+o.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Wf=function(i){return!(!n(i)||t(i))&&(e(i)?c:a).test(r(i))}}(),t=(Kf||(Kf=1,Zf=function(e,t){return null==e?void 0:e[t]}),Zf);return Gf=function(n,r){var a=t(n,r);return e(a)?a:void 0},Gf}function ky(){if(Xf)return Jf;Xf=1;var e=Ny()(Ro(),"Map");return Jf=e}function Sy(){if(tg)return eg;tg=1;var e=Ny()(Object,"create");return eg=e}function Ey(){if(hg)return pg;hg=1;var e=function(){if(rg)return ng;rg=1;var e=Sy();return ng=function(){this.__data__=e?e(null):{},this.size=0}}(),t=ig?ag:(ig=1,ag=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),n=function(){if(og)return sg;og=1;var e=Sy(),t=Object.prototype.hasOwnProperty;return sg=function(n){var r=this.__data__;if(e){var a=r[n];return"__lodash_hash_undefined__"===a?void 0:a}return t.call(r,n)?r[n]:void 0}}(),r=function(){if(cg)return lg;cg=1;var e=Sy(),t=Object.prototype.hasOwnProperty;return lg=function(n){var r=this.__data__;return e?void 0!==r[n]:t.call(r,n)}}(),a=function(){if(dg)return ug;dg=1;var e=Sy();return ug=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,pg=i}function Ay(){if(bg)return xg;bg=1;var e=yg?gg:(yg=1,gg=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return xg=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map},xg}function Oy(){if(Og)return Ag;Og=1;var e=function(){if(fg)return mg;fg=1;var e=Ey(),t=vy(),n=ky();return mg=function(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}}(),t=function(){if(wg)return vg;wg=1;var e=Ay();return vg=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(Cg)return jg;Cg=1;var e=Ay();return jg=function(t){return e(this,t).get(t)}}(),r=function(){if(kg)return Ng;kg=1;var e=Ay();return Ng=function(t){return e(this,t).has(t)}}(),a=function(){if(Eg)return Sg;Eg=1;var e=Ay();return Sg=function(t,n){var r=e(this,t),a=r.size;return r.set(t,n),this.size+=r.size==a?0:1,this},Sg}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Ag=i}function _y(){if(Mg)return Ig;Mg=1;var e=vy(),t=function(){if(Pf)return _f;Pf=1;var e=vy();return _f=function(){this.__data__=new e,this.size=0}}(),n=Mf?If:(Mf=1,If=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}),r=Rf?Tf:(Rf=1,Tf=function(e){return this.__data__.get(e)}),a=Df?Lf:(Df=1,Lf=function(e){return this.__data__.has(e)}),i=function(){if(Pg)return _g;Pg=1;var e=vy(),t=ky(),n=Oy();return _g=function(r,a){var i=this.__data__;if(i instanceof e){var s=i.__data__;if(!t||s.length<199)return s.push([r,a]),this.size=++i.size,this;i=this.__data__=new n(s)}return i.set(r,a),this.size=i.size,this}}();function s(t){var n=this.__data__=new e(t);this.size=n.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=a,s.prototype.set=i,Ig=s}function Py(){if(qg)return Fg;qg=1;var e=Oy(),t=Rg?Tg:(Rg=1,Tg=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}),n=Dg?Lg:(Dg=1,Lg=function(e){return this.__data__.has(e)});function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Fg=r}function Iy(){if($g)return Vg;$g=1;var e=Py(),t=(Ug||(Ug=1,Bg=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}),Bg),n=Hg?zg:(Hg=1,zg=function(e,t){return e.has(t)});return Vg=function(r,a,i,s,o,l){var c=1&i,u=r.length,d=a.length;if(u!=d&&!(c&&d>u))return!1;var p=l.get(r),h=l.get(a);if(p&&h)return p==a&&h==r;var m=-1,f=!0,g=2&i?new e:void 0;for(l.set(r,a),l.set(a,r);++m<u;){var y=r[m],x=a[m];if(s)var b=c?s(x,y,m,a,r,l):s(y,x,m,r,a,l);if(void 0!==b){if(b)continue;f=!1;break}if(g){if(!t(a,function(e,t){if(!n(g,t)&&(y===e||o(y,e,i,s,l)))return g.push(t)})){f=!1;break}}else if(y!==x&&!o(y,x,i,s,l)){f=!1;break}}return l.delete(r),l.delete(a),f},Vg}function My(){if(Xg)return Jg;Xg=1;var e=Do(),t=function(){if(Qg)return Wg;Qg=1;var e=Ro().Uint8Array;return Wg=e}(),n=xy(),r=Iy(),a=(Kg||(Kg=1,Zg=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}),Zg),i=(Yg||(Yg=1,Gg=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}
vendor: 6,938 bytes, line 35
35),Gg),s=e?e.prototype:void 0,o=s?s.valueOf:void 0;return Jg=function(e,s,l,c,u,d,p){switch(l){case"[object DataView]":if(e.byteLength!=s.byteLength||e.byteOffset!=s.byteOffset)return!1;e=e.buffer,s=s.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=s.byteLength||!d(new t(e),new t(s)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+s);case"[object Error]":return e.name==s.name&&e.message==s.message;case"[object RegExp]":case"[object String]":return e==s+"";case"[object Map]":var h=a;case"[object Set]":var m=1&c;if(h||(h=i),e.size!=s.size&&!m)return!1;var f=p.get(e);if(f)return f==s;c|=2,p.set(e,s);var g=r(h(e),h(s),c,u,d,p);return p.delete(e),g;case"[object Symbol]":if(o)return o.call(e)==o.call(s)}return!1},Jg}function Ty(){if(ry)return ny;ry=1;var e=Array.isArray;return ny=e}function Ry(){if(iy)return ay;iy=1;var e=(ty||(ty=1,ey=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}),ey),t=Ty();return ay=function(n,r,a){var i=r(n);return t(n)?i:e(i,a(n))},ay}function Ly(){if(dy)return uy;dy=1;var e=(oy||(oy=1,sy=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}),sy),t=cy?ly:(cy=1,ly=function(){return[]}),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,a=r?function(t){return null==t?[]:(t=Object(t),e(r(t),function(e){return n.call(t,e)}))}:t;return uy=a}function Dy(){if(yy)return gy;yy=1;var e=function(){if(fy)return my;fy=1;var e=Fo(),t=qo();return my=function(n){return t(n)&&"[object Arguments]"==e(n)}}(),t=qo(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!a.call(e,"callee")};return gy=i}var Fy,qy,By,Uy,zy,Hy,Vy,$y,Wy,Qy,Zy,Ky={exports:{}};function Gy(){return By||(By=1,function(e,t){var n=Ro(),r=qy?Fy:(qy=1,Fy=function(){return!1}),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?n.Buffer:void 0,o=(s?s.isBuffer:void 0)||r;e.exports=o}(Ky,Ky.exports)),Ky.exports}function Yy(){if(Vy)return Hy;Vy=1;return Hy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}var Jy,Xy,ex,tx,nx,rx,ax,ix,sx,ox,lx,cx,ux,dx,px,hx,mx,fx,gx,yx,xx,bx,vx,wx,jx,Cx,Nx,kx,Sx,Ex,Ax,Ox,_x,Px,Ix,Mx,Tx,Rx={exports:{}};function Lx(){if(ex)return Xy;ex=1;var e=function(){if(Wy)return $y;Wy=1;var e=Fo(),t=Yy(),n=qo(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,$y=function(a){return n(a)&&t(a.length)&&!!r[e(a)]}}(),t=Zy?Qy:(Zy=1,Qy=function(e){return function(t){return e(t)}}),n=function(){return Jy||(Jy=1,e=Rx,t=Rx.exports,n=To(),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,i=a&&a.exports===r&&n.process,s=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(Fr){}}(),e.exports=s),Rx.exports;var e,t,n,r,a,i,s}(),r=n&&n.isTypedArray,a=r?t(r):e;return Xy=a}function Dx(){if(nx)return tx;nx=1;var e=(hy||(hy=1,py=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}),py),t=Dy(),n=Ty(),r=Gy(),a=function(){if(zy)return Uy;zy=1;var e=/^(?:0|[1-9]\d*)$/;return Uy=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}(),i=Lx(),s=Object.prototype.hasOwnProperty;return tx=function(o,l){var c=n(o),u=!c&&t(o),d=!c&&!u&&r(o),p=!c&&!u&&!d&&i(o),h=c||u||d||p,m=h?e(o.length,String):[],f=m.length;for(var g in o)!l&&!s.call(o,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,f))||m.push(g);return m}}function Fx(){if(lx)return ox;lx=1;var e=(sx?ix:(sx=1,ix=function(e,t){return function(n){return e(t(n))}}))(Object.keys,Object);return ox=e}function qx(){if(ux)return cx;ux=1;var e=function(){if(ax)return rx;ax=1;var e=Object.prototype;return rx=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}(),t=Fx(),n=Object.prototype.hasOwnProperty;return cx=function(r){if(!e(r))return t(r);var a=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&a.push(i);return a},cx}function Bx(){if(mx)return hx;mx=1;var e=Dx(),t=qx(),n=function(){if(px)return dx;px=1;var e=wy(),t=Yy();return dx=function(n){return null!=n&&t(n.length)&&!e(n)}}();return hx=function(r){return n(r)?e(r):t(r)},hx}function Ux(){if(xx)return yx;xx=1;var e=function(){if(gx)return fx;gx=1;var e=Ry(),t=Ly(),n=Bx();return fx=function(r){return e(r,n,t)},fx}(),t=Object.prototype.hasOwnProperty;return yx=function(n,r,a,i,s,o){var l=1&a,c=e(n),u=c.length;if(u!=e(r).length&&!l)return!1;for(var d=u;d--;){var p=c[d];if(!(l?p in r:t.call(r,p)))return!1}var h=o.get(n),m=o.get(r);if(h&&m)return h==r&&m==n;var f=!0;o.set(n,r),o.set(r,n);for(var g=l;++d<u;){var y=n[p=c[d]],x=r[p];if(i)var b=l?i(x,y,p,r,n,o):i(y,x,p,n,r,o);if(!(void 0===b?y===x||s(y,x,a,i,o):b)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var v=n.constructor,w=r.constructor;v==w||!("constructor"in n)||!("constructor"in r)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(f=!1)}return o.delete(n),o.delete(r),f},yx}function zx(){if(Ax)return Ex;Ax=1;var e=function(){if(vx)return bx;vx=1;var e=Ny()(Ro(),"DataView");return bx=e}(),t=ky(),n=function(){if(jx)return wx;jx=1;var e=Ny()(Ro(),"Promise");return wx=e}(),r=function(){if(Nx)return Cx;Nx=1;var e=Ny()(Ro(),"Set");return Cx=e}(),a=function(){if(Sx)return kx;Sx=1;var e=Ny()(Ro(),"WeakMap");return kx=e}(),i=Fo(),s=Cy(),o="[object Map]",l="[object Promise]",c="[object Set]",u="[object WeakMap]",d="[object DataView]",p=s(e),h=s(t),m=s(n),f=s(r),g=s(a),y=i;return(e&&y(new e(new ArrayBuffer(1)))!=d||t&&y(new t)!=o||n&&y(n.resolve())!=l||r&&y(new r)!=c||a&&y(new a)!=u)&&(y=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case p:return d;case h:return o;case m:return l;case f:return c;case g:return u}return t}),Ex=y}function Hx(){if(Ix)return Px;Ix=1;var e=function(){if(_x)return Ox;_x=1;var e=_y(),t=Iy(),n=My(),r=Ux(),a=zx(),i=Ty(),s=Gy(),o=Lx(),l="[object Arguments]",c="[object Array]",u="[object Object]",d=Object.prototype.hasOwnProperty;return Ox=function(p,h,m,f,g,y){var x=i(p),b=i(h),v=x?c:a(p),w=b?c:a(h),j=(v=v==l?u:v)==u,C=(w=w==l?u:w)==u,N=v==w;if(N&&s(p)){if(!s(h))return!1;x=!0,j=!1}if(N&&!j)return y||(y=new e),x||o(p)?t(p,h,m,f,g,y):n(p,h,v,m,f,g,y);if(!(1&m)){var k=j&&d.call(p,"__wrapped__"),S=C&&d.call(h,"__wrapped__");
vendor: 34,545 bytes, line 35
35if(k||S){var E=k?p.value():p,A=S?h.value():h;return y||(y=new e),g(E,A,m,f,y)}}return!!N&&(y||(y=new e),r(p,h,m,f,g,y))},Ox}(),t=qo();return Px=function n(r,a,i,s,o){return r===a||(null==r||null==a||!t(r)&&!t(a)?r!=r&&a!=a:e(r,a,i,s,n,o))},Px}function Vx(){if(Tx)return Mx;Tx=1;var e=Hx();return Mx=function(t,n){return e(t,n)}}var $x,Wx,Qx,Zx={exports:{}};function Kx(){return $x?Zx.exports:($x=1,"undefined"!=typeof self&&self,e=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),a=n(18),i=n(19),s=n(45),o=n(46),l=n(47),c=n(48),u=n(49),d=n(12),p=n(32),h=n(33),m=n(31),f=n(1),g={Scope:f.Scope,create:f.create,find:f.find,query:f.query,register:f.register,Container:r.default,Format:a.default,Leaf:i.default,Embed:c.default,Scroll:s.default,Block:l.default,Inline:o.default,Text:u.default,Attributor:{Attribute:d.default,Class:p.default,Style:h.default,Store:m.default}};t.default=g},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=a;var i,s={},o={},l={},c={};function u(e,t){var n;if(void 0===t&&(t=i.ANY),"string"==typeof e)n=c[e]||s[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&i.LEVEL&i.BLOCK?n=c.block:e&i.LEVEL&i.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var a in r)if(n=o[r[a]])break;n=n||l[e.tagName]}return null==n?null:t&i.LEVEL&n.scope&&t&i.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(i=t.Scope||(t.Scope={})),t.create=function(e,t){var n=u(e);if(null==n)throw new a("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=u,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new a("Invalid definition");if("abstract"===r.blotName)throw new a("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?s[r.keyName]=r:(null!=r.className&&(o[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){null!=l[e]&&null!=r.className||(l[e]=r)}))),r}},function(e,t,n){var r=n(51),a=n(11),i=n(3),s=n(20),o=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(a(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+s.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+s.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=s.iterator(this.ops),a=0;a<t&&r.hasNext();){var i;a<e?i=r.next(e-a):(i=r.next(t-a),n.push(i)),a+=s.length(i)}return new l(n)},l.prototype.compose=function(e){var t=s.iterator(this.ops),n=s.iterator(e.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var o=i.retain;"insert"===t.peekType()&&t.peekLength()<=o;)o-=t.peekLength(),r.push(t.next());i.retain-o>0&&n.next(i.retain-o)}for(var c=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===t.peekType())c.push(t.next());else{var u=Math.min(t.peekLength(),n.peekLength()),d=t.next(u),p=n.next(u);if("number"==typeof p.retain){var h={};"number"==typeof d.retain?h.retain=u:h.insert=d.insert;var m=s.attributes.compose(d.attributes,p.attributes,"number"==typeof d.retain);if(m&&(h.attributes=m),c.push(h),!n.hasNext()&&a(c.ops[c.ops.length-1],h)){var f=new l(t.rest());return c.concat(f).chop()}}else"number"==typeof p.delete&&"number"==typeof d.retain&&c.push(p)}return c.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:o;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),i=new l,c=r(n[0],n[1],t),u=s.iterator(this.ops),d=s.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),t);var o=u.next(n),l=d.next(n);a(o.insert,l.insert)?i.retain(n,s.attributes.diff(o.attributes,l.attributes)):i.push(l).delete(n)}t-=n}}),i.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=s.iterator(this.ops),r=new l,a=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),o=s.length(i)-n.peekLength(),c="string"==typeof i.insert?i.insert.indexOf(t,o)-o:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},a))return;a+=1,r=new l}}r.length()>0&&e(r,{},a)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=s.iterator(this.ops),r=s.iterator(e.ops),a=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())a.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),o=n.next(i),c=r.next(i);if(o.delete)continue;c.delete?a.push(c):a.retain(i,s.attributes.transform(o.attributes,c.attributes,t))}else a.retain(s.length(n.next()));return a.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var a=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<e||!t)&&(e+=a),r+=a):e-=Math.min(a,e-r)}return e},e.exports=l},function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},o=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,a=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,r,a,i,u,d=arguments[0],p=1,h=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(a=c(t,n))&&(m&&a&&(o(a)||(i=s(a)))?(i?(i=!1,u=r&&s(r)?r:[]):u=r&&o(r)?r:{},l(d,{name:n,newValue:e(m,u,a)})):void 0!==a&&l(d,{name:n,newValue:a}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=d(n(3)),s=d(n(2)),o=d(n(0)),l=d(n(16)),c=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),r(t,[{key:"attach",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new o.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=o.default.query(e,o.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=o.default.create(g.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(o.default.Embed);f.scope=o.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){p(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return m(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(o.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),y(t))},new s.default).insert("\n",y(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,i){n<=0||(o.default.query(r,o.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,i):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,i),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var i=n.split("\n"),s=i.shift();s.length>0&&(e<this.length()-1||null==this.children.tail?a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var o=this;i.reduce(function(e,t){return(o=o.split(e,!0)).insertAt(0,t),t.length},e+s.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof l.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(o.default.Block);function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:y(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,o.default.Embed,u.default],t.bubbleFormats=y,t.BlockEmbed=f,t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var s=g(n(2)),o=g(n(14)),l=g(n(8)),c=g(n(9)),u=g(n(0)),d=n(15),p=g(d),h=g(n(3)),m=g(n(10)),f=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,m.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=v(t,r),this.container=this.options.container,null==this.container)return x.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var a=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,a=r&&0===r.length?r.index:void 0;w.call(n,function(){return n.editor.update(null,t,a)},e)});var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+a+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),m.default.level(e)}},{key:"find",value:function(e){return e.__quill||u.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&x.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var a=e.attrName||e.blotName;"string"==typeof a?this.register("formats/"+a,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||x.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?u.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,i=j(e,t,n),s=a(i,4);return e=s[0],t=s[1],n=s[3],w.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,function(){var r=n.getSelection(!0),a=new s.default;if(null==r)return a;if(u.default.query(e,u.default.Scope.BLOCK))a=n.editor.formatLine(r.index,r.length,y({},e,t));else{if(0===r.length)return n.selection.format(e,t),a;a=n.editor.formatText(r.index,r.length,y({},e,t))}return n.setSelection(r,l.default.sources.SILENT),a},r)}},{key:"formatLine",value:function(e,t,n,r,i){var s,o=this,l=j(e,t,n,r,i),c=a(l,4);return e=c[0],t=c[1],s=c[2],i=c[3],w.call(this,function(){return o.editor.formatLine(e,t,s)},i,e,0)}},{key:"formatText",value:function(e,t,n,r,i){var s,o=this,l=j(e,t,n,r,i),c=a(l,4);return e=c[0],t=c[1],s=c[2],i=c[3],w.call(this,function(){return o.editor.formatText(e,t,s)},i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=j(e,t),r=a(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=j(e,t),r=a(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var a=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return w.call(this,function(){return a.editor.insertEmbed(t,n,r)},i,t)}},{key:"insertText",value:function(e,t,n,r,i){var s,o=this,l=j(e,0,n,r,i),c=a(l,4);return e=c[0],s=c[2],i=c[3],w.call(this,function(){return o.editor.insertText(e,t,s)},i,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,i=j(e,t,n),s=a(i,4);return e=s[0],t=s[1],n=s[3],w.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,function(){e=new s.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),a=t.editor.applyDelta(e),i=a.ops[a.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),a.delete(1)),r.compose(a)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=j(t,n,r),s=a(i,4);t=s[0],n=s[1],r=s[3],this.selection.setRange(new d.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,function(){return e=new s.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function v(e,t){if((t=(0,h.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=f.default;var n=(0,h.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=b.import("modules/"+t);return null==n?x.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,h.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function w(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new s.default;var a=null==n?null:this.getSelection(),i=this.editor.delta,o=e();if(null!=a&&(!0===n&&(n=a.index),null==r?a=C(a,o,t):0!==r&&(a=C(a,n,r,t)),this.setSelection(a,l.default.sources.SILENT)),o.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,o,i,t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,d)}return o}function j(e,t,n,a,i){var s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=a,a=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=a,a=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(s=n,i=a):"string"==typeof n&&(null!=a?s[n]=a:i=n),[e,t,s,i=i||l.default.sources.API]}function C(e,t,n,r){if(null==e)return null;var i=void 0,o=void 0;if(t instanceof s.default){var c=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==l.default.sources.USER)}),u=a(c,2);i=u[0],o=u[1]}else{var p=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===l.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),h=a(p,2);i=h[0],o=h[1]}return new d.Range(i,o-i)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:s.default,parchment:u.default,"core/module":c.default,"core/theme":f.default},t.expandConfig=v,t.overload=j,t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=o(n(7)),s=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,i){if(t.compare(this.statics.blotName,r)<0&&s.default.query(r,s.default.Scope.BLOT)){var o=this.isolate(e,n);i&&o.wrap(r,i)}else a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i)}},{key:"optimize",value:function(e){if(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),a=t.order.indexOf(n);return r>=0||a>=0?r-a:e===n?0:e<n?-1:1}}]),t}(s.default.Inline);l.allowedChildren=[l,s.default.Embed,i.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=a)&&r.__esModule?r:{default:r}).default.Text);t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=s(n(54));function s(e){return e&&e.__esModule?e:{default:e}}var o=(0,s(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)})})});var l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",o.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){o.log.apply(o,arguments),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,a=t.handler;(e.target===r||r.contains(e.target))&&a.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(i.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],a="warn";function i(e){if(r.indexOf(e)<=r.indexOf(a)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];(t=console)[e].apply(t,i)}}function s(e){return r.reduce(function(t,n){return t[n]=i.bind(console,n,e),t},{})}i.level=s.level=function(e){a=e},t.default=s},function(e,t,n){var r=Array.prototype.slice,a=n(52),i=n(53),s=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var c,u;if(o(e)||o(t))return!1;if(e.prototype!==t.prototype)return!1;
vendor: 5,365 bytes, line 35
35if(i(e))return!!i(t)&&(e=r.call(e),t=r.call(t),s(e,t,n));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var d=a(e),p=a(t)}catch(Fr){return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),c=d.length-1;c>=0;c--)if(d[c]!=p[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!s(e[u],t[u],n))return!1;return typeof e==typeof t}(e,t,n))};function o(e){return null==e}function l(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var a=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|a:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=d(n(2)),o=d(n(0)),l=d(n(4)),c=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),t}(c.default);f.blotName="code",f.tagName="CODE";var g=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),a(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new s.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var a=this.descendant(u.default,this.length()-1),s=r(a,1)[0];null!=s&&s.deleteAt(s.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,a){if(0!==n&&null!=o.default.query(r,o.default.Scope.BLOCK)&&(r!==this.statics.blotName||a!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var s=this.newlineIndex(e,!0)+1,l=i-s+1,c=this.isolate(s,l),u=c.next;c.format(r,a),u instanceof t&&u.formatAt(0,e-s+n-l,r,a)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var a=this.descendant(u.default,e),i=r(a,2),s=i[0],o=i[1];s.insertAt(o,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(o.default.create("text","\n")),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEac
vendor: 10,261 bytes, line 35
35h(function(e){var t=o.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof o.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",t.Code=f,t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=y(n(2)),o=y(n(20)),l=y(n(0)),c=y(n(13)),u=y(n(24)),d=n(4),p=y(d),h=y(n(16)),m=y(n(21)),f=y(n(11)),g=y(n(3));function y(e){return e&&e.__esModule?e:{default:e}}var x=/^[ -~]*$/,b=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),e=function(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,m.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,m.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new s.default)}(e),e.reduce(function(e,s){var c=s.retain||s.delete||s.insert.length||1,u=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var h=s.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),e>=i&&!h.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,h);var m=t.scroll.line(e),f=a(m,2),y=f[0],x=f[1],b=(0,g.default)({},(0,d.bubbleFormats)(y));if(y instanceof p.default){var v=y.descendant(l.default.Leaf,x),w=a(v,1)[0];b=(0,g.default)(b,(0,d.bubbleFormats)(w))}u=o.default.attributes.diff(b,u)||{}}else if("object"===r(s.insert)){var j=Object.keys(s.insert)[0];if(null==j)return e;t.scroll.insertAt(e,j,s.insert[j])}i+=c}return Object.keys(u).forEach(function(n){t.scroll.formatAt(e,c,n,u[n])}),e+c},0),e.reduce(function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new s.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(a){if(null==n.scroll.whitelist||n.scroll.whitelist[a]){var i=n.scroll.lines(e,Math.max(t,1)),s=t;i.forEach(function(t){var i=t.length();if(t instanceof c.default){var o=e-t.offset(n.scroll),l=t.newlineIndex(o+s)-o+1;t.formatAt(o,l,a,r[a])}else t.format(a,r[a]);s-=i})}}),this.scroll.optimize(),this.update((new s.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(a){n.scroll.formatAt(e,t,a,r[a])}),this.update((new s.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new s.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=a(e,1)[0];t instanceof p.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var i=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=v((0,d.bubbleFormats)(n),t)}return t});return g.default.apply(g.default,i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new s.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(a){n.scroll.formatAt(e,t.length,a,r[a])}),this.update((new s.default).retain(e).insert(t,(0,m.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&!(e.children.length>1)&&e.children.head instanceof h.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),i=a(r,2),o=i[0],l=i[1],u=0,d=new s.default;null!=o&&(u=o instanceof c.default?o.newlineIndex(l)-l+1:o.length()-l,d=o.delta().slice(l,l+u-1).insert("\n"));var p=this.getContents(e,t+u).diff((new s.default).insert(n).concat(d)),h=(new s.default).retain(e).concat(p);return this.applyDelta(h)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(x)&&l.default.find(t[0].target)){var a=l.default.find(t[0].target),i=(0,d.bubbleFormats)(a),o=a.offset(this.scroll),c=t[0].oldValue.replace(u.default.CONTENTS,""),p=(new s.default).insert(c),h=(new s.default).insert(a.value());e=(new s.default).retain(o).concat(p.diff(h,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)},new s.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,f.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function v(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=c(n(0)),s=c(n(21)),o=c(n(11)),l=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,c(n(10)).default)("quill:selection"),h=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},m=function(){function e(t,n){var r=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,a=n.startNode,i=n.startOffset,s=n.endNode,o=n.endOffset;r.setNativeRange(a,i,s,o)}}),this.update(l.default.sources.SILENT)}return a(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update(
vendor: 5,102 bytes, line 35
35);var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var a=r.split(n.start.offset);r.parent.insertBefore(this.cursor,a)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var a=void 0,i=this.scroll.leaf(e),s=r(i,2),o=s[0],l=s[1];if(null==o)return null;var c=o.position(l,!0),u=r(c,2);a=u[0],l=u[1];var d=document.createRange();if(t>0){d.setStart(a,l);var p=this.scroll.leaf(e+t),h=r(p,2);if(o=h[0],l=h[1],null==o)return null;var m=o.position(l,!0),f=r(m,2);return a=f[0],l=f[1],d.setEnd(a,l),d.getBoundingClientRect()}var g="left",y=void 0;return a instanceof Text?(l<a.data.length?(d.setStart(a,l),d.setEnd(a,l+1)):(d.setStart(a,l-1),d.setEnd(a,l),g="right"),y=d.getBoundingClientRect()):(y=o.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:y.top+y.height,height:y.height,left:y[g],right:y[g],top:y.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var a=n.map(function(e){var n=r(e,2),a=n[0],s=n[1],o=i.default.find(a,!0),l=o.offset(t.scroll);return 0===s?l:o instanceof i.default.Container?l+o.length():l+o.index(a,s)}),s=Math.min(Math.max.apply(Math,u(a)),this.scroll.length()-1),o=Math.min.apply(Math,[s].concat(u(a)));return new h(o,s-o)}},{key:"normalizeNative",value:function(e){if(!f(this.root,e.startContainer)||!e.collapsed&&!f(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],a=[],i=this.scroll.length();return n.forEach(function(e,n){e=Math.min(i-1,e);var s,o=t.scroll.leaf(e),l=r(o,2),c=l[0],u=l[1],d=c.position(u,0!==n),p=r(d,2);s=p[0],u=p[1],a.push(s,u)}),a.length<2&&(a=a.concat(a)),a}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var a=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,a)),s=r(i,1)[0],o=s;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,a));o=r(l,1)[0]}if(null!=s&&null!=o){var c=e.getBoundingClientRect();n.top<c.top?e.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(e.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||a||e!==s.startContainer||t!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var o=document.createRange();o.setStart(e,t),o.setEnd(n,r),i.removeAllRanges(),i.addRange(o)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,u(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),a=r(n,2),i=a[0],c=a[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,o.default)(t,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore(
vendor: 24,646 bytes, line 35
35);var d,p=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(t),e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,p)}}}]),e}();function f(e,t){try{t.parentNode}catch(Fr){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=h,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(0),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"insertInto",value:function(e,n){0===e.children.length?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default.Embed);o.blotName="break",o.tagName="BR",t.default=o},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(44),i=n(30),s=n(1),o=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return r(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=l(t);e.insertBefore(n,e.children.head||void 0)}catch(r){if(r instanceof s.ParchmentError)return;throw r}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),a=r[0],i=r[1];return null==e.blotName&&e(a)||null!=e.blotName&&a instanceof e?[a,i]:a instanceof t?a.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var a=[],i=r;return this.children.forEachAt(n,r,function(n,r,s){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&a.push(n),n instanceof t&&(a=a.concat(n.descendants(e,r,i))),i-=s}),a},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,a){e.formatAt(t,a,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),a=r[0],i=r[1];if(a)a.insertAt(i,t,n);else{var o=null==n?s.create("text",t):s.create(t,n);this.appendChild(o)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new s.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),a=r[0],i=r[1],s=[[this,e]];return a instanceof t?s.concat(a.path(i,n)):(null!=a&&s.push([a,i]),s)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,a){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],a=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),a.push.apply(a,e.removedNodes))}),a.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=s.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=s.find(e.nextSibling));var r=l(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(i.default);function l(e){var t=s.find(e);if(null==t)try{t=s.create(e)}catch(Fr){t=s.create(s.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=o},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),i=n(31),s=n(17),o=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new i.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=o.query(e);n instanceof a.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var a=e.prototype.wrap.call(this,n,r);return a instanceof t&&a.statics.scope===this.statics.scope&&this.attributes.move(a),a},t}(s.default);t.default=l},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(30),i=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=i.Scope.INLINE_BLOT,t}(a.default);t.default=s},function(e,t,n){var r=n(11),a=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=a(!0,{},t);for(var i in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[i]&&void 0===t[i]&&(r[i]=e[i]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,a){return r(e[a],t[a])||(n[a]=void 0===t[a]?null:t[a]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new s(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function s(e){this.ops=e,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=i.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var a={};return t.attributes&&(a.attributes=t.attributes),"number"==typeof t.retain?a.retain=e:"string"==typeof t.insert?a.insert=t.insert.substr(n,e):a.insert=t.insert,a}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=i},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(Hr){t=function(){}}try{n=Set}catch(Hr){n=function(){}}try{r=Promise}catch(Hr){r=function(){}}function a(i,o,l,c,u){"object"==typeof o&&(l=o.depth,c=o.prototype,u=o.includeNonEnumerable,o=o.circular);var d=[],p=[],h="undefined"!=typeof Buffer;return void 0===o&&(o=!0),void 0===l&&(l=1/0),function i(l,m){if(null===l)return null;if(0===m)return l;var f,g;if("object"!=typeof l)return l;if(e(l,t))f=new t;else if(e(l,n))f=new n;else if(e(l,r))f=new r(function(e,t){l.then(function(t){e(i(t,m-1))},function(e){t(i(e,m-1))})});else if(a.__isArray(l))f=[];else if(a.__isRegExp(l))f=new RegExp(l.source,s(l)),l.lastIndex&&(f.lastIndex=l.lastIndex);else if(a.__isDate(l))f=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(f),f;e(l,Error)?f=Object.create(l):void 0===c?(g=Object.getPrototypeOf(l),f=Object.create(g)):(f=Object.create(c),g=c)}if(o){var y=d.indexOf(l);if(-1!=y)return p[y];d.push(l),p.push(f)}for(var x in e(l,t)&&l.forEach(function(e,t){var n=i(t,m-1),r=i(e,m-1);f.set(n,r)}),e(l,n)&&l.forEach(function(e){var t=i(e,m-1);f.add(t)}),l){var b;g&&(b=Object.getOwnPropertyDescriptor(g,x)),b&&null==b.set||(f[x]=i(l[x],m-1))}if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(l);for(x=0;x<v.length;x++){var w=v[x];(!(C=Object.getOwnPropertyDescriptor(l,w))||C.enumerable||u)&&(f[w]=i(l[w],m-1),C.enumerable||Object.defineProperty(f,w,{enumerable:!1}))}}if(u){var j=Object.getOwnPropertyNames(l);for(x=0;x<j.length;x++){var C,N=j[x];(C=Object.getOwnPropertyDescriptor(l,N))&&C.enumerable||(f[N]=i(l[N],m-1),Object.defineProperty(f,N,{enumerable:!1}))}}return f}(i,l)}function i(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return a.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},a.__objToStr=i,a.__isDate=function(e){return"object"==typeof e&&"[object Date]"===i(e)},a.__isArray=function(e){return"object"==typeof e&&"[object Array]"===i(e)},a.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===i(e)},a.__getRegExpFlags=s,a}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=h(n(0)),o=h(n(8)),l=n(4),c=h(l),u=h(n(16)),d=h(n(13)),p=h(n(25));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){return e instanceof c.default||e instanceof l.BlockEmbed}var f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var a=this.line(e),s=r(a,2),o=s[0],c=s[1],p=this.line(e+n),h=r(p,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=h&&o!==h&&c>0){if(o instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(o instanceof d.default){var m=o.newlineIndex(o.length(),!0);if(m>-1&&(o=o.split(m+1))===h)return void this.optimize()}else if(h instanceof d.default){var f=h.newlineIndex(0);f>-1&&h.split(f+1)}var g=h.children.head instanceof u.default?null:h.children.head;o.moveChildren(h,g),o.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,a){(null==this.whitelist||this.whitelist[r])&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,a),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==s.default.query(n,s.default.Scope.BLOCK)){var a=s.default.create(this.statics.defaultChild);this.appendChild(a),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),a.insertAt(0,n,r)}else{var o=s.default.create(n,r);this.appendChild(o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===s.default.Scope.INLINE_BLOT){var r=s.default.create(this.statics.defaultChild);r.appendChild(e),e=r}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(m,e)}},{key:"lines",value:function(){return function e(t,n,r){var a=[],i=r;return t.children.forEachAt(n,r,function(t,n,r){m(t)?a.push(t):t instanceof s.default.Container&&(a=a.concat(e(t,n,i))),i-=r}),a}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=o.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,n,e)}}}]),t}(s.default.Scroll);f.blotName="scroll",f.className="ql-editor",f.tagName="DIV",f.defaultChild="block",f.allowedChildren=[c.default,l.BlockEmbed,p.default],t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=f(n(21)),o=f(n(11)),l=f(n(3)),c=f(n(2)),u=f(n(20)),d=f(n(0)),p=f(n(5)),h=f(n(10)),m=f(n(9));function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,h.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},N),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0},j)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},j)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},C),r.addBinding({key:t.keys.DELETE},{collapsed:!1},C),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"match",value:function(e,t){return t=E(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),i(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=E(e);if(null==r||null==r.key)return y.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,s=(e.bindings[i]||[]).filter(function(e){return t.match(n,e)});if(0!==s.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var c=e.quill.getLine(l.index),u=a(c,2),p=u[0],h=u[1],m=e.quill.getLeaf(l.index),f=a(m,2),g=f[0],y=f[1],x=0===l.length?[g,y]:e.quill.getLeaf(l.index+l.length),b=a(x,2),v=b[0],w=b[1],j=g instanceof d.default.Text?g.value().slice(0,y):"",C=v instanceof d.default.Text?v.value().slice(w):"",N={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:h,prefix:j,suffix:C};s.some(function(t){if(null!=t.collapsed&&t.collapsed!==N.collapsed)return!1;if(null!=t.empty&&t.empty!==N.empty)return!1;if(null!=t.offset&&t.offset!==N.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==N.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=N.format[e]:!1===t.format[e]?null==N.format[e]:(0,o.default)(t.format[e],N.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(N.prefix)||null!=t.suffix&&!t.suffix.test(N.suffix)||!0===t.handler.call(e,l,N))})&&n.preventDefault()}}}})}}]),t}(m.default);function v(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(a(i,1)[0]instanceof d.default.Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),1))}),n}function w(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=a(n,1)[0],i={};if(0===t.offset){var s=this.quill.getLine(e.index-1),o=a(s,1)[0];if(null!=o&&o.length()>1){var l=r.formats(),c=this.quill.getFormat(e.index-1,1);i=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,p.default.sources.USER),this.quill.focus()}}function j(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>
vendor: 5,159 bytes, line 35
35=this.quill.getLength()-n)){var r={},i=0,s=this.quill.getLine(e.index),o=a(s,1)[0];if(t.offset>=o.length()-1){var l=this.quill.getLine(e.index+1),c=a(l,1)[0];if(c){var d=o.formats(),h=this.quill.getFormat(e.index,1);r=u.default.attributes.diff(d,h)||{},i=c.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+i-1,n,r,p.default.sources.USER)}}function C(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),a=t[t.length-1].formats();n=u.default.attributes.diff(a,r)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function N(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))})}function k(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),r=t.index,i=t.length,s=this.quill.scroll.descendant(n,r),o=a(s,2),l=o[0],c=o[1];if(null!=l){var u=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,m=l.newlineIndex(u+c+i),f=l.domNode.textContent.slice(h,m).split("\n");c=0,f.forEach(function(t,a){e?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===a?r+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===a?r-=n.TAB.length:i-=n.TAB.length),c+=t.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(r,i,p.default.sources.SILENT)}}}}function S(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function E(e){if("string"==typeof e||"number"==typeof e)return E({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,s.default)(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new c.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=a(t,2),r=n[0],i=n[1],s=(0,l.default)({},r.formats(),{list:"checked"}),o=(new c.default).retain(e.index).insert("\n",s).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=a(n,2),i=r[0],s=r[1],o=(new c.default).retain(e.index).insert("\n",t.format).retain(i.length()-s-1).retain(1,{header:null});this.quill.updateContents(o,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),i=a(r,2),s=i[0],o=i[1];if(o>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;
vendor: 4,546 bytes, line 35
35case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(e.index-o).delete(n+1).retain(s.length()-2-o).retain(1,{list:l});this.quill.updateContents(u,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=a(t,2),r=n[0],i=n[1],s=(new c.default).retain(e.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,p.default.sources.USER)}},"embed left":v(b.keys.LEFT,!1),"embed left shift":v(b.keys.LEFT,!0),"embed right":v(b.keys.RIGHT,!1),"embed right shift":v(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=l(n(0)),o=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,i=0;null!=r&&r.statics.scope!==s.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),a=void 0,i=void 0,l=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var c=[e,n.start.offset,n.end.offset];a=c[0],i=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof o.default?(a=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,l].map(function(e){return Math.max(0,Math.min(a.data.length,e-1))}),p=r(d,2);
vendor: 9,886 bytes, line 35
35return i=p[0],l=p[1],{startNode:a,startOffset:i,endNode:a,endOffset:l}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(s.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(0)),a=n(4),i=s(a);function s(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);o.allowedChildren=[i.default,a.BlockEmbed,o],t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(0),o=(r=s)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"value",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):n}}]),t}(o.default.Attributor.Style),c=new o.default.Attributor.Class("color","ql-color",{scope:o.default.Scope.INLINE}),u=new l("color","color",{scope:o.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=c,t.ColorStyle=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}o.blotName="link",o.tagName="A",o.SANITIZED_URL="about:blank",o.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=o,t.sanitize=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(23)),s=o(n(107));function o(e){return e&&e.__esModule?e:{default:e}}var l=0;function c(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var u=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return a(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=s.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var a=document.createEvent("Event");a.initEvent("change",!0,!0),this.select.dispatchEvent(a)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=u}
vendor: 4,183 bytes, line 35
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(0)),a=y(n(5)),i=n(4),s=y(i),o=y(n(16)),l=y(n(25)),c=y(n(24)),u=y(n(35)),d=y(n(6)),p=y(n(22)),h=y(n(7)),m=y(n(55)),f=y(n(42)),g=y(n(23));function y(e){return e&&e.__esModule?e:{default:e}}a.default.register({"blots/block":s.default,"blots/block/embed":i.BlockEmbed,"blots/break":o.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":p.default,"blots/text":h.default,"modules/clipboard":m.default,"modules/history":f.default,"modules/keyboard":g.default}),r.default.register(s.default,o.default,c.default,d.default,p.default,h.default),t.default=a.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,a){var i=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&a)i.wrap(n,a);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);i.wrap(s),s.format(n,a)}},e.prototype.insertAt=function(e,t,n){var a=null==n?r.create("text",t):r.create(t,n),i=this.split(e);this.parent.insertBefore(a,i)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),a=n(32),i=n(33),s=n(1),o=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=a.default.keys(this.domNode),o=i.default.keys(this.domNode);t.concat(n).concat(o).forEach(function(t){var n=s.query(t,s.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;
35Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=o},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function a(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){a(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(a(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=i},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function a(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[a(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[a(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[a(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();a.DEFAULTS={modules:{}},a.themes={default:a},t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=o(n(0)),s=o(n(7));
vendor: 5,178 bytes, line 35
35function o(e){return e&&e.__esModule?e:{default:e}}var l="\ufeff",c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(l).join("");if(e===this.leftGuard)if(this.prev instanceof s.default){var a=this.prev.length();this.prev.insertAt(a,r),t={startNode:this.prev.domNode,startOffset:a+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=l,t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(i.default.Embed);t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},o=new i.default.Attributor.Attribute("align","align",s),l=new i.default.Attributor.Class("align","ql-align",s),c=new i.default.Attributor.Style("align","text-align",s);t.AlignAttribute=o,t.AlignClass=l,t.AlignStyle=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s=n(26),o=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),l=new s.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});t.BackgroundClass=o,t.BackgroundStyle=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},o=new i.default.Attributor.Attribute("direction","dir",s),l=new i.default.Attributor.Class("direction","ql-direction",s),c=new i.default.Attributor.Style("direction","direction",s);t.DirectionAttribute=o,t.DirectionClass=l,t.DirectionStyle=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(0),o=(r=s)&&r.__esModule?r:{default:r},l={scope:o.default.Scope.INLINE,whitelist:["serif","monospace"]},c=new o.default.Attributor.Class("font","ql-font",l),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"value",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(o.default.Attributor.Style),d=new u("font","font-family",l);t.FontStyle=d,t.FontClass=c}
vendor: 10,002 bytes, line 35
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),o=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=s,t.SizeStyle=o},function(e,t,n){e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(0)),i=s(n(5));function s(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,function(e,t,n,a){e!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&a!==i.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],i.default.sources.USER),this.ignoreChange=!1;var r=l(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var a=this.stack.undo.pop();n=n.compose(a.undo),e=a.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(s(n(9)).default);function l(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=a.default.query(e,a.default.Scope.BLOCK)}))}(e)&&(n-=1),n}o.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=o,t.getLastChangeIndex=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=m(n(3)),s=m(n(2)),o=m(n(8)),l=m(n(23)),c=m(n(34)),u=m(n(59)),d=m(n(60)),p=m(n(28)),h=m(n(61));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var x=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],v=[!1,"serif","monospace"],w=["1","2","3",!1],j=["small",!1,"large","huge"],C=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return y(t,e),r(t,[{key:"addModule",value:function(e){var n=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&k(e,x),new d.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&k(e,b,"background"===n?"#ffffff":"#000000"),new u.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?k(e,v):e.classList.contains("ql-header")?k(e,w):e.classList.contains("ql-size")&&k(e,j)),new p.default(e)}),this.quill.on(o.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(c.default);C.DEFAULTS=(0,i.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new s.default).retain(r.index).delete(r.length).insert({image:n.target.result}),o.default.sources.USER),e.quill.setSelection(r.index+1,o.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var N=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return y(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){l.default.match(t,"enter")?(e.save(),t.preventDefault()):l.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,o.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",
vendor: 4,454 bytes, line 35
35n,o.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var a=this.quill.getSelection(!0);if(null!=a){var i=a.index+a.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,o.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",o.default.sources.USER),this.quill.setSelection(i+2,o.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(h.default);function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=N,t.default=C},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var a=n.length();if(e<a||t&&e===a&&(null==n.next||0!==n.next.length()))return[n,e];e-=a}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,a=this.find(e),i=a[0],s=e-a[1],o=this.iterator(i);(r=o())&&s<e+t;){var l=r.length();e>s?n(r,e-s,Math.min(t,s+l-e)):n(r,0,Math.min(l,e+t-s)),s+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),i=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},o=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,s),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,a){this.update(),e.prototype.formatAt.call(this,t,n,r,a)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var s=[].slice.call(this.observer.takeRecords());s.length>0;)t.push(s.pop());for(var o=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[i.DATA_KEY].mutations&&(e.domNode[i.DATA_KEY].mutations=[]),t&&o(e.parent))},l=function(e){null!=e.domNode[i.DATA_KEY]&&null!=e.domNode[i.DATA_KEY].mutations&&(e instanceof a.default&&e.children.forEac
vendor: 16,405 bytes, line 35
35h(l),e.optimize(n))},c=t,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=i.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(o(i.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=i.find(e,!1);o(t,!1),t instanceof a.default&&t.children.forEach(function(e){o(e,!1)})})):"attributes"===e.type&&o(t.prev)),o(t))}),this.children.forEach(l),s=(c=[].slice.call(this.observer.takeRecords())).slice();s.length>0;)t.push(s.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=i.find(e.target,!0);return null==t?null:null==t.domNode[i.DATA_KEY].mutations?(t.domNode[i.DATA_KEY].mutations=[e],t):(t.domNode[i.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[i.DATA_KEY]&&e.update(e.domNode[i.DATA_KEY].mutations||[],n)}),null!=this.domNode[i.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=i.Scope.BLOCK_BLOT,t.tagName="DIV",t}(a.default);t.default=o},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),i=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof a.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,a){null!=this.formats()[r]||i.query(r,i.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,a):e.prototype.formatAt.call(this,t,n,r,a)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var a=this.next;a instanceof t&&a.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,a.formats())&&(a.moveChildren(this),a.remove())},t.blotName="inline",t.scope=i.Scope.INLINE_BLOT,t.tagName="SPAN",t}(a.default);t.default=s},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),i=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=i.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,a){null!=i.query(r,i.Scope.BLOCK)?this.format(r,a):e.prototype.formatAt.call(this,t,n,r,a)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var a=this.split(t),s=i.create(n,r);a.parent.insertBefore(s,a)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=i.Scope.BLOCK_BLOT,t.tagName="P",t}(a.default);t.default=s},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,a){0===t&&n===this.length()?this.format(r,a):e.prototype.formatAt.call(this,t,n,r,a)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=a},function(e,t,n){var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(19),i=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=i.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=i.Scope.INLINE_BLOT,t}(a.default);t.default=s},function(e,t,n){var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:a.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,a=arguments[1],i=0;i<r;i++)if(t=n[i],e.call(a,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){var n=-1;function r(e,t,l){if(e==t)return e?[[0,e]]:[];(l<0||e.length<l)&&(l=null);var u=i(e,t),d=e.substring(0,u);u=s(e=e.substring(u),t=t.substring(u));var p=e.substring(e.length-u),h=function(e,t){var o;if(!e)return[[1,t]];if(!t)return[[n,e]];var l=e.length>t.length?e:t,c=e.length>t.length?t:e,u=l.indexOf(c);if(-1!=u)return o=[[1,l.substring(0,u)],[0,c],[1,l.substring(u+c.length)]],e.length>t.length&&(o[0][0]=o[2][0]=n),o;if(1==c.length)return[[n,e],[1,t]];var d=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function a(e,t,n){for(var r,a,o,l,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var p=i(e.substring(n),t.substring(u)),h=s(e.substring(0,n),t.substring(0,u));d.length<h+p&&(d=t.substring(u-h,u)+t.substring(u,u+p),r=e.substring(0,n-h),a=e.substring(n+p),o=t.substring(0,u-h),l=t.substring(u+p))}return 2*d.length>=e.length?[r,a,o,l,d]:null}var o,l,c,u,d,p=a(n,r,Math.ceil(n.length/4)),h=a(n,r,Math.ceil(n.length/2));if(!p&&!h)return null;o=h?p&&p[4].length>h[4].length?p:h:p,e.length>t.length?(l=o[0],c=o[1],u=o[2],d=o[3]):(u=o[0],d=o[1],l=o[2],c=o[3]);var m=o[4];return[l,c,u,d,m]}(e,t);if(d){var p=d[0],h=d[1],m=d[2],f=d[3],g=d[4],y=r(p,m),x=r(h,f);return y.concat([[0,g]],x)}return function(e,t){for(var r=e.length,i=t.length,s=Math.ceil((r+i)/2),o=s,l=2*s,c=new Array(l),u=new Array(l),d=0;d<l;d++)c[d]=-1,u[d]=-1;c[o+1]=0,u[o+1]=0;for(var p=r-i,h=p%2!=0,m=0,f=0,g=0,y=0,x=0;x<s;x++){for(var b=-x+m;b<=x-f;b+=2){for(var v=o+b,w=(S=b==-x||b!=x&&c[v-1]<c[v+1]?c[v+1]:c[v-1]+1)-b;S<r&&w<i&&e.charAt(S)==t.charAt(w);)S++,w++;if(c[v]=S,S>r)f+=2;else if(w>i)m+=2;else if(h&&(N=o+p-b)>=0&&N<l&&-1!=u[N]&&S>=(C=r-u[N]))return a(e,t,S,w)}for(var j=-x+g;j<=x-y;j+=2){for(var C,N=o+j,k=(C=j==-x||j!=x&&u[N-1]<u[N+1]?u[N+1]:u[N-1]+1)-j;C<r&&k<i&&e.charAt(r-C-1)==t.charAt(i-k-1);)C++,k++;if(u[N]=C,C>r)y+=2;else if(k>i)g+=2;else if(!h){var S;if((v=o+p-j)>=0&&v<l&&-1!=c[v]&&(w=o+(S=c[v])-v,S>=(C=r-C)))return a(e,t,S,w)}}}return[[n,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-u),t=t.substring(0,t.length-u));return d&&h.unshift([0,d]),p&&h.push([0,p]),o(h),null!=l&&(h=function(e,t){var r=function(e,t){if(0===t)return[0,e];for(var r=0,a=0;a<e.length;a++){var i=e[a];if(i[0]===n||0===i[0]){var s=r+i[1].length;if(t===s)return[a+1,e];if(t<s){e=e.slice();var o=t-r,l=[i[0],i[1].slice(0,o)],c=[i[0],i[1].slice(o)];return e.splice(a,1,l,c),[a+1,e]}r=s}}throw new Error("cursor_pos is out of bounds!")}(e,t),a=r[1],i=r[0],s=a[i],o=a[i+1];if(null==s)return e;if(0!==s[0])return e;if(null!=o&&s[1]+o[1]===o[1]+s[1])return a.splice(i,2,o,s),c(a,i,2);if(null!=o&&0===o[1].indexOf(s[1])){a.splice(i,2,[o[0],s[1]],[0,s[1]]);var l=o[1].slice(s[1].length);return l.length>0&&a.splice(i+2,0,[o[0],l]),c(a,i,3)}return e}(h,l)),h=function(e){for(var t=!1,r=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},i=2;i<e.length;i+=1)0===e[i-2][0]&&a(e[i-2][1])&&e[i-1][0]===n&&r(e[i-1][1])&&1===e[i][0]&&r(e[i][1])&&(t=!0,e[i-1][1]=e[i-2][1].slice(-1)+e[i-1][1],e[i][1]=e[i-2][1].slice(-1)+e[i][1],e[i-2][1]=e[i-2][1].slice(0,-1));if(!t)return e;var s=[];for(i=0;i<e.length;i+=1)e[i][1].length>0&&s.push(e[i]);return s}(h),h}function a(e,t,n,a){var i=e.substring(0,n),s=t.substring(0,a),o=e.substring(n),l=t.substring(a),c=r(i,s),u=r(o,l);return c.concat(u)}function i(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),a=r,i=0;n<a;)e.substring(i,a)==t.substring(i,a)?i=n=a:r=a,a=Math.floor((r-n)/2+n);return a}function s(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),a=r,i=0;n<a;)e.substring(e.length-a,e.length-i)==t.substring(t.length-a,t.length-i)?i=n=a:r=a,a=Math.floor((r-n)/2+n);return a}function o(e){e.push([0,""]);for(var t,r=0,a=0,l=0,c="",u="";r<e.length;)switch(e[r][0]){case 1:l++,u+=e[r][1],r++;break;case n:a++,c+=e[r][1],r++;break;case 0:a+l>1?(0!==a&&0!==l&&(0!==(t=i(u,c))&&(r-a-l>0&&0==e[r-a-l-1][0]?e[r-a-l-1][1]+=u.substring(0,t):(e.splice(0,0,[0,u.substring(0,t)]),r++),u=u.substring(t),c=c.substring(t)),0!==(t=s(u,c))&&(e[r][1]=u.substring(u.length-t)+e[r][1],u=u.substring(0,u.length-t),c=c.substring(0,c.length-t))),0===a?e.splice(r-l,a+l,[1,u]):0===l?e.splice(r-a,a+l,[n,c]):e.splice(r-a-l,a+l,[n,c],[1,u]),r=r-a-l+(a?1:0)+(l?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,l=0,a=0,c="",u=""}""===e[e.length-1][1]&&e.pop();var d=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),d=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),d=!0)),r++;d&&o(e)}var l=r;function c(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var a=e[r],i=e[r+1];a[0]===i[1]&&e.splice(r,2,[a[0],a[1]+i[1]])}return e}l.INSERT=1,l.DELETE=n,l.EQUAL=0,e.exports=l},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function a(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:a).supported=r,t.unsupported=a},function(e,t){var n=Object.prototype.hasOwnProperty,r="~";function a(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,t,a=[];if(0===this._eventsCount)return a;for(t in e=this._events)n.call(e,t)&&a.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},s.prototype.listeners=function(e,t){var n=r?r+e:e,a=this._events[n];if(t)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var i=0,s=a.length,o=new Array(s);i<s;i++)o[i]=a[i].fn;return o},s.prototype.emit=function(e,t,n,a,i,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,a),!0;case 5:return u.fn.call(u.context,t,n,a,i),!0;case 6:return u.fn.call(u.context,t,n,a,i,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,a);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){var a=new i(t,n||this),s=r?r+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],a]:this._events[s].push(a):(this._events[s]=a,this._eventsCount++),this},s.prototype.once=function(e,t,n){var a=new i(t,n||this,!0),s=r?r+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],a]:this._events[s].push(a):(this._events[s]=a,this._eventsCount++),this},s.prototype.removeListener=function(e,t,n,i){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return 0===--this._eventsCount?this._events=new a:delete this._events[s],this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||(0===--this._eventsCount?this._events=new a:delete this._events[s]);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||n&&o[l].context!==n)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:0===--this._eventsCount?this._events=new a:delete this._events[s]}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0===--this._eventsCount?this._events=new a:delete this._events[t])):(this._events=new a,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=r,s.EventEmitter=s,void 0!==e&&(e.exports=s)}
vendor: 2,369 bytes, line 35
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=b(n(3)),o=b(n(2)),l=b(n(0)),c=b(n(5)),u=b(n(10)),d=b(n(9)),p=n(36),h=n(37),m=b(n(13)),f=n(26),g=n(38),y=n(39),x=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=(0,u.default)("quill:clipboard"),j="__ql-matcher",C=[[Node.TEXT_NODE,D],[Node.TEXT_NODE,R],["br",function(e,t){return O(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,T],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===A(e).fontStyle&&(n.italic=!0),r.fontWeight&&(A(e).fontWeight.startsWith("bold")||parseInt(A(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=E(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new o.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!O(t,"\n"))return t;for(var r=-1,a=e.parentNode;!a.classList.contains("ql-clipboard");)"list"===(l.default.query(a)||{}).blotName&&(r+=1),a=a.parentNode;return r<=0?t:t.compose((new o.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",I.bind(I,"bold")],["i",I.bind(I,"italic")],["style",function(){return new o.default}]],N=[p.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}
vendor: 5,578 bytes, line 35
35),k=[p.AlignStyle,h.BackgroundStyle,f.ColorStyle,g.DirectionStyle,y.FontStyle,x.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),S=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],C.concat(r.options.matchers).forEach(function(e){var t=a(e,2),i=t[0],s=t[1];(n.matchVisual||s!==L)&&r.addMatcher(i,s)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[m.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new o.default).insert(n,v({},m.default.blotName,t[m.default.blotName]))}var r=this.prepareMatching(),i=a(r,2),s=i[0],l=i[1],c=P(this.container,s,l);return O(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new o.default).retain(c.length()-1).delete(1))),w.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,c.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new o.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new o.default).retain(n.index),a=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,c.default.sources.USER),t.quill.setSelection(r.length()-n.length,c.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=a,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var i=a(r,2),s=i[0],o=i[1];switch(s){case Node.TEXT_NODE:n.push(o);break;case Node.ELEMENT_NODE:t.push(o);break;default:[].forEach.call(e.container.querySelectorAll(s),function(e){e[j]=e[j]||[],e[j].push(o)})}}),[t,n]}}]),t}(d.default);function E(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce(function(e,n){return E(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,s.default)({},v({},t,n),r.attributes))},new o.default)}function A(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function O(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var a=e.ops[r];if("string"!=typeof a.insert)break;n=a.insert+n}return n.slice(-1*t.length)===t}function _(e){if(0===e.childNodes.length)return!1;var t=A(e);return["block","list-item"].indexOf(t.display)>-1}function P(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new o.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,a){var i=P(a,t,n);return a.nodeType===e.ELEMENT_NODE&&(i=t.reduce(function(e,t){return t(a,e)},i),i=(a[j]||[]).reduce(function(e,t){return t(a,e)},i)),r.concat(i)},new o.default):new o.default}function I(e,t,n){return E(n,e,!0)}function M(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),a=l.default.Attributor.Style.keys(e),i={};return n.concat(r).concat(a).forEach(function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null==(n=N[t])||n.attrName!==t&&n.keyName!==t||(i[n.attrName]=n.value(e)||void 0),null==(n=k[t])||n.attrName!==t&&n.keyName!==t||(n=k[t],i[n.attrName]=n.value(e)||void 0))}),Object.keys(i).length>0&&(t=E(t,i)),t}function T(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},a=n.value(e);null!=a&&(r[n.blotName]=a,t=(new o.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=E(t,n.blotName,n.formats(e)));return t}function R(e,t){return O(t,"\n")||(_(e)||t.length()>0&&e.nextSibling&&_(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(_(e)&&null!=e.nextElementSibling&&!O(t,"\n\n")){var n=e.offsetHeight+parseFloat(A(e).marginTop)+parseFloat(A(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function D(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!A(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u
vendor: 3,875 bytes, line 35
3500a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&_(e.parentNode)||null!=e.previousSibling&&_(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&_(e.parentNode)||null!=e.nextSibling&&_(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},t.default=S,t.matchAttributor=M,t.matchBlot=T,t.matchNewline=R,t.matchSpacing=L,t.matchText=D},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default);o.blotName="bold",o.tagName=["STRONG","B"],t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(2)),s=u(n(0)),o=u(n(5)),l=u(n(10)),c=u(n(9));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=(0,l.default)("quill:toolbar"),h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a,i=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var s=document.createElement("div");f(s,i.options.container),e.container.parentNode.insertBefore(s,e.container),i.container=s}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.c
vendor: 7,101 bytes, line 35
35ontrols=[],i.handlers={},Object.keys(i.options.handlers).forEach(function(e){i.addHandler(e,i.options.handlers[e])}),[].forEach.call(i.container.querySelectorAll("button, select"),function(e){i.attach(e)}),i.quill.on(o.default.events.EDITOR_CHANGE,function(e,t){e===o.default.events.SELECTION_CHANGE&&i.update(t)}),i.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){var e=i.quill.selection.getRange(),t=r(e,1)[0];i.update(t)}),i):(a=p.error("Container required for toolbar",i.options),d(i,a))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,e);if(null==s.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,e)}var a="SELECT"===e.tagName?"change":"click";e.addEventListener(a,function(a){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var c=e.options[e.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),a.preventDefault();t.quill.focus();var u=t.quill.selection.getRange(),d=r(u,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(d.index).delete(d.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,l)),o.default.sources.USER)}else t.quill.format(n,l,o.default.sources.USER);t.update(d)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var a=r(n,2),i=a[0],s=a[1];if("SELECT"===s.tagName){var o=void 0;if(null==e)o=null;else if(null==t[i])o=s.querySelector("option[selected]");else if(!Array.isArray(t[i])){var l=t[i];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),o=s.querySelector('option[value="'+l+'"]')}null==o?(s.value="",s.selectedIndex=-1):o.selected=!0}else if(null==e)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var c=t[i]===s.getAttribute("value")||null!=t[i]&&t[i].toString()===s.getAttribute("value")||null==t[i]&&!s.getAttribute("value");s.classList.toggle("ql-active",c)}else s.classList.toggle("ql-active",null!=t[i])})}}]),t}(c.default);function m(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function f(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)m(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}(n,t,r):m(n,t,r)}}),e.appendChild(n)})}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=s.default.query(t,s.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,o.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",o.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,o.default.sources.USER),this.quill.format("direction",e,o.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var a="+1"===e?1:-1;"rtl"===n.direction&&(a*=-1),this.quill.format("indent",r+a,o.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,o.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,o.default.sources.USER):this.quill.format("list","unchecked",o.default.sources.USER):this.quill.format("list",e,o.default.sources.USER)}}},t.default=h,t.addControls=f},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(28),o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"buildItem",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),a=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=a:r.style.fill=a)}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default);t.default=o}
vendor: 4,354 bytes, line 35
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(28),o=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),i=0;if(a.right>r.right&&(i=r.right-a.right,this.root.style.left=t+i+"px"),a.left<r.left&&(i=r.left-a.left,this.root.style.left=t+i+"px"),a.bottom>r.bottom){var s=a.bottom-a.top,o=e.bottom-e.top+s;this.root.style.top=n-o+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=h(n(3)),o=h(n(8)),l=n(43),c=h(l),u=h(n(27)),d=n(15),p=h(n(41));
vendor: 4,292 bytes, line 35
35function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],x=function(e){function t(e,n){m(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=y);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return g(t,e),i(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(c.default);x.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){m(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return g(t,e),i(t,[{key:"listen",value:function(){var e=this;a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,o.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(o.default.events.SELECTION_CHANGE,function(t,n,a){if(null!=t){if(0===t.length&&a===o.default.sources.USER){var i=e.quill.scroll.descendant(u.default,t.index),s=r(i,2),l=s[0],c=s[1];if(null!=l){e.linkRange=new d.Range(t.index-c,l.length());var p=u.default.formats(l.domNode);return e.preview.textContent=p,e.preview.setAttribute("href",p),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(l.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=R(n(29)),a=n(36),i=n(38),s=n(64),o=R(n(65)),l=R(n(66)),c=n(67),u=R(c),d=n(37),p=n(26),h=n(39),m=n(40),f=R(n(56)),g=R(n(68)),y=R(n(27)),x=R(n(69)),b=R(n(70)),v=R(n(71)),w=R(n(72)),j=R(n(73)),C=n(13),N=R(C),k=R(n(74)),S=R(n(75)),E=R(n(57)),A=R(n(41)),O=R(n(28)),_=R(n(59)),P=R(n(60)),I=R(n(61)),M=R(n(108)),T=R(n(62));function R(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":a.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":a.AlignStyle,"attributors/style/background":d.Backgroun
vendor: 18,213 bytes, line 35
35dStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":m.SizeStyle},!0),r.default.register({"formats/align":a.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":s.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":h.FontClass,"formats/size":m.SizeClass,"formats/blockquote":o.default,"formats/code-block":N.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":f.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":y.default,"formats/script":x.default,"formats/strike":b.default,"formats/underline":v.default,"formats/image":w.default,"formats/video":j.default,"formats/list/item":c.ListItem,"modules/formula":k.default,"modules/syntax":S.default,"modules/toolbar":E.default,"themes/bubble":M.default,"themes/snow":T.default,"ui/icons":A.default,"ui/picker":O.default,"ui/icon-picker":P.default,"ui/color-picker":_.default,"ui/tooltip":I.default},!0),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(0),o=(r=s)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(o.default.Attributor.Class),c=new l("indent","ql-indent",{scope:o.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(4),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=a)&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(4),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=l(n(0)),s=l(n(4)),o=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"format",value:function(e,n){e!==h.blotName||n?a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:a(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(s.default);p.blotName="list-item",p.tagName="LI";var h=function(e){function t(e){c(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),a=i.default.find(t.target);"checked"===r?a.format("list","unchecked"):"unchecked"===r&&a.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return d(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof p)a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(o.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[p],t.ListItem=p,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(56),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=a)&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=s)&&r.__esModule?r:{default:r}).default);o.blotName="script",o.tagName=["SUB","SUP"],t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(6),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=a)&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(6),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=a)&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(0),o=(r=s)&&r.__esModule?r:{default:r},l=n(27),c=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(o.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},s=n(4),o=n(27),l=(r=o)&&r.__esModule?r:{default:r},c=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u}
vendor: 9,317 bytes, line 35
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=l(n(35)),s=l(n(5)),o=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(i.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var h=function(e){function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),r(t,null,[{key:"register",value:function(){s.default.register(p,!0)}}]),t}(o.default);t.FormulaBlot=p,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},i=l(n(0)),s=l(n(5)),o=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);p.className="ql-syntax";var h=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),m=function(e){function t(e,n){c(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var a=null;return r.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(a),a=setTimeout(function(){r.highlight(),a=null},r.options.interval)}),r.highlight(),r}return d(t,e),r(t,null,[{key:"register",value:function(){s.default.register(h,!0),s.default.register(p,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(s.default.sources.SILENT),null!=t&&this.quill.setSelection(t,s.default.sources.SILENT)}}}]),t}(o.default);m.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=h,t.default=m},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line>
35 <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}
35,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=d(n(3)),s=d(n(8)),o=n(43),l=d(o),c=n(15),u=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=f);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return m(t,e),a(t,[{key:"extendToolbar",value:function(e){this.tooltip=new y(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),u.default)}}]),t}(l.default);g.DEFAULTS=(0,i.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){p(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(s.default.events.EDITOR_CHANGE,function(e,t,n,a){if(e===s.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&a===s.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(t.index,t.length);if(1===i.length)r.position(r.quill.getBounds(t));else{var o=i[i.length-1],l=r.quill.getIndex(o),u=Math.min(o.length()-1,t.index+t.length-l),d=r.quill.getBounds(new c.Range(l,u));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return m(t,e),a(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),a=this.root.querySelector(".ql-tooltip-arrow");if(a.style.marginLeft="",0===n)return n;a.style.marginLeft=-1*n-a.offsetWidth/2+"px"}}]),t}(o.BaseTooltip);y.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=y,t.default=g},function(e,t,n){e.exports=n(63)}]).default},Zx.exports=e());var e}var Gx=function(){if(Qx)return Wx;Qx=1;var e=Wx&&Wx.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),t=Wx&&Wx.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)},n=Wx&&Wx.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,o=i.length;s<o;s++,a++)r[a]=i[s];return r}
vendor: 6,687 bytes, line 35
35,r=Wx&&Wx.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=r($()),i=r(W()),s=r(Vx()),o=r(Kx()),l=function(r){function l(e){var t=r.call(this,e)||this;t.dirtyProps=["modules","formats","bounds","theme","children"],t.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],t.state={generation:0},t.selection=null,t.onEditorChange=function(e,n,r,a){var i,s,o,l;"text-change"===e?null===(s=(i=t).onEditorChangeText)||void 0===s||s.call(i,t.editor.root.innerHTML,n,a,t.unprivilegedEditor):"selection-change"===e&&(null===(l=(o=t).onEditorChangeSelection)||void 0===l||l.call(o,n,a,t.unprivilegedEditor))};var n=t.isControlled()?e.value:e.defaultValue;return t.value=null!=n?n:"",t}return e(l,r),l.prototype.validateProps=function(e){var t;if(a.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(a.default.Children.count(e.children)&&"textarea"===(null===(t=a.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},l.prototype.shouldComponentUpdate=function(e,t){var r,a=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var i=this.getEditorContents(),o=null!=(r=e.value)?r:"";this.isEqualValue(o,i)||this.setEditorContents(this.editor,o)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),n(this.cleanProps,this.dirtyProps).some(function(t){return!s.default(e[t],a.props[t])})},l.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some(function(n){return!s.default(e[n],t.props[n])})},l.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},l.prototype.componentWillUnmount=function(){this.destroyEditor()},l.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var r=this.editor.getContents(),a=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:a},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,s=(r=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var o=this.editor;o.setContents(r),c(function(){return n.setEditorSelection(o,s)})}},l.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},l.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},l.prototype.isControlled=function(){return"value"in this.props},l.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},l.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},l.prototype.createEditor=function(e,t){var n=new o.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},l.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},l.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},l.prototype.getEditorContents=function(){return this.value},l.prototype.getEditorSelection=function(){return this.selection},l.prototype.isDelta=function(e){return e&&e.ops},l.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?s.default(e.ops,t.ops):s.default(e,t)},l.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),c(function(){return n.setEditorSelection(e,r)})},l.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},l.prototype.setEditorTabIndex=function(e,t){var n,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(e.scroll.domNode.tabIndex=t)},l.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},l.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},l.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=i.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},l.prototype.renderEditingArea=function(){var e=this,n=this.props,r=n.children,i=n.preserveWhitespace,s={key:this.state.generation,ref:function(t){e.editingArea=t}};return a.default.Children.count(r)?a.default.cloneElement(a.default.Children.only(r),s):i?a.default.createElement("pre",t({},s)):a.default.createElement("div",t({},s))},l.prototype.render=function(){var e;return a.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!=e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},l.prototype.onEditorChangeText=function(e,t,n,r){var a,i;if(this.editor){var s=this.isDelta(this.value)?r.getContents():r.getHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=s,null===(i=(a=this.props).onChange)||void 0===i||i.call(a,e,t,n,r))}},l.prototype.onEditorChangeSelection=function(e,t,n){var r,a,i,o,l,c;if(this.editor){var u=this.getEditorSelection(),d=!u&&e,p=u&&!e;s.default(e,u)||(this.selection=e,null===(a=(r=this.props).onChangeSelection)||void 0===a||a.call(r,e,t,n),d?null===(o=(i=this.props).onFocus)||void 0===o||o.call(i,e,t,n):p&&(null===(c=(l=this.props).onBlur)||void 0===c||c.call(l,u,t,n)))}}
35,l.prototype.focus=function(){this.editor&&this.editor.focus()},l.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},l.displayName="React Quill",l.Quill=o.default,l.defaultProps={theme:"snow",modules:{},readOnly:!1},l}(a.default.Component);function c(e){Promise.resolve().then(e)}return Wx=l}();const Yx=j(Gx);const Jx=j(Kx());var Xx={d:(e,t)=>{for(var n in t)Xx.o(t,n)&&!Xx.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},eb={};Xx.d(eb,{A:()=>jb});const tb={modules:["DisplaySize","Toolbar","Resize","Keyboard"],keyboardSelect:!0,selectedClass:"selected",activeClass:"active",embedTags:["VIDEO","IFRAME"],tools:["left","center","right","full","edit"],parchment:{image:{attribute:["width"],limit:{minWidth:100}},video:{attribute:["width","height"],limit:{minWidth:200,ratio:.5625}}}};class nb{constructor(e){this.resizer=e,this.quill=e.quill,this.overlay=e.overlay,this.activeEle=e.activeEle,this.blot=e.blot,this.options=e.options,this.requestUpdate=()=>{e.onUpdate(!0)}}onCreate(){}onDestroy(){}onUpdate(){}}
35const rb=(e=>{var t={};return Xx.d(t,e),t})({default:()=>Jx}),ab=window.Quill||rb.default,ib=ab.import("parchment"),sb={LEFT:"left",RIGHT:"right",CENTER:"center",FULL:"full"},ob=ib.ClassAttributor?ib.ClassAttributor:ib.Attributor.Class,lb="resize-inline",cb=new ob(lb,"ql-resize-style",{scope:ib.Scope.INLINE,whitelist:Object.values(sb)}),ub="resize-block",db=new ob(ub,"ql-resize-style",{scope:ib.Scope.BLOCK,whitelist:Object.values(sb)});ab.register(cb,!0),ab.register(db,!0);class pb extends nb{onCreate(){this.toolbar=document.createElement("div"),this.toolbar.className="ql-resize-toolbar",this.overlay.appendChild(this.toolbar),this._addToolbarButtons()}_addToolbarButtons(){const e=this.constructor.Icons,t=this.constructor.Tools,n=[];this.options.tools.forEach(r=>{const a="string"==typeof r?t[r]:r;if(a.verify&&!1===a.verify.call(this,this.activeEle,this.blot))return;const i=document.createElement("button");i.type="button",n.push(i),i.innerHTML=(a.icon||"")+(a.text||"")||("string"==typeof r?e[r]:""),"string"==typeof r&&(i.className=`ql-resize-toolbar-${r}`),a.attrs&&Object.keys(a.attrs).forEach(e=>{i.setAttribute(e,a.attrs[e])}),i.addEventListener("click",e=>{a.handler&&!0!==a.handler.call(this,e,i,this.activeEle,this.blot)||(n.forEach(e=>e.classList.remove("active")),a.isApplied&&a.isApplied.call(this,this.activeEle,this.blot)?this._applyToolFormatting(""):(i.classList.add("active"),a.toolClass&&this._applyToolFormatting(a.toolClass)),this.requestUpdate())}),a.isApplied&&a.isApplied.call(this,this.activeEle,this.blot)&&i.classList.add("active"),this.toolbar.appendChild(i)})}_getFormatValue(e,t){if(t.statics.scope===ib.Scope.INLINE_BLOT){const e=this.quill.getIndex(t);return this.quill.getFormat(e,1)[lb]||""}return t.statics.scope===ib.Scope.BLOCK_BLOT&&db.value(e)||""}_applyToolFormatting(e){const t=this.quill.getIndex(this.blot);this.blot.statics.scope===ib.Scope.INLINE_BLOT?this.quill.formatText(t,1,lb,e):this.blot.statics.scope===ib.Scope.BLOCK_BLOT&&this.quill.formatLine(t,1,ub,e)}}pb.Icons={left:'<svg viewbox="0 0 18 18">\n  <path class="ql-fill" d="M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z"/>\n  <path class="ql-fill" d="M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z"/>\n  <path class="ql-fill" d="M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z"/>\n  <path class="ql-fill" d="M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z"/>\n  <rect class="ql-fill" x="2" y="6" width="8" height="6" rx="1" ry="1"/>\n</svg>',center:'<svg viewbox="0 0 18 18">\n  <path class="ql-fill" d="M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z"/>\n  <path class="ql-fill" d="M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z"/>\n  <rect class="ql-fill" x="3" y="6" width="12" height="6" rx="1" ry="1"/>\n</svg>',right:'<svg viewbox="0 0 18 18">\n  <path class="ql-fill" d="M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z"/>\n  <path class="ql-fill" d="M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z"/>\n  <path class="ql-fill" d="M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z"/>\n  <path class="ql-fill" d="M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z"/>\n  <rect class="ql-fill" x="8" y="6" width="8" height="6" rx="1" ry="1" transform="translate(24 18) rotate(-180)"/>\n</svg>',full:'<svg viewbox="0 0 18 18">\n  <path class="ql-fill" d="M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z"/>\n  <path class="ql-fill" d="M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z"/>\n  <rect class="ql-fill" x="2" y="6" width="14" height="6" rx="1" ry="1"/>\n</svg>',edit:'<svg viewBox="0 0 18 18">
35\n  <path class="ql-fill" d="M 12.9 2 L 11.3 3.6 L 14.8 7 L 16.3 5.5 L 12.9 2 Z M 9.3 5.5 L 2 12.2 L 2 15.5 L 5.7 15.5 L 13 8.9 L 9.3 5.5 Z"></path>\n</svg>\n'},pb.Tools={left:{toolClass:sb.LEFT,isApplied(e,t){return this._getFormatValue(e,t)===sb.LEFT}},center:{toolClass:sb.CENTER,isApplied(e,t){return this._getFormatValue(e,t)===sb.CENTER}},right:{toolClass:sb.RIGHT,isApplied(e,t){return this._getFormatValue(e,t)===sb.RIGHT}},full:{toolClass:sb.FULL,isApplied(e,t){return this._getFormatValue(e,t)===sb.FULL}},edit:{handler(e,t,n,r){this.quill.emitter.emit("resize-edit",n,r)}}};const hb=pb;const mb=window.Quill||rb.default,fb=mb.import("parchment"),gb={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};class yb extends nb{static injectInit(e){const t=e.keyboard.bindings;t[this.keys.LEFT].unshift(this.makeArrowHandler(this.keys.LEFT,!1)),t[this.keys.RIGHT].unshift(this.makeArrowHandler(this.keys.RIGHT,!1))}static makeArrowHandler(e,t){const n=e===yb.keys.LEFT?"prefix":"suffix";return{key:e,shiftKey:t,altKey:null,[n]:/^$/,handler:function(t){if(!this.quill.resizer)return!0;let n=t.index;const r=e===yb.keys.LEFT,a=e===yb.keys.RIGHT,[i]=this.quill.getLine(n+(r?-1:0));if(this.quill.resizer.judgeShow(i))return!1;const s=this.quill.getIndex(i);if(a&&s+i.length()-1===n)return!0;a&&(n+=t.length+1);let[o]=this.quill.getLeaf(n);const l=o.offset(o.parent),c=o.constructor.scope===fb.Scope.BLOCK_BLOT;return!(!r||!(c&&n===l||0===n||n===s))||(r&&0===l&&(n-=1,o=this.quill.getLeaf(n)[0]),!this.quill.resizer.judgeShow(o))}}}onCreate(){this.options.keyboardSelect&&yb.injectInit(this.quill),this.keyboardProxy=e=>this.keyboardHandle(e),document.addEventListener("keydown",this.keyboardProxy,!0)}onDestroy(){document.removeEventListener("keydown",this.keyboardProxy,!0)}keyboardHandle(e){if(e.defaultPrevented)return;if(e.shiftKey||e.ctrlKey||e.altKey)return;if(!this.activeEle||e.fromResize||e.ctrlKey)return;const t=e.keyCode;let n,r=this.blot.offset(this.quill.scroll),a=!1;t===gb.BACKSPACE||t===gb.DELETE?(this.blot.deleteAt(0),this.blot.parent.optimize(),a=!0):t>=gb.LEFT&&t<=gb.DOWN&&(t===gb.RIGHT?r+=this.blot.length()||1:t===gb.UP?(r=this.getOtherLineIndex(-1),n=this.quill.getLeaf(r)[0]):t===gb.DOWN&&(r=this.getOtherLineIndex(1),n=this.quill.getLeaf(r)[0]),a=!0),a&&(e.stopPropagation(),e.preventDefault()),n&&this.resizer.judgeShow(n,n.domNode)||(this.quill.setSelection(r),this.resizer.hide())}getOtherLineIndex(e){let t=this.blot.offset(this.quill.scroll);const[n]=this.quill.getLine(t),r=this.blot.offset(n)+1,a=e>0?n.next:n.prev;if(a){let e=a.length();"block"===a.statics.blotName&&e--,t=a.offset(this.quill.scroll)+Math.min(e,r)}return t}dispatchEvent(e){const t=new e.constructor(e);t.fromResize=!0,this.quill.root.dispatchEvent(t)}}/^2\./.test(mb.version)?yb.keys={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete"}:yb.keys=gb;const xb=window.Quill||rb.default,bb=xb.import("parchment");class vb{constructor(e,t={}){this.modules=[],this.selectedBlots=[],e.resizer=this,this.quill=e;let n=!1;t.modules&&(n=t.modules.slice()),this.options=Object.assign({},tb,t),!1!==n&&(this.options.modules=n),document.execCommand("enableObjectResizing",!1,"false"),this.quill.root.addEventListener("mousedown",this.handleClick.bind(this),!1),this.quill.on("text-change",this.handleChange.bind(this)),this.quill.emitter.on("resize-edit",this.handleEdit.bind(this)),this.quill.container.style.position=this.quill.container.style.position||"relative",this.selectedBlots=[],this.options.selectedClass&&this.quill.on("selection-change",this.addBlotsSelectedClass.bind(this)),this.moduleClasses=this.options.modules,this.modules=[],this.options.embedTags&&this.initializeEmbed()}initializeModules(){this.removeModules(),this.modules=this.moduleClasses.map(e=>new(vb.Modules[e]||e)(this)),this.modules.forEach(e=>{e.onCreate(this)}),this.onUpdate()}initializeEmbed(){if(!this.options.embedTags.length)return;this.embedClassName=`ql-${function(e=8){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e},()=>t[Math.floor(62*Math.random())]).join("")}()}`;let e=[""].concat(this.options.embedTags).join(`, .${this.embedClassName} `).slice(2);e+="{pointer-events: none;}";const t=document.createElement("style");t.textContent=e,this.quill.container.appendChild(t),this.quill.root.classList.add(this.embedClassName)}onUpdate(e){this.updateFromModule=e,this.repositionElements(),this.modules.forEac
35h(e=>{e.onUpdate()})}removeModules(){this.modules.forEach(e=>{e.onDestroy()}),this.modules=[]}handleEdit(){if(!this.blot)return;const e=this.blot.offset(this.quill.scroll);this.hide(),this.quill.focus(),this.quill.setSelection(e,1)}handleClick(e){var t;let n,r=!1,a=e.target;const i=null===(t=this.options.embedTags)||void 0===t?void 0:t.join();if(i){const t=this.quill.root;(a===t||a.querySelectorAll(i).length)&&(t.classList.remove(this.embedClassName),a=document.elementFromPoint(e.clientX,e.clientY),t.classList.add(this.embedClassName))}a&&a.tagName&&(n=xb.find(a),n&&(r=this.judgeShow(n,a))),r?e.preventDefault():this.activeEle&&this.hide()}judgeShow(e,t){let n=!1;if(!e)return n;!t&&e.domNode&&(t=e.domNode);const r=this.options.parchment[e.statics.blotName];if(!r)return n;if(this.activeEle===t)return!0;const a=r.limit||{};return(!a.minWidth||a.minWidth&&t.offsetWidth>=a.minWidth)&&(n=!0,this.activeEle&&this.hide(),this.activeEle=t,this.blot=e,this.show()),n}handleChange(e,t,n){this.updateFromModule?this.updateFromModule=!1:"user"===n&&this.overlay&&this.activeEle&&this.onUpdate()}show(){var e;this.showOverlay(),this.initializeModules(),this.options.activeClass&&this.activeEle.classList.add(this.options.activeClass),null===(e=this.options.onActive)||void 0===e||e.call(this,this.blot,this.activeEle)}showOverlay(){this.overlay&&this.hideOverlay(),this.quill.setSelection(null),this.setUserSelect("none"),this.overlay=document.createElement("div"),this.overlay.className="ql-resize-overlay",this.overlay.addEventListener("dblclick",this.handleEdit.bind(this),!1),this.quill.container.appendChild(this.overlay),this.hideProxy=()=>{this.activeEle&&this.hide()},this.quill.root.addEventListener("input",this.hideProxy,!0),this.updateOverlayPositionProxy=this.updateOverlayPosition.bind(this),this.quill.root.addEventListener("scroll",this.updateOverlayPositionProxy),this.repositionElements()}hideOverlay(){this.overlay&&(this.quill.container.removeChild(this.overlay),this.overlay=void 0,this.quill.root.removeEventListener("input",this.hideProxy,!0),this.quill.root.removeEventListener("scroll",this.updateOverlayPositionProxy),this.setUserSelect(""))}repositionElements(){if(!this.overlay||!this.activeEle)return;const e=this.quill.container,t=this.activeEle.getBoundingClientRect(),n=e.getBoundingClientRect();Object.assign(this.overlay.style,{left:`${t.left-n.left-1+e.scrollLeft}px`,top:`${t.top-n.top+this.quill.root.scrollTop}px`,width:`${t.width}px`,height:`${t.height}px`,marginTop:-1*this.quill.root.scrollTop+"px"})}updateOverlayPosition(){this.overlay.style.marginTop=-1*this.quill.root.scrollTop+"px"}addBlotsSelectedClass(e){if(!e)return this.removeBlotsSelectedClass(),void(this.selectedBlots=[]);const t=bb.Leaf||bb.LeafBlot,n=this.quill.scroll.descendants(t,e.index,e.length).filter(e=>{const t=!!this.options.parchment[e.statics.blotName];return t&&e.domNode.classList.add(this.options.selectedClass),t});this.removeBlotsSelectedClass(n),this.selectedBlots=n}removeBlotsSelectedClass(e=[]){Array.isArray(e)||(e=[e]),this.selectedBlots.forEach(t=>{-1===e.indexOf(t)&&t.domNode.classList.remove(this.options.selectedClass)})}hide(){var e;this.hideOverlay(),this.removeModules(),this.activeEle&&this.options.activeClass&&this.activeEle.classList.remove(this.options.activeClass),null===(e=this.options.onInactive)||void 0===e||e.call(this,this.blot,this.activeEle),this.activeEle=void 0,this.blot=void 0}setUserSelect(e){["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(t=>{this.quill.root.style[t]=e,document.documentElement.style[t]=e})}}vb.Modules={Base:nb,DisplaySize:class extends nb{constructor(){super(...arguments),this.display=null}onCreate(){this.display=document.createElement("div"),this.display.className="ql-resize-display",this.overlay.appendChild(this.display)}onUpdate(){if(!this.display||!this.activeEle)return;const e=this.getCurrentSize();if(this.display.innerHTML=e.join(" &times; "),e[0]>120&&e[1]>30)Object.assign(this.display.style,{right:"4px",bottom:"4px",left:"auto"});else if("right"===this.activeEle.style.float){const e=this.display.getBoundingClientRect();
vendor: 4,250 bytes, line 35
35Object.assign(this.display.style,{right:"auto",bottom:`-${e.height+4}px`,left:`-${e.width+4}px`})}else{const e=this.display.getBoundingClientRect();Object.assign(this.display.style,{right:`-${e.width+4}px`,bottom:`-${e.height+4}px`,left:"auto"})}}getCurrentSize(){return[this.activeEle.offsetWidth,this.activeEle.offsetHeight]}},Toolbar:hb,Resize:class extends nb{constructor(){super(...arguments),this.boxes=[]}onCreate(){this.blotOptions=this.options.parchment[this.blot.statics.blotName],this.boxes=[],this.addBox("tl"),this.addBox("tr"),this.addBox("br"),this.addBox("bl")}onDestroy(){this.setCursor("")}addBox(e){const t=document.createElement("div");t.className=`ql-resize-handle ${e}`,t.addEventListener("mousedown",this.handleMousedown.bind(this),!1),t.addEventListener("touchstart",this.handleMousedown.bind(this),{passive:!1}),this.overlay.appendChild(t),this.boxes.push(t)}handleMousedown(e){this.dragBox=e.target,window.TouchEvent&&e instanceof TouchEvent?(this.dragStartX=e.changedTouches[0].clientX,this.dragStartY=e.changedTouches[0].clientY):(this.dragStartX=e.clientX,this.dragStartY=e.clientY),this.preDragSize={width:this.activeEle.offsetWidth,height:this.activeEle.offsetHeight},this.naturalSize=this.getNaturalSize();const t=window.getComputedStyle(this.dragBox).cursor;this.setCursor(t),this.handleDragProxy=e=>this.handleDrag(e),this.handleMouseupProxy=e=>this.handleMouseup(e),document.addEventListener("mousemove",this.handleDragProxy),document.addEventListener("touchmove",this.handleDragProxy,{passive:!1}),document.addEventListener("mouseup",this.handleMouseupProxy,!0),document.addEventListener("touchend",this.handleMouseupProxy,!0),document.addEventListener("touchcancel",this.handleMouseupProxy,!0)}handleMouseup(e){var t;e.stopPropagation();const n=this.calcSize(e,this.blotOptions.limit);Object.assign(this.activeEle,n),Object.assign(this.activeEle.style,{width:null,height:null}),null===(t=this.options.onChangeSize)||void 0===t||t.call(this,this.blot,this.activeEle,n),this.setCursor(""),document.removeEventListener("mousemove",this.handleDragProxy),document.removeEventListener("touchmove",this.handleDragProxy),document.removeEventListener("mouseup",this.handleMouseupProxy,!0),document.removeEventListener("touchend",this.handleMouseupProxy,!0),document.removeEventListener("touchcancel",this.handleMouseupProxy,!0)}handleDrag(e){if(!this.activeEle||!this.blot)return;window.TouchEvent&&e instanceof TouchEvent&&e.cancelable&&e.preventDefault();const t=Object.assign(Object.assign({},this.blotOptions.limit),{unit:!0});Object.assign(this.activeEle.style,this.calcSize(e,t)),this.requestUpdate()}calcSize(e,t={}){let n,r;window.TouchEvent&&e instanceof TouchEvent?(n=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):(n=e.clientX,r=e.clientY);const a=n-this.dragStartX,i=r-this.dragStartY,s={};let o=1;(this.blotOptions.attribute||["width"]).forEach(e=>{s[e]=this.preDragSize[e]}),this.dragBox!==this.boxes[0]&&this.dragBox!==this.boxes[3]||(o=-1),void 0!==s.width&&(s.width=Math.round(this.preDragSize.width+a*o)),void 0!==s.height&&(s.height=Math.round(this.preDragSize.height+i*o));let{width:l,height:c}=s;if(t.ratio){let e;t.minWidth&&(l=Math.max(t.minWidth,l)),t.maxWidth&&(l=Math.min(t.maxWidth,l)),c=l*t.ratio,t.minHeight&&c<t.minHeight&&(e=!0,c=t.minHeight),t.maxHeight&&c>t.maxHeight&&(e=!0,c=t.maxHeight),e&&(l=c/t.ratio)}else void 0!==s.width&&(t.minWidth&&(l=Math.max(t.minWidth,l)),t.maxWidth&&(l=Math.min(t.maxWidth,l))),void 0!==s.height&&(t.minHeight&&(c=Math.max(t.minHeight,c)),t.maxHeight&&(c=Math.min(t.maxHeight,c)));t.unit&&(l&&(l+="px"),c&&(c+="px"));const u={};return l&&(u.width=l),c&&(u.height=c),u}getNaturalSize(){const e=this.activeEle;let t=[0,0];if(e.getAttribute("data-size")){const n=e.getAttribute("data-size").split(",");t=[parseInt(n[0]),parseInt(n[1])]}else t=[e.naturalWidth||e.offsetWidth,e.naturalHeight||e.offsetHeight],e.setAttribute("data-size",t[0]+","+t[1]);return{width:t[0],height:t[1]}}setCursor(e){[document.body,this.activeEle].forEach(t=>{t.style.cursor=`${e} !important`})}},Keyboard:yb},vb.version="2.1.3";const wb=vb;window.Quill&&window.Quill.register("modules/resize",vb);const jb=wb;var Cb,Nb=eb.A,kb={},Sb={};function Eb(){if(Cb)return Sb;Cb=1;
vendor: 9,858 bytes, line 35
35var e=$();function t(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a={},i={};function s(e){return!!n.call(i,e)||!n.call(a,e)&&(r.test(e)?i[e]=!0:(a[e]=!0,!1))}function o(e,t,n,r,a,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var l={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){l[e]=new o(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];l[t]=new o(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){l[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){l[e]=new o(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){l[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){l[e]=new o(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){l[e]=new o(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){l[e]=new o(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){l[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)});var c=/[\-:]([a-z])/g;function u(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(c,u);l[t]=new o(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(c,u);l[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(c,u);l[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){l[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}),l.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){l[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)});var d={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},p=["Webkit","ms","Moz","O"];Object.keys(d).forEach(function(e){p.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),d[t]=d[e]})});var h=/["'&<>]/;function m(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=h.exec(e);if(t){var n,r="",a=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==n&&(r+=e.substring(a,n)),a=n+1,r+=t}e=a!==n?r+e.substring(a,n):r}return e}var f=/([A-Z])/g,g=/^ms-/,y=Array.isArray;function x(e,t){return{insertionMode:e,selectedValue:t}}var b=new Map;function v(e,r,a){if("object"!=typeof a)throw Error(t(62));for(var i in r=!0,a)if(n.call(a,i)){var s=a[i];if(null!=s&&"boolean"!=typeof s&&""!==s){if(0===i.indexOf("--")){var o=m(i);s=m((""+s).trim())}else{o=i;var l=b.get(o);void 0!==l||(l=m(o.replace(f,"-$1").toLowerCase().replace(g,"-ms-")),b.set(o,l)),o=l,s="number"==typeof s?0===s||n.call(d,i)?""+s:s+"px":m((""+s).trim())}r?(r=!1,e.push(' style="',o,":",s)):e.push(";",o,":",s)}}r||e.push('"')}function w(e,t,n,r){switch(n){case"style":return void v(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=l.hasOwnProperty(n)?l[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:!0===r?e.push(" ",n,'=""'):!1!==r&&e.push(" ",n,'="',m(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',m(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',m(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',m(r),'"')}}else if(s(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',m(r),'"')}}function j(e,n,r){if(null!=n){if(null!=r)throw Error(t(60));if("object"!=typeof n||!("__html"in n))throw Error(t(61));null!=(n=n.__html)&&e.push(""+n)}}function C(e,t,r,a){e.push(S(r));var i,s=r=null;for(i in t)if(n.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":r=o;break;case"dangerouslySetInnerHTML":s=o;break;default:w(e,a,i,o)}}return e.push(">"),j(e,s,r),"string"==typeof r?(e.push(m(r)),null):r}var N=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,k=new Map;function S(e){var n=k.get(e);if(void 0===n){if(!N.test(e))throw Error(t(65,e));n="<"+e,k.set(e,n)}return n}function E(r,a,i,o,l){switch(a){case"select":r.push(S("select"));var c=null,u=null;for(f in i)if(n.call(i,f)){var d=i[f];if(null!=d)switch(f){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"defaultValue":case"value":break;default:w(r,o,f,d)}}return r.push(">"),j(r,u,c),c;case"option":u=l.selectedValue,r.push(S("option"));var p=d=null,h=null,f=null;for(c in i)if(n.call(i,c)){var g=i[c];if(null!=g)switch(c){case"children":d=g;break;case"selected":h=g;break;case"dangerouslySetInnerHTML":f=g;break;case"value":p=g;default:w(r,o,c,g)}}if(null!=u)if(i=null!==p?""+p:function(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}(d),y(u)){for(o=0;o<u.length;o++)if(""+u[o]===i){r.push(' selected=""');break}}else""+u===i&&r.push(' selected=""');else h&&r.push(' selected=""');return r.push(">"),j(r,f,d),d;case"textarea":for(d in r.push(S("textarea")),f=u=c=null,i)if(n.call(i,d)&&null!=(p=i[d]))switch(d){case"children":f=p;break;case"value":c=p;break;case"defaultValue":u=p;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:w(r,o,d,p)}if(null===c&&null!==u&&(c=u),r.push(">"),null!=f){if(null!=c)throw Error(t(92));if(y(f)&&1<f.length)throw Error(t(93));c=""+f}return"string"==typeof c&&"\n"===c[0]&&r.push("\n"),null!==c&&r.push(m(""+c)),null;case"input":for(u in r.push(S("input")),p=f=d=c=null,i)if(n.call(i,u)&&null!=(h=i[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":p=h;break;case"defaultValue":d=h;break;case"checked":f=h;break;case"value":c=h;break;default:w(r,o,u,h)}return null!==f?w(r,o,"checked",f):null!==p&&w(r,o,"checked",p),null!==c?w(r,o,"value",c):null!==d&&w(r,o,"value",d),r.push("/>"),null;case"menuitem":for(var x in r.push(S("menuitem")),i)if(n.call(i,x)&&null!=(c=i[x]))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:w(r,o,x,c)}return r.push(">"),null;case"title":for(g in r.push(S("title")),c=null,i)if(n.call(i,g)&&null!=(u=i[g]))switch(g){case"children":c=u;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:w(r,o,g,u)}return r.push(">"),c;case"listing":case"pre":for(p in r.push(S(a)),u=c=null,i)if(n.call(i,p)&&null!=(d=i[p]))switch(p){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;default:w(r,o,p,d)}if(r.push(">"),null!=u){if(null!=c)throw Error(t(60));if("object"!=typeof u||!("__html"in u))throw Error(t(61));null!=(i=u.__html)&&("string"==typeof i&&0<i.length&&"\n"===i[0]?r.pu
vendor: 10,940 bytes, line 35
35sh("\n",i):r.push(""+i))}return"string"==typeof c&&"\n"===c[0]&&r.push("\n"),c;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var b in r.push(S(a)),i)if(n.call(i,b)&&null!=(c=i[b]))switch(b){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,a));default:w(r,o,b,c)}return r.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return C(r,i,a,o);case"html":return 0===l.insertionMode&&r.push("<!DOCTYPE html>"),C(r,i,a,o);default:if(-1===a.indexOf("-")&&"string"!=typeof i.is)return C(r,i,a,o);for(h in r.push(S(a)),u=c=null,i)if(n.call(i,h)&&null!=(d=i[h]))switch(h){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"style":v(r,o,d);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(h)&&"function"!=typeof d&&"symbol"!=typeof d&&r.push(" ",h,'="',m(d),'"')}return r.push(">"),j(r,u,c),c}}function A(e,n,r){if(e.push('\x3c!--$?--\x3e<template id="'),null===r)throw Error(t(395));return e.push(r),e.push('"></template>')}var O=/[<\u2028\u2029]/g;function _(e){return JSON.stringify(e).replace(O,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function P(e,t,n,r){return n.generateStaticMarkup?(e.push(m(t)),!1):(""===t?e=r:(r&&e.push("\x3c!-- --\x3e"),e.push(m(t)),e=!0),e)}var I=Object.assign,M=Symbol.for("react.element"),T=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),q=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),W=Symbol.for("react.scope"),Q=Symbol.for("react.debug_trace_mode"),Z=Symbol.for("react.legacy_hidden"),K=Symbol.for("react.default_value"),G=Symbol.iterator;function Y(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case R:return"Fragment";case T:return"Portal";case D:return"Profiler";case L:return"StrictMode";case U:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case q:return(e.displayName||"Context")+".Consumer";case F:return(e._context.displayName||"Context")+".Provider";case B:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case H:return null!==(t=e.displayName||null)?t:Y(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return Y(e(t))}catch(TS){}}return null}var J={};function X(e,t){if(!(e=e.contextTypes))return J;var n,r={};for(n in e)r[n]=t[n];return r}var ee=null;function te(e,n){if(e!==n){e.context._currentValue2=e.parentValue,e=e.parent;var r=n.parent;if(null===e){if(null!==r)throw Error(t(401))}else{if(null===r)throw Error(t(401));te(e,r)}n.context._currentValue2=n.value}}function ne(e){e.context._currentValue2=e.parentValue,null!==(e=e.parent)&&ne(e)}function re(e){var t=e.parent;null!==t&&re(t),e.context._currentValue2=e.value}function ae(e,n){if(e.context._currentValue2=e.parentValue,null===(e=e.parent))throw Error(t(402));e.depth===n.depth?te(e,n):ae(e,n)}function ie(e,n){var r=n.parent;if(null===r)throw Error(t(402));e.depth===r.depth?te(e,r):ie(e,r),n.context._currentValue2=n.value}function se(e){var t=ee;t!==e&&(null===t?re(e):null===e?ne(t):t.depth===e.depth?te(t,e):t.depth>e.depth?ae(t,e):ie(t,e),ee=e)}var oe={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function le(e,t,n,r){var a=void 0!==e.state?e.state:null;e.updater=oe,e.props=n,e.state=a;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue2:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(a=null==(s=s(n,a))?a:I({},a,s),e.state=a),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&oe.enqueueReplaceState(e,e.state,null),null!==i.queue&&0<i.queue.length)if(t=i.queue,s=i.replace,i.queue=null,i.replace=!1,s&&1===t.length)e.state=t[0];else{for(i=s?t[0]:e.state,a=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,i,n,r):o)&&(a?(a=!1,i=I({},i,o)):I(i,o))}e.state=i}else i.queue=null}var ce={id:1,overflow:""};function ue(e,t,n){var r=e.id;e=e.overflow;var a=32-de(r)-1;r&=~(1<<a),n+=1;var i=32-de(t)+a;if(30<i){var s=a-a%5;return i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,{id:1<<32-de(t)+a|n<<a|r,overflow:i+e}}return{id:1<<i|n<<a|r,overflow:e}}var de=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(pe(e)/he|0)|0},pe=Math.log,he=Math.LN2;var me="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},fe=null,ge=null,ye=null,xe=null,be=!1,ve=!1,we=0,je=null,Ce=0;function Ne(){if(null===fe)throw Error(t(321));return fe}function ke(){if(0<Ce)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Se(){return null===xe?null===ye?(be=!1,ye=xe=ke()):(be=!0,xe=ye):null===xe.next?(be=!1,xe=xe.next=ke()):(be=!0,xe=xe.next),xe}function Ee(){ge=fe=null,ve=!1,ye=null,Ce=0,xe=je=null}function Ae(e,t){return"function"==typeof t?t(e):t}function Oe(e,t,n){if(fe=Ne(),xe=Se(),be){var r=xe.queue;if(t=r.dispatch,null!==je&&void 0!==(n=je.get(r))){je.delete(r),r=xe.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return xe.memoizedState=r,[r,t]}return[xe.memoizedState,t]}return e=e===Ae?"function"==typeof t?t():t:void 0!==n?n(t):t,xe.memoizedState=e,e=(e=xe.queue={last:null,dispatch:null}).dispatch=Pe.bind(null,fe,e),[xe.memoizedState,e]}function _e(e,t){if(fe=Ne(),t=void 0===t?null:t,null!==(xe=Se())){var n=xe.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var a=0;a<r.length&&a<t.length;a++)if(!me(t[a],r[a])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),xe.memoizedState=[e,t],e}function Pe(e,n,r){if(25<=Ce)throw Error(t(301));if(e===fe)if(ve=!0,e={action:r,next:null},null===je&&(je=new Map),void 0===(r=je.get(n)))je.set(n,e);else{for(n=r;null!==n.next;)n=n.next;n.next=e}}function Ie(){throw Error(t(394))}function Me(){}var Te={readContext:function(e){return e._currentValue2},useContext:function(e){return Ne(),e._currentValue2},useMemo:_e,useReducer:Oe,useRef:function(e){fe=Ne();var t=(xe=Se()).memoizedState;return null===t?(e={current:e},xe.memoizedState=e):t},useState:function(e){return Oe(Ae,e)},useInsertionEffect:Me,useLayoutEffect:function(){},useCallback:function(e,t){return _e(function(){return e},t)},useImperativeHandle:Me,useEffect:Me,useDebugValue:Me,useDeferredValue:function(e){return Ne(),e},useTransition:function(){return Ne(),[!1,Ie]},useId:function(){var e=ge.treeContext,n=e.overflow;e=((e=e.id)&~(1<<32-de(e)-1)).toString(32)+n;var r=Re;if(null===r)throw Error(t(404));return n=we++,e=":"+r.idPrefix+"R"+e,0<n&&(e+="H"+n.toString(32)),e+":"},useMutableSource:function(e,t){return Ne(),t(e._source)},useSyncExternalStore:function(e,n,r){if(void 0===r)throw Error(t(407));return r()}},Re=null,Le=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function De(e){return null}function Fe(){}function qe(e,t,n,r,a,i,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var l={node:t,ping:function(){var t=e.pingedTasks;t.push(l),1===t.length&&et(e)},blockedBoundary:n,blockedSegment:r,abortSet:a,legacyContext:i,context:s,treeContext:o};return a.add(l),l}function Be(e,t,n,r,a,i){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:a,textEmbedded:i}}function Ue(e,t){if(null!=(e=e.onError(t))&&"string"!=typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function ze(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function He(e,t,n,r,a){for(fe={},ge=t,we=0,e=n(r,a);ve;)ve=!1,we=0,Ce+=1,xe=null,e=n(r,a);return Ee(),e}function Ve(e,n,r,a){var i=r.render(),s=a.childContextTypes;if(null!=s){var o=n.legacyContext;if("function"!=typeof r.getChildContext)a=o;else{for(var l in r=r.getChildContext())if(!(l in s))throw Error(t(108,Y(a)||"Unknown",l));a=I({},o,r)}n.legacyContext=a,Qe(e,n,i),n.legacyContext=o}else Qe(e,n,i)}function $e(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function We(e,n,r,a,i){if("function"==typeof r)if(r.prototype&&r.prototype.isReactComponent){i=X(r,n.legacyContext);var s=r.contextType;le(s=new r(a,"object"==typeof s&&null!==s?s._currentValue2:i),r,a,i),Ve(e,n,s,r)}else{i=He(e,n,r,a,s=X(r,n.legacyContext));var o=0!==we;if("object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof)le(i,r,a,s),Ve(e,n,i,r);else if(o){a=n.treeContext,n.treeContext=ue(a,1,0);try{Qe(e,n,i)}finally{n.treeContext=a}}else Qe(e,n,i)}else{if("string"!=typeof r){switch(r){case Z:case Q:case L:case D:case R:case z:return void Qe(e,n,a.children);case W:throw Error(t(343));case U:e:{r=n.blockedBoundary,i=n.blockedSegment,s=a.fallback,a=a.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o=new Set,errorDigest:null},c=Be(0,i.chunks.length,l,i.formatContext,!1,!1);i.children.push(c),i.lastPushedText=!1;var u=Be(0,0,null,i.formatContext,!1,!1);u.parentFlushed=!0,n.blockedBoundary=l,n.blockedSegment=u;try{if(Ke(e,n,a),e.responseState.generateStaticMarkup||u.lastPushedText&&u.textEmbedded&&u.chunks.push("\x3c!-- --\x3e"),u.status=1,Je(l,u),0===l.pendingTasks)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=Ue(e,d)}finally{n.blockedBoundary=r,n.blockedSegment=i}n=qe(e,s,r,c,o,n.legacyContext,n.context,n.treeContext),e.pingedTasks.push(n)}return}if("object"==typeof r&&null!==r)switch(r.$$typeof){case B:if(a=He(e,n,r.render,a,i),0!==we){r=n.treeContext,n.treeContext=ue(r,1,0
vendor: 11,181 bytes, line 35
35);try{Qe(e,n,a)}finally{n.treeContext=r}}else Qe(e,n,a);return;case H:return void We(e,n,r=r.type,a=$e(r,a),i);case F:if(i=a.children,r=r._context,a=a.value,s=r._currentValue2,r._currentValue2=a,ee=a={parent:o=ee,depth:null===o?0:o.depth+1,context:r,parentValue:s,value:a},n.context=a,Qe(e,n,i),null===(e=ee))throw Error(t(403));return a=e.parentValue,e.context._currentValue2=a===K?e.context._defaultValue:a,e=ee=e.parent,void(n.context=e);case q:return void Qe(e,n,a=(a=a.children)(r._currentValue2));case V:return void We(e,n,r=(i=r._init)(r._payload),a=$e(r,a),void 0)}throw Error(t(130,null==r?r:typeof r,""))}switch(s=E((i=n.blockedSegment).chunks,r,a,e.responseState,i.formatContext),i.lastPushedText=!1,o=i.formatContext,i.formatContext=function(e,t,n){switch(t){case"select":return x(1,null!=n.value?n.value:n.defaultValue);case"svg":return x(2,null);case"math":return x(3,null);case"foreignObject":return x(1,null);case"table":return x(4,null);case"thead":case"tbody":case"tfoot":return x(5,null);case"colgroup":return x(7,null);case"tr":return x(6,null)}return 4<=e.insertionMode||0===e.insertionMode?x(1,null):e}(o,r,a),Ke(e,n,s),i.formatContext=o,r){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push("</",r,">")}i.lastPushedText=!1}}function Qe(e,n,r){if(n.node=r,"object"==typeof r&&null!==r){switch(r.$$typeof){case M:return void We(e,n,r.type,r.props,r.ref);case T:throw Error(t(257));case V:var a=r._init;return void Qe(e,n,r=a(r._payload))}if(y(r))return void Ze(e,n,r);if(null===r||"object"!=typeof r?a=null:a="function"==typeof(a=G&&r[G]||r["@@iterator"])?a:null,a&&(a=a.call(r))){if(!(r=a.next()).done){var i=[];do{i.push(r.value),r=a.next()}while(!r.done);Ze(e,n,i)}return}throw e=Object.prototype.toString.call(r),Error(t(31,"[object Object]"===e?"object with keys {"+Object.keys(r).join(", ")+"}":e))}"string"==typeof r?(a=n.blockedSegment).lastPushedText=P(n.blockedSegment.chunks,r,e.responseState,a.lastPushedText):"number"==typeof r&&((a=n.blockedSegment).lastPushedText=P(n.blockedSegment.chunks,""+r,e.responseState,a.lastPushedText))}function Ze(e,t,n){for(var r=n.length,a=0;a<r;a++){var i=t.treeContext;t.treeContext=ue(i,r,a);try{Ke(e,t,n[a])}finally{t.treeContext=i}}}function Ke(e,t,n){var r=t.blockedSegment.formatContext,a=t.legacyContext,i=t.context;try{return Qe(e,t,n)}catch(LS){if(Ee(),"object"!=typeof LS||null===LS||"function"!=typeof LS.then)throw t.blockedSegment.formatContext=r,t.legacyContext=a,t.context=i,se(i),LS;n=LS;var s=t.blockedSegment,o=Be(0,s.chunks.length,null,s.formatContext,s.lastPushedText,!0);s.children.push(o),s.lastPushedText=!1,e=qe(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=a,t.context=i,se(i)}}function Ge(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,Xe(this,t,e)}function Ye(e,n,r){var a=e.blockedBoundary;e.blockedSegment.status=3,null===a?(n.allPendingTasks--,2!==n.status&&(n.status=2,null!==n.destination&&n.destination.push(null))):(a.pendingTasks--,a.forceClientRender||(a.forceClientRender=!0,e=void 0===r?Error(t(432)):r,a.errorDigest=n.onError(e),a.parentFlushed&&n.clientRenderedBoundaries.push(a)),a.fallbackAbortableTasks.forEach(function(e){return Ye(e,n,r)}),a.fallbackAbortableTasks.clear(),n.allPendingTasks--,0===n.allPendingTasks&&(a=n.onAllReady)())}function Je(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&Je(e,n)}else e.completedSegments.push(t)}function Xe(e,n,r){if(null===n){if(r.parentFlushed){if(null!==e.completedRootSegment)throw Error(t(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Fe,(n=e.onShellReady)())}else n.pendingTasks--,n.forceClientRender||(0===n.pendingTasks?(r.parentFlushed&&1===r.status&&Je(n,r),n.parentFlushed&&e.completedBoundaries.push(n),n.fallbackAbortableTasks.forEach(Ge,e),n.fallbackAbortableTasks.clear()):r.parentFlushed&&1===r.status&&(Je(n,r),1===n.completedSegments.length&&n.parentFlushed&&e.partialBoundaries.push(n)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function et(e){if(2!==e.status){var t=ee,n=Le.current;Le.current=Te;var r=Re;Re=e.responseState;try{var a,i=e.pingedTasks;for(a=0;a<i.length;a++){var s=i[a],o=e,l=s.blockedSegment;if(0===l.status){se(s.context);try{Qe(o,s,s.node),o.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("\x3c!-- --\x3e"),s.abortSet.delete(s),l.status=1,Xe(o,s.blockedBoundary,l)}catch(h){if(Ee(),"object"==typeof h&&null!==h&&"function"==typeof h.then){var c=s.ping;h.then(c,c)}else{s.abortSet.delete(s),l.status=4;var u=s.blockedBoundary,d=h,p=Ue(o,d);if(null===u?ze(o,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=p,u.parentFlushed&&o.clientRenderedBoundaries.push(u))),o.allPendingTasks--,0===o.allPendingTasks)(0,o.onAllReady)()}}}}i.splice(0,a),null!==e.destination&&st(e,e.destination)}catch(h){Ue(e,h),ze(e,h)}finally{Re=r,Le.current=n,n===Te&&se(t)}}}function tt(e,n,r){switch(r.parentFlushed=!0,r.status){case 0:var a=r.id=e.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,e=e.responseState,n.push('<template id="'),n.push(e.placeholderPrefix),e=a.toString(16),n.push(e),n.push('"></template>');case 1:r.status=2;var i=!0;a=r.chunks;var s=0;r=r.children;for(var o=0;o<r.length;o++){for(i=r[o];s<i.index;s++)n.push(a[s]);i=nt(e,n,i)}for(;s<a.length-1;s++)n.push(a[s]);return s<a.length&&(i=n.push(a[s])),i;default:throw Error(t(390))}}function nt(e,n,r){var a=r.boundary;if(null===a)return tt(e,n,r);if(a.parentFlushed=!0,a.forceClientRender)return e.responseState.generateStaticMarkup||(a=a.errorDigest,n.push("\x3c!--$!--\x3e"),n.push("<template"),a&&(n.push(' data-dgst="'),a=m(a),n.push(a),n.push('"')),n.push("></template>")),tt(e,n,r),e=!!e.responseState.generateStaticMarkup||n.push("\x3c!--/$--\x3e");if(0<a.pendingTasks){a.rootSegmentID=e.nextSegmentId++,0<a.completedSegments.length&&e.partialBoundaries.push(a);var i=e.responseState,s=i.nextSuspenseID++;return i=i.boundaryPrefix+s.toString(16),a=a.id=i,A(n,e.responseState,a),tt(e,n,r),n.push("\x3c!--/$--\x3e")}if(a.byteSize>e.progressiveChunkSize)return a.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(a),A(n,e.responseState,a.id),tt(e,n,r),n.push("\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||n.push("\x3c!--$--\x3e"),1!==(r=a.completedSegments).length)throw Error(t(391));return nt(e,n,r[0]),e=!!e.responseState.generateStaticMarkup||n.push("\x3c!--/$--\x3e")}function rt(e,n,r){return function(e,n,r,a){switch(r.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 4:return e.push('<table hidden id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(n.segmentPrefix),n=a.toString(16),e.push(n),e.push('">');default:throw Error(t(397))}}(n,e.responseState,r.formatContext,r.id),nt(e,n,r),function(e,n){switch(n.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(t(397))}}(n,r.formatContext)}function at(e,n,r){for(var a=r.completedSegments,i=0;i<a.length;i++)it(e,n,r,a[i]);if(a.length=0,e=e.responseState,a=r.id,r=r.rootSegmentID,n.push(e.startInlineScript),e.sentCompleteBoundaryFunction?n.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,n.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===a)throw Error(t(395));return r=r.toString(16),n.push(a),n.push('","'),n.push(e.segmentPrefix),n.push(r),n.push('")<\/script>')}function it(e,n,r,a){if(2===a.status)return!0;var i=a.id;if(-1===i){if(-1===(a.id=r.rootSegmentID))throw Error(t(392));return rt(e,n,a)}return rt(e,n,a),e=e.responseState,n.push(e.startInlineScript),e.sentCompleteSegmentFunction?n.push('$RS("'):(e.sentCompleteSegmentFunction=!0,n.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),n.push(e.segmentPrefix),i=i.toString(16),n.push(i),n.push('","'),n.push(e.placeholderPrefix),n.push(i),n.push('")<\/script>')}function st(e,n){try{var r=e.completedRootSegment;if(null!==r&&0===e.pendingRootTasks){nt(e,n,r),e.completedRootSegment=null;var a=e.responseState.bootstrapChunks;for(r=0;r<a.length-1;r++)n.push(a[r]);r<a.length&&n.push(a[r])}var i,s=e.clientRenderedBoundaries;for(i=0;i<s.length;i++){var o=s[i];a=n;var l=e.responseState,c=o.id,u=o.errorDigest,d=o.errorMessage,p=o.errorComponentStack;if(a.push(l.startInlineScript),l.sentClientRenderFunction?a.push('$RX("'):(l.sentClientRenderFunction=!0,a.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),null===c)throw Error(t(395));if(a.push(c),a.push('"'),u||d||p){a.push(",");var h=_(u||"");a.push(h)}if(d||p){a.push(",");var m=_(d||"");a.push(m)}if(p){a.push(",");var f=_(p);a.push(f)}if(!a.push(")<\/script>"))return e.destination=null,i++,void s.splice(0,i)}s.splice(0,i);var g=e.completedBoundaries;for(i=0;i<g.length;i++)if(!at(e,n,g[i]))return e.destination=null,i++,void g.splice(0,i);g.splice(0,i);var y=e.partialBoundaries;for(i=0;i<y.length;i++){var x=y[i];e:{s=e,o=n;var b=x.completedSegments;for(l=0;l<b.length;l++)if(!it(s,o,x,b[l])){l++,b.splice(0,l);var v=!1;break e}b.splice(0,l),v=!0}if(!v)return e.destination=null,i++,void y.splice(0,i)}y.splice(0,i);var w=e.completedBoundaries;for(i=0;i<w.length;i++)if(!at(e,n,w[i]))return e.destination=null,i++,void w.splice(0,i);w.splice(0,i)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&n.push(null)}}function ot(e,t){try{var n=e.abortableTasks;
vendor: 4,192 bytes, line 35
35n.forEach(function(n){return Ye(n,e,t)}),n.clear(),null!==e.destination&&st(e,e.destination)}catch(r){Ue(e,r),ze(e,r)}}function lt(){}function ct(e,n,r,a){var i=!1,s=null,o="",l={push:function(e){return null!==e&&(o+=e),!0},destroy:function(e){i=!0,s=e}},c=!1;if(e=function(e,t,n,r,a,i,s){var o=[],l=new Set;return(n=Be(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:l,pingedTasks:o,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===a?De:a,onAllReady:Fe,onShellReady:void 0===s?Fe:s,onShellError:Fe,onFatalError:Fe},0,null,n,!1,!1)).parentFlushed=!0,e=qe(t,e,null,n,l,J,null,ce),o.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(r,n?n.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,lt,0,function(){c=!0}),et(e),ot(e,a),1===e.status)e.status=2,l.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=l;try{st(e,l)}catch(ra){Ue(e,ra),ze(e,ra)}}if(i)throw s;if(!c)throw Error(t(426));return o}return Sb.renderToNodeStream=function(){throw Error(t(207))},Sb.renderToStaticMarkup=function(e,t){return ct(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Sb.renderToStaticNodeStream=function(){throw Error(t(208))},Sb.renderToString=function(e,t){return ct(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Sb.version="18.3.1",Sb}var Ab,Ob,_b={};function Pb(){if(Ab)return _b;Ab=1;var e=$();function t(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,r=0;function a(e,t){if(0!==t.length)if(512<t.length)0<r&&(e.enqueue(new Uint8Array(n.buffer,0,r)),n=new Uint8Array(512),r=0),e.enqueue(t);else{var a=n.length-r;a<t.length&&(0===a?e.enqueue(n):(n.set(t.subarray(0,a),r),e.enqueue(n),t=t.subarray(a)),n=new Uint8Array(512),r=0),n.set(t,r),r+=t.length}}function i(e,t){return a(e,t),!0}function s(e){n&&0<r&&(e.enqueue(new Uint8Array(n.buffer,0,r)),n=null,r=0)}var o=new TextEncoder;function l(e){return o.encode(e)}function c(e){return o.encode(e)}function u(e,t){"function"==typeof e.error?e.error(t):e.close()}var d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},m={};function f(e){return!!d.call(m,e)||!d.call(h,e)&&(p.test(e)?m[e]=!0:(h[e]=!0,!1))}function g(e,t,n,r,a,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){y[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 4,557 bytes, line 35
35h(function(e){var t=e[0];y[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){y[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){y[e]=new g(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){y[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){y[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){y[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){y[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){y[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(x,b);y[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(x,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(x,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var v={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},w=["Webkit","ms","Moz","O"];Object.keys(v).forEach(function(e){w.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),v[t]=v[e]})});var j=/["'&<>]/;function C(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=j.exec(e);if(t){var n,r="",a=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==n&&(r+=e.substring(a,n)),a=n+1,r+=t}e=a!==n?r+e.substring(a,n):r}return e}var N=/([A-Z])/g,k=/^ms-/,S=Array.isArray,E=c("<script>"),A=c("<\/script>"),O=c('<script src="'),_=c('<script type="module" src="'),P=c('" async=""><\/script>'),I=/(<\/|<)(s)(cript)/gi;function M(e,t,n,r){return t+("s"===n?"\\u0073":"\\u0053")+r}function T(e,t){return{insertionMode:e,selectedValue:t}}var R=c("\x3c!-- --\x3e");function L(e,t,n,r){return""===t?r:(r&&e.push(R),e.push(l(C(t))),!0)}var D=new Map,F=c(' style="'),q=c(":"),B=c(";");function U(e,n,r){if("object"!=typeof r)throw Error(t(62));for(var a in n=!0,r)if(d.call(r,a)){var i=r[a];
vendor: 27,154 bytes, line 35
35if(null!=i&&"boolean"!=typeof i&&""!==i){if(0===a.indexOf("--")){var s=l(C(a));i=l(C((""+i).trim()))}else{s=a;var o=D.get(s);void 0!==o||(o=c(C(s.replace(N,"-$1").toLowerCase().replace(k,"-ms-"))),D.set(s,o)),s=o,i="number"==typeof i?0===i||d.call(v,a)?l(""+i):l(i+"px"):l(C((""+i).trim()))}n?(n=!1,e.push(F,s,q,i)):e.push(B,s,q,i)}}n||e.push(V)}var z=c(" "),H=c('="'),V=c('"'),W=c('=""');function Q(e,t,n,r){switch(n){case"style":return void U(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=y.hasOwnProperty(n)?y[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=l(t.attributeName),t.type){case 3:r&&e.push(z,n,W);break;case 4:!0===r?e.push(z,n,W):!1!==r&&e.push(z,n,H,l(C(r)),V);break;case 5:isNaN(r)||e.push(z,n,H,l(C(r)),V);break;case 6:!isNaN(r)&&1<=r&&e.push(z,n,H,l(C(r)),V);break;default:t.sanitizeURL&&(r=""+r),e.push(z,n,H,l(C(r)),V)}}else if(f(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(z,l(n),H,l(C(r)),V)}}var Z=c(">"),K=c("/>");function G(e,n,r){if(null!=n){if(null!=r)throw Error(t(60));if("object"!=typeof n||!("__html"in n))throw Error(t(61));null!=(n=n.__html)&&e.push(l(""+n))}}var Y=c(' selected=""');function J(e,t,n,r){e.push(ne(n));var a,i=n=null;for(a in t)if(d.call(t,a)){var s=t[a];if(null!=s)switch(a){case"children":n=s;break;case"dangerouslySetInnerHTML":i=s;break;default:Q(e,r,a,s)}}return e.push(Z),G(e,i,n),"string"==typeof n?(e.push(l(C(n))),null):n}var X=c("\n"),ee=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,te=new Map;function ne(e){var n=te.get(e);if(void 0===n){if(!ee.test(e))throw Error(t(65,e));n=c("<"+e),te.set(e,n)}return n}var re=c("<!DOCTYPE html>");function ae(n,r,a,i,s){switch(r){case"select":n.push(ne("select"));var o=null,c=null;for(m in a)if(d.call(a,m)){var u=a[m];if(null!=u)switch(m){case"children":o=u;break;case"dangerouslySetInnerHTML":c=u;break;case"defaultValue":case"value":break;default:Q(n,i,m,u)}}return n.push(Z),G(n,c,o),o;case"option":c=s.selectedValue,n.push(ne("option"));var p=u=null,h=null,m=null;for(o in a)if(d.call(a,o)){var g=a[o];if(null!=g)switch(o){case"children":u=g;break;case"selected":h=g;break;case"dangerouslySetInnerHTML":m=g;break;case"value":p=g;default:Q(n,i,o,g)}}if(null!=c)if(a=null!==p?""+p:function(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}(u),S(c)){for(i=0;i<c.length;i++)if(""+c[i]===a){n.push(Y);break}}else""+c===a&&n.push(Y);else h&&n.push(Y);return n.push(Z),G(n,m,u),u;case"textarea":for(u in n.push(ne("textarea")),m=c=o=null,a)if(d.call(a,u)&&null!=(p=a[u]))switch(u){case"children":m=p;break;case"value":o=p;break;case"defaultValue":c=p;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:Q(n,i,u,p)}if(null===o&&null!==c&&(o=c),n.push(Z),null!=m){if(null!=o)throw Error(t(92));if(S(m)&&1<m.length)throw Error(t(93));o=""+m}return"string"==typeof o&&"\n"===o[0]&&n.push(X),null!==o&&n.push(l(C(""+o))),null;case"input":for(c in n.push(ne("input")),p=m=u=o=null,a)if(d.call(a,c)&&null!=(h=a[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":p=h;break;case"defaultValue":u=h;break;case"checked":m=h;break;case"value":o=h;break;default:Q(n,i,c,h)}return null!==m?Q(n,i,"checked",m):null!==p&&Q(n,i,"checked",p),null!==o?Q(n,i,"value",o):null!==u&&Q(n,i,"value",u),n.push(K),null;case"menuitem":for(var y in n.push(ne("menuitem")),a)if(d.call(a,y)&&null!=(o=a[y]))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:Q(n,i,y,o)}return n.push(Z),null;case"title":for(g in n.push(ne("title")),o=null,a)if(d.call(a,g)&&null!=(c=a[g]))switch(g){case"children":o=c;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:Q(n,i,g,c)}return n.push(Z),o;case"listing":case"pre":for(p in n.push(ne(r)),c=o=null,a)if(d.call(a,p)&&null!=(u=a[p]))switch(p){case"children":o=u;break;case"dangerouslySetInnerHTML":c=u;break;default:Q(n,i,p,u)}if(n.push(Z),null!=c){if(null!=o)throw Error(t(60));if("object"!=typeof c||!("__html"in c))throw Error(t(61));null!=(a=c.__html)&&("string"==typeof a&&0<a.length&&"\n"===a[0]?n.push(X,l(a)):n.push(l(""+a)))}return"string"==typeof o&&"\n"===o[0]&&n.push(X),o;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var x in n.push(ne(r)),a)if(d.call(a,x)&&null!=(o=a[x]))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,r));default:Q(n,i,x,o)}return n.push(K),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return J(n,a,r,i);case"html":return 0===s.insertionMode&&n.push(re),J(n,a,r,i);default:if(-1===r.indexOf("-")&&"string"!=typeof a.is)return J(n,a,r,i);for(h in n.push(ne(r)),c=o=null,a)if(d.call(a,h)&&null!=(u=a[h]))switch(h){case"children":o=u;break;case"dangerouslySetInnerHTML":c=u;break;case"style":U(n,i,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:f(h)&&"function"!=typeof u&&"symbol"!=typeof u&&n.push(z,l(h),H,l(C(u)),V)}return n.push(Z),G(n,c,o),o}}var ie=c("</"),se=c(">"),oe=c('<template id="'),le=c('"></template>'),ce=c("\x3c!--$--\x3e"),ue=c('\x3c!--$?--\x3e<template id="'),de=c('"></template>'),pe=c("\x3c!--$!--\x3e"),he=c("\x3c!--/$--\x3e"),me=c("<template"),fe=c('"'),ge=c(' data-dgst="');c(' data-msg="'),c(' data-stck="');var ye=c("></template>");function xe(e,n,r){if(a(e,ue),null===r)throw Error(t(395));return a(e,r),i(e,de)}var be=c('<div hidden id="'),ve=c('">'),je=c("</div>"),Ce=c('<svg aria-hidden="true" style="display:none" id="'),Ne=c('">'),ke=c("</svg>"),Se=c('<math aria-hidden="true" style="display:none" id="'),Ee=c('">'),Ae=c("</math>"),Oe=c('<table hidden id="'),_e=c('">'),Pe=c("</table>"),Ie=c('<table hidden><tbody id="'),Me=c('">'),Te=c("</tbody></table>"),Re=c('<table hidden><tr id="'),Le=c('">'),De=c("</tr></table>"),Fe=c('<table hidden><colgroup id="'),qe=c('">'),Be=c("</colgroup></table>");var Ue=c('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),ze=c('$RS("'),He=c('","'),Ve=c('")<\/script>'),$e=c('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),We=c('$RC("'),Qe=c('","'),Ze=c('")<\/script>'),Ke=c('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Ge=c('$RX("'),Ye=c('"'),Je=c(")<\/script>"),Xe=c(","),et=/[<\u2028\u2029]/g;function tt(e){return JSON.stringify(e).replace(et,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var nt=Object.assign,rt=Symbol.for("react.element"),at=Symbol.for("react.portal"),it=Symbol.for("react.fragment"),st=Symbol.for("react.strict_mode"),ot=Symbol.for("react.profiler"),lt=Symbol.for("react.provider"),ct=Symbol.for("react.context"),ut=Symbol.for("react.forward_ref"),dt=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),ht=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),ft=Symbol.for("react.scope"),gt=Symbol.for("react.debug_trace_mode"),yt=Symbol.for("react.legacy_hidden"),xt=Symbol.for("react.default_value"),bt=Symbol.iterator;function vt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case it:return"Fragment";case at:return"Portal";case ot:return"Profiler";case st:return"StrictMode";case dt:return"Suspense";case pt:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ct:return(e.displayName||"Context")+".Consumer";case lt:return(e._context.displayName||"Context")+".Provider";case ut:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ht:return null!==(t=e.displayName||null)?t:vt(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return vt(e(t))}catch(TS){}}return null}var wt={};function jt(e,t){if(!(e=e.contextTypes))return wt;var n,r={};for(n in e)r[n]=t[n];return r}var Ct=null;function Nt(e,n){if(e!==n){e.context._currentValue=e.parentValue,e=e.parent;var r=n.parent;if(null===e){if(null!==r)throw Error(t(401))}else{if(null===r)throw Error(t(401));Nt(e,r)}n.context._currentValue=n.value}}function kt(e){e.context._currentValue=e.parentValue,null!==(e=e.parent)&&kt(e)}function St(e){var t=e.parent;null!==t&&St(t),e.context._currentValue=e.value}function Et(e,n){if(e.context._currentValue=e.parentValue,null===(e=e.parent))throw Error(t(402));e.depth===n.depth?Nt(e,n):Et(e,n)}function At(e,n){var r=n.parent;if(null===r)throw Error(t(402));e.depth===r.depth?Nt(e,r):At(e,r),n.context._currentValue=n.value}function Ot(e){var t=Ct;t!==e&&(null===t?St(e):null===e?kt(t):t.depth===e.depth?Nt(t,e):t.depth>e.depth?Et(t,e):At(t,e),Ct=e)}var _t={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Pt(e,t,n,r){var a=void 0!==e.state?e.state:null;e.updater=_t,e.props=n,e.state=a;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(a=null==(s=s(n,a))?a:nt({},a,s),e.state=a),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&_t.enqueueReplaceState(e,e.state,null),null!==i.queue&&0<i.queue.length)if(t=i.queue,s=i.replace,i.queue=null,i.replace=!1,s&&1===t.length)e.state=t[0];else{for(i=s?t[0]:e.state,a=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,i,n,r):o)&&(a?(a=!1,i=nt({},i,o)):nt(i,o))}e.state=i}else i.queue=null}var It={id:1,overflow:""};function Mt(e,t,n){var r=e.id;e=e.overflow;var a=32-Tt(r)-1;r&=~(1<<a),n+=1;var i=32-Tt(t)+a;if(30<i){var s=a-a%5;return i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,{id:1<<32-Tt(t)+a|n<<a|r,overflow:i+e}}return{id:1<<i|n<<a|r,overflow:e}}var Tt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Rt(e)/Lt|0)|0},Rt=Math.log,Lt=Math.LN2;var Dt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Ft=null,qt=null,Bt=null,Ut=null,zt=!1,Ht=!1,Vt=0,$t=null,Wt=0;function Qt(){if(null===Ft)throw Error(t(321));return Ft}function Zt(){if(0<Wt)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Kt(){return null===Ut?null===Bt?(zt=!1,Bt=Ut=Zt()):(zt=!0,Ut=Bt):null===Ut.next?(zt=!1,Ut=Ut.next=Zt()):(zt=!0,Ut=Ut.next),Ut}function Gt(){qt=Ft=null,Ht=!1,Bt=null,Wt=0,Ut=$t=null}function Yt(e,t){return"function"==typeof t?t(e):t}function Jt(e,t,n){if(Ft=Qt(),Ut=Kt(),zt){var r=Ut.queue;if(t=r.dispatch,null!==$t&&void 0!==(n=$t.get(r))){$t.delete(r),r=Ut.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return Ut.memoizedState=r,[r,t]}return[Ut.memoizedState,t]}return e=e===Yt?"function"==typeof t?t():t:void 0!==n?n(t):t,Ut.memoizedState=e,e=(e=Ut.queue={last:null,dispatch:null}).dispatch=en.bind(null,Ft,e),[Ut.memoizedState,e]}function Xt(e,t){if(Ft=Qt(),t=void 0===t?null:t,null!==(Ut=Kt())){var n=Ut.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var a=0;a<r.length&&a<t.length;a++)if(!Dt(t[a],r[a])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),Ut.memoizedState=[e,t],e}function en(e,n,r){if(25<=Wt)throw Error(t(301));if(e===Ft)if(Ht=!0,e={action:r,next:null},null===$t&&($t=new Map),void 0===(r=$t.get(n)))$t.set(n,e);else{for(n=r;null!==n.next;)n=n.next;n.next=e}}function tn(){throw Error(t(394))}function nn(){}var rn={readContext:function(e){return e._currentValue},useContext:function(e){return Qt(),e._currentValue},useMemo:Xt,useReducer:Jt,useRef:function(e){Ft=Qt();var t=(Ut=Kt()).memoizedState;return null===t?(e={current:e},Ut.memoizedState=e):t},useState:function(e){return Jt(Yt,e)},useInsertionEffect:nn,useLayoutEffect:function(){},useCallback:function(e,t){return Xt(function(){return e},t)},useImperativeHandle:nn,useEffect:nn,useDebugValue:nn,useDeferredValue:function(e){return Qt(),e},useTransition:function(){return Qt(),[!1,tn]},useId:function(){var e=qt.treeContext,n=e.overflow;e=((e=e.id)&~(1<<32-Tt(e)-1)).toString(32)+n;var r=an;if(null===r)throw Error(t(404));return n=Vt++,e=":"+r.idPrefix+"R"+e,0<n&&(e+="H"+n.toString(32)),e+":"},useMutableSource:function(e,t){return Qt(),t(e._source)},useSyncExternalStore:function(e,n,r){if(void 0===r)throw Error(t(407));return r()}},an=null,sn=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function on(e){return null}function ln(){}function cn(e,t,n,r,a,i,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var l={node:t,ping:function(){var t=e.pingedTasks;t.push(l),1===t.length&&Nn(e)},blockedBoundary:n,blockedSegment:r,abortSet:a,legacyContext:i,context:s,treeContext:o};return a.add(l),l}function un(e,t,n,r,a,i){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:a,textEmbedded:i}}function dn(e,t){if(null!=(e=e.onError(t))&&"string"!=typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function pn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,u(e.destination,t)):(e.status=1,e.fatalError=t)}function hn(e,t,n,r,a){for(Ft={},qt=t,Vt=0,e=n(r,a);Ht;)Ht=!1,Vt=0,Wt+=1,Ut=null,e=n(r,a);return Gt(),e}function mn(e,n,r,a){var i=r.render(),s=a.childContextTypes;if(null!=s){var o=n.legacyContext;if("function"!=typeof r.getChildContext)a=o;else{for(var l in r=r.getChildContext())if(!(l in s))throw Error(t(108,vt(a)||"Unknown",l));a=nt({},o,r)}n.legacyContext=a,yn(e,n,i),n.legacyContext=o}else yn(e,n,i)}function fn(e,t){if(e&&e.defaultProps){for(var n in t=nt({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function gn(e,n,r,a,i){if("function"==typeof r)if(r.prototype&&r.prototype.isReactComponent){i=jt(r,n.legacyContext);var s=r.contextType;Pt(s=new r(a,"object"==typeof s&&null!==s?s._currentValue:i),r,a,i),mn(e,n,s,r)}else{i=hn(e,n,r,a,s=jt(r,n.legacyContext));var o=0!==Vt;if("object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof)Pt(i,r,a,s),mn(e,n,i,r);else if(o){a=n.treeContext,n.treeContext=Mt(a,1,0);try{yn(e,n,i)}finally{n.treeContext=a}}else yn(e,n,i)}else{if("string"!=typeof r){switch(r){case yt:case gt:case st:case ot:case it:case pt:return void yn(e,n,a.children);case ft:throw Error(t(343));case dt:e:{r=n.blockedBoundary,i=n.blockedSegment,s=a.fallback,a=a.children;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o=new Set,errorDigest:null},u=un(0,i.chunks.length,c,i.formatContext,!1,!1);i.children.push(u),i.lastPushedText=!1;var d=un(0,0,null,i.formatContext,!1,!1);d.parentFlushed=!0,n.blockedBoundary=c,n.blockedSegment=d;try{if(bn(e,n,a),d.lastPushedText&&d.textEmbedded&&d.chunks.push(R),d.status=1,jn(c,d),0===c.pendingTasks)break e}catch(p){d.status=4,c.forceClientRender=!0,c.errorDigest=dn(e,p)}finally{n.blockedBoundary=r,n.blockedSegment=i}n=cn(e,s,r,u,o,n.legacyContext,n.context,n.treeContext),e.pingedTasks.push(n)}return}if("object"==typeof r&&null!==r)switch(r.$$typeof){case ut:if(a=hn(e,n,r.render,a,i),0!==Vt){r=n.treeContext,n.treeContext=Mt(r,1,0);try{yn(e,n,a)}finally{n.treeContext=r}}else yn(e,n,a);return;case ht:return void gn(e,n,r=r.type,a=fn(r,a),i);case lt:if(i=a.children,r=r._context,a=a.value,s=r._currentValue,r._currentValue=a,Ct=a={parent:o=Ct,depth:null===o?0:o.depth+1,context:r,parentValue:s,value:a},n.context=a,yn(e,n,i),null===(e=Ct))throw Error(t(403));return a=e.parentValue,e.context._currentValue=a===xt?e.context._defaultValue:a,e=Ct=e.parent,void(n.context=e);case ct:return void yn(e,n,a=(a=a.children)(r._currentValue));case mt:return void gn(e,n,r=(i=r._init)(r._payload),a=fn(r,a),void 0)}throw Error(t(130,null==r?r:typeof r,""))}switch(s=ae((i=n.blockedSegment).chunks,r,a,e.responseState,i.formatContext),i.lastPushedText=!1,o=i.formatContext,i.formatContext=function(e,t,n){switch(t){case"select":return T(1,null!=n.value?n.value:n.defaultValue);case"svg":return T(2,null);case"math":return T(3,null);case"foreignObject":return T(1,null);case"table":return T(4,null);case"thead":case"tbody":case"tfoot":return T(5,null);case"colgroup":return T(7,null);case"tr":return T(6,null)}return 4<=e.insertionMode||0===e.insertionMode?T(1,null):e}(o,r,a),bn(e,n,s),i.formatContext=o,r){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push(ie,l(r),se)}i.lastPushedText=!1}}function yn(e,n,r){if(n.node=r,"object"==typeof r&&null!==r){switch(r.$$typeof){case rt:return void gn(e,n,r.type,r.props,r.ref);case at:throw Error(t(257));case mt:var a=r._init;return void yn(e,n,r=a(r._payload))}if(S(r))return void xn(e,n,r);if(null===r||"object"!=typeof r?a=null:a="function"==typeof(a=bt&&r[bt]||r["@@iterator"])?a:null,a&&(a=a.call(r))){if(!(r=a.next()).done){var i=[];do{i.push(r.value),r=a.next()}while(!r.done);xn(e,n,i)}return}throw e=Object.prototype.toString.call(r),Error(t(31,"[object Object]"===e?"object with keys {"+Object.keys(r).join(", ")+"}":e))}"string"==typeof r?(a=n.blockedSegment).lastPushedText=L(n.blockedSegment.chunks,r,e.responseState,a.lastPushedText):"number"==typeof r&&((a=n.blockedSegment).lastPushedText=L(n.blockedSegment.chunks,""+r,e.responseState,a.lastPushedText))}function xn(e,t,n){for(var r=n.length,a=0;a<r;a++){var i=t.treeContext;t.treeContext=Mt(i,r,a);try{bn(e,t,n[a])}finally{t.treeContext=i}}}function bn(e,t,n){var r=t.blockedSegment.formatContext,a=t.legacyContext,i=t.context;try{return yn(e,t,n)}catch(ra){if(Gt(),"object"!=typeof ra||null===ra||"function"!=typeof ra.then)throw t.blockedSegment.formatContext=r,t.legacyContext=a,t.context=i,Ot(i),ra;n=ra;var s=t.blockedSegment,o=un(0,s.chunks.length,null,s.formatContext,s.lastPushedText,!0);s.children.push(o),s.lastPushedText=!1,e=cn(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=a,t.context=i,Ot(i)}}function vn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,Cn(this,t,e)}function wn(e,n,r){var a=e.blockedBoundary;e.blockedSegment.status=3,null===a?(n.allPendingTasks--,2!==n.status&&(n.status=2,null!==n.destination&&n.destination.close())):(a.pendingTasks--,a.forceClientRender||(a.forceClientRender=!0,e=void 0===r?Error(t(432)):r,a.errorDigest=n.onError(e),a.parentFlushed&&n.clientRenderedBoundaries.push(a)),a.fallbackAbortableTasks.forEach(function(e){return wn(e,n,r)}),a.fallbackAbortableTasks.clear(),n.allPendingTasks--,0===n.allPendingTasks&&(a=n.onAllReady)())}function jn(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&jn(e,n)}else e.completedSegments.push(t)}function Cn(e,n,r){if(null===n){if(r.parentFlushed){if(null!==e.completedRootSegment)throw Error(t(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=ln,(n=e.onShellReady)())}else n.pendingTasks--,n.forceClientRender||(0===n.pendingTasks?(r.parentFlushed&&1===r.status&&jn(n,r),n.parentFlushed&&e.completedBoundaries.push(n),n.fallbackAbortableTasks.forEach(vn,e),n.fallbackAbortableTasks.clear()):r.parentFlushed&&1===r.status&&(jn(n,r),1===n.completedSegments.length&&n.parentFlushed&&e.partialBoundaries.push(n)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function Nn(e){if(2!==e.status){var t=Ct,n=sn.current;sn.current=rn;var r=an;an=e.responseState;try{var a,i=e.pingedTasks;for(a=0;a<i.length;a++){var s=i[a],o=e,l=s.blockedSegment;if(0===l.status){Ot(s.context);try{yn(o,s,s.node),l.lastPushedText&&l.textEmbedded&&l.chunks.push(R),s.abortSet.delete(s),l.status=1,Cn(o,s.blockedBoundary,l)}catch(we){if(Gt(),"object"==typeof we&&null!==we&&"function"==typeof we.then){var c=s.ping;we.then(c,c)}else{s.abortSet.delete(s),l.status=4;var u=s.blockedBoundary,d=we,p=dn(o,d);if(null===u?pn(o,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=p,u.parentFlushed&&o.clientRenderedBoundaries.push(u))),o.allPendingTasks--,0===o.allPendingTasks)(0,o.onAllReady)()}}}}i.splice(0,a),null!==e.destination&&_n(e,e.destination)}catch(we){dn(e,we),pn(e,we)}finally{an=r,sn.current=n,n===rn&&Ot(t)}}}function kn(e,n,r){switch(r.parentFlushed=!0,r.status){case 0:var s=r.id=e.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,e=e.responseState,a(n,oe),a(n,e.placeholderPrefix),a(n,e=l(s.toString(16))),i(n,le);case 1:r.status=2;var o=!0;s=r.chunks;var c=0;r=r.children;for(var u=0;u<r.length;u++){for(o=r[u];c<o.index;c++)a(n,s[c]);o=Sn(e,n,o)}for(;c<s.length-1;c++)a(n,s[c]);return c<s.length&&(o=i(n,s[c])),o;default:throw Error(t(390))}}function Sn(e,n,r){var s=r.boundary;if(null===s)return kn(e,n,r);if(s.parentFlushed=!0,s.forceClientRender)s=s.errorDigest,i(n,pe),a(n,me),s&&(a(n,ge),a(n,l(C(s))),a(n,fe)),i(n,ye),kn(e,n,r);else if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var o=e.responseState,u=o.nextSuspenseID++;o=c(o.boundaryPrefix+u.toString(16)),s=s.id=o,xe(n,e.responseState,s),kn(e,n,r)}else if(s.byteSize>e.progressiveChunkSize)s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),xe(n,e.responseState,s.id),kn(e,n,r);else{if(i(n,ce),1!==(r=s.completedSegments).length)throw Error(t(391));Sn(e,n,r[0])}return i(n,he)}function En(e,n,r){return function(e,n,r,s){switch(r.insertionMode){case 0:case 1:return a(e,be),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,ve);case 2:return a(e,Ce),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,Ne);case 3:return a(e,Se),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,Ee);case 4:return a(e,Oe),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,_e);case 5:return a(e,Ie),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,Me);case 6:return a(e,Re),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,Le);case 7:return a(e,Fe),a(e,n.segmentPrefix),a(e,l(s.toString(16))),i(e,qe);default:throw Error(t(397))}}(n,e.responseState,r.formatContext,r.id),Sn(e,n,r),function(e,n){switch(n.insertionMode){case 0:case 1:return i(e,je);case 2:return i(e,ke);case 3:return i(e,Ae);case 4:return i(e,Pe);case 5:return i(e,Te);case 6:return i(e,De);case 7:return i(e,Be);default:throw Error(t(397))}}(n,r.formatContext)}function An(e,n,r){for(var s=r.completedSegments,o=0;o<s.length;o++)On(e,n,r,s[o]);if(s.length=0,e=e.responseState,s=r.id,r=r.rootSegmentID,a(n,e.startInlineScript),e.sentCompleteBoundaryFunction?a(n,We):(e.sentCompleteBoundaryFunction=!0,a(n,$e)),null===s)throw Error(t(395));return r=l(r.toString(16)),a(n,s),a(n,Qe),a(n,e.segmentPrefix),a(n,r),i(n,Ze)}function On(e,n,r,s){if(2===s.status)return!0;var o=s.id;if(-1===o){if(-1===(s.id=r.rootSegmentID))throw Error(t(392));return En(e,n,s)}return En(e,n,s),a(n,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?a(n,ze):(e.sentCompleteSegmentFunction=!0,a(n,Ue)),a(n,e.segmentPrefix),a(n,o=l(o.toString(16))),a(n,He),a(n,e.placeholderPrefix),a(n,o),i(n,Ve)}function _n(e,o){n=new Uint8Array(512),r=0;try{var c=e.completedRootSegment;if(null!==c&&0===e.pendingRootTasks){Sn(e,o,c),e.completedRootSegment=null;var u=e.responseState.bootstrapChunks;for(c=0;c<u.length-1;c++)a(o,u[c]);c<u.length&&i(o,u[c])}var d,p=e.clientRenderedBoundaries;for(d=0;d<p.length;d++){var h=p[d];u=o;var m=e.responseState,f=h.id,g=h.errorDigest,y=h.errorMessage,x=h.errorComponentStack;if(a(u,m.startInlineScript),m.sentClientRenderFunction?a(u,Ge):(m.sentClientRenderFunction=!0,a(u,Ke)),null===f)throw Error(t(395));a(u,f),a(u,Ye),(g||y||x)&&(a(u,Xe),a(u,l(tt(g||"")))),(y||x)&&(a(u,Xe),a(u,l(tt(y||"")))),x&&(a(u,Xe),a(u,l(tt(x)))),i(u,Je)}p.splice(0,d);var b=e.completedBoundaries;for(d=0;d<b.length;d++)An(e,o,b[d]);b.splice(0,d),s(o),n=new Uint8Array(512),r=0;var v=e.partialBoundaries;for(d=0;d<v.length;d++){var w=v[d];e:{p=e,h=o;var j=w.completedSegments;for(m=0;m<j.length;m++)if(!On(p,h,w,j[m])){m++,j.splice(0,m);var C=!1;break e}j.splice(0,m),C=!0}if(!C)return e.destination=null,d++,void v.splice(0,d)}v.splice(0,d);var N=e.completedBoundaries;for(d=0;d<N.length;d++)An(e,o,N[d]);N.splice(0,d)}finally{s(o),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&o.close()}}function Pn(e,t){try{var n=e.abortableTasks;n.forEach(function(n){return wn(n,e,t)}),n.clear(),null!==e.destination&&_n(e,e.destination)}catch(r){dn(e,r),pn(e,r)}}return _b.renderToReadableStream=function(e,t){return new Promise(function(n,r){var a,i,s=new Promise(function(e,t){i=e,a=t}),o=function(e,t,n,r,a,i,s,o,l){var c=[],u=new Set;return(n=un(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:c,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===a?on:a,onAllReady:void 0===i?ln:i,onShellReady:void 0===s?ln:s,onShellError:void 0===o?ln:o,onFatalError:void 0===l?ln:l},0,null,n,!1,!1)).parentFlushed=!0,e=cn(t,e,null,n,u,wt,null,It),c.push(e),t}(e,function(e,t,n,r,a){e=void 0===e?"":e,t=void 0===t?E:c('<script nonce="'+C(t)+'">');var i=[];if(void 0!==n&&i.push(t,l((""+n).replace(I,M)),A),void 0!==r)for(n=0;n<r.length;n++)i.push(O,l(C(r[n])),P);
35if(void 0!==a)for(r=0;r<a.length;r++)i.push(_,l(C(a[r])),P);return{bootstrapChunks:i,startInlineScript:t,placeholderPrefix:c(e+"P:"),segmentPrefix:c(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return T("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,i,function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===o.status)o.status=2,u(e,o.fatalError);else if(2!==o.status&&null===o.destination){o.destination=e;try{_n(o,e)}catch(t){dn(o,t),pn(o,t)}}},cancel:function(){Pn(o)}},{highWaterMark:0});e.allReady=s,n(e)},function(e){s.catch(function(){}),r(e)},a);if(t&&t.signal){var d=t.signal,p=function(){Pn(o,d.reason),d.removeEventListener("abort",p)};d.addEventListener("abort",p)}Nn(o)})},_b.version="18.3.1",_b}var Ib=function(){return Ob||(Ob=1,e=Eb(),t=Pb(),kb.version=e.version,kb.renderToString=e.renderToString,kb.renderToStaticMarkup=e.renderToStaticMarkup,kb.renderToNodeStream=e.renderToNodeStream,kb.renderToStaticNodeStream=e.renderToStaticNodeStream,kb.renderToReadableStream=t.renderToReadableStream),kb;var e,t}();const Mb=E("\n  mutation UploadImage($file: Upload!) {\n    uploadImage(file: $file) {\n      image_url\n    }\n  }\n");const Tb=/<p\b[^>]*>([\s\S]*?)<\/p>/gi,Rb=/^(?:\s|&nbsp;|<br\s*\/?>)*$/i,Lb=/(<br\s*\/?>)\s+/gi,Db=/(?:<br\s*\/?>\s*)+(?=<\/|$)/gi,Fb=e=>e.replace(Tb,(e,t)=>Rb.test(t)?"":`${t.trim()}<br><br>`).replace(Lb,"$1").replace(Db,"").trim(),qb=["webkit-fake-url:","blob:","cid:"],Bb=["mail.google.com","mail-attachment.googleusercontent.com","outlook.live.com","outlook.office.com","outlook.office365.com","outlook.cloud.microsoft","attachment.outlook.live.net","office.net","mail.yahoo.com","mail.aol.com"],Ub=e=>{let t;try{t=new URL(e,window.location.href)}catch{return!1}return!!qb.includes(t.protocol)||("http:"===t.protocol||"https:"===t.protocol)&&Bb.some(e=>t.hostname===e||t.hostname.endsWith(`.${e}`))},zb=Gx.Quill.import("blots/block/embed"),Hb=Gx.Quill.import("delta"),Vb="tableImage",$b=["Enter","Backspace","Delete"],Wb={"ql-bold":"bold","ql-italic":"italic","ql-underline":"underline","ql-strike":"strikeThrough"},Qb={b:"bold",i:"italic",u:"underline"};class Zb extends zb{static blotName="table";static tagName="TABLE";static create(e){return(new DOMParser).parseFromString(e,"text/html").body.firstElementChild??super.create()}static value(e){return e.outerHTML}}const Kb=e=>{const t=window.getSelection()?.anchorNode,n=t instanceof Element?t:t?.parentElement,r=n?.closest("td, th");return r&&e.contains(r)?r:null},Gb=e=>{document.execCommand(e)},Yb=(e,t)=>{const n=Qb[e.key.toLowerCase()];if(n&&(e.metaKey||e.ctrlKey)){if(!Kb(t))return;return e.preventDefault(),e.stopPropagation(),void Gb(n)}$b.includes(e.key)&&Kb(t)&&(e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),(()=>{const e=window.getSelection(),t=e?.getRangeAt(0);if(!t)return;t.deleteContents();const n=document.createElement("br");t.insertNode(n),n.nextSibling||n.after(document.createElement("br")),t.setStartAfter(n),t.collapse(!0),e?.removeAllRanges(),e?.addRange(t)}
35)()))},Jb={image:{attribute:["width"],limit:{minWidth:100}},[Vb]:{attribute:["width"],limit:{minWidth:40}}};Gx.Quill.register("modules/resize",Nb);const Xb=Gx.Quill.import("delta"),ev=["alt","height","width","style"],tv=Gx.Quill.import("formats/image");Gx.Quill.register(class extends tv{static formats(e){return ev.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}format(e,t){ev.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},!0),Gx.Quill.register(Zb,!0);const nv=Gx.Quill.import("ui/icons");nv.undo||(nv.undo=Ib.renderToStaticMarkup(i.jsx(zs,{}))),nv.redo||(nv.redo=Ib.renderToStaticMarkup(i.jsx(Os,{})));const rv=(e=!1)=>{const t=window.getSelection();if(!t?.rangeCount)return null;const n=t.getRangeAt(0).cloneRange();return e&&n.collapse(!0),n},av=e=>{const{container:t}=e?.clipboard??{};return!!t&&document.activeElement===t},iv=t.forwardRef(({value:e,onChange:n,placeholder:r="",disabled:a=!1,className:o,height:l="280px",onImageSizeError:c,onBlur:u},d)=>{const h=t.useRef(null),m=t.useRef(null),[f]=p(Mb),{toastError:g,toastCatchError:y}=v(),[x,b]=t.useState(!1),w=t.useRef(g),j=t.useRef(!1),C=t.useRef(null),N=t.useRef(!1),k=t.useRef(a);t.useEffect(()=>{w.current=g,k.current=a});const S=t.useCallback(()=>{const e=h.current?.getEditor();if(!e)return;const t=e.getModule("history"),n=e.getModule("toolbar"),r=n?.container?.querySelector(".ql-undo"),a=n?.container?.querySelector(".ql-redo");r&&(r.disabled=(t?.stack?.undo?.length??0)<=0),a&&(a.disabled=(t?.stack?.redo?.length??0)<=0)},[]);t.useImperativeHandle(d,()=>({setValueWithHistory:e=>{const t=h.current?.getEditor();if(!t)return;const n=t.clipboard.convert(Fb(e));t.setContents(n,"user"),S()}}));const[E,A]=t.useState(()=>e?.trim()?Fb(e):"<p><br></p>"),O=t.useRef(null);t.useEffect(()=>{if(e===O.current)return;const t=e?.trim()?Fb(e):"<p><br></p>";A(e=>e===t?e:t)},[e]),t.useEffect(()=>{if(!h.current)return;h.current.getEditor().enable(!a),S()},[a,S]);const _=t.useCallback((e,t)=>{const n=h.current?.getEditor();if(!n)return;k.current||n.enable(!0);const r=C.current;if(C.current=null,((e,t,n,r)=>{const a=t?.startContainer,i=a instanceof Element?a:a?.parentElement,s=i?.closest("td, th");if(!t||!s||!e.contains(s))return!1;const o=document.createElement("img");o.src=n,o.setAttribute("width",String(r)),o.style.width=`${r}px`,o.style.height="auto",t.deleteContents();const l=i?.closest("a");l&&s.contains(l)?l.after(o):t.insertNode(o),e.focus();const c=window.getSelection();return t.setStartAfter(o),t.collapse(!0),c?.removeAllRanges(),c?.addRange(t),!0})(n.root,r,e,150))return;const a=n.getSelection(!0),i=t??(a?a.index:n.getLength());n.focus(),n.insertEmbed(i,"image",e,"user"),n.setSelection(i+1,0);const s=n.root.querySelectorAll("img"),o=s[s.length-1];o&&o.src===e&&(o.style.width="150px",o.style.height="auto",o.setAttribute("width",String(150)))},[]),P=t.useCallback(async(e,t)=>{if(e.size>5242880){const e="Image size should be less than 5MB";return C.current=null,void(c?c(e):g(e))}b(!0),N.current=!0;try{const n=await f({variables:{file:e}}),r=n.data?.uploadImage?.image_url;if(!r){const e=n.errors?.[0]?.message||"Failed to upload image";throw new Error(e)}_(r,t)}catch(n){C.current=null,y(n)}finally{b(!1),N.current=!1}},[_,c,f]),I=t.useCallback(()=>{if(N.current)return;const e=document.createElement("input");e.type="file",e.accept="image/*",e.style.cssText="position:fixed;top:0;left:0;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(e),e.addEventListener("change",()=>{const t=e.files?.[0];e.remove(),t&&P(t)},{once:!0}),window.addEventListener("focus",()=>{setTimeout(()=>e.remove(),1e3)},{once:!0}),e.click()},[P]);t.useEffect(()=>{const e=m.current,t=h.current?.getEditor();if(!e||!t)return;const n=e=>{const{clipboardData:n}=e,r=(e=>{if(!e)return[];const t=Array.from(e.files??[]);return t.length>0?t.filter(e=>e.type.startsWith("image/")):Array.from(e.items??[]).filter(e=>"file"===e.kind&&e.type.startsWith("image/")).map(e=>e.getAsFile()).filter(e=>null!==e)})(n);0!==r.length&&(n?.getData("text/plain").trim()||(C.current=rv(),e.preventDefault(),P(r[0],t.getSelection()?.index)))};return e.addEventListener("paste",n,!0),()=>e.removeEventListener("paste",n,!0)},[P]),t.useEffect(()=>{const e=m.current,t=h.current?.getEditor();if(!e||!t)return;const n=e=>{if(N.current)return;const t=e.target?.closest?.("button.ql-image");t&&(C.current=rv(!0))},r=e=>{n(e),Yb(e,t.root)},a=e=>{n(e),((e,t)=>{const n=e.target?.closest("button");if(!n)return;const r=Object.keys(Wb).find(e=>n.classList.contains(e));r&&Kb(t)&&(e.preventDefault(),e.stopPropagation(),Gb(Wb[r]))})(e,t.root)},i=e=>((e,t)=>{const n=e.target;n instanceof HTMLImageElement&&n.closest("table")&&t.root.contains(n)&&t.getModule("resize")?.judgeShow({statics:{blotName:Vb},domNode:n},n)})(e,t),s=e=>((e,t)=>{const n=e.target?.closest("a");if(!n||!t.contains(n)||!n.closest("table"))return;const r=n.getAttribute("href");r&&(e.preventDefault(),window.open(r,"_blank","noopener,noreferrer"))})(e,t.root);
35return e.addEventListener("click",s,!0),e.addEventListener("keydown",r,!0),e.addEventListener("mousedown",a,!0),e.addEventListener("mousedown",i,!1),()=>{e.removeEventListener("click",s,!0),e.removeEventListener("keydown",r,!0),e.removeEventListener("mousedown",a,!0),e.removeEventListener("mousedown",i,!1)}},[]);const M=t.useCallback((e,t)=>{const n=h.current?.getEditor(),r=e.getAttribute?.("src")??"";return av(n)&&Ub(r)?(j.current||(j.current=!0,w.current("Pasted image couldn't be read. Use the image button in the toolbar to upload it."),setTimeout(()=>{j.current=!1},4e3)),new Xb):t},[]),T=t.useCallback(e=>((e,t)=>{const n=e.cloneNode(!0);return t&&n.querySelectorAll("img").forEach(e=>{const t=e.getAttribute("src")??"";if(!Ub(t))return;const n=e.closest("td, th"),r=e.closest("a");e.remove(),r&&!r.textContent?.trim()&&r.remove(),!n||n.textContent?.trim()||n.querySelector("img")||n.append(" ")}),n.querySelectorAll('[style*="font-family"]').forEach(e=>{e.style.removeProperty("font-family")}),n.querySelectorAll("font[face]").forEach(e=>e.removeAttribute("face")),n.style.fontFamily="Arial, Helvetica, sans-serif",(new Hb).insert({table:n.outerHTML})})(e,av(h.current?.getEditor())),[]),R=t.useCallback(()=>{const e=h.current?.getEditor();e?.getModule("history")?.undo(),S()},[S]),L=t.useCallback(()=>{const e=h.current?.getEditor();e?.getModule("history")?.redo(),S()},[S]),D={history:{delay:1e3,maxStack:100,userOnly:!0},toolbar:{container:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],["link","image"],["clean"],["undo","redo"]],handlers:{undo:R,redo:L,image:I}},clipboard:{matchVisual:!1,matchers:[["IMG",M],["TABLE",T]]},resize:{modules:["Resize","DisplaySize"],parchment:Jb}},F=t.useCallback((e,t,r)=>{const a=e.replace(Tb,(e,t)=>`${Rb.test(t)?"":t.trim()}<br>`).replace(Lb,"$1").replace(Db,"").trim();O.current=a,n(a,r),A(e),S()},[n,S]);return i.jsx("div",{ref:m,className:s("rich-text-editor-wrapper",o),style:{"--editor-height":l,width:"100%",position:"relative"},children:i.jsx(Yx,{ref:h,theme:"snow",value:E,onChange:F,modules:D,formats:["header","bold","italic","underline","strike","color","background","list","bullet","link","image","indent","width","table"],placeholder:r,readOnly:a||x,className:"rich-text-editor",onBlur:u})})}),sv=E("\n  mutation SendTestOutreachEmailMutation(\n    $subject: String!\n    $body: String!\n    $attachments: [EmailAttachmentInput!]\n  ) {\n    sendTestOutreachEmail(\n      subject: $subject\n      body: $body\n      attachments: $attachments\n    ) {\n      success\n      error\n    }\n  }\n"),ov=()=>p(sv),lv=e=>{if(!e)return"";const t=(new DOMParser).parseFromString(e,"text/html");return t.body.textContent?.trim()||""},cv=()=>{const{toastCatchError:e,toastError:n,toastSuccess:r}=v(),[a,s]=t.useState(""),[o,l]=t.useState(!1),{data:c,loading:u}=d(op),[h]=p(ip),[m,{loading:f}]=ov();t.useEffect(()=>{const e=c?.user?.vendor_member?.email_signature;e&&s(e)},[c]);const g=lv(a).length,y=5e3-g;return i.jsxs(fn,{children:[i.jsxs("div",{className:"mb-5",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("p",{className:"text-2xl font-medium leading-normal text-left",children:"Email Signature"})}),i.jsx("p",{className:"text-sm text-hoki-600",children:"Define the default signature that will be appended to emails you send."})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(iv,{value:a,onChange:e=>{lv(e).length<=5e3&&s(e)},placeholder:"Type here...",disabled:u,height:"320px"}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-xs text-hoki-500",children:[y," ","characters remaining"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(yn,{type:"button",onClick:async()=>{try{const{data:e}=await m({variables:{subject:"Email signature preview",body:a}});e?.sendTestOutreachEmail.success?r("Test email sent to your inbox"):n(e?.sendTestOutreachEmail.error??"Failed to send test email")}catch(t){e(t)}},disabled:u||f||0===g,variant:"secondary","aria-busy":f,children:f?"
35Sending...":"Send test email"}),i.jsx(yn,{type:"button",onClick:async()=>{try{l(!0);const e=lv(a).length>0;await h({variables:{email_signature:e?a:""}}),l(!1),r(e?"Email signature updated successfully":"Email signature cleared")}catch(t){l(!1),e(t)}},disabled:u||o,variant:"primary","aria-busy":o,children:o?"Saving...":"Save"})]})]})]})]})},uv=()=>{const{toastWarning:e}=v(),n=t.useRef(0);return{clampWithToast:(t,r,a)=>{if(t.length<=r)return t;const i=Date.now();if(i-n.current>4e3){n.current=i;const s=t.length-r;e(`${a} is limited to ${r.toLocaleString()} characters. The last ${s.toLocaleString()} character${1===s?" was":"s were"} trimmed.`)}return t.slice(0,r)}}},dv=4e3,pv="Write an email that:\n- References the specific events meaningfully\n- Explains how our company can help based on these developments\n- Sounds natural and conversational\n- Includes a clear next step",hv=()=>{const{toastCatchError:e,toastSuccess:n}=v(),{clampWithToast:r}=uv(),[a,s]=t.useState(""),[o,l]=t.useState(!1),{data:c,loading:u,refetch:h}=d(op),[m]=p(ip);t.useEffect(()=>{const e=c?.user?.vendor_member?.email_prompt_guidelines;s(null!=e?e:pv)},[c]);const f=dv-a.length;return i.jsxs(fn,{children:[i.jsxs("div",{className:"mb-5",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("p",{className:"text-2xl font-medium leading-normal text-left",children:"Email Prompt Guidelines"})}),i.jsx("p",{className:"text-sm text-hoki-600",children:"Customize how AI generates your emails, including tone, style, and content."})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(Lt,{value:a,disabled:u,minRows:5,maxRows:8,onChange:e=>s(r(e.target.value,dv,"Email prompt guidelines"))}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs text-hoki-500",children:`${f} characters remaining`}),i.jsxs("div",{className:"flex items-center gap-4",children:[a.trim()!==pv.trim()&&i.jsx(yn,{type:"button",onClick:()=>{s(pv)},disabled:u||o,variant:"secondary",children:"Use default prompt"}),i.jsx(yn,{type:"button",onClick:async()=>{try{l(!0),await m({variables:{email_prompt_guidelines:a.trim()}}),await h(),l(!1),n("Email prompt guidelines updated successfully")}catch(t){l(!1),e(t)}},disabled:u||o,variant:"primary",children:o?"Saving...":"Save"})]})]})]})]})},mv=e=>new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),fv=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}),gv=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),yv=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,xv=E("\n  query emailStyleSamples {\n    emailStyleSamples {\n      id\n      subject\n      body\n      source\n      created_at\n    }\n  }\n"),bv=E("\n  mutation saveEmailStyleSample($subject: String, $body: String!, $source: String!) {\n    saveEmailStyleSample(subject: $subject, body: $body, source: $source) {\n      id\n      subject\n      body\n      source\n      created_at\n    }\n  }\n"),vv=E("\n  mutation updateEmailStyleSample($id: String!, $subject: String, $body: String!) {\n    updateEmailStyleSample(id: $id, subject: $subject, body: $body) {\n      id\n      subject\n      body\n      source\n      created_at\n    }\n  }\n"),wv=E("\n  mutation deleteEmailStyleSample($id: String!) {\n    deleteEmailStyleSample(id: $id)\n  }\n"),jv=E("\n  query emailStyleCandidates {\n    recentEmailStyleSampleCandidates {\n      id\n      subject\n      sent_at\n      body\n    }\n  }\n");function Cv(){const{data:e,loading:t,refetch:n}=d(xv),[r,{loading:a}]=p(bv,{refetchQueries:[xv]}),i=e?.emailStyleSamples??[];return{samples:i,loading:t,refetch:n,saveEmailStyleSample:r,isSavingSample:a,atLimit:i.length>=3}}const Nv=({subject:e,onSubjectChange:t,body:n,onBodyChange:r,disabled:a=!1,bodyMinRows:s=4,bodyMaxRows:o=8,onCancel:l,onSave:c,saveLabel:u,saveDisabled:d=!1,className:p})=>{const{clampWithToast:h}=uv();return i.jsxs("div",{className:p,children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Subject (optional)"}),i.jsxs("span",{className:"text-xs text-hoki-500",children:[200-e.length," ","characters remaining"]})]}
35),i.jsx("input",{type:"text",value:e,onChange:e=>t(h(e.target.value,200,"Subject")),placeholder:"Email subject line",disabled:a,className:"w-full px-3 py-2 text-sm border border-hoki-300 rounded-lg"})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Body"}),i.jsxs("span",{className:"text-xs text-hoki-500",children:[3e3-n.length," ","characters remaining"]})]}),i.jsx(Lt,{value:n,minRows:s,maxRows:o,placeholder:"Paste an example email you've written...",onChange:e=>r(h(e.target.value,3e3,"Sample email body")),disabled:a,className:"text-sm focus:ring-0 min-h-[280px]"})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(yn,{type:"button",variant:"secondary",onClick:l,disabled:a,children:"Cancel"}),i.jsx(yn,{type:"button",variant:"primary",onClick:c,disabled:a||d,children:u})]})]})},kv={manual_upload:"Manually added",sent_email_import:"From sent emails",from_email_draft:"From email draft"};function Sv(e){return e.trim()?e.trim().split(/\s+/).filter(Boolean).length:0}const Ev=()=>{const{toastCatchError:e,toastSuccess:n}=v(),[r,a]=t.useState(!1),[s,o]=t.useState(""),[l,c]=t.useState(""),[u,h]=t.useState(!1),[m,f]=t.useState(!1),[g,y]=t.useState(()=>new Set),[x,b]=t.useState(()=>new Set),[w,j]=t.useState(null),[C,N]=t.useState(!1),[k,S]=t.useState(null),[E,A]=t.useState(""),[_,P]=t.useState(""),[I,M]=t.useState(!1),T=t.useRef(null),{samples:R,loading:L,refetch:D,saveEmailStyleSample:F,atLimit:q}=Cv(),[B]=p(wv),[U]=p(vv),{data:z,loading:H}=d(jv,{skip:!m,fetchPolicy:"network-only",nextFetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0}),V=t.useCallback(async()=>{const t=T.current;if(t){T.current=null;try{await F({variables:{subject:t.subject?.trim(),body:t.body,source:t.source}}),await D(),n("Sample restored.")}catch(r){e(r)}}},[F,D,n,e]),$=z?.recentEmailStyleSampleCandidates??[];return i.jsxs(i.Fragment,{children:[i.jsxs(fn,{className:"mb-20",children:[i.jsxs("div",{className:"mb-5",children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left",children:"Writing Style Samples"}),i.jsx("p",{className:"text-sm text-hoki-600",children:"Add up to 3 examples of your past emails so AI can match your voice and tone when drafting outreach emails."})]}),L?i.jsx("div",{className:"flex justify-center py-6",children:i.jsx(O,{})}):i.jsxs("div",{className:"space-y-4",children:[R.length>0&&i.jsx("div",{className:"space-y-2",children:R.map(t=>{const r=Sv(t.subject??"")+Sv(t.body),a=t.body.replace(/\s+/g," ").trim(),s=""!==t.subject?.trim();return i.jsx("div",{className:"rounded-lg border border-hoki-200 bg-white p-3 hover:border-hoki-300 transition-colors",children:i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[s&&i.jsx("p",{className:"text-sm font-medium text-gray-900 truncate mb-0.5",children:t.subject}),i.jsx("p",{className:"text-xs text-gray-500 line-clamp-2",children:a}),i.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-[11px] text-hoki-600",children:[i.jsx("span",{className:"inline-flex items-center rounded bg-hoki-50 px-1.5 py-0.5",children:kv[t.source]??t.source}),i.jsx("span",{className:"text-hoki-500",children:`${r} words`}),i.jsxs("span",{className:"text-hoki-400 flex items-center",children:[i.jsx(es,{className:"w-3.5 h-3.5"}),`Saved ${gv(t.created_at)}`]})]})]}),i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[i.jsx("button",{type:"button",onClick:()=>(e=>{S(e.id),A(e.subject??""),P(e.body),N(!0)})(t),className:"p-1.5 rounded-md text-hoki-600 hover:bg-hoki-100 hover:text-hoki-800","aria-label":"Edit sample",children:i.jsx(ks,{className:"w-3.5 h-3.5"})}),i.jsx("button",{type:"button",onClick:()=>(async t=>{const r=R.find(e=>e.id===t);if(r){T.current={...r};try{await B({variables:{id:t}}),await D(),n(i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"Sample removed."})," ",i.jsx("button",{type:"button",onClick:V,className:"ml-1 font-medium underline hover:no-underline",children:"Undo"})]}))}catch(a){T.current=null,e(a)}}})(t.id),className:"p-1.5 rounded-md text-red-600 hover:bg-red-50 hover:text-red-700","aria-label":"Remove sample",children:i.jsx(Us,{className:"w-3.5 h-3.5"})})]})]})},t.id)})}),0===R.length&&!r&&i.jsx("p",{className:"text-sm text-hoki-400",children:"No style samples yet."}),r&&i.jsx(Nv,{subject:s,onSubjectChange:o,body:l,onBodyChange:c,disabled:u,bodyMinRows:4,bodyMaxRows:8,onCancel:()=>{a(!1),o(""),c("")},onSave:async()=>
35{if(l.trim())try{h(!0),await F({variables:{subject:s.trim()||void 0,body:l.trim(),source:"manual_upload"}}),await D(),o(""),c(""),a(!1),n("Style sample saved.")}catch(t){e(t)}finally{h(!1)}},saveLabel:u?"Saving...":"Save",saveDisabled:!l.trim(),className:"space-y-2"}),!r&&i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(yn,{type:"button",variant:"secondary",onClick:()=>a(!0),disabled:q,className:q?"opacity-50 cursor-not-allowed":void 0,children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(kn,{className:"w-4 h-4 text-gray-400"}),i.jsx("span",{children:"Add sample email"})]})}),i.jsx(yn,{type:"button",variant:"secondary",onClick:async()=>{f(!0)},disabled:q,className:q?"opacity-50 cursor-not-allowed":void 0,children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(ts,{className:"w-4 h-4 text-gray-400"}),i.jsx("span",{children:"Import recent sent emails"})]})})]}),q&&i.jsxs("p",{className:"text-xs text-hoki-500",children:["Maximum of"," ",3," ","samples reached. Remove one to add more."]})]})]}),m&&i.jsx(no,{isOpen:m,onClose:()=>{f(!1),b(new Set),j(null)},title:"Import recent sent emails",hideHeaderBorder:!0,size:"lg",children:i.jsx("div",{className:"w-full flex flex-col gap-3",children:H?i.jsx("div",{className:"flex justify-center py-6",children:i.jsx(O,{})}):i.jsxs(i.Fragment,{children:[q&&i.jsxs("div",{className:"mb-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",children:["You've reached the maximum of"," ",3," ","style samples. Remove one of your existing samples before adding more."]}),0===$.length?i.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[i.jsx("div",{className:"rounded-full bg-hoki-100 p-4 mb-3",children:i.jsx(bs,{className:"w-8 h-8 text-hoki-500",strokeWidth:1.5})}),i.jsx("p",{className:"text-sm text-hoki-600 font-medium",children:"No recent emails found to import"}),i.jsx("p",{className:"text-xs text-hoki-500 mt-1 max-w-[260px]",children:"Sent emails from Big Brain will appear here so you can add them as style samples."})]}):i.jsx("div",{className:"max-h-[480px] overflow-y-auto space-y-2",children:$.map(t=>{const r=x.has(t.id),a=w===t.id;let s="Add";return r?s="Added":a&&(s="Adding..."),i.jsx("div",{className:"border border-hoki-200 rounded-lg p-3 flex flex-col gap-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex items-start gap-2 min-w-0 flex-1",children:[i.jsx("div",{className:"mt-0.5 flex-shrink-0",children:i.jsx(bs,{className:"w-4 h-4 text-hoki-500"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:t.subject}),i.jsx("span",{className:"text-xs text-hoki-500",children:gv(new Date(t.sent_at))}),i.jsx("p",{className:"mt-1 text-xs text-gray-700 "+(g.has(t.id)?"":"line-clamp-3"),children:t.body}),t.body.length>160&&i.jsx("button",{type:"button",className:"mt-0.5 text-[11px] text-blue-600 hover:underline",onClick:()=>{y(e=>{const n=new Set(e);return n.has(t.id)?n.delete(t.id):n.add(t.id),n})},children:g.has(t.id)?"Show less":"Show more"})]})]}),i.jsx(yn,{type:"button",variant:"secondary",disabled:q||null!==w||x.has(t.id),className:q||x.has(t.id)?"opacity-50 cursor-not-allowed":void 0,onClick:async()=>{try{j(t.id),await F({variables:{subject:t.subject||void 0,body:t.body,source:"sent_email_import"}}),await D(),b(e=>new Set(e).add(t.id)),n("Style sample added from sent email.")}catch(r){e(r)}finally{j(null)}},children:s})]})},t.id)})})]})})}),C&&i.jsx(no,{isOpen:C,onClose:()=>{I||(N(!1),S(null),A(""),P(""))},title:"Edit writing style sample",hideHeaderBorder:!0,size:"lg",children:i.jsx(Nv,{subject:E,onSubjectChange:A,body:_,onBodyChange:P,disabled:I,bodyMinRows:6,bodyMaxRows:12,onCancel:()=>{I||(N(!1),S(null),A(""),P(""))},onSave:async()=>{if(k&&_.trim())try{M(!0),await U({variables:{id:k,subject:E.trim()||void 0,body:_.trim()}}),await D(),n("Style sample updated."),N(!1),S(null),A(""),P("")}catch(t){e(t)}finally{M(!1)}},saveLabel:I?"Saving...":"Save",saveDisabled:!_.trim(),className:"space-y-3 min-h-[420px]"})})]})},Av=()=>{const e=Ue(),{data:t,loading:n,refetch:r}=d(ap,{skip:!e});if(!e)return null;if(n)return i.jsx("div",{className:"flex justify-center mt-10 text-center",children:i.jsx(O,{})});const a=t?.connectedEmailProviders||[],s=t?.user?.vendor_member,o=t?.user?.email;return i.jsxs("div",{className:"flex flex-col bg-white max-w-[631px] w-full h-full gap-10 sm:px-5",children:[i.jsx(rf,{connectedProviders:a,onAccountUpdate:r,usePlatformEmail:s?.use_platform_email??!1,ccSelfOnPlatformEmail:s?.cc_self_on_platform_email??!0,userEmail:o,platformEmailDisabledAt:s?.platform_email_disabled_at}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsx(hf,{}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsx(cv,{}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsx(hv,{}),i.jsx("div",{className:"w-full h-0 border-b border-hoki-200"}),i.jsx(Ev,{})]})},Ov=[10,25,50],_v=e=>{const[n,r]=t.useState("");return{searchQuery:n,renderSearch:()=>e?i.jsxs("div",{className:s("relative w-full md:w-64",e.containerClassName),children:[i.jsx(Is,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),i.jsx("input",{type:"text",value:n,onChange:t=>{return n=t.target.value,r(n),void(e?.onSearchChange&&e.onSearchChange(n));var n},placeholder:e.placeholder??"Search...",className:s("w-full border rounded-lg pl-9 py-2 text-sm border-gray-300 focus:border-gray-300",e.inputClassName)})]}):null}},Pv=({dataLength:e,currentPage:t,itemsPerPage:n,paginationState:r,rowsPerPageOptions:a,onItemsPerPageChange:s,onPrev:o,onNext:l,onPageChange:c})=>{const u=e>0?t*n+1:0,d=`Showing ${u} - ${e>0?Math.min(u+n-1,e):0} of ${e} items`,p=r?.canPrev?"text-gray-700 hover:text-black":"text-gray-300 cursor-not-allowed",h=r?.canNext?"text-gray-700 hover:text-black":"text-gray-300 cursor-not-allowed";return i.jsxs("div",{className:"flex items-center justify-between p-2 border-t bg-white",children:[i.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[i.jsx("button",{type:"button",onClick:()=>c(0),disabled:!r?.canPrev,className:p,children:i.jsx(zi,{className:"w-3 h-3"})}),i.jsx("button",{type:"button",onClick:o,disabled:!r?.canPrev,className:p,children:i.jsx(Bi,{className:"w-3 h-3"})}),r?.pages.map(e=>e===t?i.jsx("span",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-200 text-gray-700 text-xs",children:e+1},e):i.jsx("button",{type:"button",onClick:()=>c(e),className:"flex items-center justify-center h-6 w-6 text-gray-700 hover:bg-gray-50 rounded-full text-xs",children:e+1},e)),i.jsx("button",{type:"button",onClick:l,disabled:!r?.canNext,className:h,children:i.jsx(Ui,{className:"w-3 h-3"})}),i.jsx("button",{type:"button",onClick:()=>c((r?.totalPages??1)-1),disabled:!r?.canNext,className:h,children:i.jsx(Hi,{className:"w-3 h-3"})})]}),i.jsxs("div",{className:"flex items-center gap-6",children:[i.jsxs(Yu,{children:[i.jsx(Ju,{children:i.jsxs("div",{className:"flex items-center gap-1 text-gray-600 text-xs",children:[n," ","rows per page",i.jsx(qi,{className:"w-4 h-4 mt-0.5"})]})}),i.jsx(Xu,{className:"bg-white",children:a.map(e=>i.jsx(ed,{children:i.jsx("button",{type:"button",onClick:()=>s(e),children:i.jsxs("div",{className:"text-xs",children:[e," ","rows per page"]})})},e))})]}),i.jsx("div",{className:"text-gray-400 text-xs",children:d})]})]})},Iv=({toolbarLeft:e,searchComponent:t,toolbar:n,onDownload:r,sticky:a=!1,stickyClassName:s})=>e||t||n||r?i.jsxs("div",{className:"flex items-center gap-3 w-full "+(a?`sticky top-0 z-30 ${s??"bg-white border-b border-gray-200 -mt-4 pt-4 pb-3"}`:"mb-3"),children:[e,i.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0 justify-end ml-auto",children:[t,n,r&&i.jsx(qe,{tooltip:"Export CSV",placement:"top",children:i.jsx("button",{type:"button",className:"text-gray-400 hover:text-gray-600",onClick:r,"aria-label":"download",children:i.jsx(ts,{className:"w-4 h-4"})})})]})]}):null,Mv=(e,t,n,r,a)=>i.jsx("td",{className:"px-3 py-2 text-sm text-gray-600",children:"__expander__"===e.key&&n?i.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),a()},className:"p-1 rounded hover:bg-gray-100 text-gray-500",children:i.jsx(Ui,{className:"w-4 h-4 transition-transform "+(r?"rotate-90":"")})}):t[e.key]??null},e.key),Tv=({data:e,displayColumns:t,renderRow:n,prependRow:r,getRowKey:a,expandedRows:s,nestedData:o,getVisibleNestedItems:l,toggleRowExpansion:c,emptyStateMessage:u,onRowClick:d,getRowClassName:p})=>{const h=(e,n,r)=>{l(e,2).filter(e=>
35e.level===n).forEach(e=>{const a=s.has(e.key),o=l(e.key,2).filter(e=>e.level===n+1),u=Boolean(e.hasChildren&&o.length>0),d=()=>c(e.key),p=e.renderRow(e.rowData,e.level,a,u?d:void 0),m=2===n?"bg-gray-100":"bg-gray-50";r.push(i.jsx("tr",{className:`border-t divide-x divide-gray-200 ${m}`,children:t.map(e=>Mv(e,p,u,a,d))},e.key)),a&&u&&h(e.key,n+1,r)})},m=r?[r]:[];return 0===e.length&&0===m.length?i.jsx("tr",{children:i.jsx("td",{className:"py-8 text-center text-gray-500",colSpan:t.length||1,children:u||"No data found"})}):(e.forEach((e,r)=>{const u=a?a(e,r):r.toString(),f=s.has(u),g=Boolean(o&&l(u,1).length>0),y=()=>c(u),x=n(e,r,f,g?y:void 0);m.push(i.jsx("tr",{className:`border-t divide-x divide-gray-200 ${d?"cursor-pointer hover:bg-gray-50":""} ${p?.(e,r)??""}`,onClick:d?()=>d(e,r):void 0,children:t.map(e=>Mv(e,x,g,f,y))},u)),f&&o&&h(u,1,m)}),i.jsx(i.Fragment,{children:m}))},Rv=({columns:e,data:n,renderRow:r,prependRow:a,search:s,toolbarLeft:o,toolbar:l,stickyToolbar:c,stickyToolbarClassName:u,onDownload:d,nestedData:p,getRowKey:h,expandedRows:m,onExpandedRowsChange:f,totalItems:g,onPageChange:y,onItemsPerPageChange:x,controlledCurrentPage:b,controlledItemsPerPage:v,emptyStateMessage:w,sortBy:j,sortDirection:C,onSortChange:N,onRowClick:k,getRowClassName:S,rowsPerPageOptions:E})=>{const{searchQuery:A,renderSearch:O}=_v(s),_=g??n.length,{itemsPerPage:P,currentPage:I,paginationState:M,handleItemsPerPageChange:T,setCurrentPage:R,rowsPerPageOptions:L}=(({totalItems:e,searchQuery:n=""})=>{const[r,a]=t.useState(10),[i,s]=t.useState(0);t.useEffect(()=>{s(0)},[n,e]);const o=t.useMemo(()=>{const t=r>0?Math.max(1,Math.ceil(e/r)):1,n=i>0,a=i<t-1;let s=0,o=t-1;t>=3&&(0===i?(s=0,o=2):i===t-1?(s=Math.max(0,t-3),o=t-1):(s=i-1,o=i+1));const l=Array.from({length:Math.max(0,o-s+1)},(e,t)=>s+t);return{totalPages:t,canPrev:n,canNext:a,pages:l}},[r,i,e]);return{itemsPerPage:r,currentPage:i,paginationState:o,handleItemsPerPageChange:e=>{a(e),s(0)},handlePrev:()=>{o?.canPrev&&s(i-1)},handleNext:()=>{o?.canNext&&s(i+1)},setCurrentPage:s,rowsPerPageOptions:Ov}})({totalItems:_,searchQuery:A}),D=b??I,F=v??P,q=e=>{void 0===b&&R(e),y?.(e)},B=t.useMemo(()=>{const e=F>0?Math.max(1,Math.ceil(_/F)):1;return{canPrev:D>0,canNext:D<e-1}},[F,D,_]),U=t.useMemo(()=>{const e=F>0?Math.max(1,Math.ceil(_/F)):1,t=D>0,n=D<e-1;let r=0,a=e-1;e>=3&&(0===D?(r=0,a=2):D===e-1?(r=Math.max(0,e-3),a=e-1):(r=D-1,a=D+1));const i=Array.from({length:Math.max(0,a-r+1)},(e,t)=>r+t);return{totalPages:e,canPrev:t,canNext:n,pages:i}},[F,D,_]),z=void 0!==b||void 0!==v?U:M,{expandedRows:H,displayColumns:V,toggleRowExpansion:$,getVisibleNestedItems:W}=((e,n)=>{const[r,a]=t.useState(new Set),i=t.useMemo(()=>{if(!e)return new Map;const t=new Map;return e.forEach(e=>{const{parentKey:n}=e;t.has(n)||t.set(n,[]),t.get(n).push(e)}),t.forEach(e=>{e.sort((e,t)=>e.level-t.level)}),t},[e]);return{expandedRows:r,displayColumns:t.useMemo(()=>e&&e.length>0?[{key:"__expander__",label:"",sortable:!1},...n]:n,[n,e]),toggleRowExpansion:e=>{a(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},getVisibleNestedItems:(e,t=2)=>{const n=i.get(e)||[],r=Math.min(t,2);return n.filter(e=>e.level<=r)}}})(p,e),Z=m??H,K=t.useMemo(()=>{if(void 0!==b||void 0!==v)return n;const e=D*F,t=e+F;return n.slice(e,t)},[n,D,F,b,v]);return i.jsxs("div",{className:"flex flex-col",children:[i.jsx(Iv,{toolbarLeft:o,searchComponent:O(),toolbar:l,onDownload:d,sticky:c,stickyClassName:u}),i.jsxs("div",{className:"border rounded-md overflow-auto mb-12",children:[i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"min-w-full text-left text-sm bg-white",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{className:"divide-x divide-gray-200",children:V.map(e=>{const t=e.sortable&&N,n=e.sortKey||e.key,r=j===n;return i.jsx("th",{className:"px-3 py-2 font-medium whitespace-nowrap text-gray-600 "+(t?"cursor-pointer hover:bg-gray-100 select-none":""),onClick:()=>{if(!t)return;const e=r&&C===Q.Desc?Q.Asc:Q.Desc;N(n,e)},children:i.jsxs("div",{className:"flex items-center gap-1",children:[e.header??e.label,t&&i.jsx("span",{className:"inline-flex "+(r?"text-blue-600":"text-gray-300"),children:r&&C===Q.Asc?i.jsx(Pi,{className:"w-3.5 h-3.5"}):i.jsx(Oi,{className:"w-3.5 h-3.5"})})]})},e.key)})})}),i.jsx("tbody",{children:i.jsx(Tv,{data:K,displayColumns:V,renderRow:r,getRowKey:h,prependRow:a,expandedRows:Z,nestedData:p,getVisibleNestedItems:W,toggleRowExpansion:e=>{const t=new Set(Z);t.has(e)?t.delete(e):t.add(e),f?f(t):$(e)},emptyStateMessage:w,onRowClick:k,getRowClassName:S})})]})}),i.jsx(Pv,{dataLength:_,currentPage:D,itemsPerPage:F,paginationState:z,rowsPerPageOptions:E??L,onItemsPerPageChange:e=>{void 0===v&&T(e),x?.(e)},onPrev:()=>{B.canPrev&&q(D-1)},onNext:()=>{B.canNext&&q(D+1)},onPageChange:q})]})]})},Lv=({checked:e,indeterminate:n=!1,onChange:r,className:a="w-4 h-4 rounded border-gray-300 text-gray-900 !ring-offset-0 focus:!ring-offset-0 focus:ring-0","aria-label":s})=>{const o=t.useRef(null);return t.useEffect(()=>{o.current&&(o.current.indeterminate=n)},[n]),i.jsx("input",{ref:o,type:"checkbox",checked:e,onChange:e=>r(e.target.checked),className:a,"aria-label":s})},Dv=({label:e,options:t,selected:n,onToggle:r,onClear:a})=>{if(0===t.length&&0===n.length)return i.jsx(i.Fragment,{children:e});const s=n.length>0;return i.jsxs(Yu,{children:[i.jsxs(Ju,{"aria-label":`Filter by ${e.toLowerCase()}`,className:"inline-flex items-center gap-1 font-medium "+(s?"text-blue-600":"text-gray-600 hover:text-gray-900"),children:[e,i.jsx(fs,{className:"w-3.5 h-3.5 shrink-0 "+(s?"text-blue-600":"text-gray-300")}),s&&i.jsx("span",{className:"rounded-full bg-blue-100 px-1.5 text-[10px] leading-4 text-blue-700",children:n.length})]}),i.jsxs(Xu,{align:"start",className:"max-h-64 w-56 overflow-y-auto bg-white",children:[t.map(e=>i.jsxs(ed,{onSelect:t=>{t.preventDefault(),r(e)},children:[i.jsx("input",{type:"checkbox",checked:n.includes(e),readOnly:!0,tabIndex:-1,
35className:"pointer-events-none mr-2 h-3.5 w-3.5 shrink-0 rounded border-gray-300 text-blue-600"}),i.jsx("span",{className:"truncate",children:e})]},e)),s&&i.jsxs(i.Fragment,{children:[i.jsx(nd,{}),i.jsx(ed,{onSelect:a,className:"cursor-pointer text-xs text-gray-500",children:"Clear"})]})]})]})},Fv=()=>i.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-md border border-hoki-200 bg-white px-6 py-16 text-center",children:[i.jsx(as,{className:"h-8 w-8 text-hoki-300"}),i.jsx("div",{className:"text-base font-medium text-hoki-900",children:"No dismissed companies"}),i.jsx("div",{className:"max-w-md text-sm text-hoki-500",children:"Dismiss a company from a search or its profile and it'll be listed here until you restore it."})]}),qv=E("\n  query DoNotContactCompanies_Query(\n    $offset: Int\n    $limit: Int\n    $searchQuery: String\n    $sources: [DoNotContactSource!]\n    $sortDirection: SortDirection\n  ) {\n    doNotContactCompanies(\n      offset: $offset\n      limit: $limit\n      searchQuery: $searchQuery\n      sources: $sources\n      sortDirection: $sortDirection\n    ) {\n      totalCount\n      rows {\n        id\n        companyId\n        companyName\n        slug\n        logoUrl\n        source\n        sessionId\n        sessionTitle\n        sessionIsActive\n        createdAt\n      }\n    }\n  }\n"),Bv=E("\n  mutation UnmarkCompaniesDoNotContact_Mutation($companyIds: [ID!]!) {\n    unmarkCompaniesDoNotContact(companyIds: $companyIds)\n  }\n"),Uv=E("\n  mutation MarkCompaniesDoNotContact_Mutation($input: MarkCompaniesDoNotContactInput!) {\n    markCompaniesDoNotContact(input: $input)\n  }\n"),zv=u`
36  mutation ExportOutreachContacts($contactIds: [String!]!, $unlock: Boolean) {
37    exportOutreachContacts(contactIds: $contactIds, unlock: $unlock) {
38      success
39      message
40      lockedCount
41      contacts {
42        id
43        email
44        linkedinUrl
45        isUnlocked
46      }
47    }
48  }
49`,Hv=()=>p(zv),Vv=u`
50  query GetContactsUnlockInfo {
51    contactsUnlockInfo {
52      count
53      limit
54      period
55      resetInfo
56    }
57  }
58`,$v=()=>d(Vv),Wv=u`
59  query BigBrainOutreachDraft($sessionId: String!, $companyId: String!) {
60    bigBrainOutreachDraft(sessionId: $sessionId, companyId: $companyId) {
61      id
62      subject
63      body
64      contextSummary
65      recipients {
66        id
67        name
68        role
69        email
70        emailAccess
71        emailStatus
72        linkedIn
73        activeStatus
74        isUnlocked
75        inCrm
76        isUserProvidedContact
77        userProvidedContactId
78        priority
79        city
80        state
81        country
82        isDelegate
83        sendStatus
84        sentAt
85      }
86    }
87  }
88`,Qv=(e,t)=>d(Wv,{variables:{sessionId:e,companyId:t},skip:!e||!t,fetchPolicy:"network-only"}),Zv=u`
89  query GetFlaggedBigBrainEventsMinimal($sessionId: String!) {
90    flaggedBigBrainEvents(sessionId: $sessionId) {
91      id
92    }
93  }
94`,Kv=u`
95  fragment OutreachContactFields on Contact {
96    id
97    name
98    role
99    email
100    emailAccess
101    emailStatus
102    linkedIn
103    isUnlocked
104    inCrm
105    isUserProvidedContact
106    userProvidedContactId
107    priority
108    city
109    state
110    country
111    isDelegate
112  }
113`,Gv=u`
114  query GetFlaggedBigBrainEvents($sessionId: String!, $companyId: String, $companyLimit: Int) {
115    flaggedBigBrainCompanyCount(sessionId: $sessionId, companyId: $companyId)
116    flaggedBigBrainEvents(sessionId: $sessionId, companyId: $companyId, companyLimit: $companyLimit) {
117      id
118      companyId
119      company {
120        id
121        slug
122        name
123        display_name
124        brief_description
125        website_url
126        linkedin_url
127        therapeutic_areas
128        development_stages
129        funding_stage
130        treatment_modalities
131        target_classes
132        types
133        platform_business_models
134        platform_technologies
135        clinical_uses
136        medtech_product_categories
137        medtech_regulatory_statuses
138        medtech_target_care_settings
139        medtech_technology_types
140        diagnostics_regulatory_statuses
141        diagnostics_sample_types
142        diagnostics_types
143        service_categories
144        service_provider_clinical_phases
145        locations {
146          id
147          country
148          state
149          city
150          street_address
151          postal_code
152          is_hq
153        }
154        employee_count_range
155        hasContactInCampaign
156        inCrm
157        crmContactCount
158        availableContactCount
159        crmUrl
160        num_contacts
161      }
162      title
163      summary
164      sourceUrl
165      confidenceScore
166      isBestMatch
167      sourceName
168      publishedAt
169      eventType
170      isFlagged
171      flagNotes
172      passesRequired
173      matchedCriteriaCount
174      totalCriteria
175      llmExplanation
176      criteria
177    }
178  }
179`,Yv=(e,t=!1)=>d(Zv,{variables:{sessionId:e},skip:!e||t}),Jv=(e,n=!1,r)=>{const[a,i]=t.useState(50),s=d(Gv,{variables:{sessionId:e,companyId:r??null,companyLimit:a},skip:!e||n,fetchPolicy:"cache-and-network"}),o=s.data?.flaggedBigBrainCompanyCount??0,{loading:l}=s,c=t.useCallback(()=>{l||a>=o||i(a+50)},[l,a,o]);return{...s,companyCount:o,loadMoreCompanies:c,loadMoreOnScroll:e=>{const t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<200&&c()}}};function Xv(){const{toastError:e}=v(),[n,r]=t.useState(!1),[a,i]=t.useState(null),s=t.useRef(null),o=t.useRef(null),[l]=An(Vv,{fetchPolicy:"no-cache"});return{openModal:t.useCallback(async({lockedCount:e,totalCount:t,onUnlock:n,onSkip:r})=>{const a=await l(),c=a.data?.contactsUnlockInfo,u=Math.max(0,(c?.limit??0)-(c?.count??0));s.current=n,o.current=r,i({lockedCount:e,totalCount:t,creditsRemaining:u})},[l]),isUnlocking:n,isModalOpen:null!==a,modalState:a,handleUnlockAndExport:t.useCallback(async()=>{r(!0);try{await(s.current?.()),i(null)}catch(t){const n=t instanceof Error?t.message:"";e(n||"Failed to unlock contacts")}
179finally{r(!1)}},[e]),handleExportWithoutLocked:t.useCallback(()=>{o.current?.(),i(null)},[]),handleModalClose:t.useCallback(()=>i(null),[])}}const ew=u`
180  mutation CollectMoreCompanyContacts(
181    $companyId: String!
182    $limit: Int
183    $providerIds: [String!]
184  ) {
185    collectMoreCompanyContacts(
186      companyId: $companyId
187      limit: $limit
188      providerIds: $providerIds
189    ) {
190      collected
191      hasMoreToCollect
192      providerTotal
193    }
194  }
195`,tw=u`
196  query CompanyContactsPage(
197    $companyId: String!
198    $limit: Int
199    $offset: Int
200    $sessionId: String
201  ) {
202    companyContactsPage(
203      companyId: $companyId
204      limit: $limit
205      offset: $offset
206      sessionId: $sessionId
207    ) {
208      contacts {
209        ...OutreachContactFields
210      }
211      totalCollected
212      providerTotal
213      hasMoreToCollect
214    }
215  }
216  ${Kv}
217`,nw=20;function rw(e){return()=>e}function aw(e,t,n=0){const r=[...e.getObservableQueries().values()].filter(e=>"CompanyContactsPage"===e.queryName).filter(e=>!t||e.variables?.companyId===t);return Promise.all(r.map(e=>async function(e,t){const n=e.getCurrentResult().data?.companyContactsPage.contacts.length??0,r=Math.max(n,20)+t,a=Math.ceil(r/100),i=Array.from({length:a},(e,t)=>100*t),s=await Promise.all(i.map(t=>e.fetchMore({variables:{offset:t,limit:Math.min(100,r-t)},updateQuery:e=>e}))),o=s.flatMap(e=>e.data.companyContactsPage.contacts);e.updateQuery(()=>({companyContactsPage:{...s[0].data.companyContactsPage,contacts:o}}))}(e,n)))}async function iw(e,t,n=null,r=0){null!==n&&e.cache.modify({id:e.cache.identify({__typename:"Company",id:t}),fields:{availableContactCount:rw(n)}}),await aw(e,t,r).catch(()=>{})}function sw(){const e=A(),[n,r]=t.useState(!1),a=C(K),i=t.useRef(!1);return{collectMore:t.useCallback(async(t,n={})=>{if(!t)return null;if(i.current)return null;if(!n.providerIds?.length&&K().has(t))return null;i.current=!0,r(!0);try{const{data:r}=await e.mutate({mutation:ew,variables:{companyId:t,limit:n.limit??20,...n.providerIds?.length?{providerIds:n.providerIds}:{}}}),a=r?.collectMoreCompanyContacts??null;return a&&G(t,!a.hasMoreToCollect),a&&a.collected>0&&await iw(e,t,a.providerTotal,a.collected),a}catch{return null}finally{i.current=!1,r(!1)}},[e]),isCollecting:n,reset:t.useCallback(e=>{e?G(e,!1):K(new Set)},[]),exhaustedCompanies:a}}const ow=[];function lw(e,n){const{data:r,error:a,networkStatus:i,fetchMore:s,refetch:o}=d(tw,{variables:{companyId:e,limit:20,offset:0,sessionId:n},skip:!e,notifyOnNetworkStatusChange:!0}),{collectMore:l,isCollecting:c,exhaustedCompanies:u}=sw(),p=r?.companyContactsPage,h=p?.contacts??ow,m=p?.totalCollected??0,f=h.length<m,g=Boolean(e&&p?.hasMoreToCollect&&!u.has(e)),y=t.useCallback(async()=>{f?await s({variables:{offset:h.length,limit:20},updateQuery:(e,{fetchMoreResult:t})=>({companyContactsPage:{...t.companyContactsPage,contacts:[...e.companyContactsPage.contacts,...t.companyContactsPage.contacts]}})}).catch(()=>{}):await l(e??"")},[f,l,e,s,h.length]);return{contacts:h,totalCollected:m,isLoading:!p&&!a&&Boolean(e),canLoadMore:f||g,isLoadingMore:i===Z.fetchMore||c,loadMore:y,error:a,retry:o}}const cw=e=>{const t=(e??"").toString(),n=/[",\n]/.test(t),r=t.replace(/"/g,'""');return n?`"${r}"`:r},uw=["Company Name","Event Type","Event Title","Event URL","Contact Name","Contact Job Title","Contact Email","Contact LinkedIn"];function dw(e){return"company_match"===e.type?{eventType:"Company match",eventTitle:"",eventUrl:""}:{eventType:e.type??"",eventTitle:e.title??"",eventUrl:e.sourceUrl??""}}function pw(e){const t=e.map(dw),n=e=>t.map(t=>t[e]).filter(Boolean).join("; ");return{eventType:n("eventType"),eventTitle:n("eventTitle"),eventUrl:n("eventUrl")}}function hw(e,t,n,r){return[cw(e),cw(t.eventType),cw(t.eventTitle),cw(t.eventUrl),cw(n.name||""),cw(n.role||""),cw(r.get(n.id)?.email||""),cw(r.get(n.id)?.linkedinUrl||"")].join(",")}function mw(e,t){return e.map(e=>t[e]).filter(Boolean)}function fw(e,t){const n=[uw.map(cw).join(","),...e].join("\n"),r=new Blob([n],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(r),i=(new Date).toISOString().replace(/[:T]/g,"-").split(".")[0],s=document.createElement("a");s.href=a,s.download=`${t?"contacts":"outreach"}-export-${i}.csv`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)}const gw=({emailDrafts:e,flaggedEvents:n,companyGroups:r,selectedContacts:a})=>{const i=A(),s=!!r&&!!a,{toastError:o,toastInfo:l}=v(),[c,u]=t.useState(!1),[d]=Hv(),p=Xv(),h=t.useCallback(async()=>{u(!0);try{const t=n.reduce((e,t)=>
217(e[t.id]=t,e),{});let o;if(s)o=[...a.keys()];else{const t=(e||[]).flatMap(e=>e.recipients);o=[...new Set(t.map(e=>e.id))]}if(0===o.length)return;const{data:c}=await d({variables:{contactIds:o,unlock:!1}});if(!c?.exportOutreachContacts?.success)return void l(c?.exportOutreachContacts?.message||"Failed to export contacts");const u={include:[Wv,Vv,Gv]},h=c.exportOutreachContacts.lockedCount??0,m=n=>{const i=new Map(n.map(e=>[e.id,e]));return s?function(e,t,n,r){return e.flatMap(e=>{const a=e.events.map(e=>e.id),i=pw(mw(a,n));return[...t.values()].filter(t=>t.companyId===e.company.id).map(e=>e.contact).map(t=>hw(e.company.name,i,t,r))})}(r,a,t,i):function(e,t,n){return e.flatMap(e=>{const r=mw(e.eventIds,t);if(0===r.length)return[];const a=pw(r),{recipients:i}=e;return i.map(t=>hw(e.company.name,a,t,n))})}(e||[],t,i)},f=m(c.exportOutreachContacts.contacts||[]);if(h>0)return void(await p.openModal({lockedCount:h,totalCount:o.length,onUnlock:async()=>{const{data:e}=await d({variables:{contactIds:o,unlock:!0}}),t=e?.exportOutreachContacts;if(!t?.success)throw new Error(t?.message||"Failed to unlock contacts");await i.refetchQueries(u),aw(i).catch(()=>{}),fw(m(t.contacts||[]),s),t.message&&l(t.message)},onSkip:()=>fw(f,s)}));await i.refetchQueries(u),fw(f,s)}catch(t){let e="";t instanceof Error?e=t.message:"string"==typeof t&&(e=t),o(e?`Failed to export contacts: ${e}`:"Failed to export contacts")}finally{u(!1)}},[e,n,r,a,s,d,p,i,o,l]);return{exportCsv:h,isExporting:c,...p}};function yw(e,t,n){const r=new Blob([t],{type:`${n};charset=utf-8;`}),a=URL.createObjectURL(r),i=document.createElement("a");i.href=a,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a)}const xw=["company","source","session","added_at"],bw={BIG_BRAIN:"Big Brain",COMPANY_PROFILE:"Company profile"};const vw={[J.BigBrain]:"Big Brain",[J.CompanyProfile]:"Company profile"},ww=new Map(Object.entries(vw).map(([e,t])=>[t,e])),jw=Object.values(vw),Cw={BIG_BRAIN:{Icon:Ri,label:"Big Brain"},COMPANY_PROFILE:{Icon:Li,label:"Company profile"}},Nw=({row:e,linkToProfile:t})=>t&&e.slug?i.jsxs(o,{to:b.CompanyProfile(e.slug),target:"_blank",rel:"noopener noreferrer",title:e.companyName,className:"flex w-56 items-center gap-1.5 text-sm font-medium text-hoki-900 hover:text-primary",children:[i.jsx("span",{className:"truncate",children:e.companyName}),i.jsx(rs,{className:"h-3.5 w-3.5 flex-shrink-0 text-hoki-400"})]}):i.jsx("span",{className:"block w-56 truncate text-sm font-medium text-hoki-900",children:e.companyName}),kw=({row:e})=>{const{Icon:t,label:n}=Cw[e.source];return i.jsxs("div",{className:"flex w-[300px] min-w-0 items-center gap-2",children:[i.jsxs("span",{className:"inline-flex flex-shrink-0 items-center gap-1 rounded-full bg-hoki-100 px-2 py-0.5 text-xs text-hoki-500",children:[i.jsx(t,{className:"h-3 w-3"}),n]}),e.sessionTitle&&(e.sessionIsActive&&e.sessionId?i.jsxs(o,{to:`${b.App}/session/${e.sessionId}`,target:"_blank",rel:"noopener noreferrer",className:"flex min-w-0 items-center gap-1.5 text-sm text-hoki-900 hover:text-primary",children:[i.jsx(Xo,{placement:"top",referenceClassName:"min-w-0 whitespace-nowrap",children:e.sessionTitle}),i.jsx(rs,{className:"h-3.5 w-3.5 flex-shrink-0 text-hoki-400"})]}):i.jsx(Xo,{placement:"top",referenceClassName:"min-w-0 whitespace-nowrap text-sm text-hoki-900",children:e.sessionTitle}))]})},Sw=()=>{const{toastError:e}=v(),{addToast:n,removeToast:r}=Y.useToasts(),a=hr(),[s,o]=t.useState(0),[l,c]=t.useState(10),[u,h]=t.useState(""),[m,f]=t.useState(Q.Desc),[g,y]=t.useState([]),[x,b]=t.useState(new Set),[w]=im(u,250),j=t.useCallback(e=>{h(e),o(0)},[]),C=t.useCallback(e=>{c(e),o(0)},[]),N=t.useCallback((e,t)=>{f(t),o(0)},[]),k=t.useCallback(e=>{y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),o(0)},[]),S=t.useCallback(()=>{y([]),o(0)},[]),{renderSearch:E}=_v({placeholder:"Search companies...",onSearchChange:j}),_=g.map(e=>ww.get(e)).filter(e=>void 0!==e),{data:P,loading:I}=d(qv,{variables:{offset:s*l,limit:l,searchQuery:w,sources:_,sortDirection:m},fetchPolicy:"cache-and-network"});const[M,{loading:T}]=p(Bv,{refetchQueries:[qv]}),[R]=p(Uv,{refetchQueries:[qv]}),L=t.useRef(new Map),D=A(),[F,q]=t.useState(!1),B=P?.doNotContactCompanies.rows??[];
217B.forEach(e=>L.current.set(e.companyId,e));const U=P?.doNotContactCompanies.totalCount??0,z=t.useCallback(e=>{b(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),H=t.useCallback(async(t,n)=>{n&&r(n);const a=new Map;t.forEach(e=>{const t=`${e.source}|${e.sessionId??""}`;a.set(t,[...a.get(t)??[],e])});try{await Promise.all([...a.values()].map(e=>R({variables:{input:{companyIds:e.map(e=>e.companyId),source:e[0].source,sessionId:e[0].sessionId}}})))}catch{e("Could not undo. Please try again.")}},[R,r,e]),V=t.useCallback(async t=>{const r=t.map(e=>L.current.get(e)).filter(e=>void 0!==e);try{let e;await M({variables:{companyIds:t}}),b(new Set);const a=i.jsxs("span",{className:"flex items-center gap-3",children:[1===t.length?`${r[0]?.companyName??"Company"} restored`:`${t.length} companies restored`,i.jsx("button",{type:"button",onClick:()=>{H(r,e).catch(()=>{})},className:"font-medium underline",children:"Undo"})]});n(a,{appearance:"success"},t=>{e=t})}catch{e("Couldn't save that. Please try again.")}},[n,H,e,M]),$=t.useCallback(async()=>{const t=e=>D.query({query:qv,variables:{offset:e,limit:100,searchQuery:w,sources:_,sortDirection:m},fetchPolicy:"network-only"});q(!0);try{const e=await t(0),{rows:n,totalCount:r}=e.data.doNotContactCompanies,a=[];for(let s=100;s<r;s+=100)a.push(t(s));const i=await Promise.all(a);!function(e){const t=e.map(e=>[e.companyName,bw[e.source]??e.source,e.sessionTitle??"",new Date(e.createdAt).toISOString()].map(cw).join(","));yw(`dismissed_companies_${(new Date).toISOString().split("T")[0]}.csv`,[xw.join(","),...t].join("\n"),"text/csv")}([...n,...i.flatMap(e=>e.data.doNotContactCompanies.rows)])}catch{e("Could not export the list. Please try again.")}finally{q(!1)}},[D,w,m,_,e]),W=B.map(e=>e.companyId),Z=W.filter(e=>x.has(e)),K=W.length>0&&Z.length===W.length,G=t.useMemo(()=>[{key:"select",label:"",header:i.jsx(Lv,{checked:K,indeterminate:Z.length>0&&!K,onChange:e=>b(new Set(e?W:[])),"aria-label":"Select all on page"})},{key:"company",label:"Company"},{key:"source",label:"Source",header:i.jsx(Dv,{label:"Source",options:jw,selected:g,onToggle:k,onClear:S})},{key:"addedAt",label:"Added at",sortable:!0},{key:"actions",label:"Actions"}],[K,S,W,Z.length,g,k]),J=x.size>0?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("span",{className:"text-sm text-hoki-500",children:[x.size," selected"]}),i.jsx(yn,{type:"button",variant:"secondary",className:"h-[38px] border-gray-300 text-sm",disabled:T,onClick:()=>V([...x]),children:"Restore"})]}):null,X=w.length>0||g.length>0,ee=!I&&0===U&&!X;return I&&0===B.length?i.jsx("div",{className:"mt-10 flex justify-center text-center",children:i.jsx(O,{})}):i.jsxs("div",{className:"w-full max-w-5xl px-6",children:[i.jsx("p",{className:"text-2xl font-medium leading-normal text-left mb-4",children:"Dismissed Companies"}),i.jsx("p",{className:"text-sm text-hoki-600 mb-6",children:"Dismissed companies won't show up in new searches or in your digest emails."}),ee?i.jsx(Fv,{}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[J,i.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[E(),i.jsx(qe,{tooltip:"Export CSV",placement:"top",children:i.jsx("button",{type:"button",onClick:$,disabled:F||0===U,className:"text-hoki-400 hover:text-hoki-600 disabled:opacity-50","aria-label":"Export CSV",children:i.jsx(ts,{className:"h-4 w-4"})})})]})]}),i.jsx(Rv,{columns:G,data:B,renderRow:e=>({select:i.jsx(Lv,{checked:x.has(e.companyId),onChange:()=>z(e.companyId),"aria-label":`Select ${e.companyName}`}),company:i.jsx(Nw,{row:e,linkToProfile:a}),source:i.jsx(kw,{row:e}),addedAt:i.jsx("span",{className:"whitespace-nowrap text-sm text-hoki-500",children:gv(e.createdAt)}),actions:i.jsx(qe,{tooltip:"Restore this company to searches",placement:"top",children:i.jsx("button",{type:"button",onClick:()=>V([e.companyId]),disabled:T,className:"text-sm text-hoki-600 hover:text-hoki-900 hover:underline disabled:opacity-50",children:"Restore"})})}),getRowKey:e=>e.id,getRowClassName:()=>"h-12",totalItems:U,controlledCurrentPage:s,controlledItemsPerPage:l,onPageChange:o,onItemsPerPageChange:C,sortBy:"addedAt",sortDirection:m,onSortChange:N,emptyStateMessage:"No companies match your search."})]})]})},Ew=R({yearly:X()}),Aw=E("\n  fragment SourcererVendorSubscriptionForm_VendorSubsriptionPlan on VendorSubsriptionPlan {\n    monthly_price\n    annual_price\n    annual_price_before_discount\n    annual_price_divided_into_month\n    annual_discount_percentage\n  }\n"),Ow=({formContext:e,vendorSubscriptionPlanFragment:t,onSubmit:n,isFetching:r,formId:a="sourcerer-vendor-subscription-interval"})=>{const s=$n(Aw,t),o=e.watch("yearly");return i.jsx("form",{id:a,onSubmit:e.handleSubmit(n),children:!s||r?i.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[i.jsx(Yn,{className:"h-[286px]"}),i.jsx(Yn,{className:"h-[286px]"})]}):i.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[i.jsx(rt,{amount:tt(s.annual_price_divided_into_month,{trailingZeroDisplay:"str
217ipIfInteger"}),originalAmount:tt(s.monthly_price,{trailingZeroDisplay:"stripIfInteger"}),perUnit:"/ month",isSelected:o,onClick:()=>e.setValue("yearly",!0),line1:"Yearly subscription",line2:`Pay annually (${tt(s.annual_price,{trailingZeroDisplay:"stripIfInteger"})} / year)`,badge:i.jsx("div",{className:"bg-[#36AA0D] text-sm sm:text-base text-white font-semibold text-center px-2 sm:px-5 py-1 sm:py-2.5 rounded-full whitespace-nowrap",children:`Save ${s.annual_discount_percentage}%`})}),i.jsx(rt,{amount:tt(s.monthly_price,{trailingZeroDisplay:"stripIfInteger"}),perUnit:"/ month",isSelected:!o,onClick:()=>e.setValue("yearly",!1),line1:"Monthly subscription",line2:"month-to-month flexibility"})]})})},_w=E("\n  mutation UpdateSourcererVendorPlan($input: UpdateSourcererVendorPlanInput!) {\n    updateSourcererVendorPlan(input: $input)\n  }\n"),Pw=({isDialogOpen:e,setIsDialogOpen:t,handleCancelSubscription:n,isLoading:r})=>i.jsxs(On,{open:e,onOpenChange:t,children:[i.jsx(Dn,{className:"text-center underline w-full",children:"Cancel subscription"}),i.jsxs(Pn,{className:"max-w-[700px]",children:[i.jsxs(Rn,{className:"relative space-y-3",children:[i.jsx(Ln,{children:"Cancel subscription"}),i.jsx(Fn,{className:"mt-4",children:"Are you sure you want to cancel your subscription? You'll lose access to all premium features at the end of your current billing period."})]}),i.jsxs(In,{className:"sm:gap-5",children:[i.jsx(yn,{variant:"link",className:"text-black",onClick:n,isLoading:r,children:"Yes, cancel subscription"}),i.jsx(yn,{onClick:()=>t(!1),children:"Keep subscription"})]})]})]}),Iw=e=>e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Mw=E("\n  mutation CancelSubscription_Mutation {\n    cancelSubscription\n  }\n"),Tw=E("\n  mutation ResumeAndUpdateSubscription_Mutation($yearly: Boolean) {\n    resumeAndUpdateSubscription(yearly: $yearly)\n  }\n"),Rw=E("\n  query SettingPlanPage {\n    vendorSubscriptionPlan {\n      ...SourcererVendorSubscriptionForm_VendorSubsriptionPlan\n    }\n    vendorBillingInfo {\n      id\n      plan_id\n      bill_cycle\n    }\n    user {\n      id\n      vendor {\n        id\n        subscription_status\n        subscription_ended_at\n      }\n    }\n  }\n"),Lw=()=>{const{toastCatchError:e,toastSuccess:t}=v(),{loading:r,data:a,refetch:s}=d(Rw),[l,c]=n.useState(!1),[u,h]=n.useState(!1),[m]=(()=>{const[e,t]=p(Mw);return[n.useCallback(()=>e({refetchQueries:[te]}),[e]),t]})(),[f]=(()=>{const[e,t]=p(Tw);return[n.useCallback(t=>e({variables:{yearly:t},refetchQueries:[te]}),[e]),t]})(),g=xn({resolver:bn(Ew),defaultValues:{yearly:!0}});n.useEffect(()=>{g.setValue("yearly","year"===a?.vendorBillingInfo?.bill_cycle)},[g,a]);const[y]=(()=>{const[e,t]=p(_w);return[n.useCallback(t=>e({variables:{input:t},refetchQueries:[ee,te,ne]}),[e]),t]})(),[x]=at(),w=n.useMemo(()=>"active"===a?.user?.vendor?.subscription_status,[a]),j=n.useMemo(()=>!!a?.user?.vendor?.subscription_ended_at,[a]),[C,N]=n.useState(!1),k=g.watch("yearly"),S=n.useMemo(()=>w&&(k&&"year"===a?.vendorBillingInfo?.bill_cycle||!k&&"month"===a?.vend
217orBillingInfo?.bill_cycle),[a,k,w]),E=n.useCallback(async n=>{try{N(!0),j?(await f(n.yearly),t("Successfully upgraded."),await s()):w?(await y({yearly:n.yearly}),t("Successfully changed plan.")):await x({cancelUrl:window.location.href,successUrl:`${window.location.href}?success=true`,yearly:n.yearly})}catch(r){e(r)}finally{N(!1)}},[e,t,y,x,w,j,f,s]),A=n.useMemo(()=>w?S?j?"Upgrade to Premium":"Current plan":j?"Upgrade to Premium":"Change plan":"Proceed to checkout",[S,j,w]),O=n.useMemo(()=>S&&!j,[S,j]),_=n.useCallback(async()=>{try{h(!0),await m(),await s(),t("Your subscription will end at the end of the current billing cycle."),c(!1)}catch(n){e(n)}finally{h(!1)}},[e,t,m,s]);return i.jsxs("div",{className:"bg-white",children:[a?.vendorBillingInfo?.plan_id&&i.jsxs(o,{to:b.Settings_Billing,className:"inline-flex items-center gap-x-1",children:[i.jsx(Hn,{}),"Back to billing"]}),i.jsxs("div",{className:"max-w-[892px] mx-auto flex flex-col mt-14 gap-y-8",children:[i.jsxs("div",{className:"text-hoki-800 text-center w-3/5 mx-auto",children:[i.jsx("div",{className:"text-xl font-semibold",children:"Choose subscription plan"}),i.jsx("div",{children:"Select the plan that best fits your needs and unlock access to exclusive opportunities in the pharma and biotech industry."})]}),i.jsx(Ow,{onSubmit:E,formId:"sourcerer-vendor-project-subscription",vendorSubscriptionPlanFragment:a?.vendorSubscriptionPlan,formContext:g,isFetching:r}),w&&j&&a?.user?.vendor?.subscription_ended_at&&i.jsxs("div",{className:"text-center text-gray-600",children:["You will have access to premium features until"," ",Iw(new Date(a.user.vendor.subscription_ended_at))]}),r?i.jsx(Yn,{containerClassName:"w-2/3 mx-auto",className:"h-[57px]"}):i.jsx(yn,{className:"h-[57px] w-2/3 mx-auto",form:"sourcerer-vendor-project-subscription",isLoading:C,disabled:O,children:A}),w&&!j&&i.jsx("div",{className:"mt-2",children:i.jsx(Pw,{isDialogOpen:l,setIsDialogOpen:c,handleCancelSubscription:_,isLoading:u})})]})]})},Dw=E("\n  query TokenTransactions_Query {\n    tokenTransactions {\n      id\n      type\n      amount\n      description\n      updated_at\n      stripe_charge_data {\n        receipt_url\n        amount\n      }\n    }\n  }\n"),Fw=()=>d(Dw),qw=()=>{const{data:e,loading:t}=Fw(),n=e?.tokenTransactions?.filter(e=>e.type===re.Purchase)||[];return i.jsxs("div",{className:"max-w-lg sm:px-5",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2",children:[i.jsx("div",{className:"text-xl font-medium text-hoki-800",children:"Invoices & Receipts"}),i.jsx(o,{to:b.Settings_Billing_Transactions,className:"text-sm text-primary",children:"View Token Transactions"})]}),i.jsx("div",{className:"mt-5",children:t?i.jsx("div",{className:"h-[162px] col-span-4 flex justify-center items-center",children:i.jsx(O,{})}):i.jsx("div",{className:"space-y-4",children:0===n.length?i.jsxs("div",{className:"bg-white rounded-lg shadow p-12 text-center",children:[i.jsx(As,{className:"h-16 w-16 text-gray-300 mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Invoice or receipt not found."})]}):n.map(e=>i.jsx("div",{className:"bg-white rounded-lg shadow border border-gray-200 transition-shadow",children:i.jsx("div",{className:"p-4 sm:p-6",children:i.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-full flex items-center justify-center shrink-0",children:i.jsx(Xi,{className:"h-5 w-5 text-green-600"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base sm:text-lg font-medium text-gray-900",children:e.description}),i.jsx("div",{className:"text-sm text-gray-500",children:i.jsx("span",{children:mv(e.updated_at)})})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mt-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-gray-500",children:"Amount:"}),i.jsx("span",{className:"text-sm font-medium text-gray-900",children:e.stripe_charge_data?.amount?tt(e.stripe_charge_data.amount):"N/A"})]}),i.jsx("div",{children:i.jsx("span",{className:"px-3 py-1 bg-green-100 text-green-800 text-xs font-medium rounded-full",children:"Completed"})})]})]}),i.jsx("div",{className:"flex md:flex-col justify-start md:justify-center items-start md:items-end gap-2",children:i.jsxs("button",{type:"button",onClick:()=>{return t=e.stripe_charge_data?.receipt_url,void(t&&window.open(t,"_blank"));var t},className:"flex items-center gap-2 text-sm text-primary hover:underline",children:[i.jsx(rs,{className:"h-4 w-4"}),"View Receipt"]})})]})})},e.id))})})]})},Bw=()=>{const{balance:e}=Ad(),{data:n}=Fw(),r=t.useMemo(()=>n?.tokenTransactions||[],[n]),[a,s]=t.useState({search:"",type:"ALL",dateRange:"ALL"}),[l,c]=t.useState({key:"updated_at",direction:"desc"}),u=t.useMemo(()=>{const e=r.filter(e=>{const t=e.description.toLowerCase().includes(a.search.toLowerCase())||e.id.toLowerCase().includes(a.search.toLowerCase()),n="ALL"===a.type||e.type===a.type;return t&&n});return e.sort((e,t)=>
217{let n=e[l.key],r=t[l.key];return"updated_at"===l.key&&(n=new Date(n),r=new Date(r)),"asc"===l.direction?n>r?1:-1:n<r?1:-1}),e},[r,a,l]),d=e=>{c(t=>({key:e,direction:t.key===e&&"desc"===t.direction?"asc":"desc"}))},p=e=>({PURCHASE:i.jsx(Xi,{className:"w-4 h-4"}),WELCOME_BONUS:i.jsx(cs,{className:"w-4 h-4"}),QUOTE_UNLOCK:i.jsx(ds,{className:"w-4 h-4"}),QUOTE_NEGOTIATION:i.jsx(ps,{className:"w-4 h-4"}),ADJUSTMENT:i.jsx(Rs,{className:"w-4 h-4"})}[e]),h=e=>e===re.Purchase||e===re.Adjustment||e===re.WelcomeBonus,m=(e,t)=>`${h(e)?"+":"-"}${t.toLocaleString()}`;return i.jsxs("div",{className:"max-w-7xl mx-auto p-6 pt-0 bg-white",children:[i.jsxs(o,{to:b.Settings_Billing,className:"inline-flex items-center gap-x-1 mb-10",children:[i.jsx(Hn,{}),"Back to billing"]}),i.jsxs("div",{className:"mb-8",children:[i.jsx("h1",{className:"text-xl font-medium text-hoki-800 mb-2",children:"Token Transaction History"}),i.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-600",children:[i.jsxs("span",{children:["Current Balance:"," ",i.jsxs("span",{className:"font-semibold text-gray-900",children:[e.toLocaleString()," ","tokens"]})]}),i.jsx("span",{children:"•"}),i.jsxs("span",{children:["Total Transactions:"," ",r.length]})]})]}),i.jsx("div",{className:"mb-6 rounded-lg",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Is,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),i.jsx("input",{type:"text",placeholder:"Search transactions...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:border-gray-300",value:a.search,onChange:e=>s(t=>({...t,search:e.target.value}))})]}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent appearance-none bg-white",value:a.type,onChange:e=>s(t=>({...t,type:e.target.value})),children:[i.jsx("option",{value:"ALL",children:"All Types"}),i.jsx("option",{value:"PURCHASE",children:"Purchase"}),i.jsx("option",{value:"WELCOME_BONUS",children:"Welcome Bonus"}),i.jsx("option",{value:"QUOTE_UNLOCK",children:"Quote Collect"}),i.jsx("option",{value:"QUOTE_NEGOTIATION",children:"Quote Negotiation"}),i.jsx("option",{value:"ADJUSTMENT",children:"Adjustment"})]}),i.jsx(qi,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4 pointer-events-none"})]})]})}),i.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:["Showing"," ",u.length," ","of"," ",r.length," ","transactions"]}),i.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm",children:[i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),i.jsxs("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>d("amount"),children:["Amount","amount"===l.key&&i.jsx("span",{className:"ml-1",children:"asc"===l.direction?"↑":"↓"})]}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),i.jsxs("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>d("updated_at"),children:["Date","updated_at"===l.key&&i.jsx("span",{className:"ml-1",children:"asc"===l.direction?"↑":"↓"})]}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Transaction ID"})]})}),i.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:u.map(e=>{return i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:i.jsxs("div",{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${n=e.type,{PURCHASE:"text-green-600 bg-green-50",WELCOME_BONUS:"text-purple-600 bg-purple-50",QUOTE_UNLOCK:"text-blue-600 bg-blue-50",QUOTE_NEGOTIATION:"text-purple-600 bg-purple-50",ADJUSTMENT:"text-orange-600 bg-orange-50"}[n]||"text-gray-600 bg-gray-50"}`,children:[p(e.type),e.type===re.QuoteUnlock?"QUOTE COLLECT":e.type.replace("_"," ")]})}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:i.jsx("span",{className:"text-sm font-semibold "+(h(e.type)?"text-green-600":"text-red-600"),children:m(e.type,e.amount)})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("div",{className:"text-sm text-gray-900",children:e.description})}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(t=e.updated_at,new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}))}),i.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 font-mono",children:[e.id.substring(0,8),"..."]})]},e.id);var t,n})})]})}),0===u.length&&i.jsxs("div",{className:"text-center py-12",children:[i.jsx("div",{className:"text-gray-500 text-lg mb-2",children:"No transactions foun
217d"}),i.jsx("div",{className:"text-gray-400 text-sm",children:"Try adjusting your search criteria"})]})]}),u.length>0&&i.jsx("div",{className:"mt-6 flex items-center justify-between",children:i.jsxs("div",{className:"text-sm text-gray-700",children:["Showing results 1-",u.length]})})]})},Uw=({label:e,to:t})=>i.jsx(oe,{to:t,className:({isActive:e})=>s("py-3.5 whitespace-nowrap","flex items-center gap-x-2",{"border-b-primary border-b-[3px] text-hoki-800 font-semibold":e,"text-hoki-600":!e}),children:e}),zw=E("\n  query Settings {\n    user {\n      id\n      vendor {\n        id\n        agreed_take_rate\n        enable_big_brain\n      }\n    }\n  }\n"),Hw=()=>{const e=m(),{pathname:r}=f(),a=Ue(),s=Be(),o=C(N),[l,c]=t.useState(0),u=Jn(zw),d=(u.data.user?.vendor?.agreed_take_rate||0)>0,p=u.data.user?.vendor?.enable_big_brain??!1,h=!1,g=[{label:"Profile",to:b.Settings_Profile},...a&&p?[{label:"Email",to:b.Settings_Email}]:[],...a?[]:[{label:"Team",to:b.Settings_Team}],...d?[]:[{label:"Billing",to:b.Settings_Billing}],...a&&p?[{label:"Dismissed Companies",to:b.Settings_DoNotContact}]:[]],y=r===b.Settings_Team,[x,v]=n.useState(!1),w=n.useMemo(()=>({isOpenInviteTeamMemberDialog:x,setIsOpenInviteTeamMemberDialog:v}),[x]),j=r.split("/");if(3===j.length||!g.find(e=>e.to.includes(j[3])))return i.jsx(T,{to:b.Settings_Profile,replace:!0});const k=a&&!o&&l>=se;return i.jsx("div",{className:"min-h-screenWithoutNav flex flex-col bg-white",children:i.jsxs("div",{className:"p-8 flex flex-col gap-6",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("div",{className:"text-2xl font-medium text-hoki-800 h-[48px]",children:"Settings"}),y&&i.jsxs(yn,{type:"button",className:"h-[48px] font-medium disabled:cursor-not-allowed",onClick:()=>{k?e(b.Settings_Billing_Plan):v(!0)},"data-testid":"button:add-team-member",children:[i.jsx(it,{className:"mr-2"}),k?"Subscribe to add more":"Add team member"]})]}),i.jsx("div",{className:"flex border-b border-b-hoki-200 overflow-auto w-full gap-6 px-6",children:g.map(e=>i.jsx(Uw,{label:e.label,to:e.to},`setting-tab:${e.label}`))}),i.jsx("div",{className:"py-10",children:i.jsx(um.Provider,{value:w,children:i.jsx(ae,{children:i.jsxs(ie,{element:i.jsx(n.Suspense,{fallback:i.jsx("div",{className:"flex justify-center mt-10 text-center",children:i.jsx(O,{})}),children:i.jsx(M,{})}),children:[i.jsx(ie,{path:"profile",element:i.jsx(dp,{})}),a?h:i.jsx(ie,{path:"team",element:i.jsx(Nm,{setTeamMemberCount:c,isVendorTeamMemberLimitHit:k})}),a&&p&&i.jsx(ie,{path:"email",element:i.jsx(Av,{})}
217),a&&p&&i.jsx(ie,{path:"dismissed",element:i.jsx(Sw,{})}),a&&!d&&i.jsxs(ie,{path:"/billing",children:[i.jsx(ie,{index:!0,element:i.jsx(am,{})}),i.jsx(ie,{path:"plan",element:i.jsx(Lw,{})})]}),s&&i.jsxs(ie,{path:"/billing",children:[i.jsx(ie,{index:!0,element:i.jsx(qw,{})}),i.jsx(ie,{path:"transactions",element:i.jsx(Bw,{})})]})]})})})})]})})},Vw=({onOpenChange:e,open:t})=>i.jsx(On,{open:t,onOpenChange:e,children:i.jsx(_n,{children:i.jsxs(Pn,{className:"max-w-sm",children:[i.jsx(Rn,{className:"text-left font-semibold text-lg",children:"Need Help? Contact Our Support Team!"}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"text-sm",children:"At Cromatic, we're commited to providing exceptional support to our valued users."}),i.jsxs("p",{className:"text-sm",children:["Please email us at"," ",i.jsx("a",{href:`mailto:${le}`,className:"text-primary hover:underline",children:le}),". Our support team will respond promptly to assist you with any issues you may have."]})]}),i.jsx(In,{className:"items-end",children:i.jsx(qn,{children:i.jsx(yn,{children:"Close"})})})]})})}),$w=()=>{const{isOpenContactSupportModal:e,setIsOpenContactSupportModal:t}=bt();return i.jsxs(i.Fragment,{children:[i.jsx(M,{}),i.jsx(Vw,{open:e,onOpenChange:t})]})},Ww=({label:e,className:t,...r})=>{const a=f(),o=m(),l=n.useMemo(()=>"default"===a.key,[a]),c=n.useCallback(()=>{l||o(-1)},[o,l]);return l?null:i.jsxs("div",{className:"inline-flex items-center",children:[i.jsx("button",{type:"button",...r,className:s("sm:p-px text-xl hover:bg-hoki-50 rounded-full inline-flex items-center justify-center",t),onClick:c,children:i.jsx(Cr,{})}),e]})};Ww.displayName="BackButton";const Qw=E("\n  query NotificationQuery($first: Int, $after: String) {\n    notificationsConnection(first: $first, after: $after) {\n      edges {\n        cursor\n        node {\n          ...NotificationItem_NotificationFragment\n        }\n      }\n      pageInfo {\n        hasPreviousPage\n        hasNextPage\n        endCursor\n      }\n    }\n  }\n"),Zw=()=>{const{data:e,loading:n,fetchMore:r}=d(Qw,{variables:{first:10}}),a=e?.notificationsConnection?.edges||[],s=e?.notificationsConnection?.pageInfo,o=t.useRef(null),[l,c]=t.useState(!1),[u,p]=t.useState(!1);t.useEffect(()=>{if(o.current){const e=o.current.scrollHeight>o.current.clientHeight;p(e)}},[]);const h=t.useCallback(async()=>{if(o.current){const{scrollTop:e,scrollHeight:t,clientHeight:n}=o.current;e+n>=t&&s?.hasNextPage&&(c(!0),await r({variables:{after:s.endCursor,first:15}}),c(!1))}},[s,r]);return i.jsxs("div",{className:"w-full p-5 h-screenWithoutNav overflow-auto space-y-5",ref:o,onScroll:h,children:[i.jsx(Ww,{className:"mr-2"}),i.jsxs("div",{className:"bg-white rounded-lg w-full pt-2 md:pt-6 pb-2 md:pb-4",children:[i.jsx("p",{className:"text-left text-md md:text-2xl font-semibold border-b pb-2 mx-3 md:mx-4",children:"Notifications"}),a.length>0&&i.jsx(i.Fragment,{children:a?.map(e=>i.jsx(ud,{notificationFragment:e?.node},e?.cursor))}),0===a.length&&!n&&i.jsx("div",{className:"w-full flex justify-items-center pt-5",children:i.jsx("p",{className:"text-hoki-900 mx-auto",children:"You have no notifications yet."})}),(n||l)&&i.jsx("div",{className:"flex justify-center py-6",children:i.jsx(O,{})})]}),u&&!1===s?.hasNextPage&&i.jsx("p",{className:"py-4 text-center text-hoki-500 text-xs",children:"You've reached the end!"})]})},Kw=E("\n  query IsAdmin {\n    user {\n      id\n      is_admin\n    }\n  }\n"),Gw=()=>{const{isStaff:e,loading:t}=(({skip:e=!1}={})=>{const{data:t,loading:n}=d(Kw,{skip:e});return{isStaff:Boolean(t?.user?.is_admin),loading:n}})();return t?null:e?i.jsx(M,{}):i.jsx(T,{to:b.App,replace:!0})},Yw={base:"/app/ops",identities:"/app/ops/identities",clinicalTrialUpdates:"/app/ops/clinical-trial-updates",companyNews:"/app/ops/company-news",adminAccess:"/app/ops/admin-access",sendRateCaps:"/app/ops/send-rate-caps",reveSimTestCases:"/app/ops/reve-sim-test-cases",reveJobs:"/app/ops/reve-jobs",reveJobSimulator:"/app/ops/reve-job-simulator",reveSystemPromptPlayground:"/app/ops/reve-system-prompt-playground",contactRequests:"/app/ops/contact-requests",emailTemplates:"/app/ops/contact-requests/email-templates",companyOverride:"/app/
217ops/company-override",companyEnrichment:"/app/ops/company-enrichment",reveSessions:"/app/ops/reve-qa",reveSession:e=>`/app/ops/reve-qa/${e}`,campaignFailures:"/app/ops/campaign-failures",companyDataHistory:"/app/ops/company-data-history",companyDataHistoryDetail:e=>`/app/ops/company-data-history/${e}`,companyQueue:"/app/ops/company-queue",evidenceFrames:"/app/ops/evidence-frames",evidenceFrame:e=>`/app/ops/evidence-frames/${e}`,aqueduct:"/app/ops/aqueduct",aqueductPipelines:"/app/ops/aqueduct/aquas",aqueductPipeline:e=>`/app/ops/aqueduct/aquas/${e}`,aqueductRuns:"/app/ops/aqueduct/runs",aqueductRun:e=>`/app/ops/aqueduct/runs/${e}`,aqueductQueues:"/app/ops/aqueduct/queues",aqueductQueue:e=>`/app/ops/aqueduct/queues/${e}`,aqueductQueueItem:(e,t)=>`/app/ops/aqueduct/queues/${e}/items/${t}`,pipelineImport:"/app/ops/pipeline-import",aqueductWorkers:"/app/ops/aqueduct/workers"},Jw=[{title:"Organization identities",description:"Explore organizations and groups, and the names, identifiers, memberships, and evidence behind each one.",to:Yw.identities},{title:"Admin access",description:"Grant or revoke Cromatic staff (admin) access for a user.",to:Yw.adminAccess},{title:"Send rate caps",description:"Budget one mailbox to a number of emails per minute for campaign sends, and see every mailbox that currently carries a cap. A mailbox with no cap sends uncapped.",to:Yw.sendRateCaps},{title:"Contact requests",description:"Review “more contacts” requests, add net-new contacts to the database, and mark requests reviewed.",to:Yw.contactRequests},{title:"Company editor",description:"Edit a bio company by hand — domain, classification type, employee count, and description — when the classifier got them wrong or a stub is missing data, or mark a company inactive. Setting the domain here is the prerequisite for the enrichment re-run app.",to:Yw.companyOverride},{title:"Company enrichment re-run",description:"Re-run classify + enrich on a bio company stranded behind the pipeline’s skip of existing companies. Classifies only when unclassified, enriches from AI Science. Needs a domain first (set it in the Company editor); no contacts (add to a feed for those).",to:Yw.companyEnrichment},{title:"Pipeline import",description:"Import NextBiopharm drug-search exports (.xlsx) one drug at a time: match the companies they name, decide the drugs the AI flags as possible namesakes, and commit the ready ones. Companies it can’t match go to the Missing Companies queue.",to:Yw.pipelineImport},{title:"Missing Companies queue",description:"Companies an import named that aren’t in our database, kept to process later; each name is listed once. Read-only.",to:Yw.companyQueue},{title:"Campaign send failures",description:"Every campaign email that failed to send, across all users. Triage by cause, then follow the trail — recipient, campaign, owner, step, and the provider’s own error. Filter by campaign or owner email; read-only.",to:Yw.campaignFailures},{title:"Company data history",description:"See when each data mechanism last touched a bio company — v1/v2 intervention-pipeline runs and the contact-import paths — with every signal labeled by what it actually records. Read-only.",to:Yw.companyDataHistory},{title:"Aqueduct",description:"The durable research runtime: what each aqua runs and has spent, every run with its steps, provider calls and live activity log, and the queues work waits in before it becomes a run.",to:Yw.aqueduct},{title:"Clinical trial updates",description:"Browse clinical trial updates from CT.gov ingestion — field-level before/after, matched sponsors, paged.",to:Yw.clinicalTrialUpdates},{title:"Company news",description:"Browse company news events from bio-DB ingestion — the Reve outreach signal feed. Filter by company, event type, source, and date; paged.",to:Yw.companyNews},{title:"Reve company updates",description:"Day-by-day outreach-signal timeline for any company, hand-reviewed “would a person email?” examples, and run the worker over a date range to see what it drafts.",to:Yw.reveSimTestCases},{title:"Reve jobs & objectives",description:"Create and edit Reve outreach jobs across users — goals, signal types, target roles, send window, caps, companies, and lifecycle status.",to:Yw.reveJobs},{title:"Reve job draft simulator",description:"Pick a job + a past date range and replay the outreach worker over its accounts; drafts accumulate in the job. Shows signals seen per account and how far each account has been simulated through.",to:Yw.reveJobSimulator},{title:"Reve QA",description:"Browse every Reve conversation across all users, cleared ones included. Search by title, owner, or company; filter by review state; open one to review it.",to:Yw.reveSessions},{title:"Reve system prompt playground",description:"Edit the Reve base system prompt and chat with the real agent (sandbox + tools) to test prompt changes before committing them. Browse the sandbox workspace to see what the agent wrote.",to:Yw.reveSystemPromptPlayground},{title:"Evidence frames",description:"Browse frame fills from the evidence store — what each observation was read to say, in typed form, with the exact words every slot came from. Filter by frame, filler, source, standing, or a slot or role as it was filled. Read-only.",to:Yw.evidenceFrames}],Xw=()=>i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl",children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Ops portal"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Internal tools and dashboards. Cromatic staff only."}),i.jsx("div",{className:"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Jw.map(e=>i.jsxs(o,{to:e.to,className:"block rounded-lg border border-gray-200 bg-white p-5 transition hover:border-gray-300 hover:shadow-sm",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:e.title}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:e.description})]},e.to))})]})}),ej=({id:e,checked:t,onChange:n,label:r,disabled:a=!1,containerClassName:s="",inputClassName:o="",labelClassName:l="",tooltip:c,inputRef:u})=>i.jsxs("label",{htmlFor:e,className:`flex items-center gap-2 text-sm ${a?"cursor-not-allowed opacity-70":"cursor-pointer hover:text-gray-900"} ${s}`,children:[i.jsx("input",{id:e,ref:u,type:"checkbox",checked:t,disabled:a,onChange:e=>n(e.target.checked),className:`rounded border-gray-300 text-blue-600 focus:ring-blue-500 ${a?"cursor-not-allowed":""} ${o}`}),void 0!==r&&i.jsxs("span",{className:`text-gray-600 inline-flex items-center gap-1 ${l}`,children:[r,c&&i.jsx(qe,{tooltip:c,placement:"top",children:i.jsx(ms,{className:"w-4 h-4 text-gray-400"})})]})]}),tj=u`
218  query OpsClinicalTrialUpdates($limit: Int, $offset: Int, $eventTypes: [String!]) {
219    opsClinicalTrialUpdates(limit: $limit, offset: $offset, event_types: $eventTypes) {
220      items {
221        id
222        nct_id
223        title
224        event_types
225        overall_status
226        lead_sponsor_name
227        sponsors {
228          company_id
229          company_name
230          company_slug
231          role
232        }
233        delta
234        source_event_at
235        detected_at
236      }
237      total_count
238    }
239  }
240`,nj=u`
241  query OpsClinicalTrialEventTypes {
242    opsClinicalTrialEventTypes
243  }
244`,rj=100,aj=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},ij=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})},sj=["","Detected","Last update posted","Event(s)","NCT ID","Title","Sponsor(s)","Status"],oj=({label:e})=>i.jsx("span",{className:"rounded bg-blue-50 px-1.5 py-0.5 text-xs font-medium text-blue-700",children:e}),lj=({value:e})=>null==e?i.jsx("span",{className:"text-gray-400",children:"∅"}):Array.isArray(e)?0===e.length?i.jsx("span",{className:"text-gray-400",children:"∅ (empty)"}):i.jsx("span",{className:"flex flex-wrap gap-1",children:e.map((e,t)=>{const n="object"==typeof e?JSON.stringify(e):String(e);return i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-700",children:n},`${t}-${n}`)})}):"object"==typeof e?i.jsx("pre",{className:"overflow-x-auto rounded bg-gray-100 p-2 text-xs text-gray-700",children:JSON.stringify(e,null,2)}):i.jsx("span",{className:"text-gray-800",children:String(e)}),cj=({delta:e})=>i.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[i.jsx("thead",{children:i.jsx("tr",{children:["Field","Before","After"].map(e=>i.jsx("th",{className:"px-3 py-1.5 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:Object.entries(e).map(([e,t])=>i.jsxs("tr",{className:"align-top",children:[i.jsx("td",{className:"whitespace-nowrap px-3 py-1.5 font-mono text-xs text-gray-900",children:e}),i.jsx("td",{className:"px-3 py-1.5",children:i.jsx(lj,{value:t?.before})}),i.jsx("td",{className:"px-3 py-1.5",children:i.jsx(lj,{value:t?.after})})]},e))})]}),uj=({after:e})=>{const t=e&&"object"==typeof e&&!Array.isArray(e)?Object.entries(e):[];return i.jsxs("div",{children:[i.jsx("p",{className:"mb-2 text-xs font-medium text-gray-500",children:"New trial — full snapshot (first time this trial was seen)"}),t.length>0?i.jsx("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:i.jsx("tbody",{className:"divide-y divide-gray-100",children:t.map(([e,t])=>i.jsxs("tr",{className:"align-top",children:[i.jsx("td",{className:"whitespace-nowrap px-3 py-1.5 font-mono text-xs text-gray-900",children:e}),i.jsx("td",{className:"px-3 py-1.5",children:i.jsx(lj,{value:t})})]},e))})}):i.jsx(lj,{value:e})]})},dj=({delta:e})=>{if(!e||0===Object.keys(e).length)return i.jsx("p",{className:"text-sm text-gray-400",children:"No delta recorded."});const t=e.full_trial;return t?i.jsx(uj,{after:t.after}):i.jsx(cj,{delta:e})},pj=({item:e})=>0===e.sponsors.length?e.lead_sponsor_name?i.jsxs("span",{className:"text-gray-700",children:[e.lead_sponsor_name,i.jsx("span",{className:"ml-1 text-xs text-gray-400",children:"(unmatched)"})]}):i.jsx("span",{className:"text-gray-400",children:"—"}):i.jsx("span",{className:"flex flex-col gap-0.5",children:e.sponsors.map(e=>i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(o,{to:b.CompanyProfile(e.company_slug??e.company_id),className:"text-blue-600 hover:underline",children:e.company_name}),i.jsx("span",{className:"rounded bg-gray-100 px-1 py-0.5 text-[10px] font-medium uppercase tracking-wide text-gray-500",children:e.role})]},`${e.company_id}-${e.role}`))}),hj=({item:e})=>{const[t,r]=n.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-2 py-2 text-center",children:i.jsx("button",{type:"button",onClick:()=>r(e=>!e),"aria-label":t?"Collapse delta":"Expand delta",className:"rounded px-1 text-gray-400 hover:bg-gray-100 hover:text-gray-700",children:t?"▾":"▸"})}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",children:aj(e.detected_at)}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",children:ij(e.source_event_at)}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:e.event_types.length>0?i.jsx("span",{className:"flex flex-wrap gap-1",children:e.event_types.map(e=>i.jsx(oj,{label:e},e))}):"—"}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm",children:i.jsx("a",{href:`https://clinicaltrials.gov/study/${e.nct_id}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:e.nct_id})}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:e.title??"—"}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:i.jsx(pj,{item:e})}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",children:e.overall_status??"—"})]}),t&&i.jsx("tr",{className:"bg-gray-50",children:i.jsx("td",{className:"px-4 py-3",colSpan:sj.length,children:i.jsx("div",{className:"overflow-x-auto rounded-md border border-gray-200 bg-white p-3",children:i.jsx(dj,{delta:e.delta})})})})]})},mj=({allTypes:e,excluded:t,onToggle:r,onOnly:a,onAll:s})=>{const{isOpen:o,toggle:l,onClose:c}=ut(!1),u=n.useRef(null);
244wl(u,c);const d=t.size>0,p=e.length-t.size;return i.jsxs("div",{className:"relative inline-flex items-center gap-1",ref:u,children:[i.jsx("span",{children:"Event(s)"}),i.jsx("button",{type:"button",onClick:l,"aria-label":"Filter event types",title:"Filter event types",className:"rounded p-0.5 hover:bg-gray-200 "+(d?"text-blue-600":"text-gray-400"),children:i.jsx(os,{className:"h-3.5 w-3.5",fill:d?"currentColor":"none"})}),o&&i.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1 w-96 rounded-lg border border-gray-200 bg-white p-2 text-left font-normal normal-case tracking-normal shadow-lg",children:[i.jsxs("div",{className:"flex items-center justify-between px-1 pb-1.5",children:[i.jsx("span",{className:"text-xs text-gray-400",children:`${p} of ${e.length} shown`}),i.jsx("button",{type:"button",onClick:s,className:"text-xs text-blue-600 hover:underline",children:"Select all"})]}),i.jsx("ul",{className:"max-h-72 overflow-auto",children:e.map(e=>i.jsxs("li",{className:"group flex items-center justify-between rounded px-1 py-1 hover:bg-gray-50",children:[i.jsx(ej,{id:`event-filter-${e}`,checked:!t.has(e),onChange:()=>r(e),label:e,labelClassName:"truncate"}),i.jsx("button",{type:"button",onClick:()=>a(e),className:"ml-2 shrink-0 text-xs text-gray-400 hover:text-blue-600 hover:underline group-hover:text-blue-600",children:"only"})]},e))})]})]})},fj=()=>{const[e,t]=n.useState(0),[r,a]=n.useState(new Set),{data:s}=d(nj),l=s?.opsClinicalTrialEventTypes??[],c=0===r.size?void 0:l.filter(e=>!r.has(e)),u=e=>{a(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),t(0)},p=()=>{a(new Set),t(0)},h=e=>{a(new Set(l.filter(t=>t!==e))),t(0)},{data:m,previousData:f,loading:g,error:y}=d(tj,{variables:{limit:rj,offset:e,eventTypes:c}}),x=(m??f)?.opsClinicalTrialUpdates,b=x?.items??[],v=x?.total_count??0,w=0===v?0:e+1,j=Math.min(e+rj,v),C=e>0,N=e+rj<v;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-6xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Clinical trial updates"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Updates from CT.gov ingestion, most recently detected first. Expand a row to see the field-level before/after."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),g&&!x&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),y&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load clinical trial updates."}),x&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`Showing ${w.toLocaleString()}–${j.toLocaleString()} of ${v.toLocaleString()}`,g&&i.jsx("span",{className:"ml-2 text-gray-400",children:"updating…"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:!C,onClick:()=>t(e=>Math.max(e-rj,0)),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"← Prev"}),i.jsx("button",{type:"button",disabled:!N,onClick:()=>t(e=>e+rj),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Next →"})]})]}),i.jsx("div",{className:"mt-2 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:sj.map((e,t)=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:"Event(s)"===e&&l.length>0?i.jsx(mj,{allTypes:l,excluded:r,onToggle:u,onOnly:h,onAll:p}):e},e||t))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:0===b.length?i.jsx("tr",{children:i.jsx("td",{colSpan:sj.length,className:"px-4 py-10 text-center text-sm text-gray-500",children:r.size>
2440?"No updates match the selected event types.":"No clinical trial updates found."})}):b.map(e=>i.jsx(hj,{item:e},e.id))})]})})]})]})})},gj=u`
245  query OpsCompanyNews(
246    $limit: Int
247    $offset: Int
248    $canonicalCompanyId: String
249    $eventTypes: [String!]
250    $source: String
251    $fromDate: String
252    $toDate: String
253  ) {
254    opsCompanyNews(
255      limit: $limit
256      offset: $offset
257      canonical_company_id: $canonicalCompanyId
258      event_types: $eventTypes
259      source: $source
260      from_date: $fromDate
261      to_date: $toDate
262    ) {
263      items {
264        id
265        title
266        source
267        url
268        event_type
269        published_at
270        summary
271        ai_summary
272        is_news_brief
273        company_id
274        company_name
275        company_slug
276      }
277      total_count
278    }
279  }
280`,yj=u`
281  query OpsCompanyNewsEventTypes {
282    opsCompanyNewsEventTypes
283  }
284`,xj=u`
285  query OpsSearchBioCompanies($query: String!) {
286    opsSearchBioCompanies(query: $query) {
287      id
288      company_name
289    }
290  }
291`,bj=100,vj=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},wj=["","Published","Event","Company","Title","Source"],jj=({label:e})=>i.jsx("span",{className:"rounded bg-blue-50 px-1.5 py-0.5 text-xs font-medium text-blue-700",children:e}),Cj=({item:e})=>e.company_name?i.jsx(o,{to:b.CompanyProfile(e.company_slug??e.company_id??""),className:"text-blue-600 hover:underline",children:e.company_name}):i.jsxs("span",{className:"text-gray-400",children:["—",i.jsx("span",{className:"ml-1 text-xs",children:"(unmatched)"})]}),Nj=({item:e})=>{const t=Xn(e.url);return i.jsxs("div",{className:"space-y-3",children:[e.ai_summary&&i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:"AI summary"}),i.jsx("p",{className:"mt-1 text-sm text-gray-800",children:e.ai_summary})]}),e.summary&&i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:"Raw excerpt"}),i.jsx("p",{className:"mt-1 whitespace-pre-line text-sm text-gray-600",children:e.summary})]}),t&&i.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-block text-sm text-blue-600 hover:underline",children:"Open article ↗"})]})},kj=({item:e})=>{const[t,r]=n.useState(!1),a=Boolean(e.ai_summary||e.summary),s=Xn(e.url);return i.jsxs(i.Fragment,{children:[i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-2 py-2 text-center",children:a&&i.jsx("button",{type:"button",onClick:()=>r(e=>!e),"aria-label":t?"Collapse summary":"Expand summary",className:"rounded px-1 text-gray-400 hover:bg-gray-100 hover:text-gray-700",children:t?"▾":"▸"})}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",children:vj(e.published_at)}),i.jsx("td",{className:"px-4 py-2 text-sm",children:i.jsx(jj,{label:e.event_type})}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:i.jsx(Cj,{item:e})}),i.jsxs("td",{className:"px-4 py-2 text-sm",children:[s?i.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"text-gray-900 hover:text-blue-600 hover:underline",children:e.title}):i.jsx("span",{className:"text-gray-900",children:e.title}),e.is_news_brief&&i.jsx("span",{className:"ml-2 rounded bg-gray-100 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-gray-500",children:"brief"})]}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-500",children:e.source})]}),t&&a&&i.jsx("tr",{className:"bg-gray-50",children:i.jsx("td",{className:"px-4 py-3",colSpan:wj.length,children:i.jsx("div",{className:"overflow-x-auto rounded-md border border-gray-200 bg-white p-3",children:i.jsx(Nj,{item:e})})})})]})},Sj=({allTypes:e,excluded:t,onToggle:r,onOnly:a,onAll:s})=>{const{isOpen:o,toggle:l,onClose:c}=ut(!1),u=n.useRef(null);wl(u,c);const d=t.size>0,p=e.length-t.size;return i.jsxs("div",{className:"relative",ref:u,children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Event types"}),i.jsxs("button",{id:"event-type-filter",type:"button",onClick:l,className:"flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm "+(d?"border-blue-300 text-blue-700":"border-gray-300 text-gray-700"),children:[i.jsx(os,{className:"h-3.5 w-3.5",fill:d?"currentColor":"none"}),d?`${p} of ${e.length}`:"All"]}),o&&i.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1 w-80 rounded-lg border border-gray-200 bg-white p-2 text-left shadow-lg",children:[i.jsxs("div",{className:"flex items-center justify-between px-1 pb-1.5",children:[i.jsx("span",{className:"text-xs text-gray-400",children:`${p} of ${e.length} shown`}),i.jsx("button",{type:"button",onClick:s,className:"text-xs text-blue-600 hover:underline",children:"Select all"})]}),i.jsx("ul",{className:"max-h-72 overflow-auto",children:e.map(e=>i.jsxs("li",{className:"group flex items-center justify-between rounded px-1 py-1 hover:bg-gray-50",children:[i.jsx(ej,{id:`event-filter-${e}`,checked:!t.has(e),onChange:()=>r(e),label:e,labelClassName:"truncate"}),i.jsx("button",{type:"button",onClick:()=>a(e),className:"ml-2 shrink-0 text-xs text-gray-400 hover:text-blue-600 hover:underline group-hover:text-blue-600",children:"only"})]},e))})]})]})},Ej=({selected:e,onSelect:t,onClear:r})=>{const[a,s]=n.useState(""),[o,l]=n.useState("");n.useEffect(()=>{const e=setTimeout(()=>l(a),200);return()=>clearTimeout(e)},[a]);const{data:c,loading:u}=d(xj,{variables:{query:o},skip:o.trim().length<2}),p=c?.opsSearchBioCompanies??[],h=a.trim().length>=2;return e?i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Company"}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-800",children:[e.name,i.jsx("button",{type:"button",onClick:r,"aria-label":"Clear company filter",className:"text-blue-500 hover:text-blue-700",children:"✕"})]})]}):i.jsxs("div",{className:"relative",children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Company"}),i.jsx("input",{id:"company-filter",type:"text",value:a,onChange:e=>s(e.target.value),placeholder:"Search by name…",className:"w-56 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),h&&i.jsxs("div",{className:"absolute z-10 mt-1 w-56 overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm",children:[u&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"Searching…"}),!u&&0===p.length&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"No companies match."}),p.map(e=>i.jsx("button",{type:"button",onClick:()=>{t({id:e.id,name:e.company_name}),s("")},className:"block w-full px-3 py-2 text-left text-sm text-gray-800 hover:bg-gray-50",children:e.company_name},e.id))]})]})},Aj=()=>{const[e,t]=n.useState(0),[r,a]=n.useState(null),[s,l]=n.useState(new Set),[c,u]=n.useState(""),[p,h]=n.useState(""),[m,f]=n.useState(""),[g,y]=n.useState("");n.useEffect(()=>{const e=setTimeout(()=>{h(c),t(0)},300);return()=>clearTimeout(e)},[c]);const{data:x}=d(yj),b=x?.opsCompanyNewsEventTypes??[],v=0===s.size?void 0:b.filter(e=>!s.has(e)),w=p.trim(),j=Boolean(r||s.size>0||w||m||g),{data:C,previousData:N,loading:k,error:S}=d(gj,{variables:{limit:bj,offset:e,canonicalCompanyId:r?.id,eventTypes:v,source:w||void 0,fromDate:m||void 0,toDate:g||void 0}}),E=(C??N)?.opsCompanyNews,A=E?.items??[],O=E?.total_count??0,_=0===O?0:e+1,P=Math.min(e+bj,O),I=e>0,M=e+bj<O;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-6xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Company news"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"News events from bio-DB ingestion — the signal feed that powers Reve outreach. Most recently published first. Expand a row to read the AI and raw summaries."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsxs("div",{className:"mt-6 flex flex-wrap items-end gap-3",children:[i.jsx(Ej,{selected:r,onSelect:e=>{a(e),t(0)},onClear:()=>{a(null),t(0)}}),b.length>0&&i.jsx(Sj,{allTypes:b,excluded:s,onToggle:e=>{l(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),t(0)},onOnly:e=>{l(new Set(b.filter(t=>t!==e))),t(0)},onAll:()=>{l(new Set),t(0)}}),i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Source"}),i.jsx("input",{id:"source-filter",type:"text",value:c,onChange:e=>u(e.target.value),placeholder:"e.g. Fierce Biotech",className:"w-48 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"})]}),i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"From"}),i.jsx("input",{id:"from-date",type:"date",value:m,onChange:e=>{return n=e.target.value,f(n),void t(0);var n},className:"rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"})]}),i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"To"}),i.jsx("input",{id:"to-date",type:"date",value:g,onChange:e=>{return n=e.target.value,y(n),void t(0);var n},className:"rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"})]}),j&&i.jsx("button",{type:"button",onClick:()=>{a(null),l(new Set),u(""),h(""),f(""),y(""),t(0)},className:"px-2 py-2 text-sm text-blue-600 hover:underline",children:"Clear filters"})]}),k&&!E&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),S&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load company news."}),E&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`Showing ${_.toLocaleStr
291ing()}–${P.toLocaleString()} of ${O.toLocaleString()}`,k&&i.jsx("span",{className:"ml-2 text-gray-400",children:"updating…"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:!I,onClick:()=>t(e=>Math.max(e-bj,0)),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"← Prev"}),i.jsx("button",{type:"button",disabled:!M,onClick:()=>t(e=>e+bj),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Next →"})]})]}),i.jsx("div",{className:"mt-2 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:wj.map((e,t)=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e||t))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:0===A.length?i.jsx("tr",{children:i.jsx("td",{colSpan:wj.length,className:"px-4 py-10 text-center text-sm text-gray-500",children:j?"No company news matches the current filters.":"No company news found."})}):A.map(e=>i.jsx(kj,{item:e},e.id))})]})})]})]})})},Oj=u`
292  query OpsAdminPage {
293    user {
294      id
295    }
296    opsAdmins {
297      id
298      email
299      first_name
300      last_name
301      is_admin
302    }
303  }
304`,_j=u`
305  query OpsUserByEmail($email: String!) {
306    opsUserByEmail(email: $email) {
307      id
308      email
309      first_name
310      last_name
311      is_admin
312    }
313  }
314`,Pj=u`
315  mutation OpsSetUserAdmin($userId: String!, $isAdmin: Boolean!) {
316    opsSetUserAdmin(user_id: $userId, is_admin: $isAdmin) {
317      id
318      email
319      first_name
320      last_name
321      is_admin
322    }
323  }
324`,Ij=e=>[e.first_name,e.last_name].filter(Boolean).join(" ")||"—",Mj=()=>{const{data:e,loading:n,error:r}=d(Oj),a=e?.user?.id,s=e?.opsAdmins??[],[l,c]=t.useState(""),[u,h]=t.useState(null),[m,f]=t.useState(null),[g,y]=t.useState(null),[x,b]=An(_j,{fetchPolicy:"network-only",onError:()=>f("Lookup failed. Please try again.")}),{data:v,loading:w,called:j}=b;t.useEffect(()=>{v&&h(v.opsUserByEmail)},[v]);const[C,{loading:N}]=p(Pj,{refetchQueries:[{query:Oj}],awaitRefetchQueries:!0}),k=async(e,t)=>{y(null);try{const n=await C({variables:{userId:e,isAdmin:t}}),r=n.data?.opsSetUserAdmin;r&&u?.id===r.id&&h(r)}catch{y(t?"Failed to grant admin access.":"Failed to revoke admin access.")}};return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Admin access"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Grant or revoke Cromatic staff (admin) access. Admins can reach the ops portal."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),g&&i.jsx("p",{className:"mt-4 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:g}),i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Grant access"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Look up a user by their exact email address."}),i.jsxs("form",{onSubmit:e=>{e.preventDefault();const t=l.trim();t&&(f(null),h(null),x({variables:{email:t}}))},className:"mt-3 flex gap-2",children:[i.jsx("input",{type:"email",value:l,onChange:e=>c(e.target.value),placeholder:"[email protected]",className:"w-full max-w-sm rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:w||!l.trim(),className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:w?"Looking up…":"Look up"})]}),m&&i.jsx("p",{className:"mt-3 text-sm text-red-600",children:m}),j&&!w&&!m&&!u&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No user found with that email."}),u&&i.jsxs("div",{className:"mt-4 flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 px-4 py-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-gray-900",children:Ij(u)}),i.jsx("p",{className:"text-sm text-gray-600",children:u.email??"—"})]}),u.is_admin?i.jsx("span",{className:"text-sm font-medium text-green-700",children:"Already an admin"}):i.jsx("button",{type:"button",disabled:N,onClick:()=>k(u.id,!0),className:"rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:"Make admin"})]})]}),i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Current admins"}),n&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading…"}),r&&i.jsx("p",{className:"mt-3 text-sm text-red-600",children:"Failed to load admins."}),!n&&!r&&0===s.length&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No admins yet."}),s.length>0&&i.jsx("div",{className:"mt-3 overflow-hidden rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:["Name","Email",""].map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:s.map(e=>{const t=e.id===a;return i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:Ij(e)}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:e.email??"—"}),i.jsx("td",{className:"px-4 py-2 text-right text-sm",children:i.jsx("button",{type:"button",disabled:N||t,onClick:()=>k(e.id,!1),title:t?"You cannot remove your own admin access":void 0,className:"rounded-md border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Remove"})})]},e.id)})})]})})]})]})})},Tj=u`
325  query OpsMailboxSendRateCaps {
326    opsMailboxSendRateCaps {
327      user_id
328      user_email
329      provider
330      label
331      emails_per_minute
332      updated_at
333    }
334  }
335`,Rj=u`
336  query OpsMailboxLookup($email: String!) {
337    opsMailboxLookup(email: $email) {
338      user_id
339      email
340      name
341      mailboxes {
342        provider
343        label
344        emails_per_minute
345      }
346    }
347  }
348`,Lj=u`
349  mutation OpsSetMailboxSendRateCap(
350    $userId: String!
351    $provider: String!
352    $emailsPerMinute: Int!
353  ) {
354    opsSetMailboxSendRateCap(
355      user_id: $userId
356      provider: $provider
357      emails_per_minute: $emailsPerMinute
358    ) {
359      provider
360      label
361      emails_per_minute
362    }
363  }
364`,Dj=u`
365  mutation OpsClearMailboxSendRateCap($userId: String!, $provider: String!) {
366    opsClearMailboxSendRateCap(user_id: $userId, provider: $provider) {
367      provider
368      label
369      emails_per_minute
370    }
371  }
372`,Fj=2147483647,qj=e=>({...e,draft:e.emails_per_minute?.toString()??""}),Bj=e=>{const t=new Date(e);
372return Number.isNaN(t.getTime())?e:t.toLocaleString()},Uj=()=>{const{data:e,loading:n,error:r,refetch:a}=d(Tj,{fetchPolicy:"network-only"}),s=e?.opsMailboxSendRateCaps??[],[l,c]=t.useState(""),[u,h]=t.useState(null),[m,f]=t.useState(null),[g,y]=t.useState(null),[x,b]=t.useState(new Set),[v,w]=An(Rj,{fetchPolicy:"network-only",onError:()=>f("Lookup failed. Please try again.")}),{data:j,loading:C,called:N}=w;t.useEffect(()=>{if(!j)return;const e=j.opsMailboxLookup;h(e&&{...e,mailboxes:e.mailboxes.map(qj)})},[j]);const[k]=p(Lj),[S]=p(Dj),E=async(e,t,n,r)=>{y(null),b(e=>new Set(e).add(t));try{const t=await n();t&&((e,t)=>{h(n=>n?.user_id===e?{...n,mailboxes:n.mailboxes.map(e=>e.provider===t.provider?qj(t):e)}:n)})(e,t)}catch{return void y(r)}finally{b(e=>{const n=new Set(e);return n.delete(t),n})}await a().catch(()=>y("The change was saved. The capped mailbox list below failed to refresh."))},A=async e=>{if(!u)return;const t=u.mailboxes.find(t=>t.provider===e),n=(e=>{const t=e.trim();if(!/^\d+$/.test(t))return null;const n=Number(t);return n>=1&&n<=Fj?n:null})(t?.draft??"");if(null===n)return void y(`A cap is a whole number of emails per minute, from 1 to ${Fj.toLocaleString()}. Remove the cap to return the mailbox to the default.`);const{user_id:r}=u;await E(r,e,async()=>(await k({variables:{userId:r,provider:e,emailsPerMinute:n}})).data?.opsSetMailboxSendRateCap,`Failed to save the cap on ${e}.`)};return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Send rate caps"}),i.jsx("p",{className:"mt-1 max-w-2xl text-sm text-gray-600",children:"Budget one mailbox to a number of emails per minute for campaign sends. A mailbox with no cap sends at the default 15/min; platform email with no cap is uncapped. Changes take effect on the next send from that mailbox; no deploy, no restart."}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm text-gray-500",children:"The budget is counted per clock minute, so a 60-second span crossing a minute boundary can carry up to twice the cap. To stay under a provider limit — Microsoft restricts at 30/min — set half of it."})]}),i.jsx(o,{to:Yw.base,className:"shrink-0 whitespace-nowrap text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),g&&i.jsx("p",{className:"mt-4 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:g}),i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Set a cap"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Look up a user by their exact email address."}),i.jsxs("form",{onSubmit:e=>{e.preventDefault();const t=l.trim();t&&(f(null),y(null),h(null),v({variables:{email:t}}))},className:"mt-3 flex gap-2",children:[i.jsx("input",{type:"email",value:l,onChange:e=>c(e.target.value),placeholder:"[email protected]",className:"w-full max-w-sm rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:C||!l.trim(),className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:C?"Looking up…":"Look up"})]}),m&&i.jsx("p",{className:"mt-3 text-sm text-red-600",children:m}),N&&!C&&!m&&!u&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No user found with that email."}),u&&i.jsxs("div",{className:"mt-4 rounded-md border border-gray-200",children:[i.jsxs("div",{className:"border-b border-gray-200 bg-gray-50 px-4 py-3",children:[i.jsx("p",{className:"text-sm font-medium text-gray-900",children:u.name??"—"}),i.jsx("p",{className:"text-sm text-gray-600",children:u.email??"—"})]}),i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:["Mailbox","Cap",""].map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:u.mailboxes.map(e=>{const t=x.has(e.provider),n=null!==e.emails_per_minute,r=!n&&e.provider!==qd;return i.jsxs("tr",{children:[i.jsxs("td",{className:"px-4 py-3 text-sm",children:[i.jsx("span",{className:"font-medium text-gray-900",children:e.label}),i.jsx("span",{className:"ml-2 text-xs text-gray-500",children:e.provider})]}),i.jsxs("td",{className:"px-4 py-3 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"number",min:1,step:1,value:e.draft,onChange:t=>{return n=e.provider,r=t.target.value,void h(e=>e?{...e,mailboxes:e.mailboxes.map(e=>e.provider===n?{...e,draft:r}:e)}:e);var n,r},disabled:t,placeholder:"—",className:"w-24 rounded-md border border-gray-300 px-2 py-1 text-sm focus:border-blue-500 focus:outline-none"}),i.jsx("span",{className:"text-gray-500",children:"emails/min"})]}),r&&i.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Default 15/min — no cap set on this mailbox."})]}),i.jsxs("td",{className:"whitespace-nowrap px-4 py-3 text-right text-sm",children:[i.jsx("button",{type:"button",disabled:t,onClick:()=>A(e.provider),className:"rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:n?"Change":"Set cap"}),n&&i.jsx("button",{type:"button",disabled:t,onClick:()=>(async e=>{if(!u)return;const{user_id:t}=u;await E(t,e,async()=>(await S({variables:{userId:t,provider:e}}
372)).data?.opsClearMailboxSendRateCap,`Failed to remove the cap on ${e}.`)})(e.provider),className:"ml-2 rounded-md border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Remove"})]})]},e.provider)})})]})]})]}),i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Capped mailboxes"}),n&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading…"}),r&&i.jsx("p",{className:"mt-3 text-sm text-red-600",children:"Failed to load capped mailboxes."}),!n&&!r&&0===s.length&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No mailbox carries a cap. Inbox mailboxes send at the default 15/min."}),s.length>0&&i.jsx("div",{className:"mt-3 overflow-hidden rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:["User","Mailbox","Cap","Last changed"].map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:s.map(e=>i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:e.user_email??e.user_id}),i.jsxs("td",{className:"px-4 py-2 text-sm text-gray-700",children:[e.label,i.jsx("span",{className:"ml-2 text-xs text-gray-500",children:e.provider})]}),i.jsxs("td",{className:"px-4 py-2 text-sm text-gray-900",children:[e.emails_per_minute,"/min"]}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-500",children:Bj(e.updated_at)})]},`${e.user_id}:${e.provider}`))})]})})]})]})})},zj=u`
373  query OpsContactRequests {
374    opsContactRequests {
375      id
376      status
377      requesterName
378      requesterEmail
379      targetCompanyName
380      employeeCountRange
381      rolesDescription
382      requestedAt
383      newContactCount
384      inDatabaseContactCount
385    }
386  }
387`,Hj=u`
388  query OpsContactRequestDetail($id: String!) {
389    opsContactRequestDetail(id: $id) {
390      id
391      status
392      requesterEmail
393      targetCompanyName
394      targetCompanySlug
395      rolesDescription
396      csvUrl
397      apolloOrganizationUrl
398      requestedAt
399      results {
400        id
401        companyId
402        existingContactId
403        priorityScore
404        firstName
405        lastName
406        jobTitle
407        email
408        emailStatus
409        linkedinUrl
410        city
411        state
412        country
413        seniority
414        apolloId
415        coresignalId
416        addedManually
417      }
418    }
419  }
420`,Vj=u`
421  mutation OpsApproveContactRequestResults($ids: [String!]!) {
422    opsApproveContactRequestResults(ids: $ids) {
423      created
424      skippedAlreadyExist
425      skippedInvalid
426    }
427  }
428`,$j=u`
429  mutation OpsAddContactRequestResult($input: OpsAddContactRequestResultInput!) {
430    opsAddContactRequestResult(input: $input) {
431      id
432      companyId
433      existingContactId
434      priorityScore
435      firstName
436      lastName
437      jobTitle
438      email
439      emailStatus
440      linkedinUrl
441      city
442      state
443      country
444      seniority
445      apolloId
446      coresignalId
447      addedManually
448    }
449  }
450`,Wj=u`
451  mutation OpsSetContactRequestReviewed($id: String!, $reviewed: Boolean!) {
452    opsSetContactRequestReviewed(id: $id, reviewed: $reviewed) {
453      id
454      status
455    }
456  }
457`,Qj=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},Zj={pending_review:"Pending review",reviewed:"Reviewed"},Kj=e=>Zj[e]??e,Gj=e=>"reviewed"===e?"bg-green-50 text-green-700":"bg-amber-50 text-amber-700",Yj=({text:e,className:t,tooltipContent:n="Copy text"})=>{const{toastSuccess:r}=v();return i.jsx(qe,{tooltip:i.jsx("div",{className:"text-xs",children:n}),placement:"top",children:i.jsx("button",{type:"button",onClick:async t=>{t.stopPropagation(),e&&(await navigator.clipboard.writeText(e),r("Copied to clipboard",{placement:"center"}))},"aria-label":n,className:`inline-flex items-center justify-center h-5 w-5 rounded hover:bg-gray-200 text-gray-500 ${t||""}`,children:i.jsx(Yi,{className:"w-3 h-3"})})})},Jj=[{value:"no_new",label:"No new contacts"},{value:"has_new",label:"Has new contacts"}],Xj=/^[\d,]+/,eC=(e,t)=>{switch(t){case"company":return e.targetCompanyName.toLowerCase();case"employees":return(e=>{if(!e)return null;const t=Xj.exec(e);return t?Number(t[0].replace(/,/g,"")):null})(e.employeeCountRange);case"requester":{const t=e.requesterName||e.requesterEmail;return t?t.toLowerCase():null}case"newContacts":return e.newContactCount;case"inDatabase":return e.inDatabaseContactCount;case"requested":return new Date(e.requestedAt).getTime();case"status":return Kj(e.status).toLowerCase();default:return null}},tC=(e,t,n)=>[...e].sort((e,r)=>{const a=((e,t,n)=>{if(null===e&&null===t)return 0;if(null===e)return 1;if(null===t)return-1;const r="string"==typeof e&&"string"==typeof t?e.localeCompare(t):e-t;return n===Q.Asc?r:-r})(eC(e,t),eC(r,t),n);return 0!==a?a:new Date(r.requestedAt).getTime()-new Date(e.requestedAt).getTime()}),nC=[{key:"company",label:"Company",sortable:!0},{key:"employees",label:"Employees",sortable:!0},{key:"requester",label:"Requester",sortable:!0},{key:"roles",label:"Roles"},{key:"newContacts",label:"New",sortable:!0},{key:"inDatabase",label:"In database",sortable:!0},{key:"requested",label:"Requested",sortable:!0},{key:"status",label:"Status",sortable:!0}],rC=({label:e,idPrefix:n,options:r,excluded:a,onToggle:s,onOnly:o,onSelectAll:l})=>{const{isOpen:c,toggle:u,onClose:d}=ut(!1),p=t.useRef(null);
457wl(p,d);const h=a.size>0,m=r.length-a.size;return i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("span",{children:e}),i.jsxs("span",{className:"relative inline-flex",ref:p,onClick:e=>e.stopPropagation(),role:"presentation",children:[i.jsx("button",{type:"button",onClick:u,"aria-label":`Filter ${e}`,title:`Filter ${e}`,className:"rounded p-0.5 hover:bg-gray-200 "+(h?"text-blue-600":"text-gray-400"),children:i.jsx(os,{className:"h-3.5 w-3.5",fill:h?"currentColor":"none"})}),c&&i.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-gray-200 bg-white p-2 text-left font-normal normal-case tracking-normal shadow-lg",children:[i.jsxs("div",{className:"flex items-center justify-between px-1 pb-1.5",children:[i.jsx("span",{className:"text-xs text-gray-400",children:`${m} of ${r.length} shown`}),i.jsx("button",{type:"button",onClick:l,className:"text-xs text-blue-600 hover:underline",children:"Select all"})]}),i.jsx("ul",{className:"max-h-72 overflow-auto",children:r.map(e=>i.jsxs("li",{className:"group flex items-center justify-between rounded px-1 py-1 hover:bg-gray-50",children:[i.jsx(ej,{id:`${n}-${e.value}`,checked:!a.has(e.value),onChange:()=>s(e.value),label:e.label,labelClassName:"truncate"}),i.jsx("button",{type:"button",onClick:()=>o(e.value),className:"ml-2 shrink-0 text-xs text-gray-400 hover:text-blue-600 hover:underline group-hover:text-blue-600",children:"only"})]},e.value))})]})]})]})},aC=({requests:e,selectedId:n,onSelect:r})=>{const[a,s]=t.useState(""),[o,l]=t.useState(new Set),[c,u]=t.useState(new Set),[d,p]=t.useState("requested"),[h,m]=t.useState(Q.Desc),[f,g]=t.useState(0),[y,x]=t.useState(10),b=t.useMemo(()=>{const t=new Set,n=[];return e.forEach(e=>{t.has(e.status)||(t.add(e.status),n.push({value:e.status,label:Kj(e.status)}))}),n},[e]),v=t.useMemo(()=>{const t=a.trim().toLowerCase(),n=e.filter(e=>!o.has(e.status)&&(!c.has((e=>e.newContactCount>0?"has_new":"no_new")(e))&&(""===t||(e=>[e.requesterName,e.requesterEmail].filter(Boolean).join(" ").toLowerCase())(e).includes(t))));return tC(n,d,h)},[e,a,o,c,d,h]),w=Math.max(1,Math.ceil(v.length/y)),j=Math.min(f,w-1),C=t.useMemo(()=>{const e=j*y;return v.slice(e,e+y)},[v,j,y]),N=e=>{l(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),g(0)},k=e=>{l(new Set(b.map(e=>e.value).filter(t=>t!==e))),g(0)},S=()=>{l(new Set),g(0)},E=e=>{u(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),g(0)},A=e=>{u(new Set(Jj.map(e=>e.value).filter(t=>t!==e))),g(0)},O=()=>{u(new Set),g(0)},_=nC.map(e=>"status"===e.key?{...e,header:i.jsx(rC,{label:"Status",idPrefix:"status-filter",options:b,excluded:o,onToggle:N,onOnly:k,onSelectAll:S})}:"newContacts"===e.key?{...e,header:i.jsx(rC,{label:"New",idPrefix:"new-filter",options:Jj,excluded:c,onToggle:E,onOnly:A,onSelectAll:O})}:e);return i.jsx("div",{className:"mt-6",children:i.jsx(Rv,{columns:_,data:C,totalItems:v.length,controlledCurrentPage:j,controlledItemsPerPage:y,onPageChange:g,onItemsPerPageChange:e=>{x(e),g(0)},getRowKey:e=>e.id,onRowClick:e=>r(e.id),getRowClassName:e=>e.id===n?"bg-blue-50":"",sortBy:d,sortDirection:h,onSortChange:(e,t)=>
457{p(e),m(t),g(0)},search:{placeholder:"Search requester name or email…",onSearchChange:e=>{s(e),g(0)}},toolbarLeft:i.jsxs("span",{className:"text-xs text-gray-500",children:[v.length," of ",e.length]}),emptyStateMessage:"No contact requests match your search.",renderRow:e=>({company:i.jsxs("span",{className:"flex items-center gap-1 font-medium text-gray-900",children:[e.targetCompanyName,i.jsx(Yj,{text:e.targetCompanyName,tooltipContent:"Copy company name"})]}),requester:i.jsxs("span",{className:"flex flex-col",children:[e.requesterName&&i.jsx("span",{className:"text-gray-900",children:e.requesterName}),i.jsxs("span",{className:"flex items-center gap-1",children:[e.requesterEmail??"—",e.requesterEmail&&i.jsx(Yj,{text:e.requesterEmail,tooltipContent:"Copy requester email"})]})]}),employees:e.employeeCountRange??"—",roles:i.jsx("span",{className:"line-clamp-3 w-72",title:e.rolesDescription??void 0,children:e.rolesDescription??"—"}),newContacts:e.newContactCount,inDatabase:e.inDatabaseContactCount,requested:i.jsx("span",{className:"whitespace-nowrap",children:Qj(e.requestedAt)}),status:i.jsx("span",{className:`whitespace-nowrap rounded px-2 py-0.5 text-xs font-medium ${Gj(e.status)}`,children:Kj(e.status)})})})})},iC=({className:e})=>i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:i.jsx("path",{d:"M22.225 0H1.771C.792 0 0 .771 0 1.723v20.554C0 23.228.792 24 1.771 24h20.451C23.2 24 24 23.228 24 22.277V1.723C24 .771 23.2 0 22.222 0h.003zM6.813 20.452H3.861V9h2.952v11.452zM5.337 7.433c-1.144 0-2.067-.926-2.067-2.067 0-1.144.923-2.066 2.067-2.066 1.144 0 2.066.922 2.066 2.066 0 1.141-.922 2.067-2.066 2.067zM20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.849-3.037-1.851 0-2.134 1.445-2.134 2.939v5.667H9.356V9h3.414v1.561h.049c.476-.9 1.637-1.848 3.368-1.848 3.598 0 4.264 2.368 4.264 5.455v6.284z"})});var sC=(e=>(e.Active="active",e.Inactive="inactive",e))(sC||{});const oC=e=>e.isUserProvidedContact&&e.userProvidedContactId?e.userProvidedContactId:e.id;var lC=(e=>(e.Verified="verified",e.Unverified="unverified",e.Unavailable="unavailable",e))(lC||{});const cC=e=>{const{city:t,state:n,country:r}=e;if(t&&n&&r){const e=["US","United States"].includes(r);return["China","Canada","Australia","Brazil","India"].includes(r)?`${t}, ${n}, ${r}`:e?`${t}, ${n}`:`${t}, ${r}`}return t&&n?`${t}, ${n}`:t&&r?`${t}, ${r}`:n&&r?`${n}, ${r}`:t||n||r||""};var uC=(e=>(e.Hq="hq",e.All="all",e))(uC||{});const dC=(e,t)=>{const n=e.locations||[];if(0===n.length)return{primary:"",additional:[]};const r=new Map;n.forEach(e=>{const t=cC(e),n=r.get(t);n?e.is_hq&&!n.is_hq&&r.set(t,{...n,is_hq:!0}):r.set(t,e)});const a=[...r.values()];let i;if(t){const e="hq"===t.mode;i=a.find(n=>((e,t)=>{const n=t.city??[],r=t.state??[],a=t.country??[];if(0===n.length&&0===r.length&&0===a.length)return!1;const i=n.length>0&&e.city&&n.some(t=>e.city.toLowerCase()===t.toLowerCase()),s=r.length>0&&e.state&&r.some(t=>e.state.toLowerCase()===t.toLowerCase()),o=a.length>0&&e.country&&a.some(t=>e.country.toLowerCase()===t.toLowerCase());return!!(i||s||o)})(n,t)&&(!e||n.is_hq))}i||(i=a.find(e=>e.is_hq)||a[0]);const s=a.filter(e=>e!==i);if(!i)return{primary:"",additional:[]};return{primary:cC(i),additional:s.map(e=>cC(e))}};var pC=(e=>(e.All="all",e.NotContacted="not_contacted",e.Contacted="contacted",e))(pC||{}),hC=(e=>(e.All="all",e.InCrm="in_crm",e.NewToCrm="new_to_crm",e))(hC||{}),mC=(e=>(e.Saved="saved",e.NotSaved="not_saved",e.Processing="processing",e.AlreadyExists="already_exist",e.PreprocessingFailed="preprocessing_failed",e.Pending="pending",e.NeedsUserDecision="needs_user_decision",e))(mC||{}),fC=(e=>(e.Success="Success",e.NoContacts="No contacts",e.NoRecentEvents="No recent events",e.Inactive="Inactive",e.Skipped="Skipped",e.Processing="Processing",e.Pending="Pending",e.ActionNeeded="Action needed",e))(fC||{}),gC=(e=>(e.Queue="queue",e.Sent="sent",e.Contacts="contacts",e))(gC||{}),yC=(e=>(e.Signals="signals",e.Companies="companies",e))(yC||{}),xC=(e=>(e.Relevance="RELEVANCE",e.Activity="ACTIVITY",e))(xC||{}),bC=(e=>(e.Intent="intent",e.Events="events",e.Outreach="outreach",e.OutreachHistory="outreach-history",e.Agent="agent",e))(bC||{}),vC=(e=>(e.CREATED="created",e.PROCESSING="processing",e.COMPLETED="completed",e.FAILED="failed",e.REMATCH_FAILED="rematch_failed",e))(vC||{});const wC=e=>"failed"===e||"rematch_failed"===e,jC=({entityType:e="company",campaign:t,className:n})=>{const r="company"===e?"A contact at this company is":"This contact is",a="inline-flex items-center gap-1 px-2 py-0.5 rounded-full font-normal text-xs bg-amber-100 text-amber-800";if(t){const e=`${r} in a campaign: ${t.name}`,o=b.CampaignDetail(t.id,"people");return i.jsx(qe,{className:"z-50",tooltip:e,placement:"right",children:i.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:s(n||a,"hover:bg-amber-200"),children:[i.jsx(Ms,{className:"w-3 h-3"}),"Campaign"]})})}return i.jsx(qe,{className:"z-50",tooltip:`${r} in a campaign`,placement:"right",children:i.jsxs("span",{className:n||a,children:[i.jsx(Ms,{className:"w-3 h-3"}),"Campaign"]})})},CC=u`
458  mutation UnlockContacts($contactIds: [String!]!, $trigger: UnlockTrigger!) {
459    unlockContacts(contactIds: $contactIds, trigger: $trigger) {
460      success
461      message
462      contacts
463      outcomes {
464        contactId
465        charged
466        email
467        emailAccess
468        emailStatus
469      }
470    }
471  }
472`,NC=()=>p(CC),kC=new Set,SC=new Set;
472function EC(e,t){t?kC.add(e):kC.delete(e),SC.forEach(e=>e())}function AC(e){return SC.add(e),()=>{SC.delete(e)}}function OC(e){return e.emailAccess===ue.Visible||e.emailAccess===ue.Fetchable}function _C(e,t,n,r){const a={[t.email]:()=>r.email??null,[t.emailAccess]:()=>r.emailAccess};t.emailStatus&&(a[t.emailStatus]=()=>r.emailStatus??null),t.isUnlocked&&OC(r)&&(a[t.isUnlocked]=()=>!0);const i=e.identify({__typename:t.typename,id:n});e.modify({id:i,fields:a})}function PC(e,n){const r=A(),[a]=NC(),{data:i}=$v(),{toastSuccess:s,toastError:o,toastInfo:l}=v(),c=i?.contactsUnlockInfo,u=t.useCallback(async e=>{try{await navigator.clipboard.writeText(e),s("Email copied to clipboard")}catch{o("Failed to copy email")}},[s,o]),d=t.useCallback(e=>{e.email?s(e.charged?"Contact unlocked":"Email found"):l("No email found. No credit used.")},[s,l]),p=t.useCallback(async t=>{const{data:i}=await a({variables:{contactIds:[t.contactId],trigger:ce.EmailReveal}});r.refetchQueries({include:[Vv]}).catch(()=>{});const s=i?.unlockContacts;if(!s?.success)return void l(s?.message||"Failed to unlock contact");const c=s.outcomes.find(e=>e.contactId===t.contactId);c?(d(c),_C(r.cache,e,t.cacheId,c),n?.(c)):o("Failed to unlock contact")},[r,a,e,n,d,l,o]);return t.useCallback(async e=>{if(e.email)return void(await u(e.email));const t=e.emailAccess===ue.Locked;if(!t&&e.emailAccess!==ue.Fetchable)return;const n=!!c&&c.count>=c.limit;if(t&&n)l(c?.resetInfo||"You have reached your limit of unlocked contacts");else if(!kC.has(e.contactId)){EC(e.contactId,!0);try{await p(e)}catch{o("Failed to unlock contact")}finally{EC(e.contactId,!1)}}},[u,p,c,l,o])}const IC=({role:e})=>{const[n,r]=t.useState(!1);return i.jsx(qe,{className:"z-50",placement:"top",triggerClassName:"min-w-0 flex-1",tooltip:n?i.jsx("div",{className:"text-xs",children:e}):void 0,children:i.jsx("span",{className:"truncate text-xs text-gray-500 min-w-0",onMouseEnter:e=>r(e.currentTarget.scrollWidth>e.currentTarget.clientWidth),children:e})})},MC=({isUnlocked:e})=>i.jsx(qe,{className:"z-50",tooltip:i.jsx("div",{className:"text-xs",children:e?"You have already unlocked this contact":"This contact is locked"}),placement:"top",children:e?i.jsx(ys,{className:"w-3 h-3 flex-shrink-0 text-green-600"}):i.jsx(xs,{className:"w-3 h-3 flex-shrink-0 text-gray-400"})}),TC=({tooltip:e})=>i.jsx(qe,{className:"z-50 text-xs",placement:"top",tooltip:e,children:i.jsx("span",{"aria-label":e,className:"inline-flex w-3 h-3 items-center justify-center flex-shrink-0",children:i.jsx("span",{className:"h-0.5 w-2.5 rounded-full bg-gray-300"})})}),RC=({contactName:e,onClick:t,className:n})=>i.jsx("button",{type:"button",className:n||"text-gray-400 hover:text-blue-600 flex-shrink-0",onClick:e=>{e.stopPropagation(),t()},"aria-label":`Unlock and open ${e}'s LinkedIn`,children:i.jsx(iC,{className:"w-3 h-3"})});const LC=({contactId:e,email:n,emailAccess:r,onClick:a})=>{const s=function(e){return t.useSyncExternalStore(AC,()=>kC.has(e))}(e),o=function(e,t,n){return t===ue.Visible?e:n?t===ue.Locked?"Unlocking…":"Getting email…":t===ue.Locked?"Unlock to reveal email":t===ue.Fetchable?"Get email (no credit used)":null}(n,r,s);return o?i.jsx(qe,{className:"z-50 text-xs",placement:"top",tooltip:o,children:i.jsx("button",{type:"button",className:"flex-shrink-0 text-gray-400 hover:text-blue-600 disabled:cursor-wait disabled:hover:text-gray-400",disabled:s,onClick:e=>{e.stopPropagation(),a()},children:s?i.jsx(gs,{className:"w-3 h-3 animate-spin"}):i.jsx(bs,{className:"w-3 h-3"})})}):i.jsx(TC,{tooltip:"No email found"})},DC={SENDING:{label:"Sending",style:"bg-gray-100 text-gray-600",tooltip:"Sending to this recipient"},SENT:{label:"Sent",style:"bg-green-100 text-green-700",tooltip:"This recipient has received the email for this attempt"},FAILED:{label:"Needs retry",style:"bg-red-100 text-red-700",tooltip:"The send to this recipient failed — retry will try again"}},FC=({status:e})=>{if(!e)return null;const t=DC[e];return i.jsx(qe,{className:"z-50",tooltip:i.jsx("div",{className:"text-xs",children:t.tooltip}),placement:"top",children:i.jsxs("span",{className:s("inline-flex items-center gap-1 py-0.5 px-1.5 rounded-full text-xs flex-shrink-0",t.style),children:["SENDING"===e&&i.jsx(gs,{className:"w-3 h-3 animate-spin"}),"SENT"===e&&i.jsx($i,{className:"w-3 h-3"}),"FAILED"===e&&i.jsx(nt,{className:"w-3 h-3"}),i.jsx("span",{className:"truncate",children:t.label})]})})},qC=({prioritized:e})=>e?i.jsx(qe,{className:"z-50",tooltip:i.jsx("div",{className:"text-xs",children:"This contact matches your target role"}),placement:"top",children:i.jsx(Fs,{className:"w-3 h-3 text-yellow-500 fill-yellow-500 flex-shrink-0"})}):null,BC=({isDelegate:e})=>e?i.jsx(qe,{className:"z-50",tooltip:i.jsx("div",{className:"text-xs",children:"This contact appears in your uploaded list"}),placement:"top",children:i.jsx(Fs,{className:"w-3 h-3 text-blue-500 fill-blue-500 flex-shrink-0"})}):null,UC=({lastContactedAt:e,crmActivity:t})=>{const n=!!e,r=!!t?.lastActivityDate;if(!n&&!r)return null;const a=t?.lastActivityType||"Activity",s=t?.lastActivityDate?(o=t.lastActivityDate,new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})):null;var o;return i.jsx(qe,{className:"z-50",tooltip:i.jsxs("div",{className:"text-xs space-y-0.5 max-w-60",children:[n&&i.jsx("div",{children:`Last outreach on ${e.toLocaleStr
472ing()}`}),r&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:["Last activity:"," ",a,s&&` (${s})`]}),t.activityOwnerName&&i.jsxs("div",{children:["Logged by:"," ",t.activityOwnerName]}),t.lastActivitySubject&&i.jsxs("div",{className:"text-gray-300 truncate",children:["Subject:"," ",t.lastActivitySubject]})]}),(t?.totalActivities??0)>1&&i.jsxs("div",{className:"text-gray-400",children:[t.totalActivities," ","total activities"]})]}),placement:"top",children:i.jsxs("span",{className:"inline-flex items-center gap-1 py-0.5 px-1.5 rounded-full text-xs bg-gray-100 text-gray-600 flex-shrink-0",children:[i.jsx(Ms,{className:"w-3 h-3"}),i.jsx("span",{className:"truncate",children:"Contacted"})]})})};function zC(e,t){return e.emailAccess?e.emailAccess:t&&e.email?ue.Visible:ue.Locked}const HC=({contact:e,handleLinkedInClick:t,handleEmailClick:n,isContactUnlocked:r,onRemove:a,onClick:o,containerClassName:l,isSelected:c,enrolledInCampaign:u,showCampaignAddCheckbox:d,campaignAddChecked:p,onCampaignAddCheckChange:h,disableInvalid:m,lastContactedAt:f,crmActivity:g,hideAvatar:y=!1,hideUnlockBadge:x=!1,trailingAction:b})=>{const v=(e.priority??0)>0,w=(e=>{const t=[e.city,e.state,e.country].filter(Boolean);return t.length>0?t.join(", "):null})(e),j=(e.linkedIn??"").trim(),C=/^https?:\/\//i.test(j),N=e.activeStatus===sC.Inactive,k=c&&e.emailAccess===ue.None,S="SENT"===e.sendStatus;let E="";return void 0!==c&&(E=k&&!m?"bg-amber-50 text-amber-700 border border-amber-200":c?"bg-blue-50 text-blue-700 border border-blue-200":"bg-white border border-gray-200 text-gray-600 hover:bg-gray-50"),i.jsxs("div",{className:s("relative",!c&&o?"hover:bg-gray-50":"",l,E),children:[o&&i.jsx("button",{type:"button","aria-label":`Select ${e.name}`,onClick:o,className:"absolute inset-0 z-0 cursor-pointer"}),d&&i.jsx("input",{type:"checkbox",checked:p??!1,onChange:h,title:u?"Already in a campaign":"Select to add to campaign",className:"relative z-10 w-4 h-4 rounded border-gray-300 text-gray-900 focus:ring-0 focus:ring-offset-0 focus-visible:ring-2 focus-visible:ring-gray-400 flex-shrink-0 disabled:opacity-50 disabled:cursor-not-allowed",onClick:e=>e.stopPropagation()}),!y&&i.jsx("div",{className:s("w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",e.isUserProvidedContact?"bg-gray-100 text-gray-500":"bg-blue-100 text-blue-700",o?"pointer-events-none":""),children:i.jsx($s,{className:"w-3 h-3"})}),i.jsxs("div",{className:s("flex-1 min-w-0 flex flex-col",o?"pointer-events-none":""),children:[i.jsxs("div",{className:"flex items-center min-w-0 gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[i.jsx("span",{className:"truncate text-xs font-medium min-w-0",children:e.name}),e.role&&i.jsx(IC,{role:e.role})]}),i.jsxs("div",{className:"relative z-10 flex items-center gap-1.5 flex-shrink-0 pointer-events-auto",children:[u&&i.jsx(jC,{entityType:"contact",campaign:u}),N&&i.jsx(qe,{tooltip:i.jsx("div",{className:"text-xs",children:"This contact is no longer active"}),placement:"top",children:i.jsx(nt,{className:"w-3 h-3 flex-shrink-0 text-amber-600"})}),i.jsx(BC,{isDelegate:e.isDelegate}),i.jsx(qC,{prioritized:v}),i.jsx(UC,{lastContactedAt:f,crmActivity:g}),i.jsx(FC,{status:e.sendStatus}),n&&i.jsx(LC,{contactId:e.id,email:e.email,emailAccess:zC(e,r(e)),onClick:()=>n(e)}),t&&C&&i.jsx(RC,{contactName:e.name,onClick:()=>t(e)}),t&&!C&&i.jsx(TC,{tooltip:"No LinkedIn found"}),!x&&i.jsx(MC,{isUnlocked:r(e)}),void 0!==b&&i.jsx("span",{className:"inline-flex min-w-[14px] justify-center flex-shrink-0",children:b}),a&&!S&&i.jsx("button",{type:"button","aria-label":`Remove ${e.name}`,className:"text-xs text-gray-500 hover:text-blue-600",onClick:a,children:i.jsx(Sn,{className:"w-3 h-3"})})]})]}),w&&i.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 min-w-0",children:[i.jsx(vs,{className:"w-2.5 h-2.5 flex-shrink-0"}),i.jsx("span",{className:"truncate",children:w})]})]})]})},VC={firstName:"",lastName:"",jobTitle:"",email:"",linkedinUrl:"",city:"",state:"",country:"",seniority:""},$C=[{key:"firstName",label:"First name"},{key:"lastName",label:"Last name"},{key:"jobTitle",label:"Title"},{key:"seniority",label:"Seniority",placeholder:"vp, director, manager…"},{key:"email",label:"Email"},{key:"linkedinUrl",label:"LinkedIn URL"},{key:"city",label:"City"},{key:"state",label:"State"},{key:"country",label:"Country"}],WC=e=>({id:"manual-contact-preview",name:[e.firstName.trim(),e.lastName.trim()].filter(
472Boolean).join(" "),role:e.jobTitle.trim(),email:e.email.trim()||void 0,emailStatus:e.email.trim()?lC.Verified:void 0,linkedIn:e.linkedinUrl.trim()||void 0,city:e.city.trim()||void 0,state:e.state.trim()||void 0,country:e.country.trim()||void 0,isUnlocked:!0}),QC=({contactRequestId:e,onAdded:n,onCancel:r})=>{const[a,s]=t.useState(VC),[o,l]=t.useState(null),[c,{loading:u}]=p($j),d=Boolean(a.firstName.trim()||a.lastName.trim()),h=Boolean(a.email.trim()||a.linkedinUrl.trim()),m=d&&h,f=m&&!u;return i.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),!f)return;l(null);const r={contactRequestId:e,...a};try{const e=await c({variables:{input:r}}),t=e.data?.opsAddContactRequestResult;t&&(s(VC),n(t))}catch(i){l(i instanceof Error?i.message:"Failed to add the contact.")}},className:"mt-4 rounded-lg border border-gray-200 bg-gray-50 p-4",children:[i.jsxs("div",{className:"flex items-baseline justify-between",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Add a contact"}),i.jsx("p",{className:"text-xs text-gray-500",children:"Needs a name, and an email or LinkedIn URL. Goes straight into the contacts database."})]}),i.jsx("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:$C.map(e=>i.jsxs("div",{children:[i.jsx("label",{htmlFor:`manual-${e.key}`,className:"block text-xs text-gray-600",children:e.label}),i.jsx("input",{id:`manual-${e.key}`,type:"text",value:a[e.key],placeholder:e.placeholder,onChange:t=>{return n=e.key,r=t.target.value,void s(e=>({...e,[n]:r}));var n,r},className:"mt-1 w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm text-gray-900 focus:border-blue-500 focus:outline-none"})]},e.key))}),m&&i.jsxs("div",{className:"mt-4",children:[i.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:"Preview"}),i.jsx("div",{className:"mt-2 rounded-md border border-gray-200 bg-white",children:i.jsx(HC,{contact:WC(a),isSelected:!0,isContactUnlocked:()=>!0,handleLinkedInClick:()=>{},containerClassName:"flex gap-2 items-center w-full px-3 py-1.5 rounded-md"})})]}),o&&i.jsx("p",{className:"mt-3 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:o}),i.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[i.jsx("button",{type:"submit",disabled:!f,className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:u?"Adding…":"Confirm and add"}),i.jsx("button",{type:"button",onClick:r,className:"text-sm text-gray-500 hover:text-gray-700",children:"Cancel"})]})]})},ZC=["{{first_name}}","{{company_name}}","{{company_url}}"],KC=u`
473  query OpsContactRequestEmailing($contactRequestId: String!) {
474    opsContactRequestEmailing(contactRequestId: $contactRequestId) {
475      recipientEmail
476      suggestedTemplateKey
477      sender {
478        email
479        configured
480        canSend
481      }
482      drafts {
483        templateKey
484        templateName
485        subject
486        bodyHtml
487      }
488      sent {
489        id
490        templateKey
491        toEmail
492        subject
493        bodyHtml
494        sentByEmail
495        sentAt
496      }
497    }
498  }
499`,GC=u`
500  mutation OpsSendContactRequestEmail($input: OpsSendContactRequestEmailInput!) {
501    opsSendContactRequestEmail(input: $input) {
502      id
503      templateKey
504      toEmail
505      subject
506      bodyHtml
507      sentByEmail
508      sentAt
509    }
510  }
511`,YC=u`
512  query OpsEmailTemplates {
513    opsEmailTemplates {
514      key
515      name
516      subject
517      bodyHtml
518      isDefault
519      updatedAt
520      updatedByEmail
521    }
522  }
523`,JC=u`
524  mutation OpsUpdateEmailTemplate($key: String!, $subject: String!, $bodyHtml: String!) {
525    opsUpdateEmailTemplate(key: $key, subject: $subject, bodyHtml: $bodyHtml) {
526      key
527      name
528      subject
529      bodyHtml
530      isDefault
531      updatedAt
532      updatedByEmail
533    }
534  }
535`,XC=u`
536  mutation OpsResetEmailTemplate($key: String!) {
537    opsResetEmailTemplate(key: $key) {
538      key
539      name
540      subject
541      bodyHtml
542      isDefault
543      updatedAt
544      updatedByEmail
545    }
546  }
547`,eN=(e,t)=>e.drafts.find(e=>e.templateKey===t),tN=({contactRequestId:e,emailing:n,onClose:r,onSent:a})=>{const s=eN(n,n.suggestedTemplateKey),[o,l]=t.useState(n.suggestedTemplateKey),[c,u]=t.useState(s?.subject??""),[d,h]=t.useState(s?.bodyHtml??""),[m,f]=t.useState(!1),[g,y]=t.useState(null),[x,{loading:b}]=p(GC),v=n.sent[0]??null,w=(e=>e.recipientEmail?e.sender.canSend?null:`Sending from ${e.sender.email} is not set up yet: the server has no Gmail token for it. Ask engineering to set OPS_GMAIL_REFRESH_TOKEN.`:"This request has no requester email address, so there is nowhere to send.")(n);return i.jsx(On,{open:!0,onOpenChange:e=>{e||r()},children:i.jsx(_n,{children:i.jsxs(Pn,{className:"max-h-[90vh] max-w-3xl overflow-auto bg-white",children:[i.jsx(Ln,{children:"Email the requester"}),i.jsx(Fn,{children:"Pick a template, edit it if you need to, and send it from the support mailbox."}),i.jsxs("div",{className:"mt-4 space-y-4 text-sm",children:[i.jsxs("dl",{className:"grid grid-cols-[4rem_1fr] gap-y-1",children:[i.jsx("dt",{className:"text-gray-500",children:"To"}),i.jsx("dd",{className:"text-gray-900",children:n.recipientEmail??"—"}),i.jsx("dt",{className:"text-gray-500",children:"From"}),i.jsx("dd",{className:"text-gray-900",children:n.sender.email})]}),w&&i.jsx("p",{className:"rounded border border-amber-200 bg-amber-50 px-3 py-2 text-amber-800",children:w}),i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsx("div",{className:"inline-flex overflow-hidden rounded-md border border-gray-300",children:n.drafts.map(e=>i.jsx("button",{type:"button",onClick:()=>(e=>{const t=eN(n,e);l(e),u(t?.subject??""),h(t?.bodyHtml??"")})(e.templateKey),className:"px-3 py-1.5 text-sm font-medium "+(o===e.templateKey?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"),children:e.templateName},e.templateKey))}),i.jsx("span",{className:"text-xs text-gray-500",children:"Switching template replaces your edits."}),i.jsx("a",{href:Yw.emailTemplates,target:"_blank",rel:"noopener noreferrer",className:"ml-auto text-xs text-blue-600 hover:underline",children:"Edit templates"})]}),i.jsxs("label",{htmlFor:"requester-email-subject",className:"block text-gray-500",children:["Subject",i.jsx("input",{id:"requester-email-subject",type:"text",value:c,onChange:e=>u(e.target.value),className:"mt-1 w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm text-gray-900 focus:border-blue-500 focus:outline-none"})]}),i.jsx(iv,{value:d,onChange:h,height:"260px"}),g&&i.jsx("p",{className:"rounded border border-red-200 bg-red-50 px-3 py-2 text-red-700",children:g}),m&&v&&i.jsxs("p",{className:"rounded border border-amber-200 bg-amber-50 px-3 py-2 text-amber-800",children:[v.sentByEmail??"Someone"," already emailed ",v.toEmail," about this request on ",Qj(v.sentAt),". Send another email anyway?"]}),i.jsxs("div",{className:"flex justify-end gap-3",children:[i.jsx("button",{type:"button",onClick:r,className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Cancel"}),i.jsxs("button",{type:"button",disabled:Boolean(w)||b||!c.trim(),onClick:async()=>
547{if(!v||m){y(null);try{await x({variables:{input:{contactRequestId:e,templateKey:o,subject:c,bodyHtml:d,resend:Boolean(v)}}}),a()}catch(t){y(t instanceof Error?t.message:"The email could not be sent."),f(!1)}}else f(!0)},className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:[b&&"Sending…",!b&&(m?"Send anyway":"Send email")]})]})]})]})})})},nN=[{key:"name",label:"Name"},{key:"priority",label:"Priority"},{key:"title",label:"Title"},{key:"seniority",label:"Seniority"},{key:"location",label:"Location"},{key:"emailStatus",label:"Email status"},{key:"source",label:"Source"},{key:"linkedin",label:"LinkedIn"}],rN=e=>[e.firstName,e.lastName].filter(Boolean).join(" ")||"—",aN=e=>Boolean(e.existingContactId),iN=e=>e.apolloId?"Apollo":e.coresignalId?"CoreSignal":e.addedManually?"Manual":"—",sN="ml-2 inline-block whitespace-nowrap rounded px-1.5 py-0.5 text-xs font-medium",oN=({result:e,checked:t,onToggle:n})=>i.jsx("input",{type:"checkbox",checked:t,disabled:aN(e),onChange:()=>n(e.id),"aria-label":`Select ${rN(e)}`,className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 disabled:opacity-50"}),lN=({result:e})=>i.jsxs("span",{className:"text-gray-900",children:[i.jsx("span",{className:"whitespace-nowrap",children:rN(e)}),aN(e)&&i.jsx("span",{className:`${sN} bg-gray-200 text-gray-600`,children:"In database"}),!aN(e)&&i.jsx("span",{className:`${sN} bg-blue-50 text-blue-700`,children:"New"})]}),cN=({result:e})=>i.jsx(i.Fragment,{children:[e.city,e.state,e.country].filter(Boolean).join(", ")||"—"}),uN=({url:e})=>e?i.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"whitespace-nowrap text-blue-600 hover:underline",children:"Profile"}):i.jsx(i.Fragment,{children:"—"}),dN=[{value:"all",label:"All"},{value:"new",label:"New"},{value:"existing",label:"In database"}],pN=e=>e.priorityScore??-1,hN=(e,t)=>{const n=Number(aN(t))-Number(aN(e));return 0!==n?n:pN(t)-pN(e)},mN=({id:e,onClose:n})=>{const{data:r,loading:a,error:s,refetch:l}=d(Hj,{variables:{id:e},fetchPolicy:"cache-and-network"}),c=r?.opsContactRequestDetail??null,[u,h]=t.useState(new Set),[m,f]=t.useState(null),[g,y]=t.useState(null),[x,v]=t.useState(""),[w,j]=t.useState("all"),[C,N]=t.useState(!1),k=t.useRef(null),[S,E]=t.useState(!1);t.useEffect(()=>{h(new Set),f(null),y(null),v(""),j("all"),N(!1),E(!1)},[e]);const A=t.useMemo(()=>[...c?.results??[]].sort(hN),[c]),O=t.useMemo(()=>{const e=x.trim().toLowerCase();return A.filter(t=>("new"!==w||!aN(t))&&(!("existing"===w&&!aN(t))&&(""===e||(e=>[e.firstName,e.lastName,e.jobTitle,e.seniority,e.city,e.state,e.country,e.emailStatus].filter(Boolean).join(" ").toLowerCase())(t).includes(e))))},[A,x,w]),_=t.useMemo(()=>O.filter(e=>!aN(e)).map(e=>e.id),[O]),P=_.length>0&&_.every(e=>u.has(e)),I=_.some(e=>u.has(e));t.useEffect(()=>{k.current&&(k.current.indeterminate=I&&!P)},[I,P]);const M="reviewed"===c?.status,{data:T,refetch:R}=d(KC,{variables:{contactRequestId:e},skip:!M,fetchPolicy:"cache-and-network"}),L=M?T?.opsContactRequestEmailing??null:null,D=L?.sent[0]??null,[F,{loading:q}]=p(Vj),[B,{loading:U}]=p(Wj,{refetchQueries:[{query:zj}]}),z=e=>{h(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},H={key:"select",label:"",header:i.jsx("input",{ref:k,type:"checkbox",checked:P,disabled:0===_.length,onChange:()=>{h(e=>{const t=new Set(e);return _.forEach(e=>P?t.delete(e):t.add(e)),t})},"aria-label":"Select all net-new contacts",className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 disabled:opacity-50"})},V=u.size>0?`Add ${u.size} to database`:"Add to database";return i.jsxs("div",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsxs("h2",{className:"flex items-center gap-1 text-lg font-medium text-gray-900",children:[c?.targetCompanySlug?i.jsx(o,{to:b.CompanyOutreach(c.targetCompanySlug),target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:c.targetCompanyName}):c?.targetCompanyName??"Contact request",c&&i.jsx(Yj,{text:c.targetCompanyName,tooltipContent:"Copy company name"})]}),c&&i.jsx("span",{className:`mt-1 inline-block rounded px-2 py-0.5 text-xs font-medium ${Gj(c.status)}`,children:Kj(c.status)})]}),i.jsx("button",{type:"button",onClick:n,className:"text-sm text-gray-500 hover:text-gray-700",children:"Close"})]}),a&&!c&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),s&&i.jsx("p",{className:"mt-4 text-sm text-red-600",children:"Failed to load the request."}),c&&i.jsxs(i.Fragment,{children:[i.jsxs("dl",{className:"mt-4 grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx("dt",{className:"text-gray-500",children:"Request ID"}),i.jsxs("dd",{className:"flex items-center gap-1 font-mono text-xs text-gray-900",children:[c.id,i.jsx(Yj,{text:c.id,tooltipContent:"Copy request ID"})]})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-gray-500",children:"Requested at"}),i.jsx("dd",{className:"text-gray-900",children:Qj(c.requestedAt)})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-gray-500",children:"Requester"}),i.jsxs("dd",{className:"flex items-center gap-1 text-gray-900",children:[c.requesterEmail??"—",c.requesterEmail&&i.jsx(Yj,{text:c.requesterEmail,tooltipContent:"Copy requester email"})]})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-gray-500",children:"Roles requested"}),i.jsx("dd",{className:"text-gray-900",children:c.rolesDescription??"—"})]})]}),i.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm",children:[c.csvUrl&&i.jsx("a",{href:c.csvUrl,className:"text-blue-600 hover:underline",target:"_blank",rel:"noopener noreferrer",children:"Download full CSV"}),c.apolloOrganizationUrl&&i.jsx("a",{href:c.apolloOrganizationUrl,className:"text-blue-600 hover:underline",target:"_blank",rel:"noopener noreferrer",children:"Apollo organization"})]}),g&&i.jsx("p",{className:"mt-4 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:g}),m&&i.jsxs("p",{className:"mt-4 rounded border border-green-200 bg-green-50 px-3 py-2 text-sm text-green-800",children:["Added"," ",m.created," ","contact",1===m.created?"":"s","."," ","Skipped"," ",m.skippedAlreadyExist," ","already in database",m.skippedInvalid>0?`, ${m.skippedInvalid} invalid`:"","."]}),i.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[i.jsx("button",{type:"button",disabled:0===u.size||q,onClick:async()=>
547{if(0!==u.size){y(null),f(null);try{const e=await F({variables:{ids:Array.from(u)}});f(e.data?.opsApproveContactRequestResults??null),h(new Set),await l()}catch{y("Failed to add contacts to the database.")}}},className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:q?"Adding…":V}),i.jsx("button",{type:"button",disabled:U,onClick:async()=>{if(!c)return;y(null);const e="reviewed"!==c.status;try{await B({variables:{id:c.id,reviewed:e}}),await l()}catch{y("Failed to update the request status.")}},className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"reviewed"===c.status?"Revert to pending":"Mark reviewed"}),L&&i.jsx("button",{type:"button",onClick:async()=>{await R(),E(!0)},className:"rounded-md border border-blue-600 px-4 py-2 text-sm font-medium text-blue-700 hover:bg-blue-50",children:D?"Email requester again":"Email requester"})]}),D&&i.jsxs("p",{className:"mt-3 text-sm text-gray-600",children:[D.sentByEmail??"Someone"," emailed ",D.toEmail," on ",Qj(D.sentAt),": “",D.subject,"”"]}),S&&L&&i.jsx(tN,{contactRequestId:c.id,emailing:L,onClose:()=>E(!1),onSent:async()=>{E(!1),await R()}}),C&&i.jsx(QC,{contactRequestId:c.id,onAdded:async e=>{y(null),f(null),N(!1);try{const t=await F({variables:{ids:[e.id]}});f(t.data?.opsApproveContactRequestResults??null)}catch{y(`${rN(e)} was added to this request but not to the database. Select the row and press Add to database.`)}await l()},onCancel:()=>N(!1)}),i.jsx("div",{className:"mt-5",children:i.jsx(Rv,{columns:[H,...nN],data:O,getRowKey:e=>e.id,search:{placeholder:"Search name, title, location…",onSearchChange:v},toolbarLeft:i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsx("div",{className:"inline-flex overflow-hidden rounded-md border border-gray-300",children:dN.map(e=>i.jsx("button",{type:"button",onClick:()=>j(e.value),className:"px-3 py-1.5 text-sm font-medium "+(w===e.value?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"),children:e.label},e.value))}),i.jsxs("span",{className:"text-xs text-gray-500",children:[O.length," of ",A.length]})]}),toolbar:i.jsx("button",{type:"button",onClick:()=>N(e=>!e),className:"whitespace-nowrap rounded-md border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Add a contact"}),getRowClassName:e=>aN(e)?"bg-gray-50/60":"",emptyStateMessage:0===A.length?"No results exported for this request.":"No contacts match your search.",renderRow:e=>{return{select:i.jsx(oN,{result:e,checked:u.has(e.id),onToggle:z}),...(t=e,{name:i.jsx(lN,{result:t}),priority:t.priorityScore??"—",title:t.jobTitle||"—",seniority:t.seniority??"—",location:i.jsx(cN,{result:t}),emailStatus:t.emailStatus??"—",source:iN(t),linkedin:i.jsx(uN,{url:t.linkedinUrl})})};var t}})})]})]})},fN=()=>{const{data:e,loading:n,error:r}=d(zj,{fetchPolicy:"cache-and-network"}),a=e?.opsContactRequests??[],[s,l]=t.useState(null);return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-6xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Contact requests"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Review “more contacts” requests, add the contacts you want to the database, and mark each request reviewed."})]}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx(o,{to:Yw.emailTemplates,className:"text-sm text-blue-600 hover:underline",children:"Email templates"}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]})]}),n&&0===a.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),r&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load contact requests."}),!n&&!r&&0===a.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"No contact requests to review."}),a.length>0&&i.jsx(aC,{requests:a,selectedId:s,onSelect:l}),s&&i.jsx(mN,{id:s,onClose:()=>l(null)})]})})};function gN(e,t,n=0){const r=e+t+n,a=function(e){return 4*Math.ceil(e/3)}(r);return{rawBytes:r,encodedBytes:a,wouldExceed:a>10485760}}const yN={Draft:"draft",Active:"active",Paused:"paused",Completed:"completed",Cancelled:"cancelled",Scheduled:"scheduled"},xN="px-3 py-1.5 text-sm text-gray-600 bg-white border border-gray-200 rounded-md hover:bg-gray-50",bN="px-3 py-1.5 text-sm font-medium text-white bg-gray-900 rounded-md hover:bg-gray-800 disabled:opacity-50",vN="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-md hover:bg-gray-50",wN="px-4 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 disabled:opacity-50",jN="09:00",CN="17:00",NN="America/Los_Angeles",kN=["Settings","Steps","People"],SN=10,EN=1,AN=[0,3,5],ON=250,_N=0,PN=25;function IN(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return NN}}function MN(e){try{const t=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"short"}).formatToParts(new Date);return t.find(e=>"timeZoneName"===e.type)?.value??e}catch{return e}}function TN(e){try{const t=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).formatToParts(new Date),n=t.find(e=>"timeZoneName"===e.type)?.value??"GMT";return`(${n}) ${e.split("/").pop().replace(/_/g," ")}`}catch{return e}}const RN=[{group:"Americas",zones:["Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Phoenix","America/Chicago","America/Ne
547w_York","America/Halifax","America/Sao_Paulo","America/Argentina/Buenos_Aires"]},{group:"Europe & Africa",zones:["Europe/London","Europe/Paris","Europe/Berlin","Europe/Helsinki","Europe/Moscow","Africa/Lagos","Africa/Johannesburg","Africa/Cairo"]},{group:"Asia & Pacific",zones:["Asia/Dubai","Asia/Kolkata","Asia/Bangkok","Asia/Singapore","Asia/Shanghai","Asia/Tokyo","Asia/Seoul","Australia/Perth","Australia/Sydney","Pacific/Auckland"]}];const LN=function(){const e=IN(),t=new Set(RN.flatMap(e=>e.zones)),n=[];return t.has(e)||n.push({label:"Your timezone",zones:[{value:e,label:TN(e)}]}),RN.forEach(t=>{n.push({label:t.group,zones:t.zones.map(t=>({value:t,label:`${TN(t)}${t===e?" ✓":""}`}))})}),n}(),DN=MN(IN());function FN(e,t){return e<t}const qN={[yN.Draft]:{label:"Draft",className:"bg-blue-50 text-blue-600 border-blue-200",icon:i.jsx(ks,{className:"w-3 h-3"})},[yN.Active]:{label:"Active",className:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:i.jsx(Es,{className:"w-3 h-3"})},[yN.Scheduled]:{label:"Scheduled",className:"bg-sky-50 text-sky-700 border-sky-200",icon:i.jsx(Di,{className:"w-3 h-3"})},[yN.Paused]:{label:"Paused",className:"bg-amber-50 text-amber-700 border-amber-200",icon:i.jsx(Cs,{className:"w-3 h-3"})},[yN.Completed]:{label:"Completed",className:"bg-gray-50 text-gray-600 border-gray-200",icon:i.jsx($i,{className:"w-3 h-3"})},[yN.Cancelled]:{label:"Cancelled",className:"bg-red-50 text-red-600 border-red-200",icon:i.jsx(Qi,{className:"w-3 h-3"})}},BN=({status:e,showIcon:t=!0})=>{const n=qN[e]||{label:e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," "),className:"bg-gray-50 text-gray-600 border-gray-200"};return i.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium border rounded-full ${n.className}`,children:[t&&n.icon,n.label]})},UN=(e,t)=>t<=0?0:e>=t?100:Math.min(99,Math.floor(e/t*100)),zN=(e,t)=>{if(0===t)return"";const n=Math.round(e/t*100);return 0===n?"":`${n}%`},HN=e=>{const t=new Date(e),n={month:"short",day:"numeric",year:t.getFullYear()!==(new Date).getFullYear()?"numeric":void 0};return t.toLocaleDateString("en-US",n)},VN=e=>!(e.status!==yN.Active||!e.startsAt)&&new Date(e.startsAt)>new Date,$N=e=>VN(e)?yN.Scheduled:e.status,WN=(e,t)=>new Date(e).toLocaleString("en-US",{timeZone:t,weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),QN=(e,t,n)=>new Date(Date.now()+864e5*e).toLocaleDateString("en-CA",{timeZone:t,...n}),ZN=e=>new Date(`2000-01-01T${e}`).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),KN=(e,t)=>{const n=t??jN,r=[1,2,3,4,5,6,7].find(t=>"Mon"===QN(t,e,{weekday:"short"}));return[{label:`Tomorrow at ${ZN(n)}`,startsAtLocal:`${QN(1,e,{})}T${n}`},{label:`Monday at ${ZN(n)}`,startsAtLocal:`${QN(r??7,e,{})}T${n}`}]},GN=e=>{const t=new Date(e),n=new Date,r=Math.max(0,n.getTime()-t.getTime()),a=Math.floor(r/6e4),i=Math.floor(r/36e5),s=Math.floor(r/864e5);return a<1?"Just now":a<60?`${a}m ago`:i<24?`${i}h ago`:s<7?`${s}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:t.getFullYear()!==n.getFullYear()?"numeric":void 0})},YN=({icon:e,label:t,value:n,hint:r})=>i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-3",children:i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("div",{children:e}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-xs text-gray-500 font-medium",children:t}),i.jsxs("div",{className:"flex items-end gap-1",children:[i.jsx("p",{className:"text-lg font-semibold text-gray-900 tabular-nums",children:n}),r&&i.jsx("p",{className:"text-xs text-gray-400 mb-0.5",children:r})]})]})]})}),JN={pending:"text-blue-700 bg-blue-50",opened:"text-violet-700 bg-violet-50",verifying:"text-gray-600 bg-gray-50",completed:"text-gray-600 bg-gray-50",replied:"text-emerald-700 bg-emerald-50",bounced:"text-red-600 bg-red-50",failed:"text-red-600 bg-red-50",cancelled:"text-gray-500 bg-gray-50",unsubscribed:"text-amber-700 bg-amber-50",spam_complaint:"text-red-700 bg-red-50"},XN=e=>e.startsWith("skipped_")?"Skipped":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," "),ek=(e,t)=>("pending"===e||"active"===e)&&"opened"===t?"opened":e,tk=e=>e.startsWith("skipped_")?"text-amber-700 bg-amber-50":JN[e]||"text-gray-600 bg-gray-50",nk={unsubscribed:"Contact unsubscribed from this campaign",active_in_campaign:"Contact is in another campaign",recently_emailed:"Contact was emailed recently",contact_unavailable:"Contact no longer available",no_email:"No email found",email_unavailable:"Email unavailable",unlock_limit_reached:"Deferred until next contact unlock credit reset",previous_step_bounced:"A previous step in this campaign bounced",address_bounced:"This email address no longer accepts mail",manually_emailed:"You emailed this contact outside the campaign",contact_not_found:"Contact not found",contact_inactive:"Contact is inactive",user_provided_contact_not_found:"Uploaded contact not found",unknown:"Contact is no longer eligible for this campaign",max_retries_exceeded:"Kept failing after several retries",step_not_found:"This step no longer exists in the campaign",enrollment_not_found:"Enrollment no longer exists",no_contact:"No contact is linked to this enrollment",user_not_found:"Your sending account could not be found",platform_email_not_configured:"Big Brain sending is not set up",google_oauth_not_found:"Google account is not connected",microsoft_oauth_not_found:"Microsoft account is not connected",gmail_send_failed:"Gmail could not send this email",outlook_send_failed:"Outlook could not send this email",rate_limited:"Email provider rate limit reached"},rk=[[/_rejected_/,"Email provider rejected this address"],[/_server_error$/,"Email provider had a temporary problem"]],ak={pending:"Waiting to be sent",opened:"Opened the email — still in the sequence",verifying:"Checking deliverability before the first send",completed:"All steps in the sequence have been sent",cancelled:"Enrollment was cancelled",bounced:"Email bounced",unsubscribed:"Contact unsubscribed from this campaign",spam_complaint:"Contact marked the email as spam",failed:"Email send failed",replied:"Contact replied to the email"},ik=(e,t)=>{const n=(e=>{if(!e?.trim())return null;const t=e.split(":")[0].trim().toLowerCase();if(nk[t])return nk[t];const n=rk.find(([e])=>e.test(t));
547return n?n[1]:t.replace(/_/g," ")})(t),r=e.startsWith("skipped_"),a="failed"===e;if("pending"===e&&n)return n;if(r&&n)return`Skipped: ${n}`;if(r)return"Skipped. Contact was not sent an email (e.g. cooldown, already in another campaign, or no email available).";if(a&&n)return`Failed: ${n}`;if(a)return"Send failed. The email could not be delivered.";const i=e.replace(/^skipped_/,"");return ak[i]??`Status: ${XN(e)}`},sk=[10,25,50,100,250,500],ok="campaignPeoplePageSize";function lk(){try{const e=Number(window.localStorage.getItem(ok));return sk.includes(e)?e:50}catch{return 50}}function ck(e){try{window.localStorage.setItem(ok,String(e))}catch{}}const uk=/(\{\{[^}]{1,50}\}\})/g;function dk(e){const t=(e??"").trim();return t&&"<p></p>"!==t&&"<p><br></p>"!==t?t.replace(/\s+/g," ").trim():""}function pk(e,t){if(!e)return null;if(t.id.startsWith("draft-"))return e;const n=e.subject.trim()===t.subjectTemplate.trim(),r=dk(e.body)===dk(t.bodyTemplate),a=1===t.stepNumber||(e.delayDays??t.delayDays)===t.delayDays;return n&&r&&a?null:e}const hk="inline-flex px-1.5 py-0.5 bg-blue-50 text-blue-700 text-xs font-medium rounded border border-blue-100";function mk(e){return e.replace(uk,e=>`<span class="${hk}">${e}</span>`)}const fk=e=>e.split(uk).map((e,t)=>{const n=e.startsWith("{{")&&e.endsWith("}}")?hk:void 0;return i.jsx("span",{className:n,children:e},`${e}-${t}`)}),gk=["{{contact.first_name}}","{{contact.last_name}}","{{company.name}}"],yk=({token:e,onCopied:t})=>i.jsx("button",{type:"button",onClick:async()=>{await navigator.clipboard.writeText(e),t?.()},title:"Click to copy",className:"text-[11px] cursor-pointer hover:opacity-80 transition-opacity",children:fk(e)}),xk=({onCopied:e})=>i.jsxs("div",{className:"mb-4 p-3 bg-white rounded-md border border-gray-200",children:[i.jsx("p",{className:"text-[10px] font-medium text-gray-500 uppercase tracking-wider mb-1",children:"Available tokens (click to copy)"}),i.jsx("p",{className:"text-xs text-gray-500 mb-1.5",children:"Paste a token into a subject or body and it's replaced with each recipient's details when the email sends."}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:gk.map(t=>i.jsx(yk,{token:t,onCopied:e},t))})]}),bk=(e,t)=>e instanceof Error?e.message:t,vk=e=>{if(e.isDefault)return"Built-in wording";const t=`Edited by ${e.updatedByEmail??"an ops user"}`;return e.updatedAt?`${t} on ${Qj(e.updatedAt)}`:t},wk=({template:e})=>{const[n,r]=t.useState(e.subject),[a,s]=t.useState(e.bodyHtml),[o,l]=t.useState(null),[c,{loading:u}]=p(JC),[d,{loading:h}]=p(XC);return i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsxs("div",{className:"flex items-baseline justify-between",children:[i.jsx("h2",{className:"text-lg font-medium text-gray-900",children:e.name}),i.jsx("span",{className:"text-xs text-gray-500",children:vk(e)})]}),i.jsxs("label",{htmlFor:`subject-${e.key}`,className:"mt-4 block text-sm text-gray-500",children:["Subject",i.jsx("input",{id:`subject-${e.key}`,type:"text",value:n,onChange:e=>r(e.target.value),className:"mt-1 w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm text-gray-900 focus:border-blue-500 focus:outline-none"})]}),i.jsx("div",{className:"mt-4",children:i.jsx(iv,{value:a,onChange:s,height:"220px"})}),o&&i.jsx("p",{className:"mt-4 rounded border px-3 py-2 text-sm "+(o.ok?"border-green-200 bg-green-50 text-green-800":"border-red-200 bg-red-50 text-red-700"),children:o.text}),i.jsxs("div",{className:"mt-4 flex gap-3",children:[i.jsx("button",{type:"button",disabled:u||!n.trim(),onClick:async()=>{l(null);try{await c({variables:{key:e.key,subject:n,bodyHtml:a}}),l({ok:!0,text:"Saved. Every ops user now gets this version."})}catch(t){l({ok:!1,text:bk(t,"Failed to save the template.")})}},className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:u?"Saving…":"Save template"}),i.jsx("button",{type:"button",disabled:h||e.isDefault,onClick:async()=>{l(null);try{const t=await d({variables:{key:e.key}}),n=t.data?.opsResetEmailTemplate;n&&(r(n.subject),s(n.bodyHtml)),l({ok:!0,text:"Back to the built-in wording."})}catch(t){l({ok:!1,text:bk(t,"Failed to reset the template.")})}},className:"rounded-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Reset to built-in wording"})]})]})},jk=()=>{const{data:e,loading:t,error:n}=d(YC,{fetchPolicy:"cache-and-network"}),r=e?.opsEmailTemplates??[];return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Contact request emails"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"The templates ops send requesters once a contact request is reviewed. Changes apply for everyone."})]}),i.jsx(o,{to:Yw.contactRequests,className:"text-sm text-blue-600 hover:underline",children:"← Contact requests"})]}),i.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-1.5 rounded-md border border-gray-200 bg-white p-3",children:[i.jsx("span",{className:"text-xs text-gray-500",children:"Placeholders, filled 
547in for each request (click to copy):"}),ZC.map(e=>i.jsx(yk,{token:e},e))]}),t&&0===r.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),n&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load the templates."}),r.map(e=>i.jsx(wk,{template:e},e.key))]})})},Ck=u`
548  query OpsCompanyOverrideSearch($query: String!) {
549    opsCompanyOverrideSearch(query: $query) {
550      id
551      companyName
552      websiteUrl
553      slug
554      isActive
555      employeeCountRange
556      briefDescription
557      fullDescription
558      primaryTypes
559      classifierVersion
560    }
561  }
562`,Nk=u`
563  query OpsCompanyOverrideOptions {
564    opsCompanyOverrideOptions {
565      companyTypes
566      employeeCountRanges
567    }
568  }
569`,kk=u`
570  mutation OpsUpdateCompanyOverride($input: OpsCompanyOverrideInput!) {
571    opsUpdateCompanyOverride(input: $input) {
572      id
573      companyName
574      websiteUrl
575      slug
576      isActive
577      employeeCountRange
578      briefDescription
579      fullDescription
580      primaryTypes
581      classifierVersion
582    }
583  }
584`,Sk=u`
585  mutation OpsMarkCompanyInactive($companyId: String!) {
586    opsMarkCompanyInactive(companyId: $companyId) {
587      id
588      companyName
589      websiteUrl
590      slug
591      isActive
592      employeeCountRange
593      briefDescription
594      fullDescription
595      primaryTypes
596      classifierVersion
597    }
598  }
599`,Ek=e=>[...e].sort((e,t)=>e.localeCompare(t)),Ak="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none",Ok="block text-sm font-medium text-gray-800",_k=({company:e,options:n,onSaved:r,onBack:a})=>{const s=e.primaryTypes.filter(e=>n.companyTypes.includes(e)),o=e.primaryTypes.filter(e=>!n.companyTypes.includes(e)),[l,c]=t.useState(s),[u,d]=t.useState(e.websiteUrl??""),[h,m]=t.useState(e.employeeCountRange??""),[f,g]=t.useState(e.briefDescription??""),[y,x]=t.useState(e.fullDescription??""),[b,v]=t.useState(null),[w,j]=t.useState(!1),[C,{loading:N}]=p(kk),[k,{loading:S}]=p(Sk),E=""!==u.trim()&&u.trim()!==(e.websiteUrl??""),A=l.length>0&&!((e,t)=>e.length===t.length&&Ek(e).join("|")===Ek(t).join("|"))(l,s),O=""!==h.trim()&&h.trim()!==(e.employeeCountRange??""),_=""!==f.trim()&&f.trim()!==(e.briefDescription??""),P=""!==y.trim()&&y.trim()!==(e.fullDescription??""),I=E||A||O||_||P;return i.jsxs("div",{className:"mt-4 rounded-xl border border-gray-200 bg-white p-6",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:e.companyName}),i.jsxs("div",{className:"mt-1 text-xs text-gray-500",children:[i.jsx("span",{children:e.websiteUrl??"—"}),i.jsx("span",{className:"mx-1",children:"·"}),i.jsx("span",{className:"font-mono",children:e.id}),!e.isActive&&i.jsx("span",{className:"ml-2 text-rose-600",children:"inactive"})]})]}),i.jsx("button",{type:"button",onClick:a,className:"text-sm text-gray-500 hover:underline",children:"← results"})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("span",{className:Ok,children:"Domain"}),i.jsx("input",{type:"text",value:u,onChange:e=>{j(!1),d(e.target.value)},placeholder:"example.com",className:`mt-2 ${Ak}`}),i.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Sets website_url + its default alias. Required before the enrichment re-run app can classify or enrich this company."})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("span",{className:Ok,children:"Classification types"}),i.jsx("div",{className:"mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:n.companyTypes.map((e,t)=>{const n=l.includes(e),r=`company-type-${t}`;return i.jsxs("label",{htmlFor:r,className:"flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-2 text-sm "+(n?"border-blue-300 bg-blue-50":"border-gray-200 hover:bg-gray-50"),children:[i.jsx("input",{id:r,type:"checkbox",checked:n,onChange:()=>(e=>{j(!1),c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])})(e),className:"h-4 w-4"}),i.jsx("span",{className:"text-gray-800",children:e})]},e)})}),i.jsxs("p",{className:"mt-2 text-xs text-gray-500",children:[i.jsx("span",{children:"Current classifier version: "}),i.jsx("span",{className:"font-mono",children:e.classifierVersion??"none"}),A&&i.jsx("span",{children:" → will be set to manual-override on save"})]}),o.length>0&&i.jsxs("p",{className:"mt-2 text-xs text-amber-600",children:[i.jsx("span",{children:"Not a selectable type (set by a legacy classifier): "}),i.jsx("span",{className:"font-mono",children:o.join(", ")}),i.jsxs("span",{children:[". Saving a classification change replaces the stored types and ",o.length>1?"drops them.":"drops it."]})]})]}),i.jsxs("div",{className:"mt-5",children:[i.jsx("span",{className:Ok,children:"Employee count range"}),i.jsxs("select",{value:h,onChange:e=>{j(!1),m(e.target.value)},className:`mt-2 ${Ak}`,children:[i.jsx("option",{value:"",children:"— none —"}),n.employeeCountRanges.map(e=>i.jsx("option",{value:e,children:e},e))]})]}),i.jsxs("div",{className:"mt-5",children:[i.jsx("span",{className:Ok,children:"Brief description"}),i.jsx("textarea",{value:f,onChange:e=>{j(!1),g(e.target.value)},rows:2,placeholder:"Short blurb — gates main-search visibility.",className:`mt-2 ${Ak}`})]}),i.jsxs("div",{className:"mt-5",children:[i.jsxs("span",{className:Ok,children:["Full description"," ",i.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),i.jsx("textarea",{value:y,onChange:e=>{j(!1),x(e.target.value)},rows:4,className:`mt-2 ${Ak}`})]}),b&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:b}),w&&i.jsx("p",{className:"mt-4 text-sm text-emerald-600",children:"Saved."}),i.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[i.jsx("button",{type:"button",onClick:async()=>{v(null),j(!1);const t={companyId:e.id};E&&(t.websiteUrl=u.trim()),A&&(t.primaryTypes=l),O&&(t.employeeCountRange=h.trim()),_&&(t.briefDescription=f.trim()),P&&(t.fullDescription=y.trim());try{const e=await C({variables:{input:t}}),n=e.data?.opsUpdateCompanyOverride;n&&(j(!0),r(n))}catch(Fr){v(Fr instanceof Error?Fr.message:"Failed to save.")}},disabled:N||!I,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:N?"Saving…":"Save changes"}),!I&&!w&&i.jsx("span",{className:"text-xs text-gray-400",children:"No changes yet."})]}),i.jsxs("div",{className:"mt-8 border-t border-gray-200 pt-5",children:[i.jsx("span",{className:Ok,children:"Status"}),e.isActive?i.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[i.jsx("button",{type:"button",onClick:async()=>
599{if(window.confirm(`Mark ${e.companyName} as inactive?`)){v(null),j(!1);try{const t=await k({variables:{companyId:e.id}}),n=t.data?.opsMarkCompanyInactive;n&&r(n)}catch(Fr){v(Fr instanceof Error?Fr.message:"Failed to mark inactive.")}}},disabled:S,className:"shrink-0 whitespace-nowrap rounded-lg border border-rose-300 px-4 py-2 text-sm font-medium text-rose-700 hover:bg-rose-50 disabled:opacity-50",children:S?"Marking inactive…":"Mark as inactive"}),i.jsx("span",{className:"text-xs text-gray-500",children:"For a company that has shut down or stopped operating. Applies immediately and is recorded in the company's status history."})]}):i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:"This company is inactive."})]})]})},Pk=()=>{const[e,n]=t.useState(""),[r,a]=t.useState(null),{data:s}=d(Nk),[l,c]=An(Ck,{fetchPolicy:"network-only"}),u=c.data?.opsCompanyOverrideSearch??[],p=s?.opsCompanyOverrideOptions;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-3xl",children:[i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:"Company editor"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Edit a bio company by hand — its domain, classification type, employee count, and description — when the automated classifier got them wrong or a stub is missing data, or mark it inactive once it has stopped operating. Setting the domain here is the prerequisite for the enrichment re-run app. Edits apply to whichever environment this app points at; for durable changes, run against production."}),i.jsxs("form",{onSubmit:t=>{t.preventDefault();const n=e.trim();
599n.length<2||(a(null),l({variables:{query:n}}))},className:"mt-6 flex gap-2",children:[i.jsx("input",{type:"search",value:e,onChange:e=>n(e.target.value),placeholder:"Search by name, domain, slug, or company id…",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:c.loading||e.trim().length<2,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:c.loading?"Searching…":"Search"})]}),c.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:c.error.message}),!r&&i.jsxs("div",{className:"mt-4 space-y-2",children:[u.map(e=>i.jsx("button",{type:"button",onClick:()=>a(e),className:"flex w-full items-center justify-between gap-3 rounded-lg border border-gray-200 bg-white px-4 py-3 text-left hover:border-blue-300",children:i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"truncate font-medium text-gray-900",children:e.companyName}),i.jsxs("div",{className:"truncate text-xs text-gray-500",children:[e.websiteUrl??"—"," ","·"," ",e.primaryTypes.join(", ")||"no type"]})]})},e.id)),c.data&&0===u.length&&!c.loading&&i.jsx("p",{className:"text-sm text-gray-500",children:"No companies found."})]}),r&&p&&i.jsx(_k,{company:r,options:p,onSaved:e=>a(e),onBack:()=>a(null)})]})})},Ik=u`
600  query OpsEnrichmentCompanySearch($query: String!) {
601    opsEnrichmentCompanySearch(query: $query) {
602      id
603      companyName
604      websiteUrl
605      slug
606      isActive
607      primaryTypes
608      employeeCountRange
609      briefDescription
610      activeContactCount
611    }
612  }
613`,Mk=u`
614  mutation OpsRerunCompanyEnrichment($companyId: String!) {
615    opsRerunCompanyEnrichment(companyId: $companyId) {
616      outcome
617      classified
618      company {
619        id
620        companyName
621        websiteUrl
622        slug
623        isActive
624        primaryTypes
625        employeeCountRange
626        briefDescription
627        activeContactCount
628      }
629    }
630  }
631`,Tk=i.jsx(o,{to:Yw.companyOverride,className:"text-blue-600 hover:underline",children:"Company editor"}),Rk={success:{title:"Enriched successfully",tone:"text-emerald-700",next:"Add this company to a custom feed to pull contacts — it now passes the zero-contact backfill gate."},non_permitted_type:{title:"Classified as a non-permitted type",tone:"text-amber-700",next:i.jsxs(i.Fragment,{children:["The classified type isn’t one feeds accept. Force a permitted type in the"," ",Tk,"."]})},ai_data_missing:{title:"Enriched, but AI Science had no employee count",tone:"text-amber-700",next:i.jsxs(i.Fragment,{children:["Set the employee count by hand in the"," ",Tk,", then add it to a feed."]})},classify_failed:{title:"The classifier returned no type",tone:"text-amber-700",next:i.jsxs(i.Fragment,{children:["Force a type in the"," ",Tk,"."]})}},Lk=({label:e,children:t})=>i.jsxs("div",{children:[i.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-400",children:e}),i.jsx("div",{className:"mt-0.5 text-sm text-gray-800",children:t})]}),Dk=({result:e})=>i.jsxs("ul",{className:"mt-3 space-y-1 text-sm text-gray-700",children:[i.jsxs("li",{children:["Classification:"," ",i.jsx("span",{className:"font-medium",children:e.company.primaryTypes.join(", ")||"none"}),e.classified?" (classified this run)":" (kept existing)"]}),i.jsxs("li",{children:["Employee count:"," ",i.jsx("span",{className:"font-medium",children:e.company.employeeCountRange??"not found"})]}),i.jsxs("li",{children:["Description:"," ",e.company.briefDescription?"filled":"still empty"]})]}),Fk=({company:e,onBack:n})=>{const[r,a]=t.useState(!1),[s,o]=t.useState(null),[l,c]=t.useState(null),u=Boolean(e.websiteUrl),[d,{loading:h}]=p(Mk);return i.jsxs("div",{className:"mt-4 rounded-xl border border-gray-200 bg-white p-6",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:e.companyName}),i.jsxs("div",{className:"mt-1 text-xs text-gray-500",children:[i.jsx("span",{children:e.websiteUrl??"n
631o domain"}),i.jsx("span",{className:"mx-1",children:"·"}),i.jsx("span",{className:"font-mono",children:e.id}),!e.isActive&&i.jsx("span",{className:"ml-2 text-rose-600",children:"inactive"})]})]}),i.jsx("button",{type:"button",onClick:n,className:"text-sm text-gray-500 hover:underline",children:"← results"})]}),i.jsxs("div",{className:"mt-5 grid grid-cols-2 gap-4 sm:grid-cols-4",children:[i.jsx(Lk,{label:"Classification",children:e.primaryTypes.join(", ")||i.jsx("span",{className:"text-amber-600",children:"unclassified"})}),i.jsx(Lk,{label:"Employee count",children:e.employeeCountRange??"—"}),i.jsx(Lk,{label:"Description",children:e.briefDescription?"set":"—"}),i.jsx(Lk,{label:"Active contacts",children:e.activeContactCount})]}),!u&&i.jsx("div",{className:"mt-5 rounded-lg border border-amber-200 bg-amber-50 p-4",children:i.jsxs("p",{className:"text-sm text-amber-800",children:["This company has no domain. Set one in the"," ",Tk," ","first — classify and enrich resolve the company by domain — then re-run enrichment here."]})}),l&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:l}),u&&!s&&i.jsxs("div",{className:"mt-6",children:[h&&i.jsx("p",{className:"text-sm text-gray-600",children:"Running classify + enrich… this can take a minute or two."}
631),!h&&!r&&i.jsx("button",{type:"button",onClick:()=>a(!0),className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700",children:"Re-run enrichment"}),!h&&r&&i.jsxs("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-4",children:[i.jsxs("p",{className:"text-sm text-amber-800",children:["This runs the paid company-type classifier (LLM) and AI Science enrichment against"," ",i.jsx("span",{className:"font-medium",children:e.companyName})," ","in whichever environment this app points at. Continue?"]}),i.jsxs("div",{className:"mt-3 flex gap-3",children:[i.jsx("button",{type:"button",onClick:async()=>{c(null),a(!1);try{const t=await d({variables:{companyId:e.id}});o(t.data?.opsRerunCompanyEnrichment??null)}catch(Fr){c(Fr instanceof Error?Fr.message:"The re-run failed.")}},className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700",children:"Confirm re-run"}),i.jsx("button",{type:"button",onClick:()=>a(!1),className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Cancel"})]})]})]}),s&&i.jsxs("div",{className:"mt-6 border-t border-gray-100 pt-4",children:[i.jsx("p",{className:`text-sm font-semibold ${Rk[s.outcome]?.tone??"text-gray-800"}`,children:Rk[s.outcome]?.title??`Completed (${s.outcome})`}),i.jsx(Dk,{result:s}),i.jsx("p",{className:"mt-3 text-sm text-gray-600",children:Rk[s.outcome]?.next})]})]})},qk=()=>{const[e,n]=t.useState(""),[r,a]=t.useState(null),[s,l]=An(Ik,{fetchPolicy:"network-only"}),c=l.data?.opsEnrichmentCompanySearch??[];return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-3xl",children:[i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:"Company enrichment re-run"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Re-run classify + enrich on a bio company that got stranded behind the pipeline’s skip of existing companies (e.g. a CSV stub that was never classified). Classifies only when unclassified (a manual override is preserved), and enriches from AI Science. The company must have a domain first — set it in the Company editor. Contacts are pulled separately by adding the company to a custom feed. Runs against whichever environment this app points at; for durable changes, run against production."}),i.jsxs("form",{onSubmit:t=>{t.preventDefault();const n=e.trim();
631n.length<2||(a(null),s({variables:{query:n}}))},className:"mt-6 flex gap-2",children:[i.jsx("input",{type:"search",value:e,onChange:e=>n(e.target.value),placeholder:"Search by name, domain, slug, or company id…",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:l.loading||e.trim().length<2,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:l.loading?"Searching…":"Search"})]}),l.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:l.error.message}),!r&&i.jsxs("div",{className:"mt-4 space-y-2",children:[c.map(e=>i.jsx("button",{type:"button",onClick:()=>a(e),className:"flex w-full items-center justify-between gap-3 rounded-lg border border-gray-200 bg-white px-4 py-3 text-left hover:border-blue-300",children:i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"truncate font-medium text-gray-900",children:e.companyName}),i.jsxs("div",{className:"truncate text-xs text-gray-500",children:[e.websiteUrl??"no domain"," · ",e.primaryTypes.join(", ")||"unclassified"," · ",e.activeContactCount," contacts"]})]})},e.id)),l.data&&0===c.length&&!l.loading&&i.jsx("p",{className:"text-sm text-gray-500",children:"No companies found."})]}),r&&i.jsx(Fk,{company:r,onBack:()=>a(null)})]})})};var Bk=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Uk(e){return"string"==typeof e&&Bk.includes(e)}var zk=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
631dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Hk(e){return"string"==typeof e&&zk.has(e)}function Vk(e){return"string"==typeof e&&e.startsWith("data-")}function $k(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hk(n)||Vk(n))&&(t[n]=e[n]);return t}function Wk(e){return null==e?null:t.isValidElement(e)&&"object"==typeof e.props&&null!==e.props?$k(e.props):"object"!=typeof e||Array.isArray(e)?null:$k(e)}function Qk(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hk(n)||Vk(n)||Uk(n))&&(t[n]=e[n]);return t}var Zk=["children","width","height","viewBox","className","style","title","desc"];function Kk(){return Kk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kk.apply(null,arguments)}var Gk=t.forwardRef((e,n)=>{var{children:r,width:a,height:i,viewBox:s,className:o,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Zk),p=s||{width:a,height:i,x:0,y:0},h=de("recharts-surface",o);return t.createElement("svg",Kk({},Qk(d),{className:h,width:a,height:i,style:l,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:n}),t.createElement("title",null,c),t.createElement("desc",null,u),r)}),Yk=["children","className"];function Jk(){return Jk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jk.apply(null,arguments)}
vendor: 15,908 bytes, line 631
631var Xk=t.forwardRef((e,n)=>{var{children:r,className:a}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Yk),s=de("recharts-layer",a);return t.createElement("g",Jk({className:s},Qk(i),{ref:n}),r)}),eS=t.createContext(null);function tS(e){return function(){return e}}const nS=Math.cos,rS=Math.sin,aS=Math.sqrt,iS=Math.PI,sS=2*iS,oS=Math.PI,lS=2*oS,cS=1e-6,uS=lS-cS;function dS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class pS{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?dS:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return dS;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,a,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+a},${this._y1=+i}`}arcTo(e,t,n,r,a){if(e=+e,t=+t,n=+n,r=+r,(a=+a)<0)throw new Error(`negative radius: ${a}`);let i=this._x1,s=this._y1,o=n-e,l=r-t,c=i-e,u=s-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>cS)if(Math.abs(u*o-l*c)>cS&&a){let p=n-i,h=r-s,m=o*o+l*l,f=p*p+h*h,g=Math.sqrt(m),y=Math.sqrt(d),x=a*Math.tan((oS-Math.acos((m+d-f)/(2*g*y)))/2),b=x/y,v=x/g;Math.abs(b-1)>cS&&this._append`L${e+b*c},${t+b*u}`,this._append`A${a},${a},0,0,${+(u*p>c*h)},${this._x1=e+v*o},${this._y1=t+v*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,a,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,c=t+o,u=1^i,d=i?r-a:a-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>cS||Math.abs(this._y1-c)>cS)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%lS+lS),d>uS?this._append`A${n},${n},0,1,${u},${e-s},${t-o}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>cS&&this._append`A${n},${n},0,${+(d>=oS)},${u},${this._x1=e+n*Math.cos(a)},${this._y1=t+n*Math.sin(a)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function hS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new pS(t)}function mS(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function fS(e){this._context=e}function gS(e){return new fS(e)}function yS(e){return e[0]}function xS(e){return e[1]}function bS(e,t){var n=tS(!0),r=null,a=gS,i=null,s=hS(o);function o(o){var l,c,u,d=(o=mS(o)).length,p=!1;for(null==r&&(i=a(u=s())),l=0;l<=d;++l)!(l<d&&n(c=o[l],l,o))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(c,l,o),+t(c,l,o));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?yS:tS(e),t="function"==typeof t?t:void 0===t?xS:tS(t),o.x=function(t){return arguments.length?(e="function"==typeof t?t:tS(+t),o):e},o.y=function(e){return arguments.length?(t="function"==typeof e?e:tS(+e),o):t},o.defined=function(e){return arguments.length?(n="function"==typeof e?e:tS(!!e),o):n},o.curve=function(e){return arguments.length?(a=e,null!=r&&(i=a(r)),o):a},o.context=function(e){return arguments.length?(null==e?r=i=null:i=a(r=e),o):r},o}function vS(e,t,n){var r=null,a=tS(!0),i=null,s=gS,o=null,l=hS(c);function c(c){var u,d,p,h,m,f=(c=mS(c)).length,g=!1,y=new Array(f),x=new Array(f);for(null==i&&(o=s(m=l())),u=0;u<=f;++u){if(!(u<f&&a(h=c[u],u,c))===g)if(g=!g)d=u,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=u-1;p>=d;--p)o.point(y[p],x[p]);o.lineEnd(),o.areaEnd()}g&&(y[u]=+e(h,u,c),x[u]=+t(h,u,c),o.point(r?+r(h,u,c):y[u],n?+n(h,u,c):x[u]))}if(m)return o=null,m+""||null}function u(){return bS().defined(a).curve(s).context(i)}return e="function"==typeof e?e:void 0===e?yS:tS(+e),t="function"==typeof t?t:tS(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?xS:tS(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:tS(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:tS(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:tS(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:tS(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:tS(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:tS(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(a="function"==typeof e?e:tS(!!e),c):a},c.curve=function(e){return arguments.length?(s=e,null!=i&&(o=s(i)),c):s},c.context=function(e){return arguments.length?(null==e?i=o=null:o=s(i=e),c):i},c}fS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class wS{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const jS={draw(e,t){const n=aS(t/iS);e.moveTo(n,0),e.arc(0,0,n,0,sS)}},CS={draw(e,t){const n=aS(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},NS=aS(1/3),kS=2*NS,SS={draw(e,t){const n=aS(t/kS),r=n*NS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ES={draw(e,t){const n=aS(t),r=-n/2;e.rect(r,r,n,n)}},AS=rS(iS/10)/rS(7*iS/10),OS=rS(sS/10)*AS,_S=-nS(sS/10)*AS,PS={draw(e,t){const n=aS(.8908130915292852*t),r=OS*n,a=_S*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const t=sS*i/5,s=nS(t),o=rS(t);e.lineTo(o*n,-s*n),e.lineTo(s*r-o*a,o*r+s*a)}e.closePath()}},IS=aS(3),MS={draw(e,t){const n=-aS(t/(3*IS));e.moveTo(0,2*n),e.lineTo(-IS*n,-n),e.lineTo(IS*n,-n),e.closePath()}},TS=-.5,RS=aS(3)/2,LS=1/aS(12),DS=3*(LS/2+1),FS={draw(e,t){const n=aS(t/DS),r=n/2,a=n*LS,i=r,s=n*LS+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(TS*r-RS*a,RS*r+TS*a),e.lineTo(TS*i-RS*s,RS*i+TS*s),e.lineTo(TS*o-RS*l,RS*o+TS*l),e.lineTo(TS*r+RS*a,TS*a-RS*r),e.lineTo(TS*i+RS*s,TS*s-RS*i),e.lineTo(TS*o+RS*l,TS*l-RS*o),e.closePath()}};function qS(){}function BS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function US(e){this._context=e}function zS(e){this._context=e}function HS(e){this._context=e}function VS(e){this._context=e}function $S(e){return e<0?-1:1}function WS(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return($S(i)+$S(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function QS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ZS(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function KS(e){this._context=e}function GS(e){this._context=new YS(e)}function YS(e){this._context=e}function JS(e){this._context=e}function XS(e){var t,n,r=e.length-1,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function eE(e,t){this._context=e,this._t=t}function tE(e,t){if((a=e.length)>1)for(var n,r,a,i=1,s=e[t[0]],o=s.length;i<a;++i)for(r=s,s=e[t[i]],n=0;n<o;++n)s[n][1]+=s[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function nE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function rE(e,t){return e[t]}function aE(e){const t=[];return t.key=e,t}US.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},zS.prototype={areaStart:qS,areaEnd:qS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:BS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},HS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:BS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},VS.prototype={areaStart:qS,areaEnd:qS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},KS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ZS(this,this._t0,QS(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ZS(this,QS(this,n=WS(this,e,t)),n);break;default:ZS(this,this._t0,n=WS(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(GS.prototype=Object.create(KS.prototype)).point=function(e,t){KS.prototype.point.call(this,t,e)},YS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}},JS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=XS(e),a=XS(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},eE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var iE,sE={},oE={};function lE(){return iE||(iE=1,e=oE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),oE;var e}var cE,uE={};function dE(){return cE||(cE=1,e=uE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),uE;var e}var pE,hE={};function mE(){return pE||(pE=1,e=hE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}),hE;var e}var fE,gE,yE,xE,bE,vE={},wE={};function jE(){return fE||(fE=1,e=wE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),wE;var e}function CE(){return gE||(gE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jE(),n=mE();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],a=(e=t.toString(e)).length;if(0===a)return r;let i=0,s="",o="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),i++);i<a;){const t=e[i];o?"\\"===t&&i+1<a?(i++,s+=e[i]):t===o?o="":s+=t:l?'"'===t||"'"===t?o=t:"]"===t?(l=!1,r.push(s),s=""):s+=t:"["===t?(l=!0,s&&(r.push(s),s="")):"."===t?s&&(r.push(s),s=""):s+=t,i++}return s&&r.push(s),r}}(vE)),vE}function NE(){return yE||(yE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lE(),n=dE(),r=mE(),a=CE();e.get=function e(i,s,o){if(null==i)return o;
631switch(typeof s){case"string":{if(t.isUnsafeProperty(s))return o;const r=i[s];return void 0===r?n.isDeepKey(s)?e(i,a.toPath(s),o):o:r}case"number":case"symbol":{"number"==typeof s&&(s=r.toKey(s));const e=i[s];return void 0===e?o:e}default:{if(Array.isArray(s))return function(e,n,r){if(0===n.length)return r;let a=e;for(let i=0;i<n.length;i++){if(null==a)return r;if(t.isUnsafeProperty(n[i]))return r;a=a[n[i]]}if(void 0===a)return r;return a}(i,s,o);if(s=Object.is(s?.valueOf(),-0)?"-0":String(s),t.isUnsafeProperty(s))return o;const e=i[s];return void 0===e?o:e}}}}(sE)),sE}function kE(){return bE?xE:(bE=1,xE=NE().get)}const SE=j(kE());function EE(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function AE(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var a=n[r-1];return"string"==typeof a?e+a+t:void 0!==a?e+EE(a)+t:e+t},"")}var OE=e=>0===e?0:e>0?1:-1,_E=e=>"number"==typeof e&&e!=+e,PE=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,IE=e=>("number"==typeof e||e instanceof Number)&&!_E(e),ME=e=>IE(e)||"string"==typeof e,TE=0,RE=e=>{var t=++TE;return"".concat(e||"").concat(t)},LE=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!IE(e)&&"string"!=typeof e)return r;if(PE(e)){if(null==t)return r;var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return _E(n)&&(n=r),a&&null!=t&&n>t&&(n=t),n},DE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function FE(e,t,n){return IE(e)&&IE(t)?EE(e+n*(t-e)):t}var qE=e=>null==e,BE=e=>qE(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function UE(e){return null!=e}function zE(){}var HE=["type","size","sizeType"];function VE(){return VE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VE.apply(null,arguments)}function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$E(Object(n),!0).forEach(function(t){QE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZE={symbolCircle:jS,symbolCross:CS,symbolDiamond:SS,symbolSquare:ES,symbolStar:PS,symbolTriangle:MS,symbolWye:FS},KE=Math.PI/180,GE=e=>{var{type:n="circle",size:r=64,sizeType:a="area"}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,HE),s=WE(WE({},i),{},{type:n,size:r,sizeType:a}),o="circle";"string"==typeof n&&(o=n);var{className:l,cx:c,cy:u}=s,d=Qk(s);return IE(c)&&IE(u)&&IE(r)?t.createElement("path",VE({}
631,d,{className:de("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(BE(e));return ZE[t]||jS})(o),t=function(e,t){let n=null,r=hS(a);function a(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return e="function"==typeof e?e:tS(e||jS),t="function"==typeof t?t:tS(void 0===t?64:+t),a.type=function(t){return arguments.length?(e="function"==typeof t?t:tS(t),a):e},a.size=function(e){return arguments.length?(t="function"==typeof e?e:tS(+e),a):t},a.context=function(e){return arguments.length?(n=null==e?null:e,a):n},a}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*KE;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(r,a,o)),n=t();if(null!==n)return n})()})):null};GE.registerSymbol=(e,t)=>{ZE["symbol".concat(BE(e))]=t};var YE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,JE=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(a=>{var i=e[a];Uk(a)&&"function"==typeof i&&(r||(r={}),r[a]=((e,t,n)=>r=>(e(t,n,r),null))(i,t,n))}),r};function XE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tA(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XE(Object(n),!0).forEach(function(t){eA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var nA,rA={},aA={};function iA(){return nA||(nA=1,e=aA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const a=e[r],i=t(a,r,e);n.has(i)||n.set(i,a)}return Array.from(n.values())}),aA;var e}var sA,oA={};function lA(){return sA||(sA=1,e=oA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),oA;var e}var cA,uA={};function dA(){return cA||(cA=1,e=uA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),uA;var e}var pA,hA,mA={},fA={},gA={};function yA(){return pA||(pA=1,e=gA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),gA;var e}function xA(){return hA||(hA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yA();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(fA)),fA}var bA,vA,wA={};function jA(){return bA||(bA=1,e=wA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),wA;var e}function CA(){return vA||(vA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xA(),n=jA();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(mA)),mA}var NA,kA={},SA={};function EA(){return NA||(NA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NE();e.property=function(e){return function(n){return t.get(n,e)}}}(SA)),SA}var AA,OA={},_A={},PA={},IA={};function MA(){return AA||(AA=1,e=IA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),IA;var e}var TA,RA={};function LA(){return TA||(TA=1,e=RA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),RA;var e}var DA,FA,qA,BA={};function UA(){return DA||(DA=1,e=BA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),BA;var e}function zA(){return FA||(FA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MA(),n=LA(),r=UA();function a(e,o,l,c){if(o===e)return!0;switch(typeof o){case"object":return function(e,t,r,a){if(null==t)return!0;
631if(Array.isArray(t))return i(e,t,r,a);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[a,i]of t.entries()){if(!1===n(e.get(a),i,a,e,t,r))return!1}return!0}(e,t,r,a);if(t instanceof Set)return s(e,t,r,a);const o=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===o.length;if(0===o.length)return!0;if(a?.has(t))return a.get(t)===e;a?.set(t,e);try{for(let i=0;i<o.length;i++){const s=o[i];if(!n.isPrimitive(e)&&!(s in e))return!1;if(void 0===t[s]&&void 0!==e[s])return!1;if(null===t[s]&&null!==e[s])return!1;if(!r(e[s],t[s],s,e,t,a))return!1}return!0}finally{a?.delete(t)}}(e,o,l,c);case"function":return Object.keys(o).length>0?a(e,{...o},l,c):r.isEqualsSameValueZero(e,o);default:return t.isObject(e)?"string"!=typeof o||""===o:r.isEqualsSameValueZero(e,o)}}function i(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const a=new Set;for(let i=0;i<t.length;i++){const s=t[i];let o=!1;for(let l=0;l<e.length;l++){if(a.has(l))continue;let c=!1;if(n(e[l],s,i,e,t,r)&&(c=!0),c){a.add(l),o=!0;break}}if(!o)return!1}return!0}function s(e,t,n,r){return 0===t.size||e instanceof Set&&i([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):a(t,n,function e(t,n,i,s,o,l){const c=r(t,n,i,s,o,l);return void 0!==c?Boolean(c):a(t,n,e,l)},new Map)},e.isSetMatch=s}(PA)),PA}function HA(){return qA||(qA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zA();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(_A)),_A}var VA,$A={},WA={},QA={};function ZA(){return VA||(VA=1,e=QA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),QA;var e}var KA,GA={};function YA(){return KA||(KA=1,e=GA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),GA;var e}var JA,XA={};function eO(){return JA||(JA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(XA)),XA}var tO,nO,rO,aO,iO={};function sO(){return tO||(tO=1,e=iO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),iO;var e}function oO(){return nO||(nO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZA(),n=YA(),r=eO(),a=LA(),i=sO();function s(e,t,l,c=new Map,u=void 0){const d=u?.(e,t,l,c);if(void 0!==d)return d;if(a.isPrimitive(e))return e;if(c.has(e))return c.get(e);if(Array.isArray(e)){const t=new Array(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=s(e[n],n,l,c,u);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;c.set(e,t);for(const[n,r]of e)t.set(n,s(r,n,l,c,u));return t}if(e instanceof Set){const t=new Set;c.set(e,t);for(const n of e)t.add(s(n,void 0,l,c,u));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(i.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=s(e[n],n,l,c,u);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return c.set(e,t),o(t,e,l,c,u),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return c.set(e,t),o(t,e,l,c,u),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return c.set(e,t),o(t,e,l,c,u),t}if(e instanceof Error){const t=structuredClone(e);return c.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,o(t,e,l,c,u),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return c.set(e,t),o(t,e,l,c,u),t}if(e instanceof Number){const t=new Number(e.valueOf());return c.set(e,t),o(t,e,l,c,u),t}if(e instanceof String){const t=new String(e.valueOf());return c.set(e,t),o(t,e,l,c,u),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return c.set(e,t),o(t,e,l,c,u),t}return e}function o(e,n,r=e,a,i){const o=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<o.length;t++){const l=o[t],c=Object.getOwnPropertyDescriptor(e,l);(null==c||c.writable)&&(e[l]=s(n[l],l,r,a,i))}}e.cloneDeepWith=function(e,t){return s(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=s,e.copyProperties=o}(WA)),WA}function lO(){return rO||(rO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oO();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}($A)),$A}function cO(){return aO||(aO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HA(),n=lO();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(OA)),OA}var uO,dO,pO={},hO={},mO={};function fO(){return uO||(uO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oO(),n=YA(),r=eO();e.cloneDeepWith=function(e,a){return t.cloneDeepWith(e,(i,s,o,l)=>{const c=a?.(i,s,o,l);if(void 0!==c)return c;if("object"==typeof e){if(n.getTag(e)===r.objectTag&&"function"!=typeof e.constructor){const n={};return l.set(e,n),t.copyProperties(n,e,o,l),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{const n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}}(mO)),mO}function gO(){return dO||(dO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fO();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(hO)),hO}var yO,xO={},bO={};function vO(){return yO||(yO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}(bO)),bO}var wO,jO,CO,NO,kO,SO,EO,AO={};function OO(){return wO||(wO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YA();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(AO)),AO}function _O(){return jO||(jO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dE(),n=vO(),r=OO(),a=CE();e.has=function(e,i){let s;if(s=Array.isArray(i)?i:"string"==typeof i&&t.isDeepKey(i)&&null==e?.[
631i]?a.toPath(i):[i],0===s.length)return!1;let o=e;for(let t=0;t<s.length;t++){const e=s[t];if(null==o||!Object.hasOwn(o,e)){if(!((Array.isArray(o)||r.isArguments(o))&&n.isIndex(e)&&e<o.length))return!1}o=o[e]}return!0}}(xO)),xO}function PO(){return CO||(CO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HA(),n=mE(),r=gO(),a=NE(),i=_O();e.matchesProperty=function(e,s){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return s=r.cloneDeep(s),function(n){const r=a.get(n,e);return void 0===r?i.has(n,e):void 0===s?void 0===r:t.isMatch(r,s)}}}(pO)),pO}function IO(){return NO||(NO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dA(),n=EA(),r=cO(),a=PO();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?a.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(kA)),kA}function MO(){return kO||(kO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iA(),n=lA(),r=dA(),a=CA(),i=IO();e.uniqBy=function(e,s=r.identity){return a.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(i.iteratee(s),1)):[]}}(rA)),rA}function TO(){return EO?SO:(EO=1,SO=MO().uniqBy)}const RO=j(TO());var LO,DO,FO={exports:{}},qO={};var BO=(DO||(DO=1,FO.exports=function(){if(LO)return qO;LO=1;var e=$(),t=rr(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,o=e.useDebugValue;return qO.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=a(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return a=t}return a=e}if(t=a,n(r,e))return t;var s=c(e);return void 0!==u&&u(t,s)?(r=e,t):(r=e,a=s)}var r,a,i=!1,s=void 0===l?null:l;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,l,c,u]);var h=r(e,d[0],d[1]);return i(function(){p.hasValue=!0,p.value=h},[h]),o(h),h},qO}()),FO.exports),UO=t.createContext(null),zO=e=>e,HO=()=>{var e=t.useContext(UO);return e?e.store.dispatch:zO},VO=()=>{},$O=()=>VO,WO=(e,t)=>e===t;function QO(e){var n=t.useContext(UO),r=t.useMemo(()=>n?t=>{if(null!=t)return e(t)}:VO,[n,e]);return BO.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:$O,n?n.store.getState:VO,n?n.store.getState:VO,r,WO)}var ZO=e=>Array.isArray(e)?e:[e];function KO(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}var GO="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function YO(){return{s:0,v:void 0,o:null,p:null}}function JO(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let a,i=0;function s(){let t=n;const{length:s}=arguments;for(let e=0,n=s;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=YO(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=YO(),e.set(n,t)):t=r}}const o=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),i++,r){const e=a?.deref?.()??a;null!=e&&r(e,l)&&(l=e,0!==i&&i--);a="object"==typeof l&&null!==l||"function"==typeof l?new GO(l):l}return o.s=1,o.v=l,l}return s.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function XO(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,a=0,i={},s=e.pop();"object"==typeof s&&(i=s,s=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const o={...n,...i},{memoize:l,memoizeOptions:c=[],argsMemoize:u=JO,argsMemoizeOptions:d=[]}=o,p=ZO(c),h=ZO(d),m=KO(e),f=l(function(){return r++,s.apply(null,arguments)},...p),g=u(function(){a++;const e=function(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}(m,arguments);return t=f.apply(null,e),t},...h);return Object.assign(g,{resultFunc:s,memoizedResultFunc:f,dependencies:m,depen
631dencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var e_,t_=XO(JO),n_=Object.assign((e,t=t_)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>n_}),r_={},a_={},i_={};function s_(){return e_||(e_=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const a=t(e),i=t(n);if(a===i&&0===a){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?i-a:a-i}return 0}}(i_)),i_}var o_,l_,c_,u_={},d_={};function p_(){return o_||(o_=1,e=d_,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),d_;var e}function h_(){return l_||(l_=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p_(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,a){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=a&&Object.hasOwn(a,e)))}}(u_)),u_}function m_(){return c_||(c_=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s_(),n=h_(),r=CE();e.orderBy=function(e,a,i,s){if(null==e)return[];i=s?void 0:i,Array.isArray(e)||(e=Object.values(e)),Array.isArray(a)||(a=null==a?[null]:[a]),0===a.length&&(a=[null]),Array.isArray(i)||(i=null==i?[]:[i]),i=i.map(e=>String(e));const o=(e,t)=>{let n=e;for(let r=0;r<t.length&&null!=n;++r)n=n[t[r]];return n},l=a.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)})),c=e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:o(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?o(t,e):"object"==typeof t?t[e]:t)(t,e))}));return c.slice().sort((e,n)=>{for(let r=0;r<l.length;r++){const a=t.compareValues(e.criteria[r],n.criteria[r],i[r]);if(0!==a)return a}return 0}).map(e=>e.original)}}(a_)),a_}var f_,g_={};function y_(){return f_||(f_=1,e=g_,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),a=(e,t)=>{for(let i=0;i<e.length;i++){const s=e[i];Array.isArray(s)&&t<r?a(s,t+1):n.push(s)}};return a(e,0),n}),g_;var e}var x_,b_,v_,w_,j_={};function C_(){return x_||(x_=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vO(),n=xA(),r=MA(),a=UA();e.isIterateeCall=function(e,i,s){return!!r.isObject(s)&&(!!("number"==typeof i&&n.isArrayLike(s)&&t.isIndex(i)&&i<s.length||"string"==typeof i&&i in s)&&a.isEqualsSameValueZero(s[i],e))}}(j_)),j_}function N_(){return b_||(b_=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m_(),n=y_(),r=C_();e.sortBy=function(e,...a){const i=a.length;return i>1&&r.isIterateeCall(e,a[0],a[1])?a=[]:i>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(e,n.flatten(a),["asc"])}}(r_)),r_}function k_(){return w_?v_:(w_=1,v_=N_().sortBy)}const S_=j(k_());var E_=e=>e.legend.settings;t_([e=>e.legend.payload,E_],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?S_(r,n):r});function A_(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var O_=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),__=()=>Math.random().toString(36).substring(7).split("").join("."),P_={INIT:`@@redux/INIT${__()}`,REPLACE:`@@redux/REPLACE${__()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${__()}`};function I_(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function M_(e,t,n){if("function"!=typeof e)throw new Error(A_(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(A_(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){
631if("function"!=typeof n)throw new Error(A_(1));return n(M_)(e,t)}let r=e,a=t,i=new Map,s=i,o=0,l=!1;function c(){s===i&&(s=new Map,i.forEach((e,t)=>{s.set(t,e)}))}function u(){if(l)throw new Error(A_(3));return a}function d(e){if("function"!=typeof e)throw new Error(A_(4));if(l)throw new Error(A_(5));let t=!0;c();const n=o++;return s.set(n,e),function(){if(t){if(l)throw new Error(A_(6));t=!1,c(),s.delete(n),i=null}}}function p(e){if(!I_(e))throw new Error(A_(7));if(void 0===e.type)throw new Error(A_(8));if("string"!=typeof e.type)throw new Error(A_(17));if(l)throw new Error(A_(9));try{l=!0,a=r(a,e)}finally{l=!1}return(i=s).forEach(e=>{e()}),e}p({type:P_.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(A_(10));r=e,p({type:P_.REPLACE})},[O_]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(A_(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[O_](){return this}}}}}function T_(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}const r=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:P_.INIT}))throw new Error(A_(12));if(void 0===n(void 0,{type:P_.PROBE_UNKNOWN_ACTION()}))throw new Error(A_(13))})}(n)}catch(Fr){a=Fr}return function(e={},t){if(a)throw a;let i=!1;const s={};for(let a=0;a<r.length;a++){const o=r[a],l=n[o],c=e[o],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(A_(14));s[o]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?s:e}}function R_(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function L_(e){return I_(e)&&"type"in e&&"string"==typeof e.type}var D_=Symbol.for("immer-nothing"),F_=Symbol.for("immer-draftable"),q_=Symbol.for("immer-state");function B_(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var U_=Object,z_=U_.getPrototypeOf,H_="constructor",V_="prototype",$_="configurable",W_="enumerable",Q_="writable",Z_="value",K_=e=>!!e&&!!e[q_];function G_(e){return!!e&&(X_(e)||iP(e)||!!e[F_]||!!e[H_]?.[F_]||sP(e)||oP(e))}var Y_=U_[V_][H_].toString(),J_=new WeakMap;function X_(e){if(!e||!lP(e))return!1;const t=z_(e);if(null===t||t===U_[V_])return!0;const n=U_.hasOwnProperty.call(t,H_)&&t[H_];if(n===Object)return!0;if(!cP(n))return!1;let r=J_.get(n);return void 0===r&&(r=Function.toString.call(n),J_.set(n,r)),r===Y_}function eP(e,t,n=!0){if(0===tP(e)){(n?Reflect.ownKeys(e):U_.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function tP(e){const t=e[q_];return t?t.type_:iP(e)?1:sP(e)?2:oP(e)?3:0}var nP=(e,t,n=tP(e))=>2===n?e.has(t):U_[V_].hasOwnProperty.call(e,t),rP=(e,t,n=tP(e))=>2===n?e.get(t):e[t],aP=(e,t,n,r=tP(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var iP=Array.isArray,sP=e=>e instanceof Map,oP=e=>e instanceof Set,lP=e=>"object"==typeof e,cP=e=>"function"==typeof e,uP=e=>"boolean"==typeof e;var dP=e=>e.copy_||e.base_,pP=e=>e.modified_?e.copy_:e.base_;function hP(e,t){if(sP(e))return new Map(e);if(oP(e))return new Set(e);if(iP(e))return Array[V_].slice.call(e);const n=X_(e);if(!0===t||"class_only"===t&&!n){const t=U_.getOwnPropertyDescriptors(e);delete t[q_];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],i=t[a];!1===i[Q_]&&(i[Q_]=!0,i[$_]=!0),(i.get||i.set)&&(t[a]={[$_]:!0,[Q_]:!0,[W_]:i[W_],[Z_]:e[a]})}return U_.create(z_(e),t)}{const t=z_(e);if(null!==t&&n)return{...e};const r=U_.create(t);return U_.assign(r,e)}}function mP(e,t=!1){return gP(e)||K_(e)||!G_(e)||(tP(e)>1&&U_.defineProperties(e,{set:fP,add:fP,clear:fP,delete:fP}),U_.freeze(e),t&&eP(e,(e,t)=>{mP(t,!0)},!1)),e}var fP={[Z_]:function(){B_(2)}};function gP(e){return null===e||!lP(e)||U_.isFrozen(e)}var yP="MapSet",xP="Patches",bP="ArrayMethods",vP={};function wP(e){const t=vP[e];return t||B_(0),t}var jP,CP=e=>!!vP[e],NP=()=>jP;function kP(e,t){t&&(e.patchPlugin_=wP(xP),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function SP(e){EP(e),e.drafts_.forEach(OP),e.drafts_=null}function EP(e){e===jP&&(jP=e.parent_)}var AP=e=>jP={drafts_:[],parent_:jP,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:CP(yP)?wP(yP):void 0,arrayMethodsPlugin_:CP(bP)?wP(bP):void 0};function OP(e){const t=e[q_];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function _P(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[q_].modified_&&(SP(t),B_(4)),G_(e)&&(e=PP(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[q_].base_,e,t)}else e=PP(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mP(t,n)}(t,e,!0),SP(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==D_?e:void 0}function PP(e,t){if(gP(t))return t;const n=t[q_];if(!n){return DP(t,e.handledSet_,e)}if(!MP(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}LP(n,e)}return n.copy_}function IP(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var MP=(e,t)=>
vendor: 5,861 bytes, line 631
631e.scope_===t,TP=[];function RP(e,t,n,r){const a=dP(e),i=e.type_;if(void 0!==r){if(rP(a,r,i)===t)return void aP(a,r,n,i)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;eP(a,(e,n)=>{if(K_(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const s=e.draftLocations_.get(t)??TP;for(const o of s)aP(a,o,n,i)}function LP(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}IP(e)}}function DP(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||K_(e)||t.has(e)||!G_(e)||gP(e)||(t.add(e),eP(e,(r,a)=>{if(K_(a)){const t=a[q_];if(MP(t,n)){const n=pP(t);aP(e,r,n,e.type_),IP(t)}}else G_(a)&&DP(a,t,n)})),e}var FP={get(e,t){if(t===q_)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=dP(e);if(!nP(a,t,e.type_))return function(e,t,n){const r=UP(t,n);return r?Z_ in r?r[Z_]:r.get?.call(e.draft_):void 0}(e,a,t);const i=a[t];if(e.finalized_||!G_(i))return i;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return i;if(i===BP(e.base_,t)){HP(e);const n=1===e.type_?+t:t,r=VP(e.scope_,i,e,n);return e.copy_[n]=r}return i},has:(e,t)=>t in dP(e),ownKeys:e=>Reflect.ownKeys(dP(e)),set(e,t,n){const r=UP(dP(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=BP(dP(e),t),a=r?.[q_];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||nP(e.base_,t,e.type_)))return!0;HP(e),zP(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(K_(n)){const a=n[q_];MP(a,r)&&a.callbacks_.push(function(){HP(e);const r=pP(a);RP(e,n,r,t)})}else G_(n)&&e.callbacks_.push(function(){const a=dP(e);3===e.type_?a.has(n)&&DP(n,r.handledSet_,r):rP(a,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&DP(rP(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(HP(e),void 0!==BP(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),zP(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=dP(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Q_]:!0,[$_]:1!==e.type_||"length"!==t,[W_]:r[W_],[Z_]:n[t]}:r},defineProperty(){B_(11)},getPrototypeOf:e=>z_(e.base_),setPrototypeOf(){B_(12)}},qP={};for(let tae in FP){let e=FP[tae];qP[tae]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function BP(e,t){const n=e[q_];return(n?dP(n):e)[t]}function UP(e,t){if(!(t in e))return;let n=z_(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=z_(n)}}function zP(e){e.modified_||(e.modified_=!0,e.parent_&&zP(e.parent_))}function HP(e){e.copy_||(e.assigned_=new Map,e.copy_=hP(e.base_,e.scope_.immer_.useStrictShallowCopy_))}qP.deleteProperty=function(e,t){return qP.set.call(this,e,t,void 0)},qP.set=function(e,t,n){return FP.set.call(this,e[0],t,n,e[0])};function VP(e,t,n,r){const[a,i]=sP(t)?wP(yP).proxyMap_(t,n):oP(t)?wP(yP).proxySet_(t,n):function(e,t){const n=iP(e),r={type_:n?1:0,scope_:t?t.scope_:NP(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=FP;n&&(a=[r],i=qP);const{revoke:s,proxy:o}=Proxy.revocable(a,i);return r.draft_=o,r.revoke_=s,[o,r]}(t,n);return(n?.scope_??NP()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const a=t;if(!a||!MP(a,r))return;r.mapSetPlugin_?.fixSetContents(a);const i=pP(a);RP(e,a.draft_??a,i,n),LP(a,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),a}function $P(e){return K_(e)||B_(10),WP(e)}function WP(e){if(!G_(e)||gP(e))return e;const t=e[q_];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hP(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=hP(e,!0);return eP(n,(e,t)=>{aP(n,e,WP(t))},r),t&&(t.finalized_=!1),n}var QP=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(cP(e)&&!cP(t)){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,e=>t.call(this,e,...a))}}let r;if(cP(t)||B_(6),void 0===n||cP(n)||B_(7),G_(e)){const a=AP(this),i=VP(a,e,void 0);let s=!0;try{r=t(i),s=!1}finally{s?SP(a):EP(a)}return kP(a,n),_P(r,a)}if(!e||!lP(e)){if(r=t(e),void 0===r&&(r=e),r===D_&&(r=void 0),this.autoFreeze_&&mP(r,!0),n){const t=[],a=[];wP(xP).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:a}),n(t,a)}return r}B_(1)},this.produceWithPatches=(e,t)=>{if(cP(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;const a=this.produce(e,t,(e,t)=>{n=e,r=t});return[a,n,r]},uP(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),uP(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),uP(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){G_(e)||B_(8),K_(e)&&(e=$P(e));const t=AP(this),n=VP(t,e,void 0);return n[q_].isManual_=!0,EP(t),n}finishDraft(e,t){const n=e&&e[q_];n&&n.isManual_||B_(9);const{scope_:r}=n;return kP(r,t),_P(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>
631-1&&(t=t.slice(n+1));const r=wP(xP).applyPatches_;return K_(e)?r(e,t):this.produce(e,e=>r(e,t))}},ZP=QP.produce;function KP(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var GP=KP(),YP=KP,JP="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?R_:R_.apply(null,arguments)};function XP(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(QI(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>L_(t)&&t.type===e,n}var eI=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function tI(e){return G_(e)?ZP(e,()=>{}):e}function nI(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var rI="RTK_autoBatch",aI=()=>e=>({payload:e,meta:{[rI]:!0}}),iI=e=>t=>{setTimeout(t,e)},sI=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,i=!1,s=!1;const o=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:iI(10):"callback"===e.type?e.queueNotification:iI(e.timeout),c=()=>{s=!1,i&&(i=!1,o.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>a&&e());return o.add(e),()=>{t(),o.delete(e)}},dispatch(e){try{return a=!e?.meta?.[rI],i=!a,i&&(s||(s=!0,l(c))),r.dispatch(e)}finally{a=!0}}})};function oI(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let i=new eI;return t&&(function(e){return"boolean"==typeof e}(t)?i.push(GP):i.push(YP(t.extraArgument))),i},{reducer:n,middleware:r,devTools:a=!0,preloadedState:i,enhancers:s}=e||{};let o,l;if("function"==typeof n)o=n;else{if(!I_(n))throw new Error(QI(1));o=T_(n)}l="function"==typeof r?r(t):t();let c=R_;a&&(c=JP({trace:!1,..."object"==typeof a&&a}));const u=function(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(A_(15))};const s={getState:a.getState,dispatch:(e,...t)=>i(e,...t)},o=e.map(e=>e(s));return i=R_(...o)(a.dispatch),{...a,dispatch:i}}}(...l),d=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new eI(e);return n&&r.push(sI("object"==typeof n?n:void 0)),r})(u);return M_(o,i,c(..."function"==typeof s?s(d):d()))}function lI(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(QI(28));if(r in t)throw new Error(QI(29));return t[r]=n,a},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),a),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}var cI=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},uI=Symbol.for("rtk-slice-createasyncthunk");function dI(e,t){return`${e}/${t}`}function pI({creators:e}={}){const t=e?.asyncThunk?.[uI];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(QI(11));const a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(a),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},o={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(QI(12));if(n in s.sliceCaseReducersByType)throw new Error(QI(13));return s.sliceCaseReducersByType[n]=t,o},addMatcher:(e,t)=>(s.sliceMatchers.push({matcher:e,reducer:t}),o),exposeAction:(e,t)=>(s.actionCreators[e]=t,o),exposeCaseReducer:(e,t)=>(s.sliceCaseReducersByName[e]=t,o)};function l(){const[t={},n=[],r]="function"==typeof e.extraReducers?lI(e.extraReducers):[e.extraReducers],a={...t,...s.sliceCaseReducersByType};return function(e,t){let n,[r,a,i]=lI(t);if(function(e){return"function"==typeof e}(e))n=()=>tI(e());else{const t=tI(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...a.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===s.filter(e=>!!e).length&&(s=[i]),s.reduce((e,n)=>{if(n){if(K_(e)){const r=n(e,t);return void 0===r?e:r}if(G_(e))return ZP(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return s.getInitialState=n,s}(e.initialState,e=>{for(let t in a)e.addCase(t,a[t]);for(let t of s.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}i.forEach(r=>{const i=a[r],s={reducerName:r,type:dI(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(QI(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?XP(e,s):XP(e))}(s,i,o):function({type:e,reducerName:t},n,r,a){if(!a)throw new Error(QI(18));const{payloadCreator:i,fulfilled:s,pending:o,rejected:l,settled:c,options:u}=n,d=a(e,i,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s);o&&r.addCase(d.pending,o);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);
631r.exposeCaseReducer(t,{fulfilled:s||fI,pending:o||fI,rejected:l||fI,settled:c||fI})}(s,i,o,t)});const c=e=>e,u=new Map,d=new WeakMap;let p;function h(e,t){return p||(p=l()),p(e,t)}function m(){return p||(p=l()),p.getInitialState()}function f(t,n=!1){function r(e){let a=e[t];return void 0===a&&n&&(a=nI(d,r,m)),a}function a(t=c){const r=nI(u,n,()=>new WeakMap);return nI(r,t,()=>{const r={};for(const[a,i]of Object.entries(e.selectors??{}))r[a]=hI(i,t,()=>nI(d,t,m),n);return r})}return{reducerPath:t,getSelectors:a,get selectors(){return a(r)},selectSlice:r}}const g={name:n,reducer:h,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:m,...f(r),injectInto(e,{reducerPath:t,...n}={}){const a=t??r;return e.inject({reducerPath:a,reducer:h},n),{...g,...f(a,!0)}}};return g}}function hI(e,t,n,r){function a(a,...i){let s=t(a);return void 0===s&&r&&(s=n()),e(s,...i)}return a.unwrapped=e,a}var mI=pI();function fI(){}var gI="listener",yI="completed",xI="cancelled",bI=`task-${xI}`,vI=`task-${yI}`,wI=`${gI}-${xI}`,jI=`${gI}-${yI}`,CI=class{constructor(e){this.code=e,this.message=`task ${xI} (reason: ${e})`}name="TaskAbortError";message},NI=(e,t)=>{if("function"!=typeof e)throw new TypeError(QI(32))},kI=()=>{},SI=(e,t=kI)=>(e.catch(t),e),EI=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),AI=e=>{if(e.aborted)throw new CI(e.reason)};function OI(e,t){let n=kI;return new Promise((r,a)=>{const i=()=>a(new CI(e.reason));e.aborted?i():(n=EI(e,i),t.finally(()=>n()).then(r,a))}).finally(()=>{n=kI})}var _I=e=>t=>SI(OI(e,t).then(t=>(AI(e),t))),PI=e=>{const t=_I(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:II}=Object,MI={},TI="listenerMiddleware",RI=(e,t)=>(n,r)=>{NI(n);const a=new AbortController;var i;i=a,EI(e,()=>i.abort(e.reason));const s=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof CI?"cancelled":"rejected",error:n}}finally{t?.()}})(async()=>{AI(e),AI(a.signal);const t=await n({pause:_I(a.signal),delay:PI(a.signal),signal:a.signal});return AI(a.signal),t},()=>a.abort(vI));return r?.autoJoin&&t.push(s.catch(kI)),{result:_I(e)(s),cancel(){a.abort(bI)}}},LI=(e,t)=>(n,r)=>SI((async(n,r)=>{AI(t);let a=()=>{};const i=[new Promise((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});a=()=>{i(),r()}})];null!=r&&i.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await OI(t,Promise.race(i));return AI(t),e}finally{a()}})(n,r)),DI=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=XP(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(QI(21));return NI(i),{predicate:a,type:t,effect:i}},FI=II(e=>{const{type:t,predicate:n,effect:r}=DI(e);return{id:cI(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(QI(22))}}},{withTypes:()=>FI}),qI=(e,t)=>{const{type:n,effect:r,predicate:a}=DI(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===a)&&e.effect===r)},BI=e=>{e.pending.forEach(e=>{e.abort(wI)})},UI=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},zI=II(XP(`${TI}/add`),{withTypes:()=>zI}),HI=XP(`${TI}/removeAll`),VI=II(XP(`${TI}/remove`),{withTypes:()=>VI}),$I=(...e)=>{},WI=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:a=$I}=e;NI(a);const i=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&BI(e)}))(qI(t,e)??FI(e));II(i,{withTypes:()=>i});const s=e=>{const n=qI(t,e);return n&&(n.unsubscribe(),e.cancelActive&&BI(n)),!!n};II(s,{withTypes:()=>s});const o=async(e,s,o,l)=>{const c=new AbortController,u=LI(i,c.signal),d=[];try{e.pending.add(c),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(s,II({},o,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:PI(c.signal),pause:_I(c.signal),extra:r,signal:c.signal,fork:RI(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(e.abort(wI),n.delete(e))})},cancel:()=>{c.abort(wI),e.pending.delete(c)},throwIfCancelled:()=>{AI(c.signal)}})))}catch(p){p instanceof CI||UI(a,p,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(jI),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(c)}},l=((e,t)=>()=>{for(const e of t.keys())BI(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!L_(r))return n(r);if(zI.match(r))return i(r.payload);if(HI.match(r))return void l();if(VI.match(r))return s(r.payload);let c=e.getState();const u=()=>{if(c===MI)throw new Error(QI(23));return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),i=Array.from(t.values());for(const t of i){let i=!1;try{i=t.predicate(r,n,c)}
vendor: 5,339 bytes, line 631
631catch(p){i=!1,UI(a,p,{raisedBy:"predicate"})}i&&o(t,r,e,u)}}}finally{c=MI}return d},startListening:i,stopListening:s,clearListeners:l}};function QI(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ZI=mI({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,i;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(a=t.payload.bottom)&&void 0!==a?a:0,e.margin.left=null!==(i=t.payload.left)&&void 0!==i?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:KI,setLayout:GI,setChartSize:YI,setScale:JI}=ZI.actions,XI=ZI.reducer;function eM(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function tM(e){return Number.isFinite(e)}function nM(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function rM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rM(Object(n),!0).forEach(function(t){iM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sM(e,t,n){return qE(e)||qE(t)?n:ME(t)?SE(e,t,n):"function"==typeof t?t(e):n}var oM=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,lM=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var a,i,s=e.map(e=>(e.coordinate===t&&(a=!0),e.coordinate===n&&(i=!0),e.coordinate));return a||s.push(t),i||s.push(n),s},cM=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:a,range:i,scale:s,realScaleType:o,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:p,axisType:h}=e;if(!s)return null;var m="scaleBand"===o&&s.bandwidth?s.bandwidth()/2:2,f="category"===a&&s.bandwidth?s.bandwidth()/m:0;if(f="angleAxis"===h&&i&&i.length>=2?2*OE(i[0]-i[1])*f:f,d||p){var g=(d||p||[]).map((e,t)=>{var n=r?r.indexOf(e):e,a=s.map(n);return tM(a)?{coordinate:a+f,value:e,offset:f,index:t}:null}).filter(UE);return g}return l&&c?c.map((e,t)=>{var n=s.map(e);return tM(n)?{coordinate:n+f,value:e,index:t,offset:f}:null}).filter(UE):s.ticks&&null!=u?s.ticks(u).map((e,t)=>{var n=s.map(e);return tM(n)?{coordinate:n+f,value:e,index:t,offset:f}:null}).filter(UE):s.domain().map((e,t)=>{var n=s.map(e);return tM(n)?{coordinate:n+f,value:r?r[e]:e,index:t,offset:f}:null}).filter(UE)},uM={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0,o=0;o<n;++o){var l=e[o],c=null==l?void 0:l[a];if(null!=c){var u=c[1],d=c[0],p=_E(u)?d:u;p>=0?(c[0]=i,i+=p,c[1]=i):(c[0]=s,s+=p,c[1]=s)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,a,i=0,s=e[0].length;i<s;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}tE(e,t)}},none:tE,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,a=e[t[0]],i=a.length;r<i;++r){for(var s=0,o=0;s<n;++s)o+=e[s][r][1]||0;a[r][1]+=a[r][0]=-o/2}tE(e,t)}},wiggle:function(e,t){if((a=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,a,i=0,s=1;s<r;++s){for(var o=0,l=0,c=0;o<a;++o){for(var u=e[t[o]],d=u[s][1]||0,p=(d-(u[s-1][1]||0))/2,h=0;h<o;++h){var m=e[t[h]];p+=(m[s][1]||0)-(m[s-1][1]||0)}l+=d,c+=p*d}n[s-1][1]+=n[s-1][0]=i,l&&(i-=c/l)}n[s-1][1]+=n[s-1][0]=i,tE(e,t)}},positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0;s<n;++s){var o=e[s],l=null==o?void 0:o[a];if(null!=l){var c=_E(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}}},dM=(e,t,n)=>{var r,a=null!==(r=uM[n])&&void 0!==r?r:tE,i=function(){var e=tS([]),t=nE,n=tE,r=rE;function a(a){var i,s,o=Array.from(e.apply(this,arguments),aE),l=o.length,c=-1;for(const e of a)for(i=0,++c;i<l;++i)(o[i][c]=[0,+r(e,o[i].key,c,a)]).data=e;for(i=0,s=mS(t(o));i<l;++i)o[s[i]].index=i;return n(o,s),o}return a.keys=function(t){return arguments.length?(e="function"==typeof t?t:tS(Array.from(t)),a):e},a.value=function(e){return arguments.length?(r="function"==typeof e?e:tS(+e),a):r},a.order=function(e){return arguments.length?(t=null==e?nE:"function"==typeof e?e:tS(Array.from(e)),a):t},a.offset=function(e){return arguments.length?(n=null==e?tE:e,a):n},a}().keys(t).value((e,t)=>Number(sM(e,t,0))).order(nE).offset(a),s=i(e);
631return s.forEach((n,r)=>{n.forEach((n,a)=>{var i=sM(e[a],t[r],0);Array.isArray(i)&&2===i.length&&IE(i[0])&&IE(i[1])&&(n[0]=i[0],n[1]=i[1])})}),s};var pM=e=>{var{axis:t,ticks:n,offset:r,bandSize:a,entry:i,index:s}=e;if("category"===t.type)return n[s]?n[s].coordinate+r:null;var o=sM(i,t.dataKey,t.scale.domain()[s]);if(qE(o))return null;var l=t.scale.map(o);return IE(l)?l-a/2+r:null},hM=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,a)=>{var i=e[a];if(!i)return r;var{stackedData:s}=i,o=s.reduce((e,r)=>{var a,i=eM(r,t,n),s=(a=i.flat(2).filter(IE),[Math.min(...a),Math.max(...a)]);return tM(s[0])&&tM(s[1])?[Math.min(e[0],s[0]),Math.max(e[1],s[1])]:e},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},mM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gM=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=S_(t,e=>e.coordinate),i=1/0,s=1,o=a.length;s<o;s++){var l=a[s],c=a[s-1];i=Math.min(((null==l?void 0:l.coordinate)||0)-((null==c?void 0:c.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function yM(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:a,name:i}=e;return aM(aM({},t),{},{dataKey:n,payload:r,value:a,name:i})}function xM(e,t){return e?String(e):"string"==typeof t?t:void 0}var bM=e=>e.layout.width,vM=e=>e.layout.height,wM=e=>e.layout.scale,jM=e=>e.layout.margin,CM=t_(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),NM=t_(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function kM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kM(Object(n),!0).forEach(function(t){EM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AM,OM,_M,PM,IM,MM=t_([bM,vM,jM,e=>e.brush.height,function(e){return NM(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return NM(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return CM(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return CM(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},E_,e=>e.legend.size],(e,t,n,r,a,i,s,o,l,c)=>{var u={left:(n.left||0)+a,right:(n.right||0)+i},d=SM(SM({},{top:(n.top||0)+s,bottom:(n.bottom||0)+o}),u),p=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:a}=n,{align:i,verticalAlign:s,layout:o}=t;if(("vertical"===o||"horizontal"===o&&"middle"===s)&&"center"!==i&&IE(e[i]))return aM(aM({},e),{},{[i]:e[i]+(r||0)});if(("horizontal"===o||"vertical"===o&&"center"===i)&&"middle"!==s&&IE(e[s]))return aM(aM({},e),{},{[s]:e[s]+(a||0)})}return e})(d,l,c);var h=e-d.left-d.right,m=t-d.top-d.bottom;return SM(SM({brushBottom:p},d),{},{width:Math.max(h,0),height:Math.max(m,0)})}),TM=t_(MM,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),RM=t_(bM,vM,(e,t)=>({x:0,y:0,width:e,height:t})),LM=t.createContext(null),DM=()=>null!=t.useContext(LM),FM=e=>e.brush,qM=t_([FM,MM,jM],(e,t,n)=>({height:e.height,x:IE(e.x)?e.x:t.left,y:IE(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:IE(e.width)?e.width:t.width})),BM={},UM={},zM={};function HM(){return AM||(AM=1,e=zM,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let a,i=null;const s=null!=r&&r.includes("leading"),o=null==r||r.includes("trailing"),l=()=>{null!==i&&(e.apply(a,i),a=void 0,i=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,o&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),a=void 0,i=null},p=function(...e){if(n?.aborted)return;a=this,i=e;const t=null==c;u(),s&&t&&l()};return p.schedule=u,p.cancel=d,p.flush=()=>
631{l()},n?.addEventListener("abort",d,{once:!0}),p}),zM;var e}function VM(){return OM||(OM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HM();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:a=!1,trailing:i=!0,maxWait:s}=r,o=Array(2);let l;a&&(o[0]="leading"),i&&(o[1]="trailing");let c=null;const u=t.debounce(function(...t){l=e.apply(this,t),c=null},n,{edges:o}),d=function(...t){return null!=s&&(null===c&&(c=Date.now()),Date.now()-c>=s)?(l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,t),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}(UM)),UM}function $M(){return _M||(_M=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VM();e.throttle=function(e,n=0,r={}){const{leading:a=!0,trailing:i=!0}=r;return t.debounce(e,n,{leading:a,maxWait:n,trailing:i})}}(BM)),BM}function WM(){return IM?PM:(IM=1,PM=$M().throttle)}const QM=j(WM());var ZM=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];if("undefined"!=typeof console&&console.warn&&!e)if(void 0===t);else;},KM={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},GM=(e,t,n)=>{var{width:r=KM.width,height:a=KM.height,aspect:i,maxHeight:s}=n,o=PE(r)?e:Number(r),l=PE(a)?t:Number(a);return i&&i>0&&(o?l=o/i:l&&(o=l*i),s&&null!=l&&l>s&&(l=s)),{calculatedWidth:o,calculatedHeight:l}},YM={width:0,height:0,overflow:"visible"},JM={width:0,overflowX:"visible"},XM={height:0,overflowY:"visible"},eT={},tT=e=>{var{width:t,height:n}=e,r=PE(t),a=PE(n);return r&&a?YM:r?JM:a?XM:eT};function nT(){return nT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nT.apply(null,arguments)}function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rT(Object(n),!0).forEach(function(t){iT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sT=t.createContext(KM.initialDimension);function oT(e){var{children:n,width:r,height:a}=e,i=t.useMemo(()=>({width:r,height:a}),[r,a]);return function(e){return nM(e.width)&&nM(e.height)}(i)?t.createElement(sT.Provider,{value:i},n):null}var lT=()=>t.useContext(sT),cT=t.forwardRef((e,n)=>{var{aspect:r,initialDimension:a=KM.initialDimension,width:i,height:s,minWidth:o=KM.minWidth,minHeight:l,maxHeight:c,children:u,debounce:d=KM.debounce,id:p,className:h,onResize:m,style:f={}}=e,g=t.useRef(null),y=t.useRef();y.current=m,t.useImperativeHandle(n,()=>g.current);var[x,b]=t.useState({containerWidth:a.width,containerHeight:a.height}),v=t.useCallback((e,t)=>{b(n=>{var r=Math.round(e),a=Math.round(t);return n.containerWidth===r&&n.containerHeight===a?n:{containerWidth:r,containerHeight:a}})},[]);t.useEffect(()=>{if(null==g.current||"undefined"==typeof ResizeObserver)return zE;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:a}=n.contentRect;v(r,a),null===(t=y.current)||void 0===t||t.call(y,r,a)}};d>0&&(e=QM(e,d,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=g.current.getBoundingClientRect();return v(n,r),t.observe(g.current),()=>{t.disconnect()}},[v,d]);var{containerWidth:w,containerHeight:j}=x;ZM(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:C,calculatedHeight:N}=GM(w,j,{width:i,height:s,aspect:r,maxHeight:c});return ZM(null!=C&&C>0||null!=N&&N>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",C,N,i,s,o,l,r),t.createElement("div",{id:p?"".concat(p):void 0,className:de("recharts-responsive-container",h),style:aT(aT({},f),{},{width:i,height:s,minWidth:o,minHeight:l,maxHeight:c}),ref:g},t.createElement("div",{style:tT({width:i,height:s})},t.createElement(oT,{width:C,height:N},u)))}
631),uT=t.forwardRef((e,n)=>{var r=lT();if(nM(r.width)&&nM(r.height))return e.children;var{width:a,height:i}=function(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return void 0===a&&void 0===i?(a=KM.width,i=KM.height):void 0===a?a=r&&r>0?void 0:KM.width:void 0===i&&(i=r&&r>0?void 0:KM.height),{width:a,height:i}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:s,calculatedHeight:o}=GM(void 0,void 0,{width:a,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return IE(s)&&IE(o)?t.createElement(oT,{width:s,height:o},e.children):t.createElement(cT,nT({},e,{width:a,height:i,ref:n}))});function dT(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var pT=()=>{var e,t=DM(),n=QO(TM),r=QO(qM),a=null===(e=QO(FM))||void 0===e?void 0:e.padding;return t&&r&&a?{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}:n},hT={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mT=()=>{var e;return null!==(e=QO(MM))&&void 0!==e?e:hT},fT=()=>QO(bM),gT=()=>QO(vM),yT=e=>e.layout.layoutType,xT=()=>QO(yT),bT=()=>{var e=xT();if("horizontal"===e||"vertical"===e)return e},vT=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},wT=e=>{var n=HO(),r=DM(),{width:a,height:i}=e,s=lT(),o=a,l=i;return s&&(o=s.width>0?s.width:a,l=s.height>0?s.height:i),t.useEffect(()=>{!r&&nM(o)&&nM(l)&&n(YI({width:o,height:l}))},[n,r,o,l]),null},jT=Symbol.for("immer-nothing"),CT=Symbol.for("immer-draftable"),NT=Symbol.for("immer-state");function kT(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ST=Object.getPrototypeOf;function ET(e){return!!e&&!!e[NT]}function AT(e){return!!e&&(PT(e)||Array.isArray(e)||!!e[CT]||!!e.constructor?.[CT]||LT(e)||DT(e))}var OT=Object.prototype.constructor.toString(),_T=new WeakMap;function PT(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=_T.get(n);return void 0===r&&(r=Function.toString.call(n),_T.set(n,r)),r===OT}function IT(e,t,n=!0){if(0===MT(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function MT(e){const t=e[NT];return t?t.type_:Array.isArray(e)?1:LT(e)?2:DT(e)?3:0}function TT(e,t){return 2===MT(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function RT(e,t,n){const r=MT(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function LT(e){return e instanceof Map}function DT(e){return e instanceof Set}function FT(e){return e.copy_||e.base_}function qT(e,t){if(LT(e))return new Map(e);if(DT(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=PT(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[NT];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],i=t[a];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(ST(e),t)}{const t=ST(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function BT(e,t=!1){return zT(e)||ET(e)||!AT(e)||(MT(e)>1&&Object.defineProperties(e,{set:UT,add:UT,clear:UT,delete:UT}),Object.freeze(e),t&&Object.values(e).forEach(e=>BT(e,!0))),e}var UT={value:function(){kT(2)}};function zT(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var HT,VT={};function $T(e){const t=VT[e];return t||kT(0),t}function WT(){return HT}function QT(e,t){t&&($T("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ZT(e){KT(e),e.drafts_.forEach(YT),e.drafts_=null}function KT(e){e===HT&&(HT=e.parent_)}function GT(e){return HT={drafts_:[],parent_:HT,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function YT(e){const t=e[NT];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function JT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[NT].modified_&&(ZT(t),kT(4)),AT(e)&&(e=XT(t,e),t.parent_||tR(t,e)),t.patches_&&$T("Patches").generateReplacementPatches_(n[NT].base_,e,t.patches_,t.inversePatches_)):e=XT(t,n,[]),ZT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jT?e:void 0}function XT(e,t,n){if(zT(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[NT];if(!a)return IT(t,(r,i)=>eR(e,a,t,r,i,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return tR(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const t=a.copy_;let i=t,s=!1;3===a.type_&&(i=new Set(t),t.clear(),s=!0),IT(i,(r,i)=>eR(e,a,t,r,i,n,s),r),tR(e,t,!1),n&&e.patches_&&$T("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function eR(e,t,n,r,a,i,s){if(null==a)return;if("object"!=typeof a&&!s)return;const o=zT(a);if(!o||s){if(ET(a)){const s=XT(e,a,i&&t&&3!==t.type_&&!TT(t.assigned_,r)?i.concat(r):void 0);if(RT(n,r,s),!ET(s))return;e.canAutoFreeze_=!1}else s&&n.add(a);if(AT(a)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===a&&o)return;XT(e,a),t&&t.scope_.parent_||"symbol"==typeof r||!(LT(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||tR(e,a)}}}function tR(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BT(t,n)}var nR={get(e,t){if(t===NT)return e;const n=FT(e);if(!TT(n,t))return function(e,t,n){const r=iR(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!AT(r)?r:r===aR(e.base_,t)?(oR(e),e.copy_[t]=lR(r,e)):r},has:(e,t)=>t in FT(e),ownKeys:e=>Reflect.ownKeys(FT(e)),set(e,t,n){const r=iR(FT(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=aR(FT(e),t),a=r?.[NT];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||TT(e.base_,t)))return!0;oR(e),sR(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==aR(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,oR(e),sR(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=FT(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){kT(11)},getPrototypeOf:e=>ST(e.base_),setPrototypeOf(){kT(12)}},rR={};function aR(e,t){const n=e[NT];return(n?FT(n):e)[t]}function iR(e,t){if(!(t in e))return;let n=ST(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ST(n)}}function sR(e){e.modified_||(e.modified_=!0,e.parent_&&sR(e.parent_))}function oR(e){e.copy_||(e.copy_=qT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}IT(nR,(e,t)=>{rR[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),rR.deleteProperty=function(e,t){return rR.set.call(this,e,t,void 0)},rR.set=function(e,t,n){return nR.set.call(this,e[0],t,n,e[0])};function lR(e,t){const n=LT(e)?$T("MapSet").proxyMap_(e,t):DT(e)?$T("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:WT(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=nR;n&&(a=[r],i=rR);const{revoke:s,proxy:o}=Proxy.revocable(a,i);return r.draft_=o,r.revoke_=s,o}(e,t);return(t?t.scope_:WT()).drafts_.push(n),n}function cR(e){if(!AT(e)||zT(e))return e;const t=e[NT];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=qT(e,!0);return IT(n,(e,t)=>{RT(n,e,cR(t))},r),t&&(t.finalized_=!1),n}var uR=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,e=>t.call(this,e,...a))}}let r;if("function"!=typeof t&&kT(6),void 0!==n&&"function"!=typeof n&&kT(7),AT(e)){const a=GT(this),i=lR(e,void 0);let s=!0;try{r=t(i),s=!1}finally{s?ZT(a):KT(a)}return QT(a,n),JT(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===jT&&(r=void 0),this.autoFreeze_&&BT(r,!0),n){const t=[],a=[];$T("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}kT(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;const a=this.produce(e,t,(e,t)=>{n=e,r=t});return[a,n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){AT(e)||kT(8),ET(e)&&(e=function(e){ET(e)||kT(10);return cR(e)}(e));const t=GT(this),n=lR(e,void 0);return n[NT].isManual_=!0,KT(t),n}finishDraft(e,t){const n=e&&e[NT];n&&n.isManual_||kT(9);const{scope_:r}=n;return QT(r,t),JT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>
631-1&&(t=t.slice(n+1));const r=$T("Patches").applyPatches_;return ET(e)?r(e,t):this.produce(e,e=>r(e,t))}};uR.produce;var dR,pR,hR=mI({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:aI()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=$P(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:aI()},removeLegendPayload:{reducer(e,t){var n=$P(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:aI()}}}),{setLegendSize:mR,setLegendSettings:fR,addLegendPayload:gR,replaceLegendPayload:yR,removeLegendPayload:xR}=hR.actions,bR=hR.reducer,vR={exports:{}},wR={};pR||(pR=1,vR.exports=function(){if(dR)return wR;dR=1;var e=$(),t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,a=e.useEffect,i=e.useMemo,s=e.useDebugValue;return wR.useSyncExternalStoreWithSelector=function(e,o,l,c,u){var d=r(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=i(function(){function e(e){if(!a){if(a=!0,n=e,e=c(e),void 0!==u&&p.hasValue){var i=p.value;if(u(i,e))return r=i}return r=e}if(i=r,t(n,e))return i;var s=c(e);return void 0!==u&&u(i,s)?(n=e,i):(n=e,r=s)}var n,r,a=!1,i=void 0===l?null:l;return[function(){return e(o())},null===i?void 0:function(){return e(i())}]},[o,l,c,u]);var h=n(e,d[0],d[1]);return a(function(){p.hasValue=!0,p.value=h},[h]),s(h),h},wR}()),vR.exports;var jR={notify(){},get:()=>[]};var CR=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),NR=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),kR=(()=>CR||NR?t.useLayoutEffect:t.useEffect)();function SR(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ER(e,t){if(SR(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!SR(e[n[a]],t[n[a]]))return!1;return!0}var AR=Symbol.for("react-redux-context"),OR="undefined"!=typeof globalThis?globalThis:{};function _R(){if(!t.createContext)return{};const e=OR[AR]??=new Map;let n=e.get(t.createContext);return n||(n=t.createContext(null),e.set(t.createContext,n)),n}var PR=_R();var IR=function(e){const{children:n,context:r,serverState:a,store:i}=e,s=t.useMemo(()=>{const e=function(e){let t,n=jR,r=0,a=!1;function i(){l.onStateChange&&l.onStateChange()}function s(){r++,t||(t=e.subscribe(i),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){var t;t=()=>{let t=e;for(;t;)t.callback(),t=t.next},t()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){r&&null!==e&&(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}())}function o(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=jR)}const l={addNestedSub:function(e){s();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),o())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:i,isSubscribed:function(){return a},trySubscribe:function(){a||(a=!0,s())},tryUnsubscribe:function(){a&&(a=!1,o())},getListeners:()=>n};return l}(i);return{store:i,subscription:e,getServerState:a?()=>a:void 0}},[i,a]),o=t.useMemo(()=>i.getState(),[i]);kR(()=>{const{subscription:e}=s;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[s,o]);const l=r||PR;return t.createElement(l.Provider,{value:s},n)},MR=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function TR(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function RR(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(MR.has(r)){if(null==e[r]&&null==t[r])continue;if(!ER(e[r],t[r]))return!1}else if(!TR(e[r],t[r]))return!1;return!0}function LR(){return LR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LR.apply(null,arguments)}function DR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?DR(Object(n),!0).forEach(function(t){qR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qR(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BR(e){return Array.isArray(e)&&ME(e[0])&&ME(e[1])?e.join(" ~ "):e}var UR={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};var zR=e=>{var{separator:n=UR.separator,contentStyle:r,itemStyle:a,labelStyle:i=UR.labelStyle,payload:s,formatter:o,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:p,accessibilityLayer:h=UR.accessibilityLayer}=e,m=FR(FR({},UR.contentStyle),r),f=FR({margin:0},i),g=!qE(d),y=g?d:"",x=de("recharts-default-tooltip",c),b=de("recharts-tooltip-label",u);g&&p&&null!=s&&(y=p(d,s));var v=h?{role:"status","aria-live":"assertive"}:{};return t.createElement("div",LR({className:x,style:m},v),t.createElement("p",{className:b,style:f},t.isValidElement(y)?y:"".concat(y)),(()=>{if(s&&s.length){var e=function(e,t){return null==t?e:S_(e,t)}(s,l),r=e.map((e,r)=>{if("none"===e.type)return null;var i=e.formatter||o||BR,{value:l,name:c}=e,u=l,d=c;if(i){var p=i(l,c,e,r,s);if(Array.isArray(p))[u,d]=p;else{if(null==p)return null;u=p}}var h=FR(FR({},UR.itemStyle),{},{color:e.color||UR.itemStyle.color},a);return t.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:h},ME(d)?t.createElement("span",{className:"recharts-tooltip-item-name"},d):null,ME(d)?t.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,t.createElement("span",{className:"recharts-tooltip-item-value"},u),t.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return t.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},r)}return null})())},HR="recharts-tooltip-wrapper",VR={visibility:"hidden"};function $R(e){var{coordinate:t,translateX:n,translateY:r}=e;return de(HR,{["".concat(HR,"-right")]:IE(n)&&t&&IE(t.x)&&n>=t.x,["".concat(HR,"-left")]:IE(n)&&t&&IE(t.x)&&n<t.x,["".concat(HR,"-bottom")]:IE(r)&&t&&IE(t.y)&&r>=t.y,["".concat(HR,"-top")]:IE(r)&&t&&IE(t.y)&&r<t.y})}function WR(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:a,position:i,reverseDirection:s,tooltipDimension:o,viewBox:l,viewBoxDimension:c}=e;if(i&&IE(i[r]))return i[r];var u=n[r]-o-(a>0?a:0),d=n[r]+a;if(t[r])return s[r]?u:d;var p=l[r];return null==p?0:s[r]?u<p?Math.max(d,p):Math.max(u,p):null==c?0:d+o>p+c?Math.max(u,p):Math.max(d,p)}var QR=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function ZR(){var[e,n]=t.useState(()=>!QR&&(!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches));return t.useEffect(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),e}function KR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KR(Object(n),!0).forEach(function(t){YR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YR(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JR(e){if(!e.prefersReducedMotion||"auto"!==e.isAnimationActive)return e.isAnimationActive&&e.active?"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing):void 0}function XR(e){var n,r,a,i,s,o,l=ZR(),[c,u]=t.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));t.useEffect(()=>{var t=t=>{var n,r,a,i;"Escape"===t.key&&u({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(a=null===(i=e.coordinate)||void 0===i?void 0:i.y)&&void 0!==a?a:0}})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null===(n=e.coordinate)||void 0===n?void 0:n.x,null===(r=e.coordinate)||void 0===r?void 0:r.y]),!c.dismissed||(null!==(a=null===(i=e.coordinate)||void 0===i?void 0:i.x)&&void 0!==a?a:0)===c.dismissedAtCoordinate.x&&(null!==(s=null===(o=e.coordinate)||void 0===o?void 0:o.y)&&void 0!==s?s:0)===c.dismissedAtCoordinate.y||u(GR(GR({},c),{},{dismissed:!1}));
631var{cssClasses:d,cssProperties:p}=function(e){var t,n,r,{allowEscapeViewBox:a,coordinate:i,offsetTop:s,offsetLeft:o,position:l,reverseDirection:c,tooltipBox:u,useTranslate3d:d,viewBox:p}=e;return t=u.height>0&&u.width>0&&i?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=WR({allowEscapeViewBox:a,coordinate:i,key:"x",offset:o,position:l,reverseDirection:c,tooltipDimension:u.width,viewBox:p,viewBoxDimension:p.width}),translateY:r=WR({allowEscapeViewBox:a,coordinate:i,key:"y",offset:s,position:l,reverseDirection:c,tooltipDimension:u.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:d}):VR,{cssProperties:t,cssClasses:$R({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),h=e.hasPortalFromProps?{}:GR(GR({transition:JR({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},p),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),m=GR(GR({},h),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return t.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:m,ref:e.innerRef},e.children)}var eL=t.memo(XR),tL=()=>{var e;return null===(e=QO(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function nL(){return nL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nL.apply(null,arguments)}function rL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rL(Object(n),!0).forEach(function(t){iL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sL={curveBasisClosed:function(e){return new zS(e)},curveBasisOpen:function(e){return new HS(e)},curveBasis:function(e){return new US(e)},curveBumpX:function(e){return new wS(e,!0)},curveBumpY:function(e){return new wS(e,!1)},curveLinearClosed:function(e){return new VS(e)},curveLinear:gS,curveMonotoneX:function(e){return new KS(e)},curveMonotoneY:function(e){return new GS(e)},curveNatural:function(e){return new JS(e)},curveStep:function(e){return new eE(e,.5)},curveStepAfter:function(e){return new eE(e,1)},curveStepBefore:function(e){return new eE(e,0)}},oL=e=>tM(e.x)&&tM(e.y),lL=e=>null!=e.base&&oL(e.base)&&oL(e),cL=e=>e.x,uL=e=>e.y,dL={connectNulls:!1,type:"linear"},pL=e=>{var{type:t=dL.type,points:n=[],baseLine:r,layout:a,connectNulls:i=dL.connectNulls}=e,s=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(BE(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=sL["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return sL[n]||gS})(t,a),o=i?n.filter(oL):n;if(Array.isArray(r)){var l,c=n.map((e,t)=>aL(aL({},e),{},{base:r[t]}));return l="vertical"===a?vS().y(uL).x1(cL).x0(e=>
631e.base.x):vS().x(cL).y1(uL).y0(e=>e.base.y),l.defined(lL).curve(s)(i?c.filter(lL):c)}return("vertical"===a&&IE(r)?vS().y(uL).x1(cL).x0(r):IE(r)?vS().x(cL).y1(uL).y0(r):bS().x(cL).y(uL)).defined(oL).curve(s)(o)},hL=e=>{var{className:n,points:r,path:a,pathRef:i}=e,s=xT();if(!(r&&r.length||a))return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||s,connectNulls:e.connectNulls},l=r&&r.length?pL(o):a;return t.createElement("path",nL({},$k(e),(e=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(t.isValidElement(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{Uk(e)&&"function"==typeof n[e]&&(r[e]=t=>n[e](n,t))}),r})(e),{className:de("recharts-curve",n),d:null===l?void 0:l,ref:i}))},mL=["x","y","top","left","width","height","className"];function fL(){return fL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fL.apply(null,arguments)}function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xL=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),bL=e=>{var{x:n=0,y:r=0,top:a=0,left:i=0,width:s=0,height:o=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,mL),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gL(Object(n),!0).forEach(function(t){yL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:r,top:a,left:i,width:s,height:o},c);return IE(n)&&IE(r)&&IE(s)&&IE(o)&&IE(a)&&IE(i)?t.createElement("path",fL({},Qk(u),{className:de("recharts-cross",l),d:xL(n,r,s,o,a,i)})):null};function vL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vL(Object(n),!0).forEach(function(t){jL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CL=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),NL=(e,t)=>Object.keys(t).reduce((n,r)=>wL(wL({},n),{},{[r]:e(r,t[r])}),{});function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?kL(Object(n),!0).forEach(function(t){EL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AL=(e,t,n)=>e+(t-e)*n,OL=e=>{var{from:t,to:n}=e;return t!==n},_L=(e,t,n)=>{var r=NL((t,n)=>{if(OL(n)){var[r,a]=e(n.from,n.to,n.velocity);return SL(SL({},n),{},{from:r,velocity:a})}return n},t);return n<1?NL((e,t)=>OL(t)&&null!=r[e]?SL(SL({},t),{},{velocity:AL(t.velocity,r[e].velocity,n),from:AL(t.from,r[e].from,n)}):t,t):_L(e,r,n-1)};function PL(e,t,n,r,a,i){var s,o=r.reduce((n,r)=>SL(SL({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{s||(s=r);var u=(r-s)/n.dt;o=_L(n,o,u),a(SL(SL(SL({},e),t),NL((e,t)=>t.from,o))),s=r,Object.values(o).filter(OL).length&&(l=i.setTimeout(c))};return()=>(l=i.setTimeout(c),()=>{var e;null===(e=l)||void 0===e||e()})}const IL=(e,t,n,r,a,i)=>{var s,o,l=(s=e,o=t,[Object.keys(s),Object.keys(o)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==n?()=>(a(SL(SL({},e),t)),()=>{}):!0===n.isStepper?PL(e,t,n,l,a,i):function(e,t,n,r,a,i,s){var o,l=null,c=a.reduce((n,r)=>{var a=e[r],i=t[r];return null==a||null==i?n:SL(SL({},n),{},{[r]:[a,i]})},{}),u=a=>{o||(o=a);var d=(a-o)/r,p=NL((e,t)=>AL(...t,n(d)),c);if(i(SL(SL(SL({},e),t),p)),d<1)l=s.setTimeout(u);else{var h=NL((e,t)=>AL(...t,n(1)),c);i(SL(SL(SL({},e),t),h))}};return()=>(l=s.setTimeout(u),()=>{var e;null===(e=l)||void 0===e||e()})}(e,t,n,r,l,a,i)};var ML=1e-4,TL=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],RL=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),LL=(e,t)=>n=>{var r=TL(e,t);return RL(r,n)},DL=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var a=r.map(e=>parseFloat(e));return[a[0],a[1],a[2],a[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},FL=(e,t,n,r)=>{var a,i,s=LL(e,n),o=LL(t,r),l=(a=e,i=n,e=>{var t=[...TL(a,i).map((e,t)=>e*t).slice(1),0];return RL(t,e)}),c=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var a=s(n)-t,i=l(n);if(Math.abs(a-t)<ML||i<ML)return o(n);n=c(n-a/i)}return o(n)};return u.isStepper=!1,u},qL=function(){return FL(...DL(...arguments))},BL=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return qL(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,a=(e,a,i)=>{var s=i+(-(e-a)*t-i*n)*r/1e3,o=i*r/1e3+e;return Math.abs(o-a)<ML&&Math.abs(s)<ML?[a,0]:[o,s]};return a.isStepper=!0,a.dt=r,a}();default:if("cubic-bezier"===e.split("(")[0])return qL(e)}return"function"==typeof e?e:null};class UL{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,a=i=>{i-n>=t?e(i):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(a))};return r=requestAnimationFrame(a),()=>{null!=r&&cancelAnimationFrame(r)}}}function zL(){return e=new UL,t=()=>null,n=!1,r=null,a=i=>{if(!n){if(Array.isArray(i)){if(!i.length)return;var s=i,[o,...l]=s;return"number"==typeof o?void(r=e.setTimeout(a.bind(null,l),o)):(a(o),void(r=e.setTimeout(a.bind(null,l))))}"string"==typeof i&&t(i),"object"==typeof i&&t(i),"function"==typeof i&&i()}},{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),a(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e};var e,t,n,r,a}var HL=t.createContext(zL);var VL={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},$L={t:0},WL={t:1};function QL(e){var n,r,a,i=tA(e,VL),{isActive:s,canBegin:o,duration:l,easing:c,begin:u,onAnimationEnd:d,onAnimationStart:p,children:h}=i,m=ZR(),f="auto"===s?!QR&&!m:s,g=(n=i.animationId,r=i.animationManager,a=t.useContext(HL),t.useMemo(()=>null!=r?r:a(n),[n,r,a])),[y,x]=t.useState(f?$L:WL),b=t.useRef(null);return t.useEffect(()=>{f||x(WL)},[f]),t.useEffect(()=>{if(!f||!o)return zE;var e=IL($L,WL,BL(c),l,x,g.getTimeoutController());return g.start([p,u,()=>{b.current=e()},l,d]),()=>{g.stop(),b.current&&b.current(),d()}},[f,o,l,c,u,p,d,g]),h(y.t)}function ZL(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=t.useRef(RE(n)),a=t.useRef(e);return a.current!==e&&(r.current=RE(n),a.current=e),r.current}var KL,GL,YL,JL,XL,eD,tD,nD,rD,aD,iD=["radius"],sD=["radius"];function oD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 4,582 bytes, line 631
631t%2?oD(Object(n),!0).forEach(function(t){cD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uD(){return uD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uD.apply(null,arguments)}function dD(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function pD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var hD=(e,t,n,r,a)=>{var i,s=EE(n),o=EE(r),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0;if(l>0&&Array.isArray(a)){for(var p=[0,0,0,0],h=0;h<4;h++){var m,f=null!==(m=a[h])&&void 0!==m?m:0;p[h]=f>l?l:f}i=AE(KL||(KL=pD(["M",",",""])),e,t+c*p[0]),p[0]>0&&(i+=AE(GL||(GL=pD(["A ",",",",0,0,",",",",",""])),p[0],p[0],d,e+u*p[0],t)),i+=AE(YL||(YL=pD(["L ",",",""])),e+n-u*p[1],t),p[1]>0&&(i+=AE(JL||(JL=pD(["A ",",",",0,0,",",\n        ",",",""])),p[1],p[1],d,e+n,t+c*p[1])),i+=AE(XL||(XL=pD(["L ",",",""])),e+n,t+r-c*p[2]),p[2]>0&&(i+=AE(eD||(eD=pD(["A ",",",",0,0,",",\n        ",",",""])),p[2],p[2],d,e+n-u*p[2],t+r)),i+=AE(tD||(tD=pD(["L ",",",""])),e+u*p[3],t+r),p[3]>0&&(i+=AE(nD||(nD=pD(["A ",",",",0,0,",",\n        ",",",""])),p[3],p[3],d,e,t+r-c*p[3])),i+="Z"}else if(l>0&&a===+a&&a>0){var g=Math.min(l,a);i=AE(rD||(rD=pD(["M ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",",","\n            L ",",","\n            A ",",",",0,0,",",",","," Z"])),e,t+c*g,g,g,d,e+u*g,t,e+n-u*g,t,g,g,d,e+n,t+c*g,e+n,t+r-c*g,g,g,d,e+n-u*g,t+r,e+u*g,t+r,g,g,d,e,t+r-c*g)}else i=AE(aD||(aD=pD(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return i},mD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fD=e=>{var n=tA(e,mD),r=t.useRef(null),[a,i]=t.useState(-1);t.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(t){}},[]);var{x:s,y:o,width:l,height:c,radius:u,className:d}=n,{animationEasing:p,animationDuration:h,animationBegin:m,isAnimationActive:f,isUpdateAnimationActive:g}=n,y=t.useRef(l),x=t.useRef(c),b=t.useRef(s),v=t.useRef(o),w=ZL(t.useMemo(()=>({x:s,y:o,width:l,height:c,radius:u}),[s,o,l,c,u]),"rectangle-");if(s!==+s||o!==+o||l!==+l||c!==+c||0===l||0===c)return null;var j=de("recharts-rectangle",d);if(!g){var C=Qk(n),{radius:N}=C,k=dD(C,iD);return t.createElement("path",uD({},k,{x:EE(s),y:EE(o),width:EE(l),height:EE(c),radius:"number"==typeof u?u:void 0,className:j,d:hD(s,o,l,c,u)}))}var S=y.current,E=x.current,A=b.current,O=v.current,_="0px ".concat(-1===a?1:a,"px"),P="".concat(a,"px ").concat(a,"px"),I=CL(["strokeDasharray"],h,"string"==typeof p?p:mD.animationEasing);return t.createElement(QL,{animationId:w,key:w,canBegin:a>0,duration:h,easing:p,isActive:g,begin:m},e=>{var a,i=FE(S,l,e),d=FE(E,c,e),p=FE(A,s,e),h=FE(O,o,e);r.current&&(y.current=i,x.current=d,b.current=p,v.current=h),a=f?e>0?{transition:I,strokeDasharray:P}:{strokeDasharray:_}:{strokeDasharray:P};var m=Qk(n),{radius:g}=m,w=dD(m,sD);return t.createElement("path",uD({},w,{radius:"number"==typeof u?u:void 0,className:j,d:hD(p,h,i,d,u),ref:r,style:lD(lD({},a),n.style)}))})};function gD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?gD(Object(n),!0).forEach(function(t){xD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bD,vD,wD,jD,CD,ND,kD,SD=Math.PI/180,ED=e=>180*e/Math.PI,AD=(e,t,n,r)=>({x:e+Math.cos(-SD*r)*n,y:t+Math.sin(-SD*r)*n}),OD=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=((e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)})({x:n,y:r},{x:a,y:i});if(s<=0)return{radius:s,angle:0};var o=(n-a)/s,l=Math.acos(o);return r>i&&(l=2*Math.PI-l),{radius:s,angle:ED(l),angleInRadian:l}},_D=(e,t)=>{var{startAngle:n,endAngle:r}=t,a=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(a,i)},PD=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=OD({x:n,y:r},t),{innerRadius:s,outerRadius:o}=t;if(a<s||a>o)return null;if(0===a)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-360*i,endAngle:n-360*i}})(t),d=i;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;l=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;l=d>=u&&d<=c}return l?yD(yD({},t),{},{radius:a,angle:_D(d,t)}):null};function ID(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e;return{points:[AD(t,n,r,a),AD(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function MD(){return MD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MD.apply(null,arguments)}function TD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var RD=e=>{var{cx:t,cy:n,radius:r,angle:a,sign:i,isExternal:s,cornerRadius:o,cornerIsExternal:l}=e,c=o*(s?1:-1)+r,u=Math.asin(o/c)/SD,d=l?a:a+i*u,p=l?a-i*u:a;return{center:AD(t,n,c,d),circleTangency:AD(t,n,r,d),lineTangency:AD(t,n,c*Math.cos(u*SD),p),theta:u}},LD=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,o=((e,t)=>OE(t-e)*Math.min(Math.abs(t-e),359.999))(i,s),l=i+o,c=AD(t,n,a,i),u=AD(t,n,a,l),d=AE(bD||(bD=TD(["M ",",","\n    A ",",",",0,\n    ",",",",\n    ",",","\n  "])),c.x,c.y,a,a,+(Math.abs(o)>180),+(i>l),u.x,u.y);if(r>0){var p=AD(t,n,r,i),h=AD(t,n,r,l);d+=AE(vD||(vD=TD(["L ",",","\n            A ",",",",0,\n            ",",",",\n            ",","," Z"])),h.x,h.y,r,r,+(Math.abs(o)>180),+(i<=l),p.x,p.y)}else d+=AE(wD||(wD=TD(["L ",","," Z"])),t,n);return d},DD={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},FD=e=>{var n=tA(e,DD),{cx:r,cy:a,innerRadius:i,outerRadius:s,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:p}=n;if(s<i||u===d)return null;var h,m=de("recharts-sector",p),f=s-i,g=LE(o,f,0,!0);return h=g>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:o,startAngle:l,endAngle:c}=e,u=OE(c-l),{circleTangency:d,lineTangency:p,theta:h}=RD({cx:t,cy:n,radius:a,angle:l,sign:u,cornerRadius:i,cornerIsExternal:o}),{circleTangency:m,lineTangency:f,theta:g}=RD({cx:t,cy:n,radius:a,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:o}),y=o?Math.abs(l-c):Math.abs(l-c)-h-g;if(y<0)return s?AE(jD||(jD=TD(["M ",",","\n        a",",",",0,0,1,",",0\n        a",",",",0,0,1,",",0\n      "])),p.x,p.y,i,i,2*i,i,i,2*-i):LD({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:l,endAngle:c});var x=AE(CD||(CD=TD(["M ",",","\n    A",",",",0,0,",",",",","\n    A",",",",0,",",",",",",","\n    A",",",",0,0,",",",",","\n  "])),p.x,p.y,i,i,+(u<0),d.x,d.y,a,a,+(y>180),+(u<0),m.x,m.y,i,i,+(u<0),f.x,f.y);if(r>0){var{circleTangency:b,lineTangency:v,theta:w}=RD({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:o}),{circleTangency:j,lineTangency:C,theta:N}=RD({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:o}),k=o?Math.abs(l-c):Math.abs(l-c)-w-N;if(k<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+=AE(ND||(ND=TD(["L",",","\n      A",",",",0,0,",",",",","\n      A",",",",0,",",",",",",","\n      A",",",",0,0,",",",",","Z"])),C.x,C.y,i,i,+(u<0),j.x,j.y,r,r,+(k>180),+(u>0),b.x,b.y,i,i,+(u<0),v.x,v.y)}else x+=AE(kD||(kD=TD(["L",",","Z"])),t,n);return x})({cx:r,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(g,f/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):LD({cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:u,endAngle:d}),t.createElement("path",MD({},Qk(n),{className:m,d:h}))};function qD(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(YE(t)){if("centric"===e){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:o}=t,l=AD(r,a,i,o),c=AD(r,a,s,o);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return ID(t)}}var BD,UD,zD,HD,VD,$D={},WD={},QD={};function ZD(){return BD||(BD=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p_();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(QD)),QD}function KD(){return UD||(UD=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});
vendor: 6,856 bytes, line 631
631const t=ZD();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(WD)),WD}function GD(){return zD||(zD=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C_(),n=KD();e.range=function(e,r,a){a&&"number"!=typeof a&&t.isIterateeCall(e,r,a)&&(r=a=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),a=void 0===a?e<r?1:-1:n.toFinite(a);const i=Math.max(Math.ceil((r-e)/(a||1)),0),s=new Array(i);for(let t=0;t<i;t++)s[t]=e,e+=a;return s}}($D)),$D}function YD(){return VD?HD:(VD=1,HD=GD().range)}const JD=j(YD());var XD=e=>e.chartData,eF=t_([XD],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),tF=(e,t,n,r)=>r?eF(e):XD(e);function nF(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(tM(t)&&tM(n))return!0}return!1}function rF(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function aF(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[a,i]=e;if(tM(a))n=a;else if("function"==typeof a)return;if(tM(i))r=i;else if("function"==typeof i)return;var s=[n,r];if(nF(s))return s}}var iF,sF=1e9,oF=!0,lF="[DecimalError] ",cF=lF+"Invalid argument: ",uF=lF+"Exponent out of range: ",dF=Math.floor,pF=Math.pow,hF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,mF=1e7,fF=9007199254740991,gF=dF(1286742750677284.5),yF={};function xF(e,t){var n,r,a,i,s,o,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),oF?AF(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),i>(o=(s=Math.ceil(d/7))>o?s+1:o+1)&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((o=l.length)-(i=c.length)<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/mF|0,l[i]%=mF;for(n&&(l.unshift(n),++a),o=l.length;0==l[--o];)l.pop();return t.d=l,t.e=a,oF?AF(t,d):t}function bF(e,t,n){if(e!==~~e||e<t||e>n)throw Error(cF+e)}function vF(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)(n=7-(r=e[t]+"").length)&&(i+=kF(n)),i+=r;(n=7-(r=(s=e[t])+"").length)&&(i+=kF(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return i+s}yF.absoluteValue=yF.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},yF.comparedTo=yF.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(a=e.d.length)?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1},yF.decimalPlaces=yF.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},yF.dividedBy=yF.div=function(e){return wF(this,new this.constructor(e))},yF.dividedToIntegerBy=yF.idiv=function(e){var t=this.constructor;return AF(wF(this,new t(e),0,1),t.precision)},yF.equals=yF.eq=function(e){return!this.cmp(e)},yF.exponent=function(){return CF(this)},yF.greaterThan=yF.gt=function(e){return this.cmp(e)>0},yF.greaterThanOrEqualTo=yF.gte=function(e){return this.cmp(e)>=0},yF.isInteger=yF.isint=function(){return this.e>this.d.length-2},yF.isNegative=yF.isneg=function(){return this.s<0},yF.isPositive=yF.ispos=function(){return this.s>0},yF.isZero=function(){return 0===this.s},yF.lessThan=yF.lt=function(e){return this.cmp(e)<0},yF.lessThanOrEqualTo=yF.lte=function(e){return this.cmp(e)<1},yF.logarithm=yF.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(iF))throw Error(lF+"NaN");if(n.s<1)throw Error(lF+(n.s?"NaN":"-Infinity"));return n.eq(iF)?new r(0):(oF=!1,t=wF(SF(n,i),SF(e,i),i),oF=!0,AF(t,a))},yF.minus=yF.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OF(t,e):xF(t,(e.s=-e.s,e))},yF.modulo=yF.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(!(e=new r(e)).s)throw Error(lF+"NaN");return n.s?(oF=!1,t=wF(n,e,0,1).times(e),oF=!0,n.minus(t)):AF(new r(n),a)},yF.naturalExponential=yF.exp=function(){return jF(this)},yF.naturalLogarithm=yF.ln=function(){return SF(this)},yF.negated=yF.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},yF.plus=yF.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xF(t,e):OF(t,(e.s=-e.s,e))},yF.precision=yF.sd=function(e){var t,n,r,a=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(cF+e);if(t=CF(a)+1,n=7*(r=a.d.length-1)+1,r=a.d[r]){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},yF.squareRoot=yF.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(lF+"NaN")}for(e=CF(o),oF=!1,0==(a=Math.sqrt(+o))||a==1/0?(((t=vF(o.d)).length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=dF((e+1)/2)-(e<0||e%2),r=new l(t=a==1/0?"5e"+e:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(a.toString()),a=s=(n=l.precision)+3;;)if(r=(i=r).plus(wF(o,i,s+2)).times(.5),vF(i.d).slice(0,s)===(t=vF(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&"4999"==t){if(AF(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if("9999"!=t)break;s+=4}return oF=!0,AF(r,n)},yF.times=yF.mul=function(e){var t,n,r,a,i,s,o,l,c,u=this,d=u.constructor,p=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=p.length)<(c=h.length)&&(i=p,p=h,h=i,s=l,l=c,c=s),i=[],r=s=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,a=l+r;a>r;)o=i[a]+h[r]*p[a-r-1]+t,i[a--]=o%mF|0,t=o/mF|0;i[a]=(i[a]+t)%mF|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,oF?AF(e,d.precision):e},yF.toDecimalPlaces=yF.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(bF(e,0,sF),void 0===t?t=r.rounding:bF(t,0,8),AF(n,e+CF(n)+1,t))},yF.toExponential=function(e,t){var n,r=this,a=r.constructor;return void 0===e?n=_F(r,!0):(bF(e,0,sF),void 0===t?t=a.rounding:bF(t,0,8),n=_F(r=AF(new a(r),e+1,t),!0,e+1)),n},yF.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?_F(a):(bF(e,0,sF),void 0===t?t=i.rounding:bF(t,0,8),n=_F((r=AF(new i(a),e+CF(a)+1,t)).abs(),!1,e+CF(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)},yF.toInteger=yF.toint=function(){var e=this,t=e.constructor;return AF(new t(e),CF(e)+1,t.rounding)},yF.toNumber=function(){return+this},yF.toPower=yF.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=+(e=new l(e));if(!e.s)return new l(iF);if(!(o=new l(o)).s){if(e.s<1)throw Error(lF+"Infinity");return o}if(o.eq(iF))return o;if(r=l.precision,e.eq(iF))return AF(o,r);if(s=(t=e.e)>=(n=e.d.length-1),i=o.s,s){if((n=c<0?-c:c)<=fF){for(a=new l(iF),t=Math.ceil(r/7+4),oF=!1;n%2&&PF((a=a.times(o)).d,t),0!==(n=dF(n/2));)PF((o=o.times(o)).d,t);return oF=!0,e.s<0?new l(iF).div(a):AF(a,r)}}else if(i<0)throw Error(lF+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,o.s=1,oF=!1,a=e.times(SF(o,r+12)),oF=!0,(a=jF(a)).s=i,a},yF.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;
vendor: 4,193 bytes, line 631
631return void 0===e?r=_F(a,(n=CF(a))<=i.toExpNeg||n>=i.toExpPos):(bF(e,1,sF),void 0===t?t=i.rounding:bF(t,0,8),r=_F(a=AF(new i(a),e,t),e<=(n=CF(a))||n<=i.toExpNeg,e)),r},yF.toSignificantDigits=yF.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(bF(e,1,sF),void 0===t?t=n.rounding:bF(t,0,8)),AF(new n(this),e,t)},yF.toString=yF.valueOf=yF.val=yF.toJSON=yF[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=CF(e),n=e.constructor;return _F(e,t<=n.toExpNeg||t>=n.toExpPos)};var wF=function(){function e(e,t){var n,r=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+r,e[a]=n%mF|0,r=n/mF|0;return r&&e.unshift(r),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*mF+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,a,i,s){var o,l,c,u,d,p,h,m,f,g,y,x,b,v,w,j,C,N,k=r.constructor,S=r.s==a.s?1:-1,E=r.d,A=a.d;if(!r.s)return new k(r);if(!a.s)throw Error(lF+"Division by zero");for(l=r.e-a.e,C=A.length,w=E.length,m=(h=new k(S)).d=[],c=0;A[c]==(E[c]||0);)++c;if(A[c]>(E[c]||0)&&--l,(x=null==i?i=k.precision:s?i+(CF(r)-CF(a))+1:i)<0)return new k(0);if(x=x/7+2|0,c=0,1==C)for(u=0,A=A[0],x++;(c<w||u)&&x--;c++)b=u*mF+(E[c]||0),m[c]=b/A|0,u=b%A|0;else{for((u=mF/(A[0]+1)|0)>1&&(A=e(A,u),E=e(E,u),C=A.length,w=E.length),v=C,g=(f=E.slice(0,C)).length;g<C;)f[g++]=0;(N=A.slice()).unshift(0),j=A[0],A[1]>=mF/2&&++j;do{u=0,(o=t(A,f,C,g))<0?(y=f[0],C!=g&&(y=y*mF+(f[1]||0)),(u=y/j|0)>1?(u>=mF&&(u=mF-1),1==(o=t(d=e(A,u),f,p=d.length,g=f.length))&&(u--,n(d,C<p?N:A,p))):(0==u&&(o=u=1),d=A.slice()),(p=d.length)<g&&d.unshift(0),n(f,d,g),-1==o&&(o=t(A,f,C,g=f.length))<1&&(u++,n(f,C<g?N:A,g)),g=f.length):0===o&&(u++,f=[0]),m[c++]=u,o&&f[0]?f[g++]=E[v]||0:(f=[E[v]],g=1)}while((v++<w||void 0!==f[0])&&x--)}return m[0]||m.shift(),h.e=l,AF(h,s?i+CF(h)+1:i)}}();function jF(e,t){var n,r,a,i,s,o=0,l=0,c=e.constructor,u=c.precision;if(CF(e)>16)throw Error(uF+CF(e));if(!e.s)return new c(iF);for(oF=!1,s=u,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(s+=Math.log(pF(2,l))/Math.LN10*2+5|0,n=r=a=new c(iF),c.precision=s;;){if(r=AF(r.times(e),s),n=n.times(++o),vF((i=a.plus(wF(r,n,s))).d).slice(0,s)===vF(a.d).slice(0,s)){for(;l--;)a=AF(a.times(a),s);return c.precision=u,null==t?(oF=!0,AF(a,u)):a}a=i}}function CF(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function NF(e,t,n){if(t>e.LN10.sd())throw oF=!0,n&&(e.precision=n),Error(lF+"LN10 precision limit exceeded");return AF(new e(e.LN10),t)}function kF(e){for(var t="";e--;)t+="0";return t}function SF(e,t){var n,r,a,i,s,o,l,c,u,d=1,p=e,h=p.d,m=p.constructor,f=m.precision;if(p.s<1)throw Error(lF+(p.s?"NaN":"-Infinity"));if(p.eq(iF))return new m(0);if(null==t?(oF=!1,c=f):c=t,p.eq(10))return null==t&&(oF=!0),NF(m,c);if(c+=10,m.precision=c,r=(n=vF(h)).charAt(0),i=CF(p),!(Math.abs(i)<15e14))return l=NF(m,c+2,f).times(i+""),p=SF(new m(r+"."+n.slice(1)),c-10).plus(l),m.precision=f,null==t?(oF=!0,AF(p,f)):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=vF((p=p.times(e)).d)).charAt(0),d++;for(i=CF(p),r>1?(p=new m("0."+n),i++):p=new m(r+"."+n.slice(1)),o=s=p=wF(p.minus(iF),p.plus(iF),c),u=AF(p.times(p),c),a=3;;){if(s=AF(s.times(u),c),vF((l=o.plus(wF(s,new m(a),c))).d).slice(0,c)===vF(o.d).slice(0,c))return o=o.times(2),0!==i&&(o=o.plus(NF(m,c+2,f).times(i+""))),o=wF(o,new m(d),c),m.precision=f,null==t?(oF=!0,AF(o,f)):o;o=l,a+=2}}function EF(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(a=t.length;48===t.charCodeAt(a-1);)--a;if(t=t.slice(r,a)){if(a-=r,n=n-r-1,e.e=dF(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=7;r<a;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),oF&&(e.e>gF||e.e<-gF))throw Error(uF+n)}else e.s=0,e.e=0,e.d=[0];return e}function AF(e,t,n){var r,a,i,s,o,l,c,u,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if((r=t-s)<0)r+=7,a=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=d.length))return e;for(c=i=d[u],s=1;i>=10;i/=10)s++;
631a=(r%=7)-7+s}if(void 0!==n&&(o=c/(i=pF(10,s-a-1))%10|0,l=t<0||void 0!==d[u+1]||c%i,l=n<4?(o||l)&&(0==n||n==(e.s<0?3:2)):o>5||5==o&&(4==n||l||6==n&&(r>0?a>0?c/pF(10,s-a):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=CF(e),d.length=1,t=t-i-1,d[0]=pF(10,(7-t%7)%7),e.e=dF(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,i=1,u--):(d.length=u+1,i=pF(10,7-r),d[u]=a>0?(c/pF(10,s-a)%pF(10,a)|0)*i:0),l)for(;;){if(0==u){(d[0]+=i)==mF&&(d[0]=1,++e.e);break}if(d[u]+=i,d[u]!=mF)break;d[u--]=0,i=1}for(r=d.length;0===d[--r];)d.pop();if(oF&&(e.e>gF||e.e<-gF))throw Error(uF+CF(e));return e}function OF(e,t){var n,r,a,i,s,o,l,c,u,d,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),oF?AF(t,h):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r){for((u=s<0)?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),s>(a=Math.max(Math.ceil(h/7),o)+2)&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for((u=(a=l.length)<(o=d.length))&&(o=a),a=0;a<o;a++)if(l[a]!=d[a]){u=l[a]<d[a];break}s=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),o=l.length,a=d.length-o;a>0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]<d[a]){for(i=a;i&&0===l[--i];)l[i]=mF-1;--l[i],l[a]+=mF}l[a]-=d[a]}for(;0===l[--o];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,oF?AF(t,h):t):new p(0)}function _F(e,t,n){var r,a=CF(e),i=vF(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+kF(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+kF(-a-1)+i,n&&(r=n-s)>0&&(i+=kF(r))):a>=s?(i+=kF(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+kF(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=kF(r))),e.s<0?"-"+i:i}function PF(e,t){if(e.length>t)return e.length=t,!0}function IF(e){if(!e||"object"!=typeof e)throw Error(lF+"Object expected");var t,n,r,a=["precision",1,sF,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if(void 0!==(r=e[n=a[t]])){if(!(dF(r)===r&&r>=a[t+1]&&r<=a[t+2]))throw Error(cF+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(cF+n+": "+r);this[n]=new this(r)}return this}var MF=function e(t){var n,r,a;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(cF+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):EF(t,e.toString())}if("string"!=typeof e)throw Error(cF+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!hF.test(e))throw Error(cF+e);EF(t,e)}if(i.prototype=yF,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=IF,void 0===t&&(t={}),t)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<a.length;)t.hasOwnProperty(r=a[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});iF=new MF(1);const TF=MF;function RF(e){return 0===e?1:Math.floor(new TF(e).abs().log(10).toNumber())+1}function LF(e,t,n){for(var r=new TF(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var DF=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},FF=(e,t,n)=>{if(e.lte(0))return new TF(0);var r=RF(e.toNumber()),a=new TF(10).pow(r),i=e.div(a),s=1!==r?.05:.1,o=new TF(Math.ceil(i.div(s).toNumber())).add(n).mul(s).mul(a);return new TF(t?o.toNumber():Math.ceil(o.toNumber()))},qF=(e,t,n)=>{var r;if(e.lte(0))return new TF(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new TF(i).abs().log(10).toNumber()),o=new TF(10).pow(s),l=e.div(o).toNumber(),c=a.findIndex(e=>e>=l-1e-10);if(-1===c&&(o=o.mul(10),c=0),(c+=n)>=a.length){var u=Math.floor(c/a.length);c%=a.length,o=o.mul(new TF(10).pow(u))}var d=null!==(r=a[c])&&void 0!==r?r:1,p=new TF(d).mul(o);return t?p:new TF(Math.ceil(p.toNumber()))},BF=function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:FF;if(!Number.isFinite((t-e)/(n-1)))return{step:new TF(0),tickMin:new TF(0),tickMax:new TF(0)};var s,o=i(new TF(t).sub(e).div(n-1),r,a);s=e<=0&&t>
631=0?new TF(0):(s=new TF(e).add(t).div(2)).sub(new TF(s).mod(o));var l=Math.ceil(s.sub(e).div(o).toNumber()),c=Math.ceil(new TF(t).sub(s).div(o).toNumber()),u=l+c+1;return u>n?BF(e,t,n,r,a+1,i):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:o,tickMin:s.sub(new TF(l).mul(o)),tickMax:s.add(new TF(c).mul(o))})},UF=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",s=Math.max(r,2),[o,l]=DF([t,n]);if(o===-1/0||l===1/0){var c=l===1/0?[o,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),l];return t>n?c.reverse():c}if(o===l)return((e,t,n)=>{var r=new TF(1),a=new TF(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new TF(10).pow(RF(e)-1),a=new TF(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new TF(Math.floor(e)))}else 0===e?a=new TF(Math.floor((t-1)/2)):n||(a=new TF(Math.floor(e)));for(var s=Math.floor((t-1)/2),o=[],l=0;l<t;l++)o.push(a.add(new TF(l-s).mul(r)).toNumber());return o})(o,r,a);var u="snap125"===i?qF:FF,{step:d,tickMin:p,tickMax:h}=BF(o,l,s,a,0,u),m=LF(p,h.add(new TF(.1).mul(d)),d);return t>n?m.reverse():m},zF=function(e,t){var[n,r]=e,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",[s,o]=DF([n,r]);if(s===-1/0||o===1/0)return[n,r];if(s===o)return[s];var l="snap125"===i?qF:FF,c=Math.max(t,2),u=l(new TF(o).sub(s).div(c-1),a,0),d=[...LF(new TF(s),new TF(o),u),o];return!1===a&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},HF=e=>e.rootProps.maxBarSize,VF=e=>e.rootProps.barCategoryGap,$F=e=>e.rootProps.stackOffset,WF=e=>e.rootProps.reverseStackOrder,QF=e=>e.options.chartName,ZF=e=>e.rootProps.syncId,KF=e=>e.rootProps.syncMethod,GF=e=>e.options.eventEmitter,YF={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},JF=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function XF(e,t,n){return"auto"!==n?n:null!=e?oM(e,t)?"category":"number":void 0}function eq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eq(Object(n),!0).forEach(function(t){nq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rq={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},aq={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},iq=t_([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},vT],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=XF(t,"angleAxis",rq.type))&&void 0!==n?n:"category";return tq(tq({},rq),{},{type:r})}),sq=t_([(e,t)=>e.polarAxis.radiusAxis[t],vT],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=XF(t,"radiusAxis",aq.type))&&void 0!==n?n:"category";return tq(tq({},aq),{},{type:r})}),oq=e=>e.polarOptions,lq=t_([bM,vM,MM],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),cq=t_([oq,lq],(e,t)=>{if(null!=e)return LE(e.innerRadius,t,0)}),uq=t_([oq,lq],(e,t)=>{if(null!=e)return LE(e.outerRadius,t,.8*t)}),dq=t_([oq],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});t_([iq,dq],JF);var pq=t_([lq,cq,uq],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});t_([sq,pq],JF);var hq=t_([yT,oq,cq,uq,bM,vM],(e,t,n,r,a,i)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:s,cy:o,startAngle:l,endAngle:c}=t;return{cx:LE(s,a,a/2),cy:LE(o,i,i/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),mq=(e,t)=>
vendor: 10,648 bytes, line 631
631t,fq=(e,t,n)=>n;function gq(e){return null==e?void 0:e.id}function yq(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=n,s=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var o=gq(e);n.forEach((t,n)=>{var r,l=null==i||a?n:String(sM(t,i,null)),c=sM(t,e.dataKey,0);r=s.has(l)?s.get(l):{},Object.assign(r,{[o]:c}),s.set(l,r)})}}),Array.from(s.values())}function xq(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var bq=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function vq(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var wq=e=>{var t=yT(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},jq=e=>e.tooltip.settings.axisId;function Cq(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(e){var t=a[0],n=a[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var a=e.bandwidth();switch(n.position){case"middle":r+=a/2;break;case"end":r+=a}}return r}}}}}function Nq(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function kq(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Sq(e){let t,n,r;function a(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<0?a=t+1:i=t}while(a<i)}return a}return 2!==e.length?(t=Nq,n=(t,n)=>Nq(e(t),n),r=(t,n)=>e(t)-n):(t=e===Nq||e===kq?e:Eq,n=e,r=e),{left:a,center:function(e,t,n=0,i=e.length){const s=a(e,t,n,i-1);return s>n&&r(e[s-1],t)>-r(e[s],t)?s-1:s},right:function(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<=0?a=t+1:i=t}while(a<i)}return a}}}function Eq(){return 0}function Aq(e){return null===e?NaN:+e}const Oq=Sq(Nq).right;Sq(Aq).center;class _q extends Map{constructor(e,t=Iq){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(Pq(this,e))}has(e){return super.has(Pq(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function Pq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Iq(e){return null!==e&&"object"==typeof e?e.valueOf():e}function Mq(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const Tq=Math.sqrt(50),Rq=Math.sqrt(10),Lq=Math.sqrt(2);function Dq(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Tq?10:i>=Rq?5:i>=Lq?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?Dq(e,t,2*n):[o,l,c]}function Fq(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[a,i,s]=r?Dq(t,e,n):Dq(e,t,n);if(!(i>=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c<o;++c)l[c]=(i-c)/-s;else for(let c=0;c<o;++c)l[c]=(i-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(a+c)/-s;else for(let c=0;c<o;++c)l[c]=(a+c)*s;return l}function qq(e,t,n){return Dq(e=+e,t=+t,n=+n)[2]}function Bq(e,t,n){n=+n;const r=(t=+t)<(e=+e),a=r?qq(t,e,n):qq(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function Uq(e,t){let n;for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);return n}function zq(e,t){let n;for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);return n}function Hq(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=void 0===a?Mq:function(e=Nq){if(e===Nq)return Mq;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);r>n;){if(r-n>600){const i=r-n+1,s=t-n+1,o=Math.log(i),l=.5*Math.exp(2*o/3),c=.5*Math.sqrt(o*l*(i-l)/i)*(s-i/2<0?-1:1);Hq(e,t,Math.max(n,Math.floor(t-s*l/i+c)),Math.min(r,Math.floor(t+(i-s)*l/i+c)),a)}const i=e[t];let s=n,o=r;for(Vq(e,n,t),a(e[r],i)>0&&Vq(e,n,r);s<o;){for(Vq(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}0===a(e[n],i)?Vq(e,n,o):(++o,Vq(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function Vq(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function $q(e,t,n=Aq){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e);return s+(+n(e[i+1],i+1,e)-s)*(a-i)}}function Wq(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Qq(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const Zq=Symbol("implicit");function Kq(){var e=new _q,t=[],n=[],r=Zq;function a(a){let i=e.get(a);if(void 0===i){if(r!==Zq)return r;e.set(a,i=t.push(a)-1)}return n[i%n.length]}return a.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new _q;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return a},a.range=function(e){return arguments.length?(n=Array.from(e),a):n.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.copy=function(){return Kq(t,n).unknown(r)},Wq.apply(a,arguments),a}function Gq(){var e,t,n=Kq().unknown(void 0),r=n.domain,a=n.range,i=0,s=1,o=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=s<i,p=d?s:i,h=d?i:s;e=(h-p)/Math.max(1,n-l+2*c),o&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*u,t=e*(1-l),o&&(p=Math.round(p),t=Math.round(t));var m=function(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++r<a;)i[r]=e+r*n;return i}(n).map(function(t){return p+e*t});return a(d?m.reverse():m)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,s]=e,i=+i,s=+s,d()):[i,s]},n.rangeRound=function(e){return[i,s]=e,i=+i,s=+s,o=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(o=!!e,d()):o},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return Gq(r(),[i,s]).round(o).paddingInner(l).paddingOuter(c).align(u)},Wq.apply(d(),arguments)}function Yq(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Yq(t())},e}function Jq(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xq(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function eB(){}var tB=.7,nB=1/tB,rB="\\s*([+-]?\\d+)\\s*",aB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",iB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sB=/^#([0-9a-f]{3,8})$/,oB=new RegExp(`^rgb\\(${rB},${rB},${rB}\\)$`),lB=new RegExp(`^rgb\\(${iB},${iB},${iB}\\)$`),cB=new RegExp(`^rgba\\(${rB},${rB},${rB},${aB}\\)$`),uB=new RegExp(`^rgba\\(${iB},${iB},${iB},${aB}\\)$`),dB=new RegExp(`^hsl\\(${aB},${iB},${iB}\\)$`),pB=new RegExp(`^hsla\\(${aB},${iB},${iB},${aB}\\)$`),hB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function mB(){return this.rgb().formatHex()}function fB(){return this.rgb().formatRgb()}function gB(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sB.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?yB(t):3===n?
vendor: 7,360 bytes, line 631
631new vB(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xB(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xB(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=oB.exec(e))?new vB(t[1],t[2],t[3],1):(t=lB.exec(e))?new vB(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=cB.exec(e))?xB(t[1],t[2],t[3],t[4]):(t=uB.exec(e))?xB(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=dB.exec(e))?SB(t[1],t[2]/100,t[3]/100,1):(t=pB.exec(e))?SB(t[1],t[2]/100,t[3]/100,t[4]):hB.hasOwnProperty(e)?yB(hB[e]):"transparent"===e?new vB(NaN,NaN,NaN,0):null}function yB(e){return new vB(e>>16&255,e>>8&255,255&e,1)}function xB(e,t,n,r){return r<=0&&(e=t=n=NaN),new vB(e,t,n,r)}function bB(e,t,n,r){return 1===arguments.length?function(e){return e instanceof eB||(e=gB(e)),e?new vB((e=e.rgb()).r,e.g,e.b,e.opacity):new vB}(e):new vB(e,t,n,null==r?1:r)}function vB(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function wB(){return`#${kB(this.r)}${kB(this.g)}${kB(this.b)}`}function jB(){const e=CB(this.opacity);return`${1===e?"rgb(":"rgba("}${NB(this.r)}, ${NB(this.g)}, ${NB(this.b)}${1===e?")":`, ${e})`}`}function CB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function NB(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kB(e){return((e=NB(e))<16?"0":"")+e.toString(16)}function SB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new AB(e,t,n,r)}function EB(e){if(e instanceof AB)return new AB(e.h,e.s,e.l,e.opacity);if(e instanceof eB||(e=gB(e)),!e)return new AB;if(e instanceof AB)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(s=t===i?(n-r)/o+6*(n<r):n===i?(r-t)/o+2:(t-n)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new AB(s,o,l,e.opacity)}function AB(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function OB(e){return(e=(e||0)%360)<0?e+360:e}function _B(e){return Math.max(0,Math.min(1,e||0))}function PB(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Jq(eB,gB,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mB,formatHex:mB,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return EB(this).formatHsl()},formatRgb:fB,toString:fB}),Jq(vB,bB,Xq(eB,{brighter(e){return e=null==e?nB:Math.pow(nB,e),new vB(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?tB:Math.pow(tB,e),new vB(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vB(NB(this.r),NB(this.g),NB(this.b),CB(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wB,formatHex:wB,formatHex8:function(){return`#${kB(this.r)}${kB(this.g)}${kB(this.b)}${kB(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:jB,toString:jB})),Jq(AB,function(e,t,n,r){return 1===arguments.length?EB(e):new AB(e,t,n,null==r?1:r)},Xq(eB,{brighter(e){return e=null==e?nB:Math.pow(nB,e),new AB(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?tB:Math.pow(tB,e),new AB(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new vB(PB(e>=240?e-240:e+120,a,r),PB(e,a,r),PB(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new AB(OB(this.h),_B(this.s),_B(this.l),CB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=CB(this.opacity);return`${1===e?"hsl(":"hsla("}${OB(this.h)}, ${100*_B(this.s)}%, ${100*_B(this.l)}%${1===e?")":`, ${e})`}`}}));const IB=e=>()=>e;function MB(e){return 1===(e=+e)?TB:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):IB(isNaN(t)?n:t)}}function TB(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):IB(isNaN(e)?t:e)}const RB=function e(t){var n=MB(t);function r(e,t){var r=n((e=bB(e)).r,(t=bB(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),s=TB(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function LB(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(i){for(n=0;n<r;++n)a[n]=e[n]*(1-i)+t[n]*i;return a}}function DB(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,i=new Array(a),s=new Array(r);for(n=0;n<a;++n)i[n]=VB(e[n],t[n]);for(;n<r;++n)s[n]=t[n];return function(e){for(n=0;n<a;++n)s[n]=i[n](e);return s}}function FB(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function qB(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function BB(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=VB(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var UB=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zB=new RegExp(UB.source,"g");function HB(e,t){var n,r,a,i=UB.lastIndex=zB.lastIndex=0,s=-1,o=[],l=[];for(e+="",t+="";(n=UB.exec(e))&&(r=zB.exec(t));)(a=r.index)>i&&(a=t.slice(i,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:qB(n,r)})),i=zB.lastIndex;return i<t.length&&(a=t.slice(i),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)o[(n=l[r]).i]=n.x(e);return o.join("")})}function VB(e,t){var n,r=typeof t;return null==t||"boolean"===r?IB(t):("number"===r?qB:"string"===r?(n=gB(t))?(t=n,RB):HB:t instanceof gB?RB:t instanceof Date?FB:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?LB:Array.isArray(t)?DB:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?BB:qB)(e,t)}function $B(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function WB(e,t){void 0===t&&(t=e,e=VB);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function QB(e){return+e}var ZB=[0,1];function KB(e){return e}function GB(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function YB(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=GB(a,r),i=n(s,i)):(r=GB(r,a),i=n(i,s)),function(e){return i(r(e))}}function JB(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=GB(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(t){var n=Oq(e,t,1,r)-1;return i[n](a[n](t))}}function XB(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eU(){var e,t,n,r,a,i,s=ZB,o=ZB,l=VB,c=KB;function u(){var e=Math.min(s.length,o.length);return c!==KB&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(s[0],s[e-1])),r=e>2?JB:YB,a=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(a||(a=r(s.map(e),o,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(o,s.map(e),qB)))(n)))},d.domain=function(e){return arguments.length?(s=Array.from(e,QB),u(
vendor: 18,204 bytes, line 631
631)):s.slice()},d.range=function(e){return arguments.length?(o=Array.from(e),u()):o.slice()},d.rangeRound=function(e){return o=Array.from(e),l=$B,u()},d.clamp=function(e){return arguments.length?(c=!!e||KB,u()):c!==KB},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function tU(){return eU()(KB,KB)}function nU(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rU(e){return(e=nU(Math.abs(e)))?e[1]:NaN}var aU,iU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sU(e){if(!(t=iU.exec(e)))throw new Error("invalid format: "+e);var t;return new oU({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function oU(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function lU(e,t){var n=nU(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}sU.prototype=oU.prototype,oU.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const cU={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>lU(100*e,t),r:lU,s:function(e,t){var n=nU(e,t);if(!n)return aU=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(aU=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+nU(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uU(e){return e}var dU,pU,hU,mU=Array.prototype.map,fU=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gU(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?uU:(t=mU.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],s=0,o=t[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(e.substring(a-=o,a+o)),!((l+=o+1)>r));)o=t[s=(s+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?uU:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(mU.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=sU(e)).fill,d=e.align,p=e.sign,h=e.symbol,m=e.zero,f=e.width,g=e.comma,y=e.precision,x=e.trim,b=e.type;"n"===b?(g=!0,b="g"):cU[b]||(void 0===y&&(y=12),x=!0,b="g"),(m||"0"===n&&"="===d)&&(m=!0,n="0",d="=");var v=(t&&void 0!==t.prefix?t.prefix:"")+("$"===h?a:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===h?i:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),j=cU[b],C=/[defgprs%]/.test(b);function N(e){var t,a,i,l=v,h=w;if("c"===b)h=j(e)+h,e="";else{var N=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:j(Math.abs(e),y),x&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),N&&0===+e&&"+"!==p&&(N=!1),l=(N?"("===p?p:c:"-"===p||"("===p?"":p)+l,h=("s"!==b||isNaN(e)||void 0===aU?"":fU[8+aU/3])+h+(N&&"("===p?")":""),C)for(t=-1,a=e.length;++t<a;)if(48>(i=e.charCodeAt(t))||i>57){h=(46===i?s+e.slice(t+1):e.slice(t))+h,e=e.slice(0,t);break}}g&&!m&&(e=r(e,1/0));var k=l.length+e.length+h.length,S=k<f?new Array(f-k+1).join(n):"";switch(g&&m&&(e=r(S+e,S.length?f-h.length:1/0),S=""),d){case"<":e=l+e+h+S;break;case"=":e=l+S+e+h;break;case"^":e=S.slice(0,k=S.length>>1)+l+e+h+S.slice(k);break;default:e=S+l+e+h}return o(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),N.toString=function(){return e+""},N}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(rU(t)/3))),r=Math.pow(10,-n),a=d(((e=sU(e)).type="f",e),{suffix:fU[8+n/3]});return function(e){return a(r*e)}}}}function yU(e,t,n,r){var a,i=Bq(e,t,n);switch((r=sU(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(rU(t)/3)))-rU(Math.abs(e)))}(i,s))||(r.precision=a),hU(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rU(t)-rU(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-rU(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return pU(r)}function xU(e){var t=e.domain;return e.ticks=function(e){var n=t();return Fq(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return yU(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,i=t(),s=0,o=i.length-1,l=i[s],c=i[o],u=10;for(c<l&&(a=l,l=c,c=a,a=s,s=o,o=a);u-- >0;){if((a=qq(l,c,n))===r)return i[s]=l,i[o]=c,t(i);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function bU(e,t){var n,r=0,a=(e=e.slice()).length-1,i=e[r],s=e[a];return s<i&&(n=r,r=a,a=n,n=i,i=s,s=n),e[r]=t.floor(i),e[a]=t.ceil(s),e}function vU(e){return Math.log(e)}function wU(e){return Math.exp(e)}function jU(e){return-Math.log(-e)}function CU(e){return-Math.exp(-e)}function NU(e){return isFinite(e)?+("1e"+e):e<0?0:e}function kU(e){return(t,n)=>-e(-t,n)}function SU(e){const t=e(vU,wU),n=t.domain;let r,a,i=10;function s(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),a=function(e){return 10===e?NU:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=kU(r),a=kU(a),e(jU,CU)):e(vU,wU),t}return t.base=function(e){return arguments.length?(i=+e,s()):i},t.domain=function(e){return arguments.length?(n(e),s()):n()},t.ticks=e=>{const t=n();let s=t[0],o=t[t.length-1];const l=o<s;l&&([s,o]=[o,s]);let c,u,d=r(s),p=r(o);const h=null==e?10:+e;let m=[];if(!(i%1)&&p-d<h){if(d=Math.floor(d),p=Math.ceil(p),s>0){for(;d<=p;++d)for(c=1;c<i;++c)if(u=d<0?c/a(-d):c*a(d),!(u<s)){if(u>o)break;m.push(u)}}else for(;d<=p;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/a(-d):c*a(d),!(u<s)){if(u>o)break;m.push(u)}2*m.length<h&&(m=Fq(s,o,h))}else m=Fq(d,p,Math.min(p-d,h)).map(a);return l?m.reverse():m},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=sU(n)).precision||(n.trim=!0),n=pU(n)),e===1/0)return n;const s=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/a(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=s?n(e):""}},t.nice=()=>n(bU(n(),{floor:e=>a(Math.floor(r(e))),ceil:e=>a(Math.ceil(r(e)))})),t}function EU(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function AU(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function OU(e){var t=1,n=e(EU(t),AU(t));return n.constant=function(n){return arguments.length?e(EU(t=+n),AU(t)):t},xU(n)}function _U(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function PU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function IU(e){return e<0?-e*e:e*e}function MU(e){var t=e(KB,KB),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(KB,KB):.5===n?e(PU,IU):e(_U(n),_U(1/n)):n},xU(t)}function TU(){var e=MU(eU());return e.copy=function(){return XB(e,TU()).exponent(e.exponent())},Wq.apply(e,arguments),e}function RU(e){return Math.sign(e)*e*e}dU=gU({thousands:",",grouping:[3],currency:["$",""]}),pU=dU.format,hU=dU.formatPrefix;const LU=new Date,DU=new Date;function FU(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=t=>(e(t=new Date(+t)),t),a.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),a.round=e=>{const t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),a.range=(n,r,i)=>{const s=[];if(n=a.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;let o;do{s.push(o=new Date(+n)),t(n,i),e(n)}while(o<n&&n<r);return s},a.filter=n=>FU(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(a.count=(t,r)=>(LU.setTime(+t),DU.setTime(+r),e(LU),e(DU),Math.floor(n(LU,DU))),a.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?t=>r(t)%e===0:t=>a.count(0,t)%e===0):a:null)),a}const qU=FU(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qU.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?FU(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):qU:null),qU.range;const BU=1e3,UU=6e4,zU=36e5,HU=864e5,VU=6048e5,$U=2592e6,WU=31536e6,QU=FU(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*BU)},(e,t)=>(t-e)/BU,e=>e.getUTCSeconds());QU.range;const ZU=FU(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*BU)},(e,t)=>{e.setTime(+e+t*UU)},(e,t)=>(t-e)/UU,e=>e.getMinutes());ZU.range;const KU=FU(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*UU)},(e,t)=>(t-e)/UU,e=>e.getUTCMinutes());KU.range;const GU=FU(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*BU-e.getMinutes()*UU)},(e,t)=>{e.setTime(+e+t*zU)},(e,t)=>(t-e)/zU,e=>e.getHours());GU.range;const YU=FU(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zU)},(e,t)=>(t-e)/zU,e=>e.getUTCHours());YU.range;const JU=FU(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*UU)/HU,e=>e.getDate()-1);JU.range;const XU=FU(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HU,e=>e.getUTCDate()-1);XU.range;const ez=FU(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HU,e=>Math.floor(e/HU));function tz(e){return FU(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*UU)/VU)}ez.range;const nz=tz(0),rz=tz(1),az=tz(2),iz=tz(3),sz=tz(4),oz=tz(5),lz=tz(6);function cz(e){return FU(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/VU)}nz.range,rz.range,az.range,iz.range,sz.range,oz.range,lz.range;const uz=cz(0),dz=cz(1),pz=cz(2),hz=cz(3),mz=cz(4),fz=cz(5),gz=cz(6);uz.range,dz.range,pz.range,hz.range,mz.range,fz.range,gz.range;const yz=FU(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());yz.range;const xz=FU(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());xz.range;const bz=FU(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());bz.every=e=>isFinite(e=Math.floor(e))&&e>0?FU(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,bz.range;const vz=FU(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function wz(e,t,n,r,a,i){const s=[[QU,1,BU],[QU,5,5e3],[QU,15,15e3],[QU,30,3e4],[i,1,UU],[i,5,3e5],[i,15,9e5],[i,30,18e5],[a,1,zU],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,HU],[r,2,1728e5],[n,1,VU],[t,1,$U],[t,3,7776e6],[e,1,WU]];function o(t,n,r){const a=Math.abs(n-t)/r,i=Sq(([,,e])=>e).right(s,a);if(i===s.length)return e.every(Bq(t/WU,n/WU,r));if(0===i)return qU.every(Math.max(Bq(t,n,r),1));const[o,l]=s[a/s[i-1][2]<s[i][2]/a?i-1:i];return o.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const a=n&&"function"==typeof n.range?n:o(e,t,n),i=a?a.range(e,+t+1):[];return r?i.reverse():i},o]}vz.every=e=>isFinite(e=Math.floor(e))&&e>0?FU(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,vz.range;const[jz,Cz]=wz(vz,xz,uz,ez,YU,KU),[Nz,kz]=wz(bz,yz,nz,JU,GU,ZU);function Sz(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ez(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Az(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Oz,_z,Pz,Iz={"-":"",_:" ",0:"0"},Mz=/^\s*\d+/,Tz=/^%/,Rz=/[\\^$*+?|[\]().{}]/g;function Lz(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function Dz(e){return e.replace(Rz,"\\$&")}function Fz(e){return new RegExp("^(?:"+e.map(Dz).join("|")+")","i")}function qz(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Bz(e,t,n){var r=Mz.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Uz(e,t,n){var r=Mz.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function zz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Hz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Vz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $z(e,t,n){var r=Mz.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qz(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Zz(e,t,n){var r=Mz.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Kz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Yz(e,t,n){var r=Mz.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Jz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Xz(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function eH(e,t,n){var r=Mz.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tH(e,t,n){var r=Mz.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nH(e,t,n){var r=Mz.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rH(e,t,n){var r=Tz.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aH(e,t,n){var r=Mz.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function iH(e,t,n){var r=Mz.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sH(e,t){return Lz(e.getDate(),t,2)}function oH(e,t){return Lz(e.getHours(),t,2)}function lH(e,t){return Lz(e.getHours()%12||12,t,2)}function cH(e,t){return Lz(1+JU.count(bz(e),e),t,3)}function uH(e,t){return Lz(e.getMilliseconds(),t,3)}function dH(e,t){return uH(e,t)+"000"}function pH(e,t){return Lz(e.getMonth()+1,t,2)}function hH(e,t){return Lz(e.getMinutes(),t,2)}function mH(e,t){return Lz(e.getSeconds(),t,2)}function fH(e){var t=e.getDay();return 0===t?7:t}function gH(e,t){return Lz(nz.count(bz(e)-1,e),t,2)}function yH(e){var t=e.getDay();return t>=4||0===t?sz(e):sz.ceil(e)}function xH(e,t){return e=yH(e),Lz(sz.count(bz(e),e)+(4===bz(e).getDay()),t,2)}function bH(e){return e.getDay()}function vH(e,t){return Lz(rz.count(bz(e)-1,e),t,2)}function wH(e,t){return Lz(e.getFullYear()%100,t,2)}function jH(e,t){return Lz((e=yH(e)).getFullYear()%100,t,2)}function CH(e,t){return Lz(e.getFullYear()%1e4,t,4)}function NH(e,t){var n=e.getDay();return Lz((e=n>=4||0===n?sz(e):sz.ceil(e)).getFullYear()%1e4,t,4)}function kH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Lz(t/60|0,"0",2)+Lz(t%60,"0",2)}function SH(e,t){return Lz(e.getUTCDate(),t,2)}function EH(e,t){return Lz(e.getUTCHours(),t,2)}function AH(e,t){return Lz(e.getUTCHours()%12||12,t,2)}function OH(e,t){return Lz(1+XU.count(vz(e),e),t,3)}function _H(e,t){return Lz(e.getUTCMilliseconds(),t,3)}function PH(e,t){return _H(e,t)+"000"}function IH(e,t){return Lz(e.getUTCMonth()+1,t,2)}function MH(e,t){return Lz(e.getUTCMinutes(),t,2)}function TH(e,t){return Lz(e.getUTCSeconds(),t,2)}function RH(e){var t=e.getUTCDay();return 0===t?7:t}function LH(e,t){return Lz(uz.count(vz(e)-1,e),t,2)}function DH(e){var t=e.getUTCDay();return t>=4||0===t?mz(e):mz.ceil(e)}function FH(e,t){return e=DH(e),Lz(mz.count(vz(e),e)+(4===vz(e).getUTCDay()),t,2)}function qH(e){return e.getUTCDay()}function BH(e,t){return Lz(dz.count(vz(e)-1,e),t,2)}function UH(e,t){return Lz(e.getUTCFullYear()%100,t,2)}function zH(e,t){return Lz((e=DH(e)).getUTCFullYear()%100,t,2)}function HH(e,t){return Lz(e.getUTCFullYear()%1e4,t,4)}function VH(e,t){var n=e.getUTCDay();return Lz((e=n>=4||0===n?mz(e):mz.ceil(e)).getUTCFullYear()%1e4,t,4)}function $H(){return"+0000"}function WH(){return"%"}function QH(e){return+e}function ZH(e){return Math.floor(+e/1e3)}function KH(e){return new Date(e)}function GH(e){return e instanceof Date?+e:+new Date(+e)}function YH(e,t,n,r,a,i,s,o,l,c){var u=tU(),d=u.invert,p=u.domain,h=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),x=c("%b %
631d"),b=c("%B"),v=c("%Y");function w(e){return(l(e)<e?h:o(e)<e?m:s(e)<e?f:i(e)<e?g:r(e)<e?a(e)<e?y:x:n(e)<e?b:v)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?p(Array.from(e,GH)):p().map(KH)},u.ticks=function(t){var n=p();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=p();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?p(bU(n,e)):u},u.copy=function(){return XB(u,YH(e,t,n,r,a,i,s,o,l,c))},u}function JH(){var e,t,n,r,a,i=0,s=1,o=KB,l=!1;function c(t){return null==t||isNaN(t=+t)?a:o(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),c):[o(0),o(1)]}}return c.domain=function(a){return arguments.length?([i,s]=a,e=r(i=+i),t=r(s=+s),n=e===t?0:1/(t-e),c):[i,s]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(o=e,c):o},c.range=u(VB),c.rangeRound=u($B),c.unknown=function(e){return arguments.length?(a=e,c):a},function(a){return r=a,e=a(i),t=a(s),n=e===t?0:1/(t-e),c}}function XH(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function eV(){var e=MU(JH());return e.copy=function(){return XH(e,eV()).exponent(e.exponent())},Qq.apply(e,arguments)}function tV(){var e,t,n,r,a,i,s,o=0,l=.5,c=1,u=1,d=KB,p=!1;function h(e){return isNaN(e=+e)?s:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:a),d(p?Math.max(0,Math.min(1,e)):e))}function m(e){return function(t){var n,r,a;return arguments.length?([n,r,a]=t,d=WB(e,[n,r,a]),h):[d(0),d(.5),d(1)]}}return h.domain=function(s){return arguments.length?([o,l,c]=s,e=i(o=+o),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),u=t<e?-1:1,h):[o,l,c]},h.clamp=function(e){return arguments.length?(p=!!e,h):p},h.interpolator=function(e){return arguments.length?(d=e,h):d},h.range=m(VB),h.rangeRound=m($B),h.unknown=function(e){return arguments.length?(s=e,h):s},function(s){return i=s,e=s(o),t=s(l),n=s(c),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),u=t<e?-1:1,h}}function nV(){var e=MU(tV());return e.copy=function(){return XH(e,nV()).exponent(e.exponent())},Qq.apply(e,arguments)}!function(e){Oz=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Fz(a),u=qz(a),d=Fz(i),p=qz(i),h=Fz(s),m=qz(s),f=Fz(o),g=qz(o),y=Fz(l),x=qz(l),b={a:function(e){return s[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return o[e.getMonth()]},c:null,d:sH,e:sH,f:dH,g:jH,G:NH,H:oH,I:lH,j:cH,L:uH,m:pH,M:hH,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:QH,s:ZH,S:mH,u:fH,U:gH,V:xH,w:bH,W:vH,x:null,X:null,y:wH,Y:CH,Z:kH,"%":WH},v={a:function(e){return s[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return o[e.getUTCMonth()]},c:null,d:SH,e:SH,f:PH,g:zH,G:VH,H:EH,I:AH,j:OH,L:_H,m:IH,M:MH,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:QH,s:ZH,S:TH,u:RH,U:LH,V:FH,w:qH,W:BH,x:null,X:null,y:UH,Y:HH,Z:$H,"%":WH},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return N(e,t,n,r)},d:Gz,e:Gz,f:nH,g:Wz,G:$z,H:Jz,I:Jz,j:Yz,L:tH,m:Kz,M:Xz,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Zz,Q:aH,s:iH,S:eH,u:Uz,U:zz,V:Hz,w:Bz,W:Vz,x:function(e,t,r){return N(e,n,t,r)},X:function(e,t,n){return N(e,r,t,n)},y:Wz,Y:$z,Z:Qz,"%":rH};function j(e,t){return function(n){var r,a,i,s=[],o=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++o<c;)37===e.charCodeAt(o)&&(s.push(e.slice(l,o)),null!=(a=Iz[r=e.charAt(++o)])?r=e.charAt(++o):a="e"===r?" ":"0",(i=t[r])&&(r=i(n,a)),s.push(r),l=o+1);return s.push(e.slice(l,o)),s.join("")}}function C(e,t){return function(n){var r,a,i=Az(1900,void 0,1);if(N(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);
vendor: 4,187 bytes, line 631
631if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=Ez(Az(i.y,0,1))).getUTCDay(),r=a>4||0===a?dz.ceil(r):dz(r),r=XU.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=Sz(Az(i.y,0,1))).getDay(),r=a>4||0===a?rz.ceil(r):rz(r),r=JU.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?Ez(Az(i.y,0,1)).getUTCDay():Sz(Az(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Ez(i)):Sz(i)}}function N(e,t,n,r){for(var a,i,s=0,o=t.length,l=n.length;s<o;){if(r>=l)return-1;if(37===(a=t.charCodeAt(s++))){if(a=t.charAt(s++),!(i=w[a in Iz?t.charAt(s++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return b.x=j(n,b),b.X=j(r,b),b.c=j(t,b),v.x=j(n,v),v.X=j(r,v),v.c=j(t,v),{format:function(e){var t=j(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=j(e+="",v);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}(e),_z=Oz.format,Oz.parse,Pz=Oz.utcFormat,Oz.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const rV=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Gq,scaleDiverging:function e(){var t=xU(tV()(KB));return t.copy=function(){return XH(t,e())},Qq.apply(t,arguments)},scaleDivergingLog:function e(){var t=SU(tV()).domain([.1,1,10]);return t.copy=function(){return XH(t,e()).base(t.base())},Qq.apply(t,arguments)},scaleDivergingPow:nV,scaleDivergingSqrt:function(){return nV.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=OU(tV());return t.copy=function(){return XH(t,e()).constant(t.constant())},Qq.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,QB),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,QB):[0,1],xU(r)},scaleImplicit:Zq,scaleLinear:function e(){var t=tU();return t.copy=function(){return XB(t,e())},Wq.apply(t,arguments),xU(t)},scaleLog:function e(){const t=SU(eU()).domain([1,10]);return t.copy=()=>XB(t,e()).base(t.base()),Wq.apply(t,arguments),t},scaleOrdinal:Kq,scalePoint:function(){return Yq(Gq.apply(null,arguments).paddingInner(1))},scalePow:TU,scaleQuantile:function e(){var t,n=[],r=[],a=[];function i(){var e=0,t=Math.max(1,r.length);for(a=new Array(t-1);++e<t;)a[e-1]=$q(n,e/t);return s}function s(e){return null==e||isNaN(e=+e)?t:r[Oq(a,e)]}return s.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?a[t-1]:n[0],t<a.length?a[t]:n[n.length-1]]},s.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(Nq),i()},s.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},s.unknown=function(e){return arguments.length?(t=e,s):t},s.quantiles=function(){return a.slice()},s.copy=function(){return e().domain(n).range(r).unknown(t)},Wq.apply(s,arguments)},scaleQuantize:function e(){var t,n=0,r=1,a=1,i=[.5],s=[0,1];function o(e){return null!=e&&e<=e?s[Oq(i,e,0,a)]:t}function l(){var e=-1;for(i=new Array(a);++e<a;)i[e]=((e+1)*r-(e-a)*n)/(a+1);return o}return o.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},o.range=function(e){return arguments.length?(a=(s=Array.from(e)).length-1,l(
631)):s.slice()},o.invertExtent=function(e){var t=s.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=a?[i[a-1],r]:[i[t-1],i[t]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return e().domain([n,r]).range(s).unknown(t)},Wq.apply(xU(o),arguments)},scaleRadial:function e(){var t,n=tU(),r=[0,1],a=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:a?Math.round(r):r}return i.invert=function(e){return n.invert(RU(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,QB)).map(RU)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(a=!!e,i):a},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(a).clamp(n.clamp()).unknown(t)},Wq.apply(i,arguments),xU(i)},scaleSequential:function e(){var t=xU(JH()(KB));return t.copy=function(){return XH(t,e())},Qq.apply(t,arguments)},scaleSequentialLog:function e(){var t=SU(JH()).domain([1,10]);return t.copy=function(){return XH(t,e()).base(t.base())},Qq.apply(t,arguments)},scaleSequentialPow:eV,scaleSequentialQuantile:function e(){var t=[],n=KB;function r(e){if(null!=e&&!isNaN(e=+e))return n((Oq(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(Nq),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return zq(e);if(t>=1)return Uq(e);var n,r=(n-1)*t,a=Math.floor(r),i=Uq(Hq(e,a).subarray(0,a+1));return i+(zq(e.subarray(a+1))-i)*(r-a)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},Qq.apply(r,arguments)},scaleSequentialSqrt:function(){return eV.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=OU(JH());return t.copy=function(){return XH(t,e()).constant(t.constant())},Qq.apply(t,arguments)},scaleSqrt:function(){return TU.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=OU(eU());return t.copy=function(){return XB(t,e()).constant(t.constant())},Wq.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],a=1;function i(e){return null!=e&&e<=e?r[Oq(n,e,0,a)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),a=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),a=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},Wq.apply(i,arguments)},scaleTime:function(){return Wq.apply(YH(Nz,kz,bz,yz,nz,JU,GU,ZU,QU,_z).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return Wq.apply(YH(jz,Cz,vz,xz,uz,XU,YU,KU,QU,Pz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:yU},Symbol.toStringTag,{value:"Module"}));function aV(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){if(e in rV)return rV[e]();var t="scale".concat(BE(e));return t in rV?rV[t]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function iV(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?aV(e.scale,n,r):aV(t,n,r)}function sV(e){return function(e){return"scale".concat(BE(e))}(e)in rV}var oV=(e,t,n)=>{if(null!=e){var{scale:r,type:a}=e;return"auto"===r?"category"===a&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>
vendor: 5,068 bytes, line 631
631=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===a?"band":"linear":"string"==typeof r?sV(r)?r:"point":void 0}};function lV(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),a=e.range();if(!(0===n.length||a.length<2))return e=>{var t,a,i=function(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(a?e[i]<t:e[i]>t)?n=i+1:r=i}return n}(r,e);if(i<=0)return n[0];if(i>=n.length)return n[n.length-1];var s=null!==(t=r[i-1])&&void 0!==t?t:0,o=null!==(a=r[i])&&void 0!==a?a:0;return Math.abs(e-s)<=Math.abs(e-o)?n[i-1]:n[i]}}}function cV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cV(Object(n),!0).forEach(function(t){dV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pV=[0,"auto"],hV={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},mV=(e,t)=>e.cartesianAxis.xAxis[t],fV=(e,t)=>{var n=mV(e,t);return null==n?hV:n},gV={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:pV,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},yV=(e,t)=>e.cartesianAxis.yAxis[t],xV=(e,t)=>{var n=yV(e,t);return null==n?gV:n},bV={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},vV=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?bV:n},wV=(e,t,n)=>{switch(t){case"xAxis":return fV(e,n);case"yAxis":return xV(e,n);case"zAxis":return vV(e,n);case"angleAxis":return iq(e,n);case"radiusAxis":return sq(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},jV=(e,t,n)=>{switch(t){case"xAxis":return fV(e,n);case"yAxis":return xV(e,n);case"angleAxis":return iq(e,n);case"radiusAxis":return sq(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},CV=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function NV(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var kV=e=>e.graphicalItems.cartesianItems,SV=t_([mq,fq],NV),EV=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),AV=t_([kV,wV,SV],EV,{memoizeOptions:{resultEqualityCheck:vq}}),OV=t_([AV],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(xq)),_V=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),PV=t_([AV],_V),IV=e=>e.map(e=>e.data).filter(Boolean).flat(1),MV=t_([AV],IV,{memoizeOptions:{resultEqualityCheck:vq}}),TV=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},RV=t_([MV,tF],TV),LV=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:sM(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:sM(e,t)}))):e.map(e=>({value:e})),DV=t_([RV,wV,AV],LV);function FV(e){if(ME(e)||e instanceof Date){var t=Number(e);if(tM(t))return t}}function qV(e){if(Array.isArray(e)){var t=[FV(e[0]),FV(e[1])];return nF(t)?t:void 0}var n=FV(e);if(null!=n)return[n,n]}function BV(e){return e.map(FV).filter(UE)}function UV(e,t){var n=FV(e),r=FV(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var zV=t_([DV],e=>null==e?void 0:e.map(e=>e.value).sort(UV));function HV(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var VV=e=>{var t=wq(e),n=jq(e);return jV(e,t,n)},$V=t_([VV],e=>null==e?void 0:e.dataKey),WV=t_([OV,tF,VV],yq),QV=(e,t,n,r)=>{var a=t.reduce((e,t)=>
631{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(a).map(t=>{var[a,i]=t,s=r?[...i].reverse():i,o=s.map(gq);return[a,{stackedData:dM(e,o,n),graphicalItems:s}]}))},ZV=t_([WV,OV,$F,WF],QV),KV=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(null==r&&"zAxis"!==n){var s=hM(e,a,i);if(null==s||0!==s[0]||0!==s[1])return s}},GV=t_([wV],e=>e.allowDataOverflow),YV=e=>{var t;if(null==e||!("domain"in e))return pV;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=BV(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:pV},JV=t_([wV],YV),XV=t_([JV,GV],aF),e$=t_([ZV,XD,mq,XV],KV,{memoizeOptions:{resultEqualityCheck:bq}}),t$=e=>e.errorBars,n$=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var a=r.flat();return[Math.min(...a),Math.max(...a)]}},r$=(e,t,n,r,a)=>{var i,s;if(n.length>0&&e.forEach(e=>{n.forEach(n=>{var o,l,c=null===(o=r[n.id])||void 0===o?void 0:o.filter(e=>HV(a,e)),u=sM(e,null!==(l=t.dataKey)&&void 0!==l?l:n.dataKey),d=function(e,t,n){return!n||"number"!=typeof t||_E(t)?[]:n.length?BV(n.flatMap(n=>{var r,a,i=sM(e,n.dataKey);if(Array.isArray(i)?[r,a]=i:r=a=i,tM(r)&&tM(a))return[t-r,t+a]})):[]}(e,u,c);if(d.length>=2){var p=Math.min(...d),h=Math.max(...d);(null==i||p<i)&&(i=p),(null==s||h>s)&&(s=h)}var m=qV(u);null!=m&&(i=null==i?m[0]:Math.min(i,m[0]),s=null==s?m[1]:Math.max(s,m[1]))})}),null!=(null==t?void 0:t.dataKey)&&e.forEach(e=>{var n=qV(sM(e,t.dataKey));null!=n&&(i=null==i?n[0]:Math.min(i,n[0]),s=null==s?n[1]:Math.max(s,n[1]))}),tM(i)&&tM(s))return[i,s]},a$=t_([RV,wV,PV,t$,mq],r$,{memoizeOptions:{resultEqualityCheck:bq}});function i$(e){var{value:t}=e;if(ME(t)||t instanceof Date)return t}var s$=e=>e.referenceElements.dots,o$=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),l$=t_([s$,mq,fq],o$),c$=e=>e.referenceElements.areas,u$=t_([c$,mq,fq],o$),d$=e=>e.referenceElements.lines,p$=t_([d$,mq,fq],o$),h$=(e,t)=>{if(null!=e){var n=BV(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},m$=t_(l$,mq,h$),f$=(e,t)=>{if(null!=e){var n=BV(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},g$=t_([u$,mq],f$);var y$=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return BV([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:BV(n)}(e):function(e){var t;if(null!=e.y)return BV([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:BV(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},x$=t_([p$,mq],y$),b$=t_(m$,x$,g$,(e,t,n)=>n$(e,n,t)),v$=(e,t,n,r,a,i,s,o)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(nF(r))return rF(r,t,n)}catch(h){}if(Array.isArray(e)&&2===e.length){var a,i,[s,o]=e;if("auto"===s)null!=t&&(a=Math.min(...t));else if(IE(s))a=s;else if("function"==typeof s)try{null!=t&&(a=s(null==t?void 0:t[0]))}catch(m){}else if("string"==typeof s&&mM.test(s)){var l=mM.exec(s);if(null==l||null==l[1]||null==t)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=null==t?void 0:t[0];if("auto"===o)null!=t&&(i=Math.max(...t));else if(IE(o))i=o;else if("function"==typeof o)try{null!=t&&(i=o(null==t?void 0:t[1]))}catch(f){}else if("string"==typeof o&&fM.test(o)){var u=fM.exec(o);if(null==u||null==u[1]||null==t)i=void 0;else{var d=+u[1];i=t[1]+d}}else i=null==t?void 0:t[1];var p=[a,i];if(nF(p))return null==t?p:rF(p,t,n)}}}(t,"vertical"===s&&"xAxis"===o||"horizontal"===s&&"yAxis"===o?n$(r,i,a):n$(i,a),e.allowDataOverflow),w$=t_([wV,JV,XV,e$,a$,b$,yT,mq],v$,{memoizeOptions:{resultEqualityCheck:bq}}),j$=[0,1],C$=(e,t,n,r,a,i,s)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==s){var o,{dataKey:l,type:c}=e,u=oM(t,i);return u&&null==l?JD(0,null!==(o=null==n?void 0:n.length)&&void 0!==o?o:0):"category"===c?((e,t,n
vendor: 17,615 bytes, line 631
631)=>{var r=e.map(i$).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&DE(r))?JD(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"===a?j$:s}},N$=t_([wV,yT,RV,DV,$F,mq,w$],C$),k$=t_([wV,CV,QF],oV),S$=(e,t,n)=>{var{niceTicks:r}=t;if("none"!==r){var a=YV(t),i=Array.isArray(a)&&("auto"===a[0]||"auto"===a[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&nF(e)){if(i)return UF(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return zF(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(i&&nF(e))return UF(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&nF(e))return zF(e,t.tickCount,t.allowDecimals,"adaptive")}}},E$=t_([N$,jV,k$],S$),A$=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&nF(t)&&Array.isArray(n)&&n.length>0){var a,i,s=t[0],o=null!==(a=n[0])&&void 0!==a?a:0,l=t[1],c=null!==(i=n[n.length-1])&&void 0!==i?i:0;return[Math.min(s,o),Math.max(l,c)]}return t},O$=t_([wV,N$,E$,mq],A$),_$=t_(DV,wV,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(BV(e.map(e=>e.value))).sort((e,t)=>e-t),a=r[0],i=r[r.length-1];if(null==a||null==i)return 1/0;var s=i-a;if(0===s)return 1/0;for(var o=0;o<r.length-1;o++){var l=r[o],c=r[o+1];if(null!=l&&null!=c){var u=c-l;n=Math.min(n,u)}}return n/s}}),P$=t_(_$,yT,VF,MM,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!tM(e))return 0;var i="vertical"===t?r.height:r.width;if("gap"===a)return e*i/2;if("no-gap"===a){var s=LE(n,e*i),o=e*i/2;return o-s-(o-s)/i*s}return 0}),I$=t_(fV,(e,t,n)=>{var r=fV(e,t);return null==r||"string"!=typeof r.padding?0:P$(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:a}=e;return"string"==typeof a?{left:t,right:t}:{left:(null!==(n=a.left)&&void 0!==n?n:0)+t,right:(null!==(r=a.right)&&void 0!==r?r:0)+t}}),M$=t_(xV,(e,t,n)=>{var r=xV(e,t);return null==r||"string"!=typeof r.padding?0:P$(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:a}=e;return"string"==typeof a?{top:t,bottom:t}:{top:(null!==(n=a.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=a.bottom)&&void 0!==r?r:0)+t}}),T$=t_([MM,I$,qM,FM,(e,t,n)=>n],(e,t,n,r,a)=>{var{padding:i}=r;return a?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),R$=t_([MM,yT,M$,qM,FM,(e,t,n)=>n],(e,t,n,r,a,i)=>{var{padding:s}=a;return i?[r.height-s.bottom,s.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),L$=(e,t,n,r)=>{var a;switch(t){case"xAxis":return T$(e,n,r);case"yAxis":return R$(e,n,r);case"zAxis":return null===(a=vV(e,n))||void 0===a?void 0:a.range;case"angleAxis":return dq(e);case"radiusAxis":return pq(e,n);default:return}},D$=t_([wV,L$],JF),F$=t_([k$,O$],(e,t)=>{if(null!=t){if("linear"===e){if(!nF(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];tM(i)&&((void 0===n||i<n)&&(n=i),(void 0===r||i>r)&&(r=i))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}}),q$=t_([wV,k$,F$,D$],iV),B$=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:a,scale:i}=n;return!oM(e,r)||"number"!==a&&"auto"===i?void 0:t.map(e=>e.value)}},U$=t_([yT,DV,jV,mq],B$),z$=t_([q$],Cq);function H$(e,t){return e.id<t.id?-1:e.id>t.id?1:0}t_([q$],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):lV(e,void 0)}),t_([q$,zV],lV),t_([AV,t$,mq],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>HV(n,e)));var V$=(e,t)=>t,$$=(e,t,n)=>n,W$=t_(CM,V$,$$,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(H$)),Q$=t_(NM,V$,$$,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(H$)),Z$=(e,t)=>({width:e.width,height:t.height}),K$=t_(MM,fV,Z$),G$=t_(vM,MM,W$,V$,$$,(e,t,n,r,a)=>{var i,s={};return n.forEach(n=>{var o=Z$(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!a||"bottom"===r&&a;s[n.id]=i-Number(l)*o.height,i+=(l?-1:1)*o.height}),s}),Y$=t_(bM,MM,Q$,V$,$$,(e,t,n,r,a)=>{var i,s={};return n.forEach(n=>{var o=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!a||"right"===r&&a;s[n.id]=i-Number(l)*o.width,i+=(l?-1:1)*o.width}),s}),J$=t_([MM,fV,(e,t)=>{var n=fV(e,t);if(null!=n)return G$(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var a=null==n?void 0:n[r];return null==a?{x:e.left,y:0}:{x:e.left,y:a}}}),X$=t_([MM,xV,(e,t)=>{var n=xV(e,t);if(null!=n)return Y$(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var a=null==n?void 0:n[r];return null==a?{x:0,y:e.top}:{x:a,y:e.top}}}),eW=t_(MM,xV,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),tW=(e,t,n)=>{switch(t){case"xAxis":return K$(e,n).width;case"yAxis":return eW(e,n).height;default:return}},nW=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,o=oM(e,r),l=t.map(e=>e.value);return s&&o&&"category"===i&&a&&DE(l)?l:void 0}},rW=t_([yT,DV,wV,mq],nW),aW=t_([yT,(e,t,n)=>{switch(t){case"xAxis":return fV(e,n);case"yAxis":return xV(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},k$,z$,rW,U$,L$,E$,mq],(e,t,n,r,a,i,s,o,l)=>{if(null!=t){var c=oM(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:i,duplicateDomain:a,isCategorical:c,niceTicks:o,range:s,realScaleType:n,scale:r}}}),iW=t_([yT,jV,k$,z$,E$,L$,rW,U$,mq],(e,t,n,r,a,i,s,o,l)=>{if(null!=t&&null!=r){var c=oM(e,l),{type:u,ticks:d,tickCount:p}=t,h="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,m="category"===u&&r.bandwidth?r.bandwidth()/h:0;m="angleAxis"===l&&null!=i&&i.length>=2?2*OE(i[0]-i[1])*m:m;var f=d||a;return f?f.map((e,t)=>{var n=s?s.indexOf(e):e,a=r.map(n);return tM(a)?{index:t,coordinate:a+m,value:e,offset:m}:null}).filter(UE):c&&o?o.map((e,t)=>{var n=r.map(e);return tM(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(UE):r.ticks?r.ticks(p).map((e,t)=>{var n=r.map(e);return tM(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(UE):r.domain().map((e,t)=>{var n=r.map(e);return tM(n)?{coordinate:n+m,value:s?s[e]:e,index:t,offset:m}:null}).filter(UE)}}),sW=t_([yT,jV,z$,L$,rW,U$,mq],(e,t,n,r,a,i,s)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var o=oM(e,s),{tickCount:l}=t,c=0;return c="angleAxis"===s&&(null==r?void 0:r.length)>=2?2*OE(r[0]-r[1])*c:c,o&&i?i.map((e,t)=>{var r=n.map(e);return tM(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(UE):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return tM(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(UE):n.domain().map((e,t)=>{var r=n.map(e);return tM(r)?{coordinate:r+c,value:a?a[e]:e,index:t,offset:c}:null}).filter(UE)}}),oW=t_(wV,z$,(e,t)=>{if(null!=e&&null!=t)return uV(uV({},e),{},{scale:t})}),lW=t_([wV,k$,N$,D$],iV),cW=t_([lW],Cq);t_((e,t,n)=>vV(e,n),cW,(e,t)=>{if(null!=e&&null!=t)return uV(uV({},e),{},{scale:t})});var uW=t_([yT,CM,NM],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}});t_([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,a=e[0];for(var i of e){var s=Math.abs(i.coordinate-t);s<r&&(r=s,a=i)}return null===(n=a)||void 0===n?void 0:n.value}});var dW=e=>e.options.defaultTooltipEventType,pW=e=>e.options.validateTooltipEventTypes;function hW(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function mW(e,t){return hW(t,dW(e),pW(e))}var fW=(e,t)=>{var n,r=Number(t);if(!_E(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},gW={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},yW=mI({name:"tooltip",initialState:{itemInteraction:{click:gW,hover:gW},axisInteraction:{click:gW,hover:gW},keyboardInteraction:gW,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:aI()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=$P(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:aI()},removeTooltipEntrySettings:{reducer(e,t){var n=$P(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:aI()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:xW,replaceTooltipEntrySettings:bW,removeTooltipEntrySettings:vW,setTooltipSettingsState:wW,setActiveMouseOverItemIndex:jW,mouseLeaveItem:CW,mouseLeaveChart:NW,setActiveClickItemIndex:kW,setMouseOverAxisIndex:SW,setMouseClickAxisIndex:EW,setSyncInteraction:AW,setKeyboardInteraction:OW}=yW.actions,_W=yW.reducer;function PW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PW(Object(n),!0).forEach(function(t){MW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TW=(e,t,n,r)=>{if(null==t)return gW;var a=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==a)return gW;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var i=!0===e.settings.active;if(null!=a.index){if(i)return IW(IW({},a),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return IW(IW({},gW),{},{coordinate:a.coordinate})};function RW(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],a=t[1];if(void 0===n)return!1;var i=Math.min(r,a),s=Math.max(r,a);return n>=i&&n<=s}var LW=(e,t,n,r)=>{var a=null==e?void 0:e.index;if(null==a)return null;var i=Number(a);if(!tM(i))return a;var s=1/0;t.length>0&&(s=t.length-1);var o=Math.max(0,Math.min(i,s)),l=t[o];return null==l||function(e,t,n){if(null==n||null==t)return!0;var r=sM(e,t);return null==r||!nF(n)||RW(r,n)}(l,n,r)?String(o):null},DW=(e,t,n,r,a,i,s)=>{if(null!=i){var o=s[0],l=null==o?void 0:o.getPosition(i);if(null!=l)return l;var c=null==a?void 0:a[Number(i)];if(c)return"horizontal"===n?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},FW=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var a;if(a="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==a)return e.tooltipItemPayloads;if(null==a&&null!=r){var i=e.tooltipItemPayloads[0];return null!=i?[i]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===a})},qW=e=>e.options.tooltipPayloadSearcher,BW=e=>e.tooltip;function UW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UW(Object(n),!0).forEach(function(t){HW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VW(e){if("string"==typeof e)return e}var $W=(e,t,n,r,a,i,s)=>{if(null!=t&&null!=i){var{chartData:o,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,p,h,{dataDefinedOnItem:m,settings:f}=n,g=function(e,t){return null!=e?e:t}(m,o),y=Array.isArray(g)?eM(g,c,u):g,x=null!==(d=null==f?void 0:f.dataKey)&&void 0!==d?d:r,b=null==f?void 0:f.nameKey;(p=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===s?function(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):SE(e,t))===n)}(y,r,a):i(y,t,l,b),Array.isArray(p))?p.forEach(t=>{var n,r,a=function(e){if(null!=e&&"object"==typeof e){var t,n="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,r="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0;return{name:n,unit:r,dataKey:"dataKey"in e?"string"==typeof(t=e.dataKey)||"number"==typeof t?t:"function"==typeof t?e=>t(e):void 0:void 0,payload:"payload"in e?e.payload:void 0,color:"color"in e?VW(e.color):void 0,fill:"fill"in e?VW(e.fill):void 0}}}(t),i=null==a?void 0:a.name,s=null==a?void 0:a.dataKey,o=null==a?void 0:a.payload,l=zW(zW({},f),{},{name:i,unit:null==a?void 0:a.unit,color:null!==(n=null==a?void 0:a.color)&&void 0!==n?n:null==f?void 0:f.color,fill:null!==(r=null==a?void 0:a.fill)&&void 0!==r?r:null==f?void 0:f.fill});e.push(yM({tooltipEntrySettings:l,dataKey:s,payload:o,value:sM(o,s),name:null==i?void 0:String(i)}))}):e.push(yM({tooltipEntrySettings:f,dataKey:x,payload:p,value:sM(p,x),name:null!==(h=sM(p,b))&&void 0!==h?h:null==f?void 0:f.name}));return e},[])}},WW=t_([VV,CV,QF],oV),QW=t_([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),ZW=t_([wq,jq],NV),KW=t_([QW,VV,ZW],EV,{memoizeOptions:{resultEqualityCheck:vq}}),GW=t_([KW],e=>e.filter(xq)),YW=t_([KW],IV,{memoizeOptions:{resultEqualityCheck:vq}}),JW=t_([YW,XD],TV),XW=t_([GW,XD,VV],yq),eQ=t_([JW,VV,KW],LV),tQ=t_([VV],YV),nQ=t_([VV],e=>e.allowDataOverflow),rQ=t_([tQ,nQ],aF),aQ=t_([KW],e=>e.filter(xq)),iQ=t_([XW,aQ,$F,WF],QV),sQ=t_([iQ,XD,wq,rQ],KV),oQ=t_([KW],_V),lQ=t_([JW,VV,oQ,t$,wq],r$,{memoizeOptions:{resultEqualityCheck:bq}}),cQ=t_([s$,wq,jq],o$),uQ=t_([cQ,wq],h$),dQ=t_([c$,wq,jq],o$),pQ=t_([dQ,wq],f$),hQ=t_([d$,wq,jq],o$),mQ=t_([hQ,wq],y$),fQ=t_([uQ,mQ,pQ],n$),gQ=t_([VV,tQ,rQ,sQ,lQ,fQ,yT,wq],v$),yQ=t_([VV,yT,JW,eQ,$F,wq,gQ],C$),xQ=t_([yQ,VV,WW],S$),bQ=t_([VV,yQ,xQ,wq],A$),vQ=e=>{var t=wq(e),n=jq(e);return L$(e,t,n,!1)},wQ=t_([VV,vQ],JF),jQ=t_([VV,WW,bQ,wQ],iV),CQ=t_([jQ],Cq),NQ=t_([yT,eQ,VV,wq],nW),kQ=t_([yT,eQ,VV,wq],B$),SQ=t_([yT,VV,WW,CQ,vQ,NQ,kQ,wq],(e,t,n,r,a,i,s,o)=>
631{if(t){var{type:l}=t,c=oM(e,o);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===o&&null!=a&&(null==a?void 0:a.length)>=2?2*OE(a[0]-a[1])*d:d,c&&s?s.map((e,t)=>{var n=r.map(e);return tM(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(UE):r.domain().map((e,t)=>{var n=r.map(e);return tM(n)?{coordinate:n+d,value:i?i[e]:e,index:t,offset:d}:null}).filter(UE)}}}),EQ=t_([dW,pW,e=>e.tooltip.settings],(e,t,n)=>hW(n.shared,e,t)),AQ=e=>e.tooltip.settings.trigger,OQ=e=>e.tooltip.settings.defaultIndex,_Q=t_([BW,EQ,AQ,OQ],TW),PQ=t_([_Q,JW,$V,yQ],LW),IQ=t_([SQ,PQ],fW),MQ=t_([_Q],e=>{if(e)return e.dataKey}),TQ=t_([_Q],e=>{if(e)return e.graphicalItemId}),RQ=t_([BW,EQ,AQ,OQ],FW),LQ=t_([bM,vM,yT,MM,SQ,OQ,RQ],DW),DQ=t_([_Q,LQ],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),FQ=t_([_Q],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),qQ=t_([RQ,PQ,XD,$V,IQ,qW,EQ],$W);function BQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BQ(Object(n),!0).forEach(function(t){zQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t_([qQ],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});var HQ=()=>{var e=QO(VV),t=QO(SQ),n=QO(CQ);return gM(e&&n?UQ(UQ({},e),{},{scale:n}):void 0,t)};function VQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VQ(Object(n),!0).forEach(function(t){WQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QQ=(e,t,n,r,a)=>{var i,s=null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0;if(s<=1||null==e)return 0;if("angleAxis"===r&&null!=a&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var o=0;o<s;o++){var l,c,u,d,p,h=o>0?null===(l=n[o-1])||void 0===l?void 0:l.coordinate:null===(c=n[s-1])||void 0===c?void 0:c.coordinate,m=null===(u=n[o])||void 0===u?void 0:u.coordinate,f=o>=s-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(p=n[o+1])||void 0===p?void 0:p.coordinate,g=void 0;if(null!=h&&null!=m&&null!=f)if(OE(m-h)!==OE(f-m)){var y=[];if(OE(f-m)===OE(a[1]-a[0])){g=f;var x=m+a[1]-a[0];y[0]=Math.min(x,(x+h)/2),y[1]=Math.max(x,(x+h)/2)}else{g=h;var b=f+a[1]-a[0];y[0]=Math.min(m,(b+m)/2),y[1]=Math.max(m,(b+m)/2)}var v,w=[Math.min(m,(g+m)/2),Math.max(m,(g+m)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1])return null===(v=n[o])||void 0===v?void 0:v.index}else{var j,C=Math.min(h,f),N=Math.max(h,f);if(e>(C+m)/2&&e<=(N+m)/2)return null===(j=n[o])||void 0===j?void 0:j.index}}else if(t)for(var k=0;k<s;k++){var S=t[k];if(null!=S){var E=t[k+1],A=t[k-1];if(0===k&&null!=E&&e<=(S.coordinate+E.coordinate)/2)return S.index;if(k===s-1&&null!=A&&e>(S.coordinate+A.coordinate)/2)return S.index;if(k>0&&k<s-1&&null!=A&&null!=E&&e>(S.coordinate+A.coordinate)/2&&e<=(S.coordinate+E.coordinate)/2)return S.index}}return-1},ZQ=(e,t)=>t,KQ=(e,t,n)=>n,GQ=(e,t,n,r)=>r,YQ=t_(SQ,e=>S_(e,e=>e.coordinate)),JQ=t_([BW,ZQ,KQ,GQ],TW),XQ=t_([JQ,JW,$V,yQ],LW),eZ=t_([BW,ZQ,KQ,GQ],FW),tZ=t_([bM,vM,yT,MM,SQ,GQ,eZ],DW),nZ=t_([JQ,tZ],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),rZ=t_([SQ,XQ],fW),aZ=t_([eZ,XQ,XD,$V,rZ,qW,ZQ],$W),iZ=t_([JQ,XQ],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),sZ=(e,t,n,r,a,i,s)=>{if(e&&r&&a&&i&&n){var o=PD(e,n);if(o){var l=((e,t)=>
631"centric"===t?e.angle:e.radius)(o,t),c=QQ(l,s,i,r,a),u=((e,t,n,r)=>{var a=t.find(e=>e&&e.index===n);if(a){if("centric"===e){var i=a.coordinate,{radius:s}=r;return $Q($Q($Q({},r),AD(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var o=a.coordinate,{angle:l}=r;return $Q($Q($Q({},r),AD(r.cx,r.cy,o,l)),{},{angle:l,radius:o})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,i,c,o);return{activeIndex:String(c),activeCoordinate:u}}}},oZ=t_(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),lZ=t_(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(YF));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function cZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cZ(Object(n),!0).forEach(function(t){dZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pZ={zIndexMap:Object.values(YF).reduce((e,t)=>uZ(uZ({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},hZ=new Set(Object.values(YF));var mZ=mI({name:"zIndex",initialState:pZ,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:aI()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return hZ.has(e)}(n)&&delete e.zIndexMap[n])},prepare:aI()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:a}=t.payload;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:a?void 0:r,panoramaElement:a?r:void 0}},prepare:aI()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:aI()}}}),{registerZIndexPortal:fZ,unregisterZIndexPortal:gZ,registerZIndexPortalElement:yZ,unregisterZIndexPortalElement:xZ}=mZ.actions,bZ=mZ.reducer;function vZ(e){var{zIndex:n,children:a}=e,i=void 0!==xT()&&void 0!==n&&0!==n,s=DM(),o=HO();t.useLayoutEffect(()=>i?(o(fZ({zIndex:n})),()=>{o(gZ({zIndex:n}))}):zE,[o,n,i]);var l=QO(e=>oZ(e,n,s));return i?l?r.createPortal(a,l):null:a}function wZ(){return wZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wZ.apply(null,arguments)}function jZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jZ(Object(n),!0).forEach(function(t){NZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
vendor: 4,607 bytes, line 631
631function NZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kZ(e){var{cursor:n,cursorComp:r,cursorProps:a}=e;return t.isValidElement(n)?t.cloneElement(n,a):t.createElement(r,a)}function SZ(e){var n,r,a,i,{coordinate:s,payload:o,index:l,offset:c,tooltipAxisBandSize:u,layout:d,cursor:p,tooltipEventType:h,chartName:m}=e,f=s,g=o,y=l;if(!p||!f||"ScatterChart"!==m&&"axis"!==h)return null;if("ScatterChart"===m)r=f,a=bL,i=YF.cursorLine;else if("BarChart"===m)r=function(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-a:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-a,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,f,c,u),a=fD,i=YF.cursorRectangle;else if("radial"===d&&YE(f)){var{cx:x,cy:b,radius:v,startAngle:w,endAngle:j}=ID(f);r={cx:x,cy:b,startAngle:w,endAngle:j,innerRadius:v,outerRadius:v},a=FD,i=YF.cursorLine}else r={points:qD(d,f,c)},a=hL,i=YF.cursorLine;var C="object"==typeof p&&"className"in p?p.className:void 0,N=CZ(CZ(CZ(CZ({stroke:"#ccc",pointerEvents:"none"},c),r),Wk(p)),{},{payload:g,payloadIndex:y,className:de("recharts-tooltip-cursor",C)});return t.createElement(vZ,{zIndex:null!==(n=e.zIndex)&&void 0!==n?n:i},t.createElement(kZ,{cursor:p,cursorComp:a,cursorProps:N}))}function EZ(e){var n=HQ(),r=mT(),a=xT(),i=QO(QF);return null==n||null==r||null==a||null==i?null:t.createElement(SZ,wZ({},e,{offset:r,layout:a,tooltipAxisBandSize:n,chartName:i}))}var AZ,OZ=t.createContext(null),_Z={exports:{}};var PZ=(AZ||(AZ=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,a),!0;case 5:return u.fn.call(u.context,t,r,a,i),!0;case 6:return u.fn.call(u.context,t,r,a,i,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,a);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||a&&!o[l].once||r&&o[l].context!==r)&&c.push(o[l]);c.length?this._events[i]=1===c.length?c[0]:c:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o}
631(_Z)),_Z.exports);var IZ=new(j(PZ)),MZ="recharts.syncEvent.tooltip",TZ="recharts.syncEvent.brush",RZ=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!_E(n))return e[n]}},LZ=mI({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),DZ=LZ.reducer,{createEventEmitter:FZ}=LZ.actions;function qZ(e){return e.tooltip.syncInteraction}var BZ=mI({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:UZ,setDataStartEndIndexes:zZ,setComputedData:HZ}=BZ.actions,VZ=BZ.reducer,$Z=["x","y"];function WZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WZ(Object(n),!0).forEach(function(t){ZZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KZ(){var e=QO(ZF),n=QO(GF),r=HO(),a=QO(KF),i=QO(SQ),s=xT(),o=pT(),l=QO(e=>e.rootProps.className);t.useEffect(()=>{if(null==e)return zE;var t=(t,l,c)=>{var u;if(n!==c&&e===t)if("index"!==a){if(null!=i){var d;if("function"==typeof a){var p={activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate},h=a(i,p);d=i[h]}else"value"===a&&(d=i.find(e=>String(e.value)===l.payload.label));var{coordinate:m}=l.payload;if(null!=d&&!1!==l.payload.active&&null!=m&&null!=o){var{x:f,y:g}=m,y=Math.min(f,o.x+o.width),x=Math.min(g,o.y+o.height),b={x:"horizontal"===s?d.coordinate:y,y:"horizontal"===s?x:d.coordinate},v=AW({active:l.payload.active,coordinate:b,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId});r(v)}else r(AW({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(o&&null!=l&&null!==(u=l.payload)&&void 0!==u&&u.coordinate&&l.payload.sourceViewBox){var w=l.payload.coordinate,{x:j,y:C}=w,N=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(w,$Z),{x:k,y:S,width:E,height:A}=l.payload.sourceViewBox,O=QZ(QZ({},N),{},{x:o.x+(E?(j-k)/E:0)*o.width,y:o.y+(A?(C-S)/A:0)*o.height});r(QZ(QZ({},l),{},{payload:QZ(QZ({},l.payload),{},{coordinate:O})}))}else r(l)};return IZ.on(MZ,t),()=>{IZ.off(MZ,t)}},[l,r,n,e,a,i,s,o])}function GZ(){var e=HO();t.useEffect(()=>{e(FZ())},[e]),KZ(),function(){var e=QO(ZF),n=QO(GF),r=HO();t.useEffect(()=>{if(null==e)return zE;var t=(t,a,i)=>{n!==i&&e===t&&r(zZ(a))};return IZ.on(TZ,t),()=>{IZ.off(TZ,t)}},[r,n,e])}()}function YZ(e,n,r,a,i,s){var o=QO(t=>((e,t,n)=>{if(null!=t){var r=BW(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(t,e,n)),l=QO(TQ),c=QO(GF),u=QO(ZF),d=QO(KF),p=QO(qZ),h=null==p?void 0:p.active,m=pT();t.useEffect(()=>{if(!h&&null!=u&&null!=c){var e=AW({active:s,coordinate:r,dataKey:o,index:i,label:"number"==typeof a?String(a):a,sourceViewBox:m,graphicalItemId:l});IZ.emit(MZ,u,e,c)}},[h,r,o,l,i,a,c,u,d,s,m])}function JZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?JZ(Object(n),!0).forEach(function(t){eK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tK(e){return e.dataKey}var nK=[],rK={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function aK(e){var n,a,i=tA(e,rK),{active:s,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:u,filterNull:d,isAnimationActive:p,offset:h,payloadUniqBy:m,position:f,reverseDirection:g,useTranslate3d:y,wrapperStyle:x,cursor:b,shared:v,trigger:w,defaultIndex:j,portal:C,axisId:N}=i,k=HO(),S="number"==typeof j?String(j):j;t.useEffect(()=>{k(wW({shared:v,trigger:w,axisId:N,active:s,defaultIndex:S}))},[k,v,w,N,s,S]);var E=pT(),A=tL(),O=function(e){return QO(t=>mW(t,e))}(v),{activeIndex:_,isActive:P}=null!==(n=QO(e=>iZ(e,O,w,S)))&&void 0!==n?n:{},I=QO(e=>aZ(e,O,w,S)),M=QO(e=>rZ(e,O,w,S)),T=QO(e=>nZ(e,O,w,S)),R=I,L=t.useContext(OZ),D=null!==(a=null!=s?s:P)&&void 0!==a&&a,[F,q]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=t.useState({height:0,left:0,top:0,width:0}),a=t.useCallback(e=>{if(null!=e){var t=e.getBoundingClientRect(),a={height:t.height,left:t.left,top:t.top,width:t.width};(Math.abs(a.height-n.height)>1||Math.abs(a.left-n.left)>1||Math.abs(a.top-n.top)>1||Math.abs(a.width-n.width)>1)&&r({height:a.height,left:a.left,top:a.top,width:a.width})}},[n.width,n.height,n.top,n.left,...e]);return[n,a]}([R,D]),B="axis"===O?M:void 0;YZ(O,w,T,B,_,D);var U=null!=C?C:L;if(null==U||null==E||null==O)return null;var z=null!=R?R:nK;D||(z=nK),d&&z.length&&(z=function(e,t,n){return!0===t?RO(e,n):"function"==typeof t?RO(e,t):e}(z.filter(e=>null!=e.value&&(!0!==e.hide||i.includeHidden)),m,tK));var H=z.length>0,V=XZ(XZ({},i),{},{payload:z,label:B,active:D,activeIndex:_,coordinate:T,accessibilityLayer:A}),$=t.createElement(eL,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:D,coordinate:T,hasPayload:H,offset:h,position:f,reverseDirection:g,useTranslate3d:y,viewBox:E,wrapperStyle:x,lastBoundingBox:F,innerRef:q,hasPortalFromProps:Boolean(C)},function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):"function"==typeof e?t.createElement(e,n):t.createElement(zR,n)}(u,V));return t.createElement(t.Fragment,null,r.createPortal($,U),D&&t.createElement(EZ,{cursor:b,tooltipEventType:O,coordinate:T,payload:z,index:_}))}var iK=e=>null;function sK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}iK.displayName="Cell";function oK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cK=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?oK(Object(n),!0).forEach(function(t){lK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),uK=new class{constructor(e){sK(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(cK.cacheSize),dK={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},pK="recharts_measurement_span";var hK=(e,t)=>{try{var n=document.getElementById(pK);n||((n=document.createElement("span")).setAttribute("id",pK),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,dK,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(a){return{width:0,height:0}}},mK=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||QR)return{width:0,height:0};if(!cK.enableCache)return hK(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",i=t.fontStyle||"",s=t.letterSpacing||"",o=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(s,"|").concat(o)}(e,t),r=uK.get(n);if(r)return r;var a=hK(e,t);return uK.set(n,a),a};var fK=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gK=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,yK=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,xK=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},vK=["cm","mm","pt","pc","in","Q","px"];var wK="NaN";class jK{static parse(e){var t,[,n,r]=null!==(t=xK.exec(e))&&void 0!==t?t:[];return null==n?jK.NaN:new jK(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,_E(e)&&(this.unit=""),""===t||yK.test(t)||(this.num=NaN,this.unit=""),function(e){return vK.includes(e)}(t)&&(this.num=function(e,t){return e*bK[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new jK(NaN,""):new jK(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new jK(NaN,""):new jK(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new jK(NaN,""):new jK(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new jK(NaN,""):new jK(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return _E(this.num)}}function CK(e){if(null==e||e.includes(wK))return wK;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=null!==(n=fK.exec(t))&&void 0!==n?n:[],s=jK.parse(null!=r?r:""),o=jK.parse(null!=i?i:""),l="*"===a?s.multiply(o):s.divide(o);if(l.isNaN())return wK;t=t.replace(fK,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,p]=null!==(c=gK.exec(t))&&void 0!==c?c:[],h=jK.parse(null!=u?u:""),m=jK.parse(null!=p?p:""),f="+"===d?h.add(m):h.subtract(m);if(f.isNaN())return wK;t=t.replace(gK,f.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(jK,"NaN",new jK(NaN,""));var NK=/\(([^()]*)\)/;function kK(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=NK.exec(n));){var[,r]=t;n=n.replace(NK,CK(r))}return n}(t),t=CK(t)}function SK(e){var t=function(e){try{return kK(e)}catch(t){return wK}}(e.slice(5,-1));return t===wK?"":t}var EK=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],AK=["dx","dy","angle","className","breakAll"];function OK(){return OK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OK.apply(null,arguments)}function _K(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var PK=/[ \f\n\r\t\v\u2028\u2029]+/,IK=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];return qE(t)||(a=n?t.toString().split(""):t.toString().split(PK)),{wordsWithComputedWidth:a.map(e=>({word:e,width:mK(e,r).width})),spaceWidth:n?0:mK(" ",r).width}}catch(i){return null}};function MK(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var TK=(e,t,n,r)=>e.reduce((e,a)=>{var{word:i,width:s}=a,o=e[e.length-1];if(o&&null!=s&&(null==t||r||o.width+s+n<Number(t)))o.words.push(i),o.width+=s+n;else{var l={words:[i],width:s};e.push(l)}return e},[]),RK=e=>e.reduce((e,t)=>
631e.width>t.width?e:t),LK=(e,t,n,r,a,i,s,o)=>{var l=e.slice(0,t),c=IK({breakAll:n,style:r,children:l+"…"});if(!c)return[!1,[]];var u=TK(c.wordsWithComputedWidth,i,s,o);return[u.length>a||RK(u).width>Number(i),u]},DK=e=>[{words:qE(e)?[]:e.toString().split(PK),width:void 0}],FK=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!QR){var o=IK({breakAll:i,children:r,style:a});if(!o)return DK(r);var{wordsWithComputedWidth:l,spaceWidth:c}=o;return((e,t,n,r,a)=>{var{maxLines:i,children:s,style:o,breakAll:l}=e,c=IE(i),u=String(s),d=TK(t,r,n,a);if(!c||a)return d;if(!(d.length>i||RK(d).width>Number(r)))return d;for(var p,h=0,m=u.length-1,f=0;h<=m&&f<=u.length-1;){var g=Math.floor((h+m)/2),y=g-1,[x,b]=LK(u,y,l,o,i,r,n,a),[v]=LK(u,g,l,o,i,r,n,a);if(x||v||(h=g+1),x&&v&&(m=g-1),!x&&v){p=b;break}f++}return p||d})({breakAll:i,children:r,maxLines:s,style:a},l,c,t,Boolean(n))}return DK(r)},qK="#808080",BK={angle:0,breakAll:!1,capHeight:"0.71em",fill:qK,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},UK=t.forwardRef((e,n)=>{var r=tA(e,BK),{x:a,y:i,lineHeight:s,capHeight:o,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:d}=r,p=_K(r,EK),h=t.useMemo(()=>FK({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:c,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,c,p.style,p.width]),{dx:m,dy:f,angle:g,className:y,breakAll:x}=p,b=_K(p,AK);if(!ME(a)||!ME(i)||0===h.length)return null;var v,w=Number(a)+(IE(m)?m:0),j=Number(i)+(IE(f)?f:0);if(!tM(w)||!tM(j))return null;switch(d){case"start":v=SK("calc(".concat(o,")"));break;case"middle":v=SK("calc(".concat((h.length-1)/2," * -").concat(s," + (").concat(o," / 2))"));break;default:v=SK("calc(".concat(h.length-1," * -").concat(s,")"))}var C=[],N=h[0];if(c&&null!=N){var k=N.width,{width:S}=p;C.push("scale(".concat(IE(S)&&IE(k)?S/k:1,")"))}return g&&C.push("rotate(".concat(g,", ").concat(w,", ").concat(j,")")),C.length&&(b.transform=C.join(" ")),t.createElement("text",OK({},Qk(b),{ref:n,x:w,y:j,className:de("recharts-text",y),textAnchor:u,fill:l.includes("url")?qK:l}),h.map((e,n)=>{var r=e.words.join(x?"":" ");return t.createElement("tspan",{x:w,dy:0===n?v:s,key:"".concat(r,"-").concat(n)},r)}))});function zK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zK(Object(n),!0).forEach(function(t){VK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}UK.displayName="Text";var $K=["labelRef"],WK=["content"];function QK(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ZK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZK(Object(n),!0).forEach(function(t){GK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZK(Object(n)).forEac
631h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YK(){return YK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YK.apply(null,arguments)}var JK=t.createContext(null),XK=e=>{var{x:n,y:r,upperWidth:a,lowerWidth:i,width:s,height:o,children:l}=e,c=t.useMemo(()=>({x:n,y:r,upperWidth:a,lowerWidth:i,width:s,height:o}),[n,r,a,i,s,o]);return t.createElement(JK.Provider,{value:c},l)},eG=()=>{var e=t.useContext(JK),n=pT();return e||(n?dT(n):void 0)},tG=t.createContext(null),nG=e=>null!=e&&"function"==typeof e,rG=(e,n,r,a,i)=>{var s,o,{offset:l,className:c}=e,{cx:u,cy:d,innerRadius:p,outerRadius:h,startAngle:m,endAngle:f,clockWise:g}=i,y=(p+h)/2,x=((e,t)=>OE(t-e)*Math.min(Math.abs(t-e),360))(m,f),b=x>=0?1:-1;switch(n){case"insideStart":s=m+b*l,o=g;break;case"insideEnd":s=f-b*l,o=!g;break;case"end":s=f+b*l,o=g;break;default:throw new Error("Unsupported position ".concat(n))}o=x<=0?o:!o;var v=AD(u,d,y,s),w=AD(u,d,y,s+359*(o?1:-1)),j="M".concat(v.x,",").concat(v.y,"\n    A").concat(y,",").concat(y,",0,1,").concat(o?0:1,",\n    ").concat(w.x,",").concat(w.y),C=qE(e.id)?RE("recharts-radial-line-"):e.id;return t.createElement("text",YK({},a,{dominantBaseline:"central",className:de("recharts-radial-bar-label",c)}),t.createElement("defs",null,t.createElement("path",{id:C,d:j})),t.createElement("textPath",{xlinkHref:"#".concat(C)},r))},aG=e=>null!=e&&"cx"in e&&IE(e.cx),iG={angle:0,offset:5,zIndex:YF.label,position:"middle",textBreakAll:!1};function sG(e){var n,r,a,i,s,o=tA(e,iG),{viewBox:l,parentViewBox:c,position:u,value:d,children:p,content:h,className:m="",textBreakAll:f,labelRef:g}=o,y=(n=t.useContext(tG),r=QO(hq),n||r),x=eG(),b=function(e){if(!aG(e))return e;var{cx:t,cy:n,outerRadius:r}=e,a=2*r;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}(a=null==l?"center"===u?x:null!=y?y:x:aG(l)?l:dT(l));if(!a||qE(d)&&qE(p)&&!t.isValidElement(h)&&"function"!=typeof h)return null;var v=KK(KK({},o),{},{viewBox:a});if(t.isValidElement(h)){var{labelRef:w}=v,j=QK(v,$K);return t.cloneElement(h,j)}if("function"==typeof h){var{content:C}=v,N=QK(v,WK);if(i=t.createElement(h,N),t.isValidElement(i))return i}else i=(e=>{var{value:t,formatter:n}=e,r=qE(e.children)?t:e.children;return"function"==typeof n?n(r):r})(o);var k=Qk(o);if(aG(a)){if("insideStart"===u||"insideEnd"===u||"end"===u)return rG(o,u,i,k,a);s=((e,t,n)=>{var{cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:o,endAngle:l}=e,c=(o+l)/2;if("outside"===n){var{x:u,y:d}=AD(r,a,s+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=(i+s)/2,{x:h,y:m}=AD(r,a,p,c);return{x:h,y:m,textAnchor:"middle",verticalAnchor:"middle"}})(a,o.offset,o.position)}else{if(!b)return null;var S=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:o,upperWidth:l,lowerWidth:c}=dT(t),u=i,d=i+(l-c)/2,p=(u+d)/2,h=(l+c)/2,m=u+l/2,f=o>=0?1:-1,g=f*r,y=f>0?"end":"start",x=f>0?"start":"end",b=l>=0?1:-1,v=b*r,w=b>0?"end":"start",j=b>0?"start":"end",C=a;if("top"===n){var N={x:u+l/2,y:s-g,horizontalAnchor:"middle",verticalAnchor:y};return C&&(N.height=Math.max(s-C.y,0),N.width=l),N}if("bottom"===n){var k={x:d+c/2,y:s+o+g,horizontalAnchor:"middle",verticalAnchor:x};return C&&(k.height=Math.max(C.y+C.height-(s+o),0),k.width=c),k}if("left"===n){var S={x:p-v,y:s+o/2,horizontalAnchor:w,verticalAnchor:"middle"};
631return C&&(S.width=Math.max(S.x-C.x,0),S.height=o),S}if("right"===n){var E={x:p+h+v,y:s+o/2,horizontalAnchor:j,verticalAnchor:"middle"};return C&&(E.width=Math.max(C.x+C.width-E.x,0),E.height=o),E}var A=C?{width:h,height:o}:{};return"insideLeft"===n?HK({x:p+v,y:s+o/2,horizontalAnchor:j,verticalAnchor:"middle"},A):"insideRight"===n?HK({x:p+h-v,y:s+o/2,horizontalAnchor:w,verticalAnchor:"middle"},A):"insideTop"===n?HK({x:u+l/2,y:s+g,horizontalAnchor:"middle",verticalAnchor:x},A):"insideBottom"===n?HK({x:d+c/2,y:s+o-g,horizontalAnchor:"middle",verticalAnchor:y},A):"insideTopLeft"===n?HK({x:u+v,y:s+g,horizontalAnchor:j,verticalAnchor:x},A):"insideTopRight"===n?HK({x:u+l-v,y:s+g,horizontalAnchor:w,verticalAnchor:x},A):"insideBottomLeft"===n?HK({x:d+v,y:s+o-g,horizontalAnchor:j,verticalAnchor:y},A):"insideBottomRight"===n?HK({x:d+c-v,y:s+o-g,horizontalAnchor:w,verticalAnchor:y},A):n&&"object"==typeof n&&(IE(n.x)||PE(n.x))&&(IE(n.y)||PE(n.y))?HK({x:i+LE(n.x,h),y:s+LE(n.y,o),horizontalAnchor:"end",verticalAnchor:"end"},A):HK({x:m,y:s+o/2,horizontalAnchor:"middle",verticalAnchor:"middle"},A)})({viewBox:b,position:u,offset:o.offset,parentViewBox:aG(c)?void 0:c});s=KK(KK({x:S.x,y:S.y,textAnchor:S.horizontalAnchor,verticalAnchor:S.verticalAnchor},void 0!==S.width?{width:S.width}:{}),void 0!==S.height?{height:S.height}:{})}return t.createElement(vZ,{zIndex:o.zIndex},t.createElement(UK,YK({ref:g,className:de("recharts-label",m)},k,s,{textAnchor:MK(k.textAnchor)?k.textAnchor:s.textAnchor,breakAll:f}),i))}sG.displayName="Label";function oG(e){var{label:n,labelRef:r}=e;return((e,n,r)=>{if(!e)return null;var a={viewBox:n,labelRef:r};return!0===e?t.createElement(sG,YK({key:"label-implicit"},a)):ME(e)?t.createElement(sG,YK({key:"label-implicit",value:e},a)):t.isValidElement(e)?e.type===sG?t.cloneElement(e,KK({key:"label-implicit"},a)):t.createElement(sG,YK({key:"label-implicit",content:e},a)):nG(e)?t.createElement(sG,YK({key:"label-implicit",content:e},a)):e&&"object"==typeof e?t.createElement(sG,YK({},e,{key:"label-implicit"},a)):null})(n,eG(),r)||null}var lG=["valueAccessor"],cG=["dataKey","clockWise","id","textBreakAll","zIndex"];function uG(){return uG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uG.apply(null,arguments)}function dG(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var pG=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return qE(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},hG=t.createContext(void 0),mG=hG.Provider,fG=t.createContext(void 0);function gG(e){var{valueAccessor:n=pG}=e,r=dG(e,lG),{dataKey:a,clockWise:i,id:s,textBreakAll:o,zIndex:l}=r,c=dG(r,cG),u=t.useContext(hG),d=t.useContext(fG),p=u||d;return p&&p.length?t.createElement(vZ,{zIndex:null!=l?l:YF.label},t.createElement(Xk,{className:"recharts-label-list"},p.map((e,i)=>{var l,u=qE(a)?n(e,i):sM(e.payload,a),d=qE(s)?{}:{id:"".concat(s,"-").concat(i)};return t.createElement(sG,uG({key:"label-".concat(i)},Qk(e),c,d,{fill:null!==(l=r.fill)&&void 0!==l?l:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:o,viewBox:e.viewBox,index:i,zIndex:0}))}))):null}function yG(e){var{label:n}=e;return n?!0===n?t.createElement(gG,{key:"labelList-implicit"}):t.isValidElement(n)||nG(n)?t.createElement(gG,{key:"labelList-implicit",content:n}):"object"==typeof n?t.createElement(gG,uG({key:"labelList-implicit"},n,{type:String(n.type)})):null:null}fG.Provider,gG.displayName="LabelList";var xG=mI({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:bG,removeRadiusAxis:vG,addAngleAxis:wG,removeAngleAxis:jG}=xG.actions,CG=xG.reducer;var NG=pe(),kG=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",SG=null,EG=null,AG=e=>{if(e===SG&&Array.isArray(EG))return EG;var n=[];
631return t.Children.forEach(e,e=>{qE(e)||(NG.isFragment(e)?n=n.concat(AG(e.props.children)):n.push(e))}),EG=n,SG=e,n};var OG,_G,PG,IG={};function MG(){return OG||(OG=1,e=IG,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}),IG;var e}function TG(){return PG?_G:(PG=1,_G=MG().isPlainObject)}const RG=j(TG());var LG,DG,FG,qG,BG;function UG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UG(Object(n),!0).forEach(function(t){HG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VG(){return VG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VG.apply(null,arguments)}function $G(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var WG=(e,t,n,r,a)=>{var i,s=n-r;return i=AE(LG||(LG=$G(["M ",",",""])),e,t),i+=AE(DG||(DG=$G(["L ",",",""])),e+n,t),i+=AE(FG||(FG=$G(["L ",",",""])),e+n-s/2,t+a),i+=AE(qG||(qG=$G(["L ",",",""])),e+n-s/2-r,t+a),i+=AE(BG||(BG=$G(["L ",","," Z"])),e,t)},QG={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZG=e=>{var n=tA(e,QG),{x:r,y:a,upperWidth:i,lowerWidth:s,height:o,className:l}=n,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:p}=n,h=t.useRef(null),[m,f]=t.useState(-1),g=t.useRef(i),y=t.useRef(s),x=t.useRef(o),b=t.useRef(r),v=t.useRef(a),w=ZL(e,"trapezoid-");if(t.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var e=h.current.getTotalLength();e&&f(e)}catch(t){}},[]),r!==+r||a!==+a||i!==+i||s!==+s||o!==+o||0===i&&0===s||0===o)return null;var j=de("recharts-trapezoid",l);if(!p)return t.createElement("g",null,t.createElement("path",VG({},Qk(n),{className:j,d:WG(r,a,i,s,o)})));var C=g.current,N=y.current,k=x.current,S=b.current,E=v.current,A="0px ".concat(-1===m?1:m,"px"),O="".concat(m,"px ").concat(m,"px"),_=CL(["strokeDasharray"],u,c);return t.createElement(QL,{animationId:w,key:w,canBegin:m>0,duration:u,easing:c,isActive:p,begin:d},e=>{var l=FE(C,i,e),c=FE(N,s,e),u=FE(k,o,e),d=FE(S,r,e),p=FE(E,a,e);h.current&&(g.current=l,y.current=c,x.current=u,b.current=d,v.current=p);var m=e>0?{transition:_,strokeDasharray:O}:{strokeDasharray:A};return t.createElement("path",VG({},Qk(n),{className:j,d:WG(d,p,l,c,u),ref:h,style:zG(zG({},m),n.style)}))})},KG=["option","shapeType","activeClassName","inActiveClassName"];function GG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?GG(Object(n),!0).forEach(function(t){JG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XG(e){var{shapeType:n,elementProps:r}=e;switch(n){case"rectangle":return t.createElement(fD,r);case"trapezoid":return t.createElement(ZG,r);case"sector":return t.createElement(FD,r);case"symbols":if(function(e){return"symbols"===e}(n))return t.createElement(GE,r);break;case"curve":return t.createElement(hL,r);default:return null}}function eY(e){var n,{option:r,shapeType:a,activeClassName:i="recharts-active-shape",inActiveClassName:s="recharts-shape"}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,KG);if(t.isValidElement(r))n=t.cloneElement(r,YG(YG({},o),function(e){return t.isValidElement(e)?e.props:e}(r)));else if("function"==typeof r)n=r(o,o.index);else if(RG(r)&&"boolean"!=typeof r){var l=function(e,t){return YG(YG({},t),e)}(r,o);n=t.createElement(XG,{shapeType:a,elementProps:l})}else{var c=o;n=t.createElement(XG,{shapeType:a,elementProps:c})}return o.isActive?t.createElement(Xk,{className:i},n):t.createElement(Xk,{className:s},n)}var tY,nY=(e,t,n)=>{var r=HO();return(a,i)=>s=>{null==e||e(a,i,s),r(jW({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},rY=e=>{var t=HO();return(n,r)=>a=>{null==e||e(n,r,a),t(CW())}},aY=(e,t,n)=>{var r=HO();return(a,i)=>s=>{null==e||e(a,i,s),r(kW({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function iY(e){var{tooltipEntrySettings:n}=e,r=HO(),a=DM(),i=t.useRef(null);return t.useLayoutEffect(()=>{a||(null===i.current?r(xW(n)):i.current!==n&&r(bW({prev:i.current,next:n})),i.current=n)},[n,r,a]),t.useLayoutEffect(()=>()=>{i.current&&(r(vW(i.current)),i.current=null)},[r]),null}function sY(e){var{legendPayload:n}=e,r=HO(),a=DM(),i=t.useRef(null);return t.useLayoutEffect(()=>{a||(null===i.current?r(gR(n)):i.current!==n&&r(yR({prev:i.current,next:n})),i.current=n)},[r,a,n]),t.useLayoutEffect(()=>()=>{i.current&&(r(xR(i.current)),i.current=null)},[r]),null}var oY=null!==(tY=a["useId".toString()])&&void 0!==tY?tY:()=>{var[e]=t.useState(()=>RE("uid-"));return e};var lY=t.createContext(void 0),cY=e=>{var{id:n,type:r,children:a}=e,i=function(e,t){var n=oY();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(r),n);return t.createElement(lY.Provider,{value:i},a(i))},uY=mI({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:aI()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=$P(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:aI()},removeCartesianGraphicalItem:{reducer(e,t){var n=$P(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:aI()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:aI()},removePolarGraphicalItem:{reducer(e,t){var n=$P(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:aI()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=$P(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:aI()}}}),{addCartesianGraphicalItem:dY,replaceCartesianGraphicalItem:pY,removeCartesianGraphicalItem:hY,addPolarGraphicalItem:mY,removePolarGraphicalItem:fY,replacePolarGraphicalItem:gY}=uY.actions,yY=uY.reducer,xY=e=>{var n=HO(),r=t.useRef(null);return t.useLayoutEffect(()=>{null===r.current?n(dY(e)):r.current!==e&&n(pY({prev:r.current,next:e})),r.current=e},[n,e]),t.useLayoutEffect(()=>()=>{r.current&&(n(hY(r.current)),r.current=null)},[n]),null},bY=t.memo(xY);function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?vY(Object(n),!0).forEach(function(t){jY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CY=mI({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:aI()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.xAxis[n.id]&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:aI()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:aI()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:aI()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.yAxis[n.id]&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:aI()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:aI()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:aI()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.zAxis[n.id]&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:aI()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:aI()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,a=e.yAxis[n];if(a){var i,s=a.widthHistory||[];if(3===s.length&&s[0]===s[2]&&r===s[1]&&r!==a.width&&Math.abs(r-(null!==(i=s[0])&&void 0!==i?i:0))<=1)return;var o=[...s,r].slice(-3);e.yAxis[n]=wY(wY({},a),{},{width:r,widthHistory:o})}}}}),{addXAxis:NY,replaceXAxis:kY,removeXAxis:SY,addYAxis:EY,replaceYAxis:AY,removeYAxis:OY,addZAxis:_Y,replaceZAxis:PY,removeZAxis:IY,updateYAxisWidth:MY}=CY.actions,TY=CY.reducer,RY=t_([MM],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),LY=t_([RY,bM,vM],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),DY=()=>QO(LY),FY=(e,t,n)=>{var r=null!=n?n:e;if(!qE(r))return LE(r,t,0)};function qY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qY(Object(n),!0).forEach(function(t){UY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zY=e=>{var{chartData:n}=e,r=HO(),a=DM();return t.useEffect(()=>a?()=>{}:(r(UZ(n)),()=>{r(UZ(void 0))}),[n,r,a]),null},HY={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},VY=mI({name:"brush",initialState:HY,reducers:{setBrushSettings:(e,t)=>null==t.payload?HY:t.payload}}),{setBrushSettings:$Y}=VY.actions,WY=VY.reducer;var QY=mI({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=$P(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=$P(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=$P(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:ZY,removeDot:KY,addArea:GY,removeArea:YY,addLine:JY,removeLine:XY}=QY.actions,eJ=QY.reducer,tJ=t.createContext(void 0),nJ=e=>{var{children:n}=e,[r]=t.useState("".concat(RE("recharts"),"-clip")),a=DY();if(null==a)return null;var{x:i,y:s,width:o,height:l}=a;return t.createElement(tJ.Provider,{value:r},t.createElement("defs",null,t.createElement("clipPath",{id:r},t.createElement("rect",{x:i,y:s,height:l,width:o}))),n)};function rJ(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];void 0!==a&&n.push(a)}return n}function aJ(e,t,n){return function(e){var{width:t,height:n}=e,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),a=r*Math.PI/180,i=Math.atan(n/t),s=a>i&&a<Math.PI-i?n/Math.sin(a):t/Math.cos(a);return Math.abs(s)}({width:e.width+t.width,height:e.height+t.height},n)}function iJ(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function sJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 4,504 bytes, line 631
631t%2?sJ(Object(n),!0).forEach(function(t){lJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(e,t,n){var r,{tick:a,ticks:i,viewBox:s,minTickGap:o,orientation:l,interval:c,tickFormatter:u,unit:d,angle:p}=e;if(!i||!i.length||!a)return[];if(IE(c)||QR)return null!==(r=function(e,t){return rJ(e,t+1)}(i,IE(c)?c:0))&&void 0!==r?r:[];var h=[],m="top"===l||"bottom"===l?"width":"height",f=d&&"width"===m?mK(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(e,r)=>{var a="function"==typeof u?u(e.value,r):e.value;return"width"===m?aJ(mK(a,{fontSize:t,letterSpacing:n}),f,p):mK(a,{fontSize:t,letterSpacing:n})[m]},y=i[0],x=i[1],b=i.length>=2&&null!=y&&null!=x?OE(x.coordinate-y.coordinate):1,v=function(e,t,n){var r="width"===n,{x:a,y:i,width:s,height:o}=e;return 1===t?{start:r?a:i,end:r?a+s:i+o}:{start:r?a+s:i+o,end:r?a:i}}(s,b,m);return"equidistantPreserveStart"===c?function(e,t,n,r,a){for(var i,s=(r||[]).slice(),{start:o,end:l}=t,c=0,u=1,d=o,p=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:rJ(r,u)};var i,s=c,p=()=>(void 0===i&&(i=n(t,s)),i),h=t.coordinate,m=0===c||iJ(e,h,p,d,l);m||(c=0,d=o,u+=1),m&&(d=h+e*(p()/2+a),c+=u)};u<=s.length;)if(i=p())return i.v;return[]}(b,v,g,i,o):"equidistantPreserveEnd"===c?function(e,t,n,r,a){var i=(r||[]).slice().length;if(0===i)return[];for(var{start:s,end:o}=t,l=1;l<=i;l++){for(var c,u=(i-1)%l,d=s,p=!0,h=function(){var t=r[m];if(null==t)return 0;var i,s=m,l=()=>(void 0===i&&(i=n(t,s)),i),c=t.coordinate,h=m===u||iJ(e,c,l,d,o);if(!h)return p=!1,1;h&&(d=c+e*(l()/2+a))},m=u;m<i&&(0===(c=h())||1!==c);m+=l);if(p){for(var f=[],g=u;g<i;g+=l){var y=r[g];null!=y&&f.push(y)}return f}}return[]}(b,v,g,i,o):(h="preserveStart"===c||"preserveStartEnd"===c?function(e,t,n,r,a,i){var s=(r||[]).slice(),o=s.length,{start:l,end:c}=t;if(i){var u=r[o-1];if(null!=u){var d=n(u,o-1),p=e*(u.coordinate+e*d/2-c);s[o-1]=u=oJ(oJ({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate}),null!=u.tickCoord&&iJ(e,u.tickCoord,()=>d,l,c)&&(c=u.tickCoord-e*(d/2+a),s[o-1]=oJ(oJ({},u),{},{isShow:!0}))}}for(var h=i?o-1:o,m=function(t){var r=s[t];if(null==r)return 1;var i,o=r,u=()=>(void 0===i&&(i=n(r,t)),i);if(0===t){var d=e*(o.coordinate-e*u()/2-l);s[t]=o=oJ(oJ({},o),{},{tickCoord:d<0?o.coordinate-d*e:o.coordinate})}else s[t]=o=oJ(oJ({},o),{},{tickCoord:o.coordinate});null!=o.tickCoord&&iJ(e,o.tickCoord,u,l,c)&&(l=o.tickCoord+e*(u()/2+a),s[t]=oJ(oJ({},o),{},{isShow:!0}))},f=0;f<h;f++)m(f);return s}(b,v,g,i,o,"preserveStartEnd"===c):function(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:o}=t,{end:l}=t,c=function(t){var r=i[t];if(null==r)return 1;var c,u=r,d=()=>(void 0===c&&(c=n(r,t)),c);if(t===s-1){var p=e*(u.coordinate+e*d()/2-l);i[t]=u=oJ(oJ({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate})}else i[t]=u=oJ(oJ({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&iJ(e,u.tickCoord,d,o,l)&&(l=u.tickCoord-e*(d()/2+a),i[t]=oJ(oJ({},u),{},{isShow:!0}))},u=s-1;u>=0;u--)c(u);return i}(b,v,g,i,o),h.filter(e=>e.isShow))}var uJ=mI({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:a}=t.payload;e[n][r]=a},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:dJ,removeRenderedTicks:pJ}=uJ.actions,hJ=uJ.reducer,mJ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function fJ(){return fJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fJ.apply(null,arguments)}function gJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
631t%2?gJ(Object(n),!0).forEach(function(t){xJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bJ={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:YF.axis};function vJ(e){var{x:n,y:r,width:a,height:i,orientation:s,mirror:o,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var u=yJ(yJ(yJ({},c),$k(l)),{},{fill:"none"});if("top"===s||"bottom"===s){var d=+("top"===s&&!o||"bottom"===s&&o);u=yJ(yJ({},u),{},{x1:n,y1:r+d*i,x2:n+a,y2:r+d*i})}else{var p=+("left"===s&&!o||"right"===s&&o);u=yJ(yJ({},u),{},{x1:n+p*a,y1:r,x2:n+p*a,y2:r+i})}return t.createElement("line",fJ({},u,{className:de("recharts-cartesian-axis-line",SE(l,"className"))}))}function wJ(e){var n,{option:r,tickProps:a,value:i}=e,s=de(a.className,"recharts-cartesian-axis-tick-value");if(t.isValidElement(r))n=t.cloneElement(r,yJ(yJ({},a),{},{className:s}));else if("function"==typeof r)n=r(yJ(yJ({},a),{},{className:s}));else{var o="recharts-cartesian-axis-tick-value";"boolean"!=typeof r&&(o=de(o,function(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}(r))),n=t.createElement(UK,fJ({},a,{className:o}),i)}return n}function jJ(e){var{ticks:n,axisType:r,axisId:a}=e,i=HO();return t.useEffect(()=>{if(null==a||null==r)return zE;var e=n.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(dJ({ticks:e,axisId:a,axisType:r})),()=>{i(pJ({axisId:a,axisType:r}))}},[i,n,a,r]),null}var CJ=t.forwardRef((e,n)=>{var{ticks:r=[],tick:a,tickLine:i,stroke:s,tickFormatter:o,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:p,x:h,y:m,width:f,height:g,tickSize:y,tickMargin:x,fontSize:b,letterSpacing:v,getTicksConfig:w,events:j,axisType:C,axisId:N}=e,k=cJ(yJ(yJ({},w),{},{ticks:r}),b,v),S=$k(w),E=Wk(a),A=MK(S.textAnchor)?S.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(d,p),O=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(d,p),_={};"object"==typeof i&&(_=i);var P=yJ(yJ({},S),{},{fill:"none"},_),I=k.map(e=>yJ({entry:e},function(e,t,n,r,a,i,s,o,l){var c,u,d,p,h,m,f=o?-1:1,g=e.tickSize||s,y=IE(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,m=(d=(p=n+ +!o*a)-f*g)-f*l,h=y;break;case"left":d=p=e.coordinate,h=(c=(u=t+ +!o*r)-f*g)-f*l,m=y;break;case"right":d=p=e.coordinate,h=(c=(u=t+ +o*r)+f*g)+f*l,m=y;break;default:c=u=e.coordinate,m=(d=(p=n+ +o*a)+f*g)+f*l,h=y}return{line:{x1:c,y1:d,x2:u,y2:p},tick:{x:h,y:m}}}(e,h,m,f,g,d,y,p,x))),M=I.map(e=>{var{entry:n,line:r}=e;return t.createElement(Xk,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(n.value,"-").concat(n.coordinate,"-").concat(n.tickCoord)},i&&t.createElement("line",fJ({},P,r,{className:de("recharts-cartesian-axis-tick-line",SE(i,"className"))})))}),T=I.map((e,n)=>{var r,i,{entry:d,tick:p}=e,h=yJ(yJ(yJ(yJ({verticalAnchor:O},S),{},{textAnchor:A,stroke:"none",fill:s},p),{},{index:n,payload:d,visibleTicksCount:k.length,tickFormatter:o,padding:c},u),{},{angle:null!==(r=null!==(i=null==u?void 0:u.angle)&&void 0!==i?i:S.angle)&&void 0!==r?r:0}),m=yJ(yJ({},h),E);return t.createElement(Xk,fJ({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(d.value,"-").concat(d.coordinate,"-").concat(d.tickCoord)},JE(j,d,n)),a&&t.createElement(wJ,{option:a,tickProps:m,value:"".concat("function"==typeof o?o(d.value,n):d.value).concat(l||"")}))});return t.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(C,"-ticks")},t.createElement(jJ,{ticks:k,axisId:N,axisType:C}),T.length>0&&t.createElement(vZ,{zIndex:YF.label},t.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(C,"-tick-labels"),ref:n},T)),M.length>0&&t.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(C,"-tick-lines")},M))}
631),NJ=t.forwardRef((e,n)=>{var{axisLine:r,width:a,height:i,className:s,hide:o,ticks:l,axisType:c,axisId:u}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,mJ),[p,h]=t.useState(""),[m,f]=t.useState(""),g=t.useRef(null);t.useImperativeHandle(n,()=>({getCalculatedWidth:()=>{var t;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:a=0,tickMargin:i=0}=e,s=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>s&&(s=t.width)}});var o=n?n.getBoundingClientRect().width:0,l=s+(a+i)+o+(n?r:0);return Math.round(l)}return 0})({ticks:g.current,label:null===(t=e.labelRef)||void 0===t?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=t.useCallback(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),a=r.fontSize,i=r.letterSpacing;a===p&&i===m||(h(a),f(i))}}},[p,m]);return o||null!=a&&a<=0||null!=i&&i<=0?null:t.createElement(vZ,{zIndex:e.zIndex},t.createElement(Xk,{className:de("recharts-cartesian-axis",s)},t.createElement(vJ,{x:e.x,y:e.y,width:a,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:$k(e)}),t.createElement(CJ,{ref:y,axisType:c,events:d,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:m,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),t.createElement(XK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},t.createElement(oG,{label:e.label,labelRef:e.labelRef}),e.children)))}),kJ=t.forwardRef((e,n)=>{var r=tA(e,bJ);return t.createElement(NJ,fJ({},r,{ref:n}))});kJ.displayName="CartesianAxis";var SJ=["x1","y1","x2","y2","key"],EJ=["offset"],AJ=["xAxisId","yAxisId"],OJ=["xAxisId","yAxisId"];function _J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_J(Object(n),!0).forEach(function(t){IJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_J(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MJ(){return MJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MJ.apply(null,arguments)}function TJ(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var RJ=e=>{var{fill:n}=e;if(!n||"none"===n)return null;var{fillOpacity:r,x:a,y:i,width:s,height:o,ry:l}=e;return t.createElement("rect",{x:a,y:i,ry:l,width:s,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function LJ(e){var n,{option:r,lineItemProps:a}=e;if(t.isValidElement(r))n=t.cloneElement(r,a);else if("function"==typeof r)n=r(a);else{var i,{x1:s,y1:o,x2:l,y2:c,key:u}=a,d=null!==(i=$k(TJ(a,SJ)))&&void 0!==i?i:{},{offset:p}=d,h=TJ(d,EJ);n=t.createElement("line",MJ({},h,{x1:s,y1:o,x2:l,y2:c,fill:"none",key:u}))}return n}function DJ(e){var{x:n,width:r,horizontal:a=!0,horizontalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:s,yAxisId:o}=e,l=TJ(e,AJ),c=i.map((e,i)=>{var s=PJ(PJ({},l),{},{x1:n,y1:e,x2:n+r,y2:e,key:"line-".concat(i),index:i});return t.createElement(LJ,{key:"line-".concat(i),option:a,lineItemProps:s})});return t.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function FJ(e){var{y:n,height:r,vertical:a=!0,verticalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:s,yAxisId:o}=e,l=TJ(e,OJ),c=i.map((e,i)=>{var s=PJ(PJ({},l),{},{x1:e,y1:n,x2:e,y2:n+r,key:"line-".concat(i),index:i});return t.createElement(LJ,{option:a,lineItemProps:s,key:"line-".concat(i)})});return t.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function qJ(e){var{horizontalFill:n,fillOpacity:r,x:a,y:i,width:s,height:o,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!n||!n.length||null==l)return null;var u=l.map(e=>Math.round(e+i-i)).sort((e,t)=>
631e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,l)=>{var c=u[l+1],d=null==c?i+o-e:c-e;if(d<=0)return null;var p=l%n.length;return t.createElement("rect",{key:"react-".concat(l),y:e,x:a,height:d,width:s,stroke:"none",fill:n[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return t.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function BJ(e){var{vertical:n=!0,verticalFill:r,fillOpacity:a,x:i,y:s,width:o,height:l,verticalPoints:c}=e;if(!n||!r||!r.length)return null;var u=c.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,n)=>{var c=u[n+1],d=null==c?i+o-e:c-e;if(d<=0)return null;var p=n%r.length;return t.createElement("rect",{key:"react-".concat(n),x:e,y:s,width:d,height:l,stroke:"none",fill:r[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return t.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var UJ=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return lM(cJ(PJ(PJ(PJ({},bJ),n),{},{ticks:cM(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},zJ=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return lM(cJ(PJ(PJ(PJ({},bJ),n),{},{ticks:cM(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},HJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:YF.grid};function VJ(e){var n=fT(),r=gT(),a=mT(),i=PJ(PJ({},tA(e,HJ)),{},{x:IE(e.x)?e.x:a.left,y:IE(e.y)?e.y:a.top,width:IE(e.width)?e.width:a.width,height:IE(e.height)?e.height:a.height}),{xAxisId:s,yAxisId:o,x:l,y:c,width:u,height:d,syncWithTicks:p,horizontalValues:h,verticalValues:m}=i,f=DM(),g=QO(e=>aW(e,"xAxis",s,f)),y=QO(e=>aW(e,"yAxis",o,f));if(!(nM(u)&&nM(d)&&IE(l)&&IE(c)))return null;var x=i.verticalCoordinatesGenerator||UJ,b=i.horizontalCoordinatesGenerator||zJ,{horizontalPoints:v,verticalPoints:w}=i;if(!(v&&v.length||"function"!=typeof b)){var j=h&&h.length,C=b({yAxis:y?PJ(PJ({},y),{},{ticks:j?h:y.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:a},!!j||p);ZM(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(v=C)}if(!(w&&w.length||"function"!=typeof x)){var N=m&&m.length,k=x({xAxis:g?PJ(PJ({},g),{},{ticks:N?m:g.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:a},!!N||p);ZM(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(w=k)}return t.createElement(vZ,{zIndex:i.zIndex},t.createElement("g",{className:"recharts-cartesian-grid"},t.createElement(RJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),t.createElement(qJ,MJ({},i,{horizontalPoints:v})),t.createElement(BJ,MJ({},i,{verticalPoints:w})),t.createElement(DJ,MJ({},i,{offset:a,horizontalPoints:v,xAxis:g,yAxis:y})),t.createElement(FJ,MJ({},i,{offset:a,verticalPoints:w,xAxis:g,yAxis:y}))))}VJ.displayName="CartesianGrid";var $J=mI({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:a}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?a:e))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:WJ,replaceErrorBar:QJ,removeErrorBar:ZJ}=$J.actions,KJ=$J.reducer,GJ=["children"];var YJ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},JJ=t.createContext(YJ);function XJ(e){var{children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,GJ);return t.createElement(JJ.Provider,{value:r},n)}function eX(e,t){var n,r,a=QO(t=>fV(t,e)),i=QO(e=>xV(e,t)),s=null!==(n=null==a?void 0:a.allowDataOverflow)&&void 0!==n?n:hV.allowDataOverflow,o=null!==(r=null==i?void 0:i.allowDataOverflow)&&void 0!==r?r:gV.allowDataOverflow;return{needClip:s||o,needClipX:s,needClipY:o}}function tX(e){var{xAxisId:n,yAxisId:r,clipPathId:a}=e,i=DY(),{needClipX:s,needClipY:o,needClip:l}=eX(n,r);if(!l||!i)return null;var{x:c,y:u,width:d,height:p}=i;return t.createElement("clipPath",{id:"clipPath-".concat(a)},t.createElement("rect",{x:s?c:c-d/2,y:o?u:u-p/2,width:s?d:2*d,height:o?p:2*p}))}function nX(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.xAxisId)&&void 0!==n?n:0}function rX(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.yAxisId)&&void 0!==n?n:0}function aX(){return aX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aX.apply(null,arguments)}function iX(e){return t.createElement(eY,aX({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var sX=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(IE(e))return e;var a=IE(n)||qE(n);return a?e(n,r):(a||function(){throw new Error("Invariant failed")}(),t)}},oX=t_([kV,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),lX=t_([oX],e=>null==e?void 0:e.maxBarSize),cX=t_([yT,kV,nX,rX,(e,t,n)=>n],(e,t,n,r,a)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===a).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),uX=t_([cX,e=>e.rootProps.barSize,(e,t)=>{var n=yT(e),r=nX(e,t),a=rX(e,t);if(null!=r&&null!=a)return"horizontal"===n?tW(e,"xAxis",r):tW(e,"yAxis",a)}],(e,t,n)=>{var r=e.filter(xq),a=e.filter(e=>null==e.stackId),i=r.reduce((e,t)=>
631{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{}),s=Object.entries(i).map(e=>{var r,[a,i]=e,s=i.map(e=>e.dataKey);return{stackId:a,dataKeys:s,barSize:FY(t,n,null===(r=i[0])||void 0===r?void 0:r.barSize)}}),o=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:FY(t,n,e.barSize)}));return[...s,...o]}),dX=(e,t,n)=>{var r,a,i=yT(e),s=nX(e,t),o=rX(e,t);if(null!=s&&null!=o)return"horizontal"===i?(r=oW(e,"xAxis",s,n),a=sW(e,"xAxis",s,n)):(r=oW(e,"yAxis",o,n),a=sW(e,"yAxis",o,n)),gM(r,a)},pX=t_([uX,HF,e=>e.rootProps.barGap,VF,(e,t,n)=>{var r,a,i=oX(e,t);if(null==i)return 0;var s=nX(e,t),o=rX(e,t);if(null==s||null==o)return 0;var l,c,u=yT(e),d=HF(e),{maxBarSize:p}=i,h=qE(p)?d:p;return"horizontal"===u?(l=oW(e,"xAxis",s,n),c=sW(e,"xAxis",s,n)):(l=oW(e,"yAxis",o,n),c=sW(e,"yAxis",o,n)),null!==(r=null!==(a=gM(l,c,!0))&&void 0!==a?a:h)&&void 0!==r?r:0},dX,lX],(e,t,n,r,a,i,s)=>{var o=qE(s)?t:s,l=function(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var o,l=LE(e,n,0,!0),c=[];if(tM(null===(i=r[0])||void 0===i?void 0:i.barSize)){var u=!1,d=n/s,p=r.reduce((e,t)=>e+(t.barSize||0),0);(p+=(s-1)*l)>=n&&(p-=(s-1)*l,l=0),p>=n&&d>0&&(u=!0,p=s*(d*=.9));var h={offset:((n-p)/2|0)-l,size:0};o=r.reduce((e,t)=>{var n,r={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h.offset+h.size+l,size:u?d:null!==(n=t.barSize)&&void 0!==n?n:0}},a=[...e,r];return h=r.position,a},c)}else{var m=LE(t,n,0,!0);n-2*m-(s-1)*l<=0&&(l=0);var f=(n-2*m-(s-1)*l)/s;f>1&&(f>>=0);var g=tM(a)?Math.min(f,a):f;o=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:m+(f+l)*n+(f-g)/2,size:g}}],c)}return o}}(n,r,a!==i?a:i,e,o);return a!==i&&null!=l&&(l=l.map(e=>BY(BY({},e),{},{position:BY(BY({},e.position),{},{offset:e.position.offset-a/2})}))),l}),hX=t_([pX,oX],(e,t)=>{if(null!=e&&null!=t){var n=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=n)return n.position}}),mX=t_([(e,t,n)=>{var r=yT(e),a=nX(e,t),i=rX(e,t);if(null!=a&&null!=i)return"horizontal"===r?ZV(e,"yAxis",i,n):ZV(e,"xAxis",a,n)},oX],(e,t)=>{var n=gq(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var a=e[r];if(a){var{stackedData:i}=a;if(i)return i.find(e=>e.key===n)}}}}),fX=t_([MM,RM,(e,t,n)=>{var r=nX(e,t);if(null!=r)return oW(e,"xAxis",r,n)},(e,t,n)=>{var r=rX(e,t);if(null!=r)return oW(e,"yAxis",r,n)},(e,t,n)=>{var r=nX(e,t);if(null!=r)return sW(e,"xAxis",r,n)},(e,t,n)=>{var r=rX(e,t);if(null!=r)return sW(e,"yAxis",r,n)},hX,yT,(e,t,n)=>n?eF(e):XD(e),dX,mX,oX,(e,t,n,r)=>r],(e,t,n,r,a,i,s,o,l,c,u,d,p)=>{var{chartData:h,dataStartIndex:m,dataEndIndex:f}=l;if(null!=d&&null!=s&&null!=t&&("horizontal"===o||"vertical"===o)&&null!=n&&null!=r&&null!=a&&null!=i&&null!=c){var g,{data:y}=d;if(null!=(g=null!=y&&y.length>0?y:null==h?void 0:h.slice(m,f+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:o,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:p,offset:h,cells:m,parentViewBox:f,dataStartIndex:g}=e,y="horizontal"===t?l:o,x=d?y.scale.domain():null,b=(e=>{var{numericAxis:t}=e,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]})({numericAxis:y}),v=y.scale.map(b);return p.map((e,p)=>{var y,w,j,C,N,k;if(d){var S=d[p+g];if(null==S)return null;y=((e,t)=>{if(!t||2!==t.length||!IE(t[0])||!IE(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!IE(e[0])||e[0]<n)&&(a[0]=n),(!IE(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a})(S,x)}else y=sM(e,n),Array.isArray(y)||(y=[b,y]);var E=sX(r,qX)(y[1],p);if("horizontal"===t){var A,O=l.scale.map(y[0]),_=l.scale.map(y[1]);if(null==O||null==_)return null;w=pM({axis:o,ticks:c,bandSize:s,offset:i.offset,entry:e,index:p}),j=null!==(A=null!=_?_:O)&&void 0!==A?A:void 0,C=i.size;var P=O-_;if(N=_E(P)?0:P,k={x:w,y:h.top,width:C,height:h.height},Math.abs(E)>0&&Math.abs(N)<Math.abs(E)){var I=OE(N||E)*(Math.abs(E)-Math.abs(N));j-=I,N+=I}}else{var M=o.scale.map(y[0]),T=o.scale.map(y[1]);if(null==M||null==T)return null;if(w=M,j=pM({axis:l,ticks:u,bandSize:s,offset:i.offset,entry:e,index:p}),C=T-M,N=i.size,k={x:h.left,y:j,width:h.width,height:N},Math.abs(E)>0&&Math.abs(C)<Math.abs(E))C+=OE(C||E)*(Math.abs(E)-Math.abs(C))}return null!=w&&null!=j&&null!=C&&null!=N&&(a||0!==C&&0!==N)?EX(EX({},e),{},{stackedBarStart:v,x:w,y:j,width:C,height:N,value:d?y:y[1],payload:e,background:k,tooltipPosition:{x:w+C/2,y:j+N/2},parentViewBox:f,originalDataIndex:p},m&&m[p]&&m[p].props):null}
631).filter(Boolean)}({layout:o,barSettings:d,pos:s,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:u,displayedData:g,offset:e,cells:p,dataStartIndex:m})}}),gX=["index"];function yX(){return yX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yX.apply(null,arguments)}var xX=t.createContext(void 0),bX=e=>{var n,r=t.useContext(xX);return null!=r?r.stackId:null!=e?null==(n=e)?void 0:String(n):void 0},vX=e=>{var{index:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,gX),a=(e=>{var n=t.useContext(xX);if(null!=n){var{stackId:r}=n;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(r,e),")")}})(n);return t.createElement(Xk,yX({className:"recharts-bar-stack-layer",clipPath:a},r))},wX=["onMouseEnter","onMouseLeave","onClick"],jX=["value","background","tooltipPosition"],CX=["id"],NX=["onMouseEnter","onClick","onMouseLeave"];function kX(){return kX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kX.apply(null,arguments)}function SX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SX(Object(n),!0).forEach(function(t){AX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OX(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _X=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:xM(n,t),payload:e}]},PX=t.memo(e=>{var{dataKey:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:o,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:void 0,getPosition:zE,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:n,nameKey:void 0,name:xM(s,n),hide:o,type:c,color:i,unit:l,graphicalItemId:u}};return t.createElement(iY,{tooltipEntrySettings:d})});function IX(e){var n=QO(PQ),{data:r,dataKey:a,background:i,allOtherBarProps:s}=e,{onMouseEnter:o,onMouseLeave:l,onClick:c}=s,u=OX(s,wX),d=nY(o,a,s.id),p=rY(l),h=aY(c,a,s.id);if(!i||null==r)return null;var m,f,g=Wk(i);return t.createElement(vZ,{zIndex:(m=i,f=YF.barBackground,m&&"object"==typeof m&&"zIndex"in m&&"number"==typeof m.zIndex&&tM(m.zIndex)?m.zIndex:f)},r.map((e,r)=>{var{value:s,background:o,tooltipPosition:l}=e,c=OX(e,jX);if(!o)return null;var m=d(e,r),f=p(e,r),y=h(e,r),x=EX(EX(EX(EX(EX({option:i,isActive:String(r)===n},c),{},{fill:"#eee"},o),g),JE(u,e,r)),{},{onMouseEnter:m,onMouseLeave:f,onClick:y,dataKey:a,index:r,className:"recharts-bar-background-rectangle"});return t.createElement(iX,kX({key:"background-bar-".concat(r)},x))}))}function MX(e){var{showLabels:n,children:r,rects:a}=e,i=null==a?void 0:a.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return EX(EX({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return t.createElement(mG,{value:n?i:void 0},r)}function TX(e){var{shape:n,activeBar:r,baseProps:a,entry:i,index:s,dataKey:o}=e,l=QO(PQ),c=QO(MQ),u=r&&String(i.originalDataIndex)===l&&(null==c||o===c),[d,p]=t.useState(!1),[h,m]=t.useState(!1);t.useEffect(()=>{var e;return u?(p(!0),e=requestAnimationFrame(()=>{m(!0)})):m(!1),()=>{cancelAnimationFrame(e)}},[u]);var f,g=t.useCallback(()=>{u||p(!1)},[u]),y=u&&h,x=u||d;f=u?!0===r?n:r:n;var b=t.createElement(iX,kX({},a,{name:String(a.name)},i,{isActive:y,option:f,index:s,dataKey:o,onTransitionEnd:g}));return x?t.createElement(vZ,{zIndex:YF.activeBar},t.createElement(vX,{index:i.originalDataIndex},b)):b}function RX(e){var{shape:n,baseProps:r,entry:a,index:i,dataKey:s}=e;return t.createElement(iX,kX({},r,{name:String(r.name)},a,{isActive:!1,option:n,index:i,dataKey:s}))}function LX(e){var n,{data:r,props:a}=e,i=null!==(n=$k(a))&&void 0!==n?n:{},{id:s}=i,o=OX(i,CX),{shape:l,dataKey:c,activeBar:u}=a,{onMouseEnter:d,onClick:p,onMouseLeave:h}=a,m=OX(a,NX),f=nY(d,c,s),g=rY(h),y=aY(p,c,s);return r?t.createElement(t.Fragment,null,r.map((e,n)=>t.createElement(vX,kX({index:e.originalDataIndex,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(n),className:"recharts-bar-rectangle"},JE(m,e,n),{onMouseEnter:f(e,n),onMouseLeave:g(e,n),onClick:y(e,n)}),u?t.createElement(TX,{shape:l,activeBar:u,baseProps:o,entry:e,index:n,dataKey:c}):t.createElement(RX,{shape:l,baseProps:o,entry:e,index:n,dataKey:c})))):null}function DX(e){var{props:n,previousRectanglesRef:r}=e,{data:a,layout:i,isAnimationActive:s,animationBegin:o,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=n,p=r.current,h=ZL(n,"recharts-bar-"),[m,f]=t.useState(!1),g=!m,y=t.useCallback(()=>{"function"==typeof u&&u(),f(!1)},[u]),x=t.useCallback(()=>{"function"==typeof d&&d(),f(!0)},[d]);return t.createElement(MX,{showLabels:g,rects:a},t.createElement(QL,{animationId:h,begin:o,duration:l,isActive:s,easing:c,onAnimationEnd:y,onAnimationStart:x,key:h},e=>{var s=1===e?a:null==a?void 0:a.map((t,n)=>{var r=p&&p[n];if(r)return EX(EX({},t),{},{x:FE(r.x,t.x,e),y:FE(r.y,t.y,e),width:FE(r.width,t.width,e),height:FE(r.height,t.height,e)});if("horizontal"===i){var a=FE(0,t.height,e),s=FE(t.stackedBarStart,t.y,e);return EX(EX({},t),{},{y:s,height:a})}var o=FE(0,t.width,e),l=FE(t.stackedBarStart,t.x,e);return EX(EX({},t),{},{width:o,x:l})});return e>0&&(r.current=null!=s?s:null),null==s?null:t.createElement(Xk,null,t.createElement(LX,{props:n,data:s}))}),t.createElement(yG,{label:n.label}),n.children)}function FX(e){var n=t.useRef(null);return t.createElement(DX,{previousRectanglesRef:n,props:e})}var qX=0,BX=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:sM(e,t)}};class UX extends t.PureComponent{render(){var{hide:e,data:n,dataKey:r,className:a,xAxisId:i,yAxisId:s,needClip:o,background:l,id:c}=this.props;if(e||null==n)return null;var u=de("recharts-bar",a),d=c;return t.createElement(Xk,{className:u,id:c},o&&t.createElement("defs",null,t.createElement(tX,{clipPathId:d,xAxisId:i,yAxisId:s})),t.createElement(Xk,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(d,")"):void 0},t.createElement(IX,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),t.createElement(FX,this.props)))}}var zX={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendT
631ype:"rect",minPointSize:qX,xAxisId:0,yAxisId:0,zIndex:YF.bar};function HX(e){var n,r,a,i,s,{xAxisId:o,yAxisId:l,hide:c,legendType:u,minPointSize:d,activeBar:p,animationBegin:h,animationDuration:m,animationEasing:f,isAnimationActive:g}=e,{needClip:y}=eX(o,l),x=xT(),b=DM(),v=(n=e.children,r=iK,a=[],i=[],i=Array.isArray(r)?r.map(e=>kG(e)):[kG(r)],AG(n).forEach(e=>{var t=SE(e,"type.displayName")||SE(e,"type.name");t&&-1!==i.indexOf(t)&&a.push(e)}),a),w=QO(t=>fX(t,e.id,b,v));if("vertical"!==x&&"horizontal"!==x)return null;var j=null==w?void 0:w[0];return s=null==j||null==j.height||null==j.width?0:"vertical"===x?j.height/2:j.width/2,t.createElement(XJ,{xAxisId:o,yAxisId:l,data:w,dataPointFormatter:BX,errorBarOffset:s},t.createElement(UX,kX({},e,{layout:x,needClip:y,data:w,xAxisId:o,yAxisId:l,hide:c,legendType:u,minPointSize:d,activeBar:p,animationBegin:h,animationDuration:m,animationEasing:f,isAnimationActive:g})))}function VX(e){var n=tA(e,zX),r=bX(n.stackId),a=DM();return t.createElement(cY,{id:n.id,type:"bar"},e=>t.createElement(t.Fragment,null,t.createElement(sY,{legendPayload:_X(n)}),t.createElement(PX,{dataKey:n.dataKey,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:e}),t.createElement(bY,{type:"bar",id:e,data:void 0,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,dataKey:n.dataKey,stackId:r,hide:n.hide,barSize:n.barSize,minPointSize:n.minPointSize,maxBarSize:n.maxBarSize,isPanorama:a,hasCustomShape:null!=n.shape}),t.createElement(vZ,{zIndex:n.zIndex},t.createElement(HX,kX({},n,{id:e})))))}var $X=t.memo(VX,RR);$X.displayName="Bar";var WX=["domain","range"],QX=["domain","range"];function ZX(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function KX(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function GX(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=ZX(e,WX),{domain:i,range:s}=t,o=ZX(t,QX);return!!KX(n,i)&&(!!KX(r,s)&&RR(a,o))}var YX=["type"],JX=["dangerouslySetInnerHTML","ticks","scale"],XX=["id","scale"];function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e0.apply(null,arguments)}function t0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t0(Object(n),!0).forEach(function(t){r0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function i0(e){var n=HO(),r=t.useRef(null),a=bT(),{type:i}=e,s=a0(e,YX),o=XF(a,"xAxis",i),l=t.useMemo(()=>
631{if(null!=o)return n0(n0({},s),{},{type:o})},[s,o]);return t.useLayoutEffect(()=>{null!=l&&(null===r.current?n(NY(l)):r.current!==l&&n(kY({prev:r.current,next:l})),r.current=l)},[l,n]),t.useLayoutEffect(()=>()=>{r.current&&(n(SY(r.current)),r.current=null)},[n]),null}var s0=e=>{var{xAxisId:n,className:r}=e,a=QO(RM),i=DM(),s="xAxis",o=QO(e=>iW(e,s,n,i)),l=QO(e=>K$(e,n)),c=QO(e=>J$(e,n)),u=QO(e=>mV(e,n));if(null==l||null==c||null==u)return null;var{dangerouslySetInnerHTML:d,ticks:p,scale:h}=e,m=a0(e,JX),{id:f,scale:g}=u,y=a0(u,XX);return t.createElement(kJ,e0({},m,y,{x:c.x,y:c.y,width:l.width,height:l.height,className:de("recharts-".concat(s," ").concat(s),r),viewBox:a,ticks:o,axisType:s,axisId:n}))},o0={allowDataOverflow:hV.allowDataOverflow,allowDecimals:hV.allowDecimals,allowDuplicatedCategory:hV.allowDuplicatedCategory,angle:hV.angle,axisLine:bJ.axisLine,height:hV.height,hide:!1,includeHidden:hV.includeHidden,interval:hV.interval,label:!1,minTickGap:hV.minTickGap,mirror:hV.mirror,orientation:hV.orientation,padding:hV.padding,reversed:hV.reversed,scale:hV.scale,tick:hV.tick,tickCount:hV.tickCount,tickLine:bJ.tickLine,tickSize:bJ.tickSize,type:hV.type,niceTicks:hV.niceTicks,xAxisId:0},l0=e=>{var n=tA(e,o0);return t.createElement(t.Fragment,null,t.createElement(i0,{allowDataOverflow:n.allowDataOverflow,allowDecimals:n.allowDecimals,allowDuplicatedCategory:n.allowDuplicatedCategory,angle:n.angle,dataKey:n.dataKey,domain:n.domain,height:n.height,hide:n.hide,id:n.xAxisId,includeHidden:n.includeHidden,interval:n.interval,minTickGap:n.minTickGap,mirror:n.mirror,name:n.name,orientation:n.orientation,padding:n.padding,reversed:n.reversed,scale:n.scale,tick:n.tick,tickCount:n.tickCount,tickFormatter:n.tickFormatter,ticks:n.ticks,type:n.type,unit:n.unit,niceTicks:n.niceTicks}),t.createElement(s0,n))},c0=t.memo(l0,GX);c0.displayName="XAxis";var u0=["type"],d0=["dangerouslySetInnerHTML","ticks","scale"],p0=["id","scale"];function h0(){return h0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h0.apply(null,arguments)}function m0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m0(Object(n),!0).forEach(function(t){g0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y0(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function x0(e){var n=HO(),r=t.useRef(null),a=bT(),{type:i}=e,s=y0(e,u0),o=XF(a,"yAxis",i),l=t.useMemo(()=>{if(null!=o)return f0(f0({},s),{},{type:o})},[o,s]);return t.useLayoutEffect(()=>{null!=l&&(null===r.current?n(EY(l)):r.current!==l&&n(AY({prev:r.current,next:l})),r.current=l)},[l,n]),t.useLayoutEffect(()=>()=>{r.current&&(n(OY(r.current)),r.current=null)},[n]),null}function b0(e){var{yAxisId:n,className:r,width:a,label:i}=e,s=t.useRef(null),o=t.useRef(null),l=QO(RM),c=DM(),u=HO(),d="yAxis",p=QO(e=>eW(e,n)),h=QO(e=>X$(e,n)),m=QO(e=>iW(e,d,n,c)),f=QO(e=>yV(e,n));if(t.useLayoutEffect(()=>{if("auto"===a&&p&&!nG(i)&&!t.isValidElement(i)&&null!=f){var e=s.current;if(e){var r=e.getCalculatedWidth();Math.round(p.width)!==Math.round(r)&&u(MY({id:n,width:r}))}}},[m,p,u,i,n,a,f]),null==p||null==h||null==f)return null;var{dangerouslySetInnerHTML:g,ticks:y,scale:x}=e,b=y0(e,d0),{id:v,scale:w}=f,j=y0(f,p0);return t.createElement(kJ,h0({},b,j,{ref:s,labelRef:o,x:h.x,y:h.y,tickTextProps:"auto"===a?{width:void 0}:{width:a},width:p.width,height:p.height,className:de("recharts-".concat(d," ").concat(d),r),viewBox:l,ticks:m,axisType:d,axisId:n}))}var v0={allowDataOverflow:gV.allowDataOverflow,allowDecimals:gV.allowDecimals,allowDuplicatedCategory:gV.allowDuplicatedCategory,angle:gV.angle,axisLine
vendor: 4,805 bytes, line 631
631:bJ.axisLine,hide:!1,includeHidden:gV.includeHidden,interval:gV.interval,label:!1,minTickGap:gV.minTickGap,mirror:gV.mirror,orientation:gV.orientation,padding:gV.padding,reversed:gV.reversed,scale:gV.scale,tick:gV.tick,tickCount:gV.tickCount,tickLine:bJ.tickLine,tickSize:bJ.tickSize,type:gV.type,niceTicks:gV.niceTicks,width:gV.width,yAxisId:0},w0=e=>{var n=tA(e,v0);return t.createElement(t.Fragment,null,t.createElement(x0,{interval:n.interval,id:n.yAxisId,scale:n.scale,type:n.type,domain:n.domain,allowDataOverflow:n.allowDataOverflow,dataKey:n.dataKey,allowDuplicatedCategory:n.allowDuplicatedCategory,allowDecimals:n.allowDecimals,tickCount:n.tickCount,padding:n.padding,includeHidden:n.includeHidden,reversed:n.reversed,ticks:n.ticks,width:n.width,orientation:n.orientation,mirror:n.mirror,hide:n.hide,unit:n.unit,name:n.name,angle:n.angle,minTickGap:n.minTickGap,tick:n.tick,tickFormatter:n.tickFormatter,niceTicks:n.niceTicks}),t.createElement(b0,n))},j0=t.memo(w0,GX);j0.displayName="YAxis";var C0=t_([(e,t)=>t,yT,hq,wq,wQ,SQ,YQ,MM],(e,t,n,r,a,i,s,o)=>{if(e&&t&&r&&a&&i)return"horizontal"===t||"vertical"===t?((e,t,n,r,a,i,s)=>{if(e&&n&&r&&a&&function(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,s)){var o=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),l=QQ(o,i,a,n,r),c=((e,t,n,r)=>{var a=t.find(e=>e&&e.index===n);if(a){if("horizontal"===e)return{x:a.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}})(t,a,l,e);return{activeIndex:String(l),activeCoordinate:c}}})(e,t,r,a,i,s,o):sZ(e,t,n,r,a,i,s)});function N0(e){var t,n,r,a=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var i=e.currentTarget.getBBox();t=i.width>0?a.width/i.width:1,n=i.height>0?a.height/i.height:1}else{var s=e.currentTarget;t=s.offsetWidth>0?a.width/s.offsetWidth:1,n=s.offsetHeight>0?a.height/s.offsetHeight:1}var o=(e,r)=>({relativeX:Math.round((e-a.left)/t),relativeY:Math.round((r-a.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>o(e.clientX,e.clientY)):o(e.clientX,e.clientY)}var k0=XP("mouseClick"),S0=WI();S0.startListening({actionCreator:k0,effect:(e,t)=>{var n=e.payload,r=C0(t.getState(),N0(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(EW({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var E0=XP("mouseMove"),A0=WI(),O0=null,_0=null,P0=null;function I0(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}A0.startListening({actionCreator:E0,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s="all"===i||(null==i?void 0:i.includes("mousemove"));null!==O0&&(cancelAnimationFrame(O0),O0=null),null===_0||"number"==typeof a&&s||(clearTimeout(_0),_0=null),P0=N0(n);var o=()=>{var e=t.getState(),n=mW(e,e.tooltip.settings.shared);if(!P0)return O0=null,void(_0=null);if("axis"===n){var r=C0(e,P0);null!=(null==r?void 0:r.activeIndex)?t.dispatch(SW({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(NW())}O0=null,_0=null};s?"raf"===a?O0=requestAnimationFrame(o):"number"==typeof a&&null===_0&&(_0=setTimeout(o,a)):o()}});var M0={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},T0=mI({name:"rootProps",initialState:M0,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:M0.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),R0=T0.reducer,{updateOptions:L0}=T0.actions,D0=mI({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),{updatePolarOptions:F0}=D0.actions,q0=D0.reducer,B0=XP("keyDown"),U0=XP("focus"),z0=XP("blur"),H0=WI(),V0=null,$0=null,W0=null;function Q0(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}H0.startListening({actionCreator:B0,effect:(e,t)=>
631{W0=e.payload,null!==V0&&(cancelAnimationFrame(V0),V0=null);var n=t.getState(),{throttleDelay:r,throttledEvents:a}=n.eventSettings,i="all"===a||a.includes("keydown");null===$0||"number"==typeof r&&i||(clearTimeout($0),$0=null);var s=()=>{try{var e=t.getState();if(!(!1!==e.rootProps.accessibilityLayer))return;var{keyboardInteraction:n}=e.tooltip,r=W0;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var a=LW(n,JW(e),$V(e),yQ(e)),i=null==a?-1:Number(a);if(!Number.isFinite(i)||i<0)return;var s=SQ(e);if("Enter"===r){var o=tZ(e,"axis","hover",String(n.index));return void t.dispatch(OW({active:!n.active,activeIndex:n.index,activeCoordinate:o}))}var l=i+("ArrowRight"===r?1:-1)*("left-to-right"===uW(e)?1:-1);if(null==s||l>=s.length||l<0)return;var c=tZ(e,"axis","hover",String(l));t.dispatch(OW({active:!0,activeIndex:l.toString(),activeCoordinate:c}))}finally{V0=null,$0=null}};i?"raf"===r?V0=requestAnimationFrame(s):"number"==typeof r&&null===$0&&(s(),W0=null,$0=setTimeout(()=>{W0?s():($0=null,V0=null)},r)):s()}}),H0.startListening({actionCreator:U0,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var a=tZ(n,"axis","hover",String("0"));t.dispatch(OW({active:!0,activeIndex:"0",activeCoordinate:a}))}}}}),H0.startListening({actionCreator:z0,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;r.active&&t.dispatch(OW({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var Z0=XP("externalEvent"),K0=WI(),G0=new Map,Y0=new Map,J0=new Map;K0.startListening({actionCreator:Z0,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){var a=r.type,i=Q0(r);J0.set(a,{handler:n,reactEvent:i});var s=G0.get(a);void 0!==s&&(cancelAnimationFrame(s),G0.delete(a));var o=t.getState(),{throttleDelay:l,throttledEvents:c}=o.eventSettings,u=c,d="all"===u||(null==u?void 0:u.includes(a)),p=Y0.get(a);void 0===p||"number"==typeof l&&d||(clearTimeout(p),Y0.delete(a));var h=()=>{var e=J0.get(a);try{if(!e)return;var{handler:n,reactEvent:r}=e,i=t.getState(),s={activeCoordinate:DQ(i),activeDataKey:MQ(i),activeIndex:PQ(i),activeLabel:IQ(i),activeTooltipIndex:PQ(i),isTooltipActive:FQ(i)};n&&n(s,r)}finally{G0.delete(a),Y0.delete(a),J0.delete(a)}};if(d)if("raf"===l){var m=requestAnimationFrame(h);G0.set(a,m)}else if("number"==typeof l){if(!Y0.has(a)){h();var f=setTimeout(h,l);Y0.set(a,f)}}else h();else h()}}});var X0=t_([BW],e=>e.tooltipItemPayloads),e1=t_([X0,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var{getPosition:a}=r;if(null!=a)return a(t)}}}),t1=XP("touchMove"),n1=WI(),r1=null,a1=null,i1=null,s1=null;n1.startListening({actionCreator:t1,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){s1=Q0(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s="all"===i||i.includes("touchmove");null!==r1&&(cancelAnimationFrame(r1),r1=null),null===a1||"number"==typeof a&&s||(clearTimeout(a1),a1=null),i1=Array.from(n.touches).map(e=>N0({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var o=()=>{if(null!=s1){var e=t.getState(),n=mW(e,e.tooltip.settings.shared);if("axis"===n){var r,a=null===(r=i1)||void 0===r?void 0:r[0];if(null==a)return r1=null,void(a1=null);var i=C0(e,a);null!=(null==i?void 0:i.activeIndex)&&t.dispatch(SW({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if("item"===n){var s,o=s1.touches[0];if(null==document.elementFromPoint||null==o)return;var l=document.elementFromPoint(o.clientX,o.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute("data-recharts-item-index"),u=null!==(s=l.getAttribute("data-recharts-item-id"))&&void 0!==s?s:void 0,d=KW(e).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:p}=d,h=e1(e,c,u);t.dispatch(jW({activeDataKey:p,activeIndex:c,activeCoordinate:h,activeGraphicalItemId:u}))}r1=null,a1=null}};s?"raf"===a?r1=requestAnimationFrame(o):"number"==typeof a&&null===a1&&(o(),s1=null,a1=setTimeout(()=>{s1?o():(a1=null,r1=null)},a)):o()}}});var o1={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]}
631,l1=mI({name:"eventSettings",initialState:o1,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:c1}=l1.actions,u1=T_({brush:WY,cartesianAxis:TY,chartData:VZ,errorBars:KJ,eventSettings:l1.reducer,graphicalItems:yY,layout:XI,legend:bR,options:DZ,polarAxis:CG,polarOptions:q0,referenceElements:eJ,renderedTicks:hJ,rootProps:R0,tooltip:_W,zIndex:bZ});function d1(e){var{preloadedState:n,children:r,reduxStoreName:a}=e,i=DM(),s=t.useRef(null);if(i)return r;null==s.current&&(s.current=function(e){return oI({reducer:u1,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([S0.middleware,A0.middleware,H0.middleware,K0.middleware,n1.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(sI({type:"raf"}))},devTools:{serialize:{replacer:I0},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(n,a));var o=UO;return t.createElement(IR,{context:o,store:s.current},r)}function p1(e){var{layout:n,margin:r}=e,a=HO(),i=DM();return t.useEffect(()=>{i||(a(GI(n)),a(KI(r)))},[a,i,n,r]),null}var h1=t.memo(p1,RR);function m1(e){var n=HO();return t.useEffect(()=>{n(L0(e))},[n,e]),null}var f1=e=>{var n=HO();return t.useEffect(()=>{n(c1(e))},[n,e]),null},g1=t.memo(f1,RR);function y1(e){var{zIndex:n,isPanorama:r}=e,a=t.useRef(null),i=HO();return t.useLayoutEffect(()=>(a.current&&i(yZ({zIndex:n,element:a.current,isPanorama:r})),()=>{i(xZ({zIndex:n,isPanorama:r}))}),[i,n,r]),t.createElement("g",{tabIndex:-1,ref:a,className:"recharts-zIndex-layer_".concat(n)})}function x1(e){var{children:n,isPanorama:r}=e,a=QO(lZ);if(!a||0===a.length)return n;var i=a.filter(e=>e<0),s=a.filter(e=>e>0);return t.createElement(t.Fragment,null,i.map(e=>t.createElement(y1,{key:e,zIndex:e,isPanorama:r})),n,s.map(e=>t.createElement(y1,{key:e,zIndex:e,isPanorama:r})))}var b1=["children"];function v1(){return v1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v1.apply(null,arguments)}var w1={width:"100%",height:"100%",display:"block"},j1=t.forwardRef((e,n)=>{var r=fT(),a=gT(),i=tL();if(!nM(r)||!nM(a))return null;var s,o,{children:l,otherAttributes:c,title:u,desc:d}=e;return null!=c&&(s="number"==typeof c.tabIndex?c.tabIndex:i?0:void 0,o="string"==typeof c.role?c.role:i?"application":void 0),t.createElement(Gk,v1({},c,{title:u,desc:d,role:o,tabIndex:s,width:r,height:a,style:w1,ref:n}),l)}),C1=e=>{var{children:n}=e,r=QO(qM);if(!r)return null;var{width:a,height:i,y:s,x:o}=r;return t.createElement(Gk,{width:a,height:i,x:o,y:s},n)},N1=t.forwardRef((e,n)=>{var{children:r}=e,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,b1);return DM()?t.createElement(C1,null,t.createElement(x1,{isPanorama:!0},r)):t.createElement(j1,v1({ref:n},a),t.createElement(x1,{isPanorama:!1},r))});function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k1(Object(n),!0).forEach(function(t){E1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function E1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A1.apply(null,arguments)}var O1=()=>(GZ(),null);function _1(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);
631if(!Number.isNaN(t))return t}return 0}var P1=t.forwardRef((e,n)=>{var r,a,i=t.useRef(null),[s,o]=t.useState({containerWidth:_1(null===(r=e.style)||void 0===r?void 0:r.width),containerHeight:_1(null===(a=e.style)||void 0===a?void 0:a.height)}),l=t.useCallback((e,t)=>{o(n=>{var r=Math.round(e),a=Math.round(t);return n.containerWidth===r&&n.containerHeight===a?n:{containerWidth:r,containerHeight:a}})},[]),c=t.useCallback(e=>{if("function"==typeof n&&n(e),null!=e&&"undefined"!=typeof ResizeObserver){var{width:t,height:r}=e.getBoundingClientRect();l(t,r);var a=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;l(n,r)}});a.observe(e),i.current=a}},[n,l]);return t.useEffect(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[l]),t.createElement(t.Fragment,null,t.createElement(wT,{width:s.containerWidth,height:s.containerHeight}),t.createElement("div",A1({ref:c},e)))}),I1=t.forwardRef((e,n)=>{var{width:r,height:a}=e,[i,s]=t.useState({containerWidth:_1(r),containerHeight:_1(a)}),o=t.useCallback((e,t)=>{s(n=>{var r=Math.round(e),a=Math.round(t);return n.containerWidth===r&&n.containerHeight===a?n:{containerWidth:r,containerHeight:a}})},[]),l=t.useCallback(e=>{if("function"==typeof n&&n(e),null!=e){var{width:t,height:r}=e.getBoundingClientRect();o(t,r)}},[n,o]);return t.createElement(t.Fragment,null,t.createElement(wT,{width:i.containerWidth,height:i.containerHeight}),t.createElement("div",A1({ref:l},e)))}),M1=t.forwardRef((e,n)=>{var{width:r,height:a}=e;return t.createElement(t.Fragment,null,t.createElement(wT,{width:r,height:a}),t.createElement("div",A1({ref:n},e)))}),T1=t.forwardRef((e,n)=>{var{width:r,height:a}=e;return"string"==typeof r||"string"==typeof a?t.createElement(I1,A1({},e,{ref:n})):"number"==typeof r&&"number"==typeof a?t.createElement(M1,A1({},e,{width:r,height:a,ref:n})):t.createElement(t.Fragment,null,t.createElement(wT,{width:r,height:a}),t.createElement("div",A1({ref:n},e)))});var R1=t.forwardRef((e,n)=>{var{children:r,className:a,height:i,onClick:s,onContextMenu:o,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:p,onMouseUp:h,onTouchEnd:m,onTouchMove:f,onTouchStart:g,style:y,width:x,responsive:b,dispatchTouchEvents:v=!0}=e,w=t.useRef(null),j=HO(),[C,N]=t.useState(null),[k,S]=t.useState(null),E=function(){var e=HO(),[n,r]=t.useState(null),a=QO(wM);return t.useEffect(()=>{if(null!=n){var t=n.getBoundingClientRect().width/n.offsetWidth;tM(t)&&t!==a&&e(JI(t))}},[n,e,a]),r}(),A=lT(),O=(null==A?void 0:A.width)>0?A.width:x,_=(null==A?void 0:A.height)>0?A.height:i,P=t.useCallback(e=>{E(e),"function"==typeof n&&n(e),N(e),S(e),null!=e&&(w.current=e)},[E,n,N,S]),I=t.useCallback(e=>{j(k0(e)),j(Z0({handler:s,reactEvent:e}))},[j,s]),M=t.useCallback(e=>{j(E0(e)),j(Z0({handler:u,reactEvent:e}))},[j,u]),T=t.useCallback(e=>{j(NW()),j(Z0({handler:d,reactEvent:e}))},[j,d]),R=t.useCallback(e=>{j(E0(e)),j(Z0({handler:p,reactEvent:e}))},[j,p]),L=t.useCallback(()=>{j(U0())},[j]),D=t.useCallback(()=>{j(z0())},[j]),F=t.useCallback(e=>{j(B0(e.key))},[j]),q=t.useCallback(e=>{j(Z0({handler:o,reactEvent:e}))},[j,o]),B=t.useCallback(e=>{j(Z0({handler:l,reactEvent:e}))},[j,l]),U=t.useCallback(e=>{j(Z0({handler:c,reactEvent:e}))},[j,c]),z=t.useCallback(e=>{j(Z0({handler:h,reactEvent:e}))},[j,h]),H=t.useCallback(e=>{j(Z0({handler:g,reactEvent:e}))},[j,g]),V=t.useCallback(e=>{v&&j(t1(e)),j(Z0({handler:f,reactEvent:e}))},[j,v,f]),$=t.useCallback(e=>{j(Z0({handler:m,reactEvent:e}))},[j,m]),W=function(e){return e?P1:T1}(b);return t.createElement(OZ.Provider,{value:C},t.createElement(eS.Provider,{value:k},t.createElement(W,{width:null!=O?O:null==y?void 0:y.width,height:null!=_?_:null==y?void 0:y.height,className:de("recharts-wrapper",a),style:S1({position:"relative",cursor:"default",width:O,height:_},y),onClick:I,onContextMenu:q,onDoubleClick:B,onFocus:L,onBlur:D,onKeyDown:F,onMouseDown:U,onMouseEnter:M,onMouseLeave:T,onMouseMove:R,onMouseUp:z,onTouchEnd:$,onTouchMove:V,onTouchStart:H,ref:P},t.createElement(O1,null),r)))}),L1=["width","height","responsive","children","className","style","compact","title","desc"];
631var D1=t.forwardRef((e,n)=>{var{width:r,height:a,responsive:i,children:s,className:o,style:l,compact:c,title:u,desc:d}=e,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,L1),h=$k(p);return c?t.createElement(t.Fragment,null,t.createElement(wT,{width:r,height:a}),t.createElement(N1,{otherAttributes:h,title:u,desc:d},s)):t.createElement(R1,{className:o,style:l,width:r,height:a,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},t.createElement(N1,{otherAttributes:h,title:u,desc:d,ref:n},t.createElement(nJ,null,s)))});function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F1.apply(null,arguments)}function q1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var U1=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q1(Object(n),!0).forEach(function(t){B1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},o1),z1=t.forwardRef(function(e,n){var r,a=tA(e.categoricalChartProps,U1),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:l,categoricalChartProps:c}=e,u={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:l,eventEmitter:void 0};return t.createElement(d1,{preloadedState:{options:u},reduxStoreName:null!==(r=c.id)&&void 0!==r?r:i},t.createElement(zY,{chartData:c.data}),t.createElement(h1,{layout:a.layout,margin:a.margin}),t.createElement(g1,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),t.createElement(m1,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),t.createElement(D1,F1({},a,{ref:n})))}),H1=["axis","item"],V1=t.forwardRef((e,n)=>t.createElement(z1,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:H1,tooltipPayloadSearcher:RZ,categoricalChartProps:e,ref:n}));const $1=u`
632  query OpsCampaignSendFailureSummary($from: String, $to: String) {
633    opsCampaignSendFailureSummary(from: $from, to: $to) {
634      from
635      to
636      total_failures
637      causes {
638        cause
639        variants
640        failure_count
641        campaign_count
642        user_count
643        first_failed_at
644        last_failed_at
645      }
646    }
647  }
648`,W1=u`
649  query OpsCampaignSendFailureSeries(
650    $from: String
651    $cause: String
652    $campaignId: String
653    $userEmail: String
654    $timeZone: String
655  ) {
656    opsCampaignSendFailureSeries(
657      from: $from
658      cause: $cause
659      campaign_id: $campaignId
660      user_email: $userEmail
661      time_zone: $timeZone
662    ) {
663      from
664      to
665      bucket
666      time_zone
667      buckets {
668        bucket_start
669        failure_count
670      }
671    }
672  }
673`,Q1=u`
674  query OpsCampaignSearch($query: String) {
675    opsCampaignSearch(query: $query) {
676      id
677      name
678      status
679      created_at
680      user_email
681      has_failures
682    }
683  }
684`,Z1=u`
685  query OpsCampaignSendFailures(
686    $from: String
687    $to: String
688    $cause: String
689    $campaignId: String
690    $userEmail: String
691    $limit: Int
692    $offset: Int
693  ) {
694    opsCampaignSendFailures(
695      from: $from
696      to: $to
697      cause: $cause
698      campaign_id: $campaignId
699      user_email: $userEmail
700      limit: $limit
701      offset: $offset
702    ) {
703      items {
704        id
705        failed_at
706        cause
707        reason_family
708        reason
709        step_number
710        enrollment_id
711        recipient_email
712        campaign_id
713        campaign_name
714        campaign_status
715        user_id
716        user_email
717      }
718      total_count
719    }
720  }
721`,K1=[{label:"24 hours",days:1},{label:"7 days",days:7},{label:"30 days",days:30}],G1=(e,t)=>{const n=new Date(e);return Number.isNaN(n.getTime())?"—":"hour"===t?n.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric"}):n.toLocaleDateString("en-US",{month:"short",day:"numeric"})},Y1=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},J1="#d03b3b",X1=["Failed","Cause","Recipient","Campaign","Owner","Step","Reason"],e2=({active:e,onClick:t,children:n})=>i.jsx("button",{type:"button",onClick:t,className:"rounded-full border px-3 py-1 text-sm font-medium "+(e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-600 hover:bg-gray-50"),children:n}),t2=({cause:e,active:t,onClick:n})=>i.jsxs("button",{type:"button",onClick:n,className:"rounded-lg border px-4 py-3 text-left "+(t?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:bg-gray-50"),children:[i.jsx("p",{className:"font-mono text-sm text-gray-900",children:e.cause}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:`${e.failure_count.toLocaleString()} failures · ${e.campaign_count} campaign${1===e.campaign_count?"":"s"} · ${e.user_count} user${1===e.user_count?"":"s"}`}),(e.variants.length>1||e.variants[0]!==e.cause)&&i.jsx("p",{className:"mt-1 font-mono text-xs text-gray-400",children:e.variants.join(", ")}),i.jsx("p",{className:"mt-1 text-xs text-gray-500",children:`Last ${Y1(e.last_failed_at)}`})]}),n2=({series:e,bucket:t,activeBucket:n,onSelectBucket:r})=>{const a=e.map(e=>({bucket_start:e.bucket_start,label:G1(e.bucket_start,t),failure_count:e.failure_count,fill:n&&n!==e.bucket_start?"#f0c2c2":J1}));return i.jsx(uT,{width:"100%",height:160,children:i.jsxs(V1,{data:a,margin:{top:4,right:4,bottom:0,left:4},barCategoryGap:2,onClick:e=>{const t=a[Number(e?.activeIndex)];t&&r(t.bucket_start)},children:[i.jsx(VJ,{stroke:"#f1f1ef",vertical:!1}),i.jsx(c0,{dataKey:"label",tick:{fill:"#52514e",fontSize:11},axisLine:{stroke:"#e5e5e2"},tickLine:!1,minTickGap:24}),i.jsx(j0,{allowDecimals:!1,width:32,tick:{fill:"#52514e",fontSize:11},axisLine:!1,tickLine:!1}),i.jsx(aK,{cursor:{fill:"rgba(0,0,0,0.04)"},contentStyle:{borderRadius:8,border:"1px solid #e5e5e2",fontSize:12},labelStyle:{color:"#0b0b0b"}}),i.jsx($X,{dataKey:"failure_count",name:"failures",fill:J1,radius:[4,4,0,0],cursor:"pointer"})]})})},r2=({selected:e,onSelect:t,onClear:r})=>{const[a,s]=n.useState(""),[o,l]=n.useState(""),{isOpen:c,onOpen:u,onClose:p}=ut(!1),h=n.useRef(null);wl(h,p),n.useEffect(()=>{const e=setTimeout(()=>l(a),200);return()=>clearTimeout(e)},[a]);const{data:m,loading:f}=d(Q1,{variables:{query:o.trim()||void 0}}),g=m?.opsCampaignSearch??[];return e?i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Campaign"}),i.jsxs("span",{className:"inline-flex max-w-sm items-center gap-1.5 rounded-lg border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-800",children:[i.jsx("span",{className:"truncate",children:e.name}),i.jsx("button",{type:"button",onClick:r,"aria-label":"Clear campaign filter",className:"text-blue-500 hover:text-blue-700",children:"✕"})]})]}):i.jsxs("div",{className:"relative",ref:h,children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Campaign"}),i.jsx("input",{id:"campaign-filter",type:"text",value:a,onChange:e=>s(e.target.value),onFocus:u,placeholder:"Search by name or paste an ID…",className:"w-80 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),c&&i.jsxs("div",{className:"absolute z-10 mt-1 max-h-96 w-96 overflow-y-auto rounded-lg border border-gray-200 bg-white shadow-sm",children:[f&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"Searching…"}),!f&&0===g.length&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:o.trim()?"No campaigns match.":"No campaign has failed yet — search to find one anyway."}),!f&&g.length>0&&!o.trim()&&i.jsx("p",{className:"sticky top-0 border-b border-gray-100 bg-white px-3 py-1.5 text-xs text-gray-400",children:"Campaigns that failed most recently"}),g.map(e=>i.jsxs("button",{type:"button",onClick:()=>{t(e),s(""),p()},className:"block w-full border-b border-gray-100 px-3 py-2 text-left last:border-b-0 hover:bg-gray-50",children:[i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"truncate text-sm text-gray-800",children:e.name}),e.has_failures&&i.jsx("span",{className:"shrink-0 rounded-full bg-red-50 px-2 py-0.5 text-xs font-medium text-red-700",children:"has failures"})]}),i.jsx("span",{className:"block font-mono text-xs text-gray-400",children:e.id}),i.jsx("span",{className:"block text-xs text-gray-500",children:`${e.status} · ${e.user_email??"owner unknown"} · created ${Y1(e.created_at)}`})]},e.id))]})]})},a2=({item:e})=>i.jsxs("tr",{className:"align-top",children:[i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-sm text-gray-700",children:Y1(e.failed_at)}),i.jsxs("td",{className:"whitespace-nowrap px-4 py-2 font-mono text-xs text-gray-700",children:[e.cause,e.reason_family!==e.cause&&i.jsx("span",{className:"block text-gray-400",children:e.reason_family})]}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:e.recipient_email??"—"}),i.jsxs("td",{className:"px-4 py-2 text-sm text-gray-700",children:[e.campaign_name??i.jsx("span",{className:"font-mono text-xs text-gray-400",children:e.campaign_id}),e.campaign_status&&i.jsx("span",{className:"block text-xs text-gray-500",children:e.campaign_status})]}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:e.user_email??"—"}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:e.step_number}),i.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:i.jsx("span",{className:"block max-w-md break-words",children:e.reason})})]}),i2=()=>{const[e,t]=n.useState(7),[r,a]=n.useState(null),[s,l]=n.useState(null),[c,u]=n.useState(""),[p,h]=n.useState(0),[m,f]=n.useState(null),g=n.useMemo(()=>{return t=e,new Date(Date.now()-864e5*t).toISOString();var t},[e]),y=n.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",[]),x=n.useMemo(()=>(()=>{const e=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts(new Date);return e.find(e=>"timeZoneName"===e.type)?.value??"UTC"})(),[]),b=e=>{l(e),h(0)},v=c.trim(),{data:w,loading:j}=d($1,{variables:{from:g},fetchPolicy:"cache-and-network"}),{data:C}=d(W1,{variables:{from:g,cause:r??void 0,campaignId:s?.id??void 0,userEmail:v||void 0,timeZone:y},fetchPolicy:"cache-and-network"}
721),N=C?.opsCampaignSendFailureSeries,k=n.useMemo(()=>{if(!m||!N)return null;const e=new Date(m),t="hour"===N.bucket?36e5:864e5;return{from:e.toISOString(),to:new Date(e.getTime()+t-1).toISOString()}},[m,N]),{data:S,previousData:E,loading:A,error:O}=d(Z1,{variables:{from:k?.from??g,to:k?.to,cause:r??void 0,campaignId:s?.id??void 0,userEmail:v||void 0,limit:50,offset:p},fetchPolicy:"cache-and-network"}),_=S?.opsCampaignSendFailures,P=_??(O?void 0:E?.opsCampaignSendFailures),I=P?.items??[],M=P?.total_count??0,T=w?.opsCampaignSendFailureSummary,R=0===M?0:p+1,L=Math.min(p+50,M),D=Boolean(_)&&p>0,F=Boolean(_)&&p+50<M,q=Boolean(r)||Boolean(s)||Boolean(v);return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-6xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Campaign send failures"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Every campaign email that failed to send, across all users. One row per attempt, so a contact that failed, was resent, and failed again appears more than once."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsx("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:K1.map(n=>i.jsx(e2,{active:e===n.days,onClick:()=>{return e=n.days,t(e),f(null),void h(0);var e},children:n.label},n.days))}),j&&!T&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading causes…"}),T&&i.jsxs("div",{className:"mt-4",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`${T.total_failures.toLocaleString()} failures since ${Y1(T.from)}`,i.jsx("span",{className:"ml-2 text-gray-400",children:`All times ${x}`})]}),T.causes.length>0&&i.jsx("div",{className:"mt-2 grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:T.causes.map(e=>i.jsx(t2,{cause:e,active:r===e.cause,onClick:()=>{return t=e.cause,a(e=>e===t?null:t),void h(0);var t}},e.cause))})]}),N&&N.buckets.length>0&&i.jsxs("div",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-4",children:[i.jsxs("div",{className:"flex items-baseline justify-between",children:[i.jsx("h2",{className:"text-sm font-medium text-gray-700",children:`Failures per ${N.bucket}`}),m?i.jsx("button",{type:"button",onClick:()=>{f(null),h(0)},className:"text-sm text-blue-600 hover:underline",children:`Showing ${G1(m,N.bucket)} — show whole window`}):i.jsx("span",{className:"text-xs text-gray-400",children:"Click a bar to filter the rows below"})]}),i.jsx("div",{className:"mt-2",children:i.jsx(n2,{series:N.buckets,bucket:N.bucket,activeBucket:m,onSelectBucket:e=>{f(t=>t===e?null:e),h(0)}})})]}),i.jsxs("div",{className:"mt-6 flex flex-wrap items-end gap-3",children:[i.jsx(r2,{selected:s,onSelect:b,onClear:()=>b(null)}),i.jsxs("div",{children:[i.jsx("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:"Owner email (exact)"}),i.jsx("input",{id:"owner-email",type:"text",value:c,onChange:e=>{u(e.target.value),h(0)},placeholder:"[email protected]",className:"w-72 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"})]}),q&&i.jsx("button",{type:"button",onClick:()=>{a(null),l(null),u(""),f(null),h(0)},className:"px-2 py-2 text-sm text-blue-600 hover:underline",children:"Clear filters"})]}),A&&!P&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),O&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load campaign send failures."}),P&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`Showing ${R.toLocaleString()}–${L.toLocaleString()} of ${M.toLocaleString()}`,A&&i.jsx("span",{className:"ml-2 text-gray-400",children:"updating…"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:!D,onClick:()=>h(e=>Math.max(e-50,0)),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"← Prev"}),i.jsx("button",{type:"button",disabled:!F,onClick:()=>h(e=>e+50),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Next →"})]})]}),i.jsx("div",{className:"mt-2 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:X1.map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:0===I.length?i.jsx("tr",{children:i.jsx("td",{colSpan:X1.length,className:"px-4 py-10 text-center text-sm text-gray-500",children:q?"No send failures match the current filters.":"No send failures in this window."})}):I.map(e=>i.jsx(a2,{item:e},e.id))})]})})]})]})})},s2=u`
722  query OpsCompanyDataHistorySearch($query: String!) {
723    opsCompanyDataHistorySearch(query: $query) {
724      id
725      companyName
726      websiteUrl
727      slug
728      isActive
729    }
730  }
731`,o2=u`
732  query OpsCompanyDataHistory($companyId: String!) {
733    opsCompanyDataHistory(companyId: $companyId) {
734      company {
735        id
736        companyName
737        websiteUrl
738        slug
739        isActive
740        createdAt
741      }
742      pipelines {
743        v2Ran
744        v2ExtractedAt
745        v1Ran
746        v1Status
747        v1ExtractedAt
748        interventionCount
749        pipelineCount
750        interventions {
751          interventionId
752          interventionName
753          interventionType
754          linkedAt
755          pipelineCount
756          lastV1ConfirmedAt
757        }
758      }
759      contacts {
760        activeContactCount
761        totalContactCount
762        lastContactCreatedAt
763        apolloContactsRefreshedAt
764        contactRequests {
765          id
766          requestedAt
767          status
768          resultCount
769          matchedExistingCount
770        }
771        enrichmentJobs {
772          id
773          name
774          type
775          status
776          touchedAt
777          resultCount
778          matchedCount
779        }
780      }
781    }
782  }
783`,l2=()=>{const[e,n]=t.useState(""),[r,a]=An(s2,{fetchPolicy:"network-only"}),s=a.data?.opsCompanyDataHistorySearch??[];return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:"Company data history"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"See when each data mechanism last touched a bio company — the two intervention-extraction pipelines and the contact-import paths — with each signal labeled by what it actually records. Read-only; reflects whichever environment this app points at."}),i.jsxs("form",{onSubmit:t=>{t.preventDefault();const n=e.trim();n.length<2||r({variables:{query:n}})},className:"mt-6 flex gap-2",children:[i.jsx("input",{type:"search",value:e,onCh
783ange:e=>n(e.target.value),placeholder:"Search by name, domain, slug, or company id…",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:a.loading||e.trim().length<2,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:a.loading?"Searching…":"Search"})]}),a.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:a.error.message}),i.jsxs("div",{className:"mt-4 space-y-2",children:[s.map(e=>i.jsxs(o,{to:Yw.companyDataHistoryDetail(e.id),className:"block rounded-lg border border-gray-200 bg-white px-4 py-3 hover:border-blue-300",children:[i.jsxs("div",{className:"truncate font-medium text-gray-900",children:[e.companyName,!e.isActive&&i.jsx("span",{className:"ml-2 rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-600",children:"inactive"})]}),i.jsxs("div",{className:"truncate text-xs text-gray-500",children:[e.websiteUrl??"no domain"," · ",e.slug??"no slug"]})]},e.id)),a.data&&0===s.length&&!a.loading&&i.jsx("p",{className:"text-sm text-gray-500",children:"No companies found."})]})]})})},c2=(e,t="never")=>{if(!e)return t;const n=new Date(e);return Number.isNaN(n.getTime())?t:n.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})},u2=({about:e,children:t})=>{const r=n.useId();return i.jsx(qe,{placement:"top",tooltip:t,className:"max-w-xs text-xs",children:i.jsxs("button",{type:"button","aria-label":`About ${e}`,"aria-describedby":r,className:"-m-1.5 inline-flex p-1.5 text-gray-500 hover:text-gray-700",children:[i.jsx(ms,{className:"h-3.5 w-3.5","aria-hidden":"true"}),i.jsx("span",{id:r,className:"sr-only",children:t})]})})},d2=({title:e,caveat:t,children:n})=>i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:e}),t&&i.jsx(u2,{about:e,children:t})]}),i.jsx("div",{className:"mt-4",children:n})]}),p2=({label:e,value:t,caveat:n,caveatAbout:r,mono:a})=>i.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-x-4 border-t border-gray-100 py-2 first:border-t-0 first:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("span",{className:"text-sm text-gray-600",children:e}),n&&i.jsx(u2,{about:r??e,children:n})]}),i.jsx("span",{className:"text-sm text-gray-900 "+(a?"font-mono text-xs":""),children:t})]}),h2=({ran:e,ranLabel:t="ran",neverLabel:n="never ran"})=>i.jsx("span",{className:"rounded-full px-2 py-0.5 text-xs font-medium "+(e?"bg-emerald-50 text-emerald-700":"bg-gray-100 text-gray-600"),children:e?t:n}),m2=({children:e})=>i.jsx("p",{className:"text-sm text-gray-500",children:e}),f2=({contacts:e})=>i.jsxs(d2,{title:"Contacts",caveat:"“Last write of any kind” is deliberately not shown: email unlocks, dedup merges, and no-op freshness touches all bump it, so it reads as a refresh that never happened.",children:[i.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx(p2,{label:"Active contacts",value:e.activeContactCount}),i.jsx(p2,{label:"Total contacts",value:e.totalContactCount,caveat:"Counted through canonical_company_id; the legacy contacts.company_id link is not used."})]}),i.jsxs("div",{children:[i.jsx(p2,{label:"Last new contacts added",value:c2(e.lastContactCreatedAt),caveat:"Newest contacts.created_at — when contacts were last ADDED, not when they were last checked.",mono:!0}),i.jsx(p2,{label:"Last Apollo check",value:c2(e.apolloContactsRefreshedAt,"unknown"),caveat:"Unknown, not never: bulk-collect imports search Apollo without stamping this field, so a company whose contacts all came from bulk collect has been checked but carries no record of it.",mono:!0})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Contact requests"}),0===e.contactRequests.length?i.jsx(m2,{children:"No contact requests recorded for this company."}):i.jsx("div",{className:"mt-2 overflow-x-auto",children:i.jsxs("table",{className:"w-full min-w-[32rem] text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs uppercase tracking-wide text-gray-500",children:[i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Requested"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Status"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Results"}),i.jsx("th",{className:"py-2 font-medium",children:"Already in database"})]})}),i.jsx("tbody",{children:e.contactRequests.map(e=>i.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[i.jsx("td",{className:"py-2 pr-4 text-gray-900",children:c2(e.requestedAt)}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.status}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.resultCount}),i.jsx("td",{className:"py-2 text-gray-600",children:e.matchedExistingCount})]},e.id))})]})})]}),i.jsxs("div",{className:"mt-6",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Enrichment jobs"}),e.enrichmentJobs.length>0&&i.jsx(u2,{about:"Enrichment jobs",children:"Dated by when the job wrote this company’s results, not by when it was enqueued."})]}),0===e.enrichmentJobs.length?i.jsx(m2,{children:"No enrichment job has touched this company."}):i.jsx("div",{className:"mt-2 overflow-x-auto",children:i.jsxs("table",{className:"w-full min-w-[36rem] text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs uppercase tracking-wide text-gray-500",children:[i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Touched"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Job"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Type"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Status"}),i.jsx("th",{className:"py-2 font-medium",children:"Results (matched)"})]})}),i.jsx("tbody",{children:e.enrichmentJobs.map(e=>i.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[i.jsx("td",{className:"py-2 pr-4 text-gray-900",children:c2(e.touchedAt)}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.name??"untitled"}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.type}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.status}),i.jsxs("td",{className:"py-2 text-gray-600",children:[e.resultCount," (",e.matchedCount,")"]})]},e.id))})]})})]})]}),g2=({pipelines:e})=>i.jsxs(d2,{title:"Intervention pipelines",caveat:"Database-backed history only. v2 runs that were produced in S3 but never ingested leave no trace here.",children:[i.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"v2 — batch harness"}),i.jsx(h2,{ran:e.v2Ran})]}),i.jsx("div",{className:"mt-2",children:i.jsx(p2,{label:"Extracted at",value:c2(e.v2ExtractedAt),caveat:"Stage-05 extraction time, not the time it was written to the database. Every company in the same batch carries this 
783same stamp; the batch's human name lives only in S3.",caveatAbout:"v2 extracted at",mono:!0})})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"v1 — queue extractor"}),i.jsx(h2,{ran:e.v1Ran})]}),i.jsxs("div",{className:"mt-2",children:[null!=e.v1Status&&"complete"!==e.v1Status&&i.jsx(p2,{label:"Status",value:e.v1Status,caveat:"Shown only when the run did not finish cleanly — a completed run says so by carrying an extraction date, and a failed one leaves none."}),i.jsx(p2,{label:"Extracted at",value:c2(e.v1ExtractedAt),caveat:"Only the latest SUCCESSFUL run is recorded; earlier runs and failed runs are not.",caveatAbout:"v1 extracted at",mono:!0})]})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsxs("h3",{className:"text-sm font-medium text-gray-900",children:["Linked interventions (",e.interventionCount," interventions, ",e.pipelineCount," pipeline rows)"]}),0===e.interventions.length?i.jsx(m2,{children:"No interventions are linked to this company."}):i.jsx("div",{className:"mt-2 max-h-96 overflow-auto scrollbar-always-visible",children:i.jsxs("table",{className:"w-full min-w-[38rem] text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs uppercase tracking-wide text-gray-500",children:[i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Intervention"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Type"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Linked"}),i.jsx("th",{className:"py-2 pr-4 font-medium",children:"Pipelines"}),i.jsx("th",{className:"py-2 font-medium",children:"Latest v1 confirm"})]})}),i.jsx("tbody",{children:e.interventions.map(e=>i.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[i.jsx("td",{className:"py-2 pr-4 text-gray-900",children:e.interventionName}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.interventionType}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:c2(e.linkedAt)}),i.jsx("td",{className:"py-2 pr-4 text-gray-600",children:e.pipelineCount}),i.jsx("td",{className:"py-2 text-gray-600",children:c2(e.lastV1ConfirmedAt,"never")})]},e.interventionId))})]})})]})]}),y2=()=>{const{companyId:e=""}=he(),{data:t,loading:n,error:r}=d(o2,{variables:{companyId:e},fetchPolicy:"network-only"}),a=t?.opsCompanyDataHistory;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsx(o,{to:Yw.companyDataHistory,className:"text-sm text-blue-600 hover:underline",children:"← Company data history"}),n&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),r&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:r.message}),!n&&!r&&!a&&i.jsxs("p",{className:"mt-4 text-sm text-gray-500",children:["No bio company found with id"," ",e,"."]}),a&&i.jsxs(i.Fragment,{children:[i.jsxs("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:[a.company.slug?i.jsx("a",{href:b.CompanyProfile(a.company.slug),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:a.company.companyName}):a.company.companyName,!a.company.isActive&&i.jsx("span",{className:"ml-2 align-middle rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-600",children:"inactive"})]}),i.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-2 font-mono text-xs text-gray-500",children:[i.jsx("span",{children:a.company.websiteUrl??"no domain"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:a.company.slug??"no slug"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:a.company.id}),i.jsx(Yj,{text:a.company.id,tooltipContent:"Copy company id"})]}),i.jsxs("div",{className:"mt-2 flex items-center gap-2.5 text-xs text-gray-600",children:[i.jsxs("span",{children:["Added to the database ",i.jsx("span",{className:"font-mono text-gray-900",children:c2(a.company.createdAt)})]}),i.jsx(u2,{about:"Added to the database",children:"Dates the row itself, not our first knowledge of the company. What put it there is not recorded."})]}),i.jsx(g2,{pipelines:a.pipelines}),i.jsx(f2,{contacts:a.contacts})]})]})})},x2=[{companyName:"RayzeBio, Inc.",canonicalCompanyId:"9cee4dc2-f060-4220-be26-2f84664ea14f",story:"Radiopharma company (BMS subsidiary). A steady stream of deal news, facility milestones, and trial registrations — exercises the everyday calls: reach out on real news, stay quiet on repeat coverage, and skip minor trial housekeeping.",runs:[{id:"R1",date:"2025-06-10",
783signals:[{summary:"BMS/RayzeBio license Philochem’s prostate-cancer radiotracer OncoACP3 — $350M upfront, up to $1.35B.",newsIds:["ee0e84ea-aa89-4ca1-8ebf-866538818533"]}],expectedDrafts:[{topic:"Reach out on the new Philochem radiotracer licensing deal",email:"Congrats on the OncoACP3 licensing deal with BMS — as the prostate-cancer radiotracer program scales, happy to line up CROs with radioligand expertise.",causedBy:"a major, concrete business development the day it broke"}]},{id:"R2",date:"2025-06-11",endDate:"2025-06-15",signals:[{summary:"Several more write-ups of the same licensing deal over the next few days.",newsIds:["3cd6cb5e-dbe2-4ce8-95b0-a80772518bd1","416262ec-c7e5-48b7-84c3-829b6b682a59","a71986ee-c836-4007-9a70-3d1f8016136f","43c6f1dd-bee5-40cc-affc-442e568032f7","f163d77d-7747-4fb5-bcc8-ea8673a99334","5d4fd75c-08ec-4aef-957d-47fe690b2882"]}],expectedDrafts:[],flags:["same-story"],notes:"Already reached out yesterday — more coverage of the same deal isn’t a new reason to email."},{date:"2025-06-16",endDate:"2025-07-10",signals:[],expectedDrafts:[]},{id:"R3",date:"2025-07-11",signals:[{summary:"$160M radiopharmaceutical manufacturing facility opens in Indianapolis.",newsIds:["4f65d5ec-b09a-4094-8ce0-8cfcd36bb829"]}],expectedDrafts:[{topic:"Reach out on the new $160M Indianapolis facility",email:"Exciting to see the new $160M Indianapolis radiopharma site come online — if you’re expanding trial or manufacturing capacity, we can help source specialized CROs.",causedBy:"a concrete company milestone worth acknowledging"}]},{id:"R4",date:"2025-07-14",endDate:"2025-07-25",signals:[{summary:"Continued coverage of the facility opening across outlets over two weeks.",newsIds:["9cca923a-de97-4aba-adaf-5363e8ead490","72f6d71b-abb1-4c6f-a3bd-308ce9430575","fd6c6bef-9e88-406d-a0f0-74c1edfe0408","5412d213-3ec9-4844-9882-d090b23f91fe","becfae90-8d19-4190-b596-a41892ad6153","c4e855a7-ee09-4d22-bcc0-ae462e239c91"]}],expectedDrafts:[],flags:["same-story"],notes:"Same facility story — already covered."},{date:"2025-07-26",endDate:"2025-09-09",signals:[],expectedDrafts:[]},{id:"R5",date:"2025-09-10",signals:[{summary:"New trial registered: RYZ401 in solid tumors expressing SSTR2.",ctUpdateIds:["f609c0b3-f838-4c4d-9d82-7c4daa03aac1"]}],expectedDrafts:[{topic:"Reach out on the newly registered RYZ401 trial",email:"Saw RYZ401 just hit ClinicalTrials.gov for SSTR2+ solid tumors — as you get it underway, happy to connect you with CROs experienced in targeted-radioligand oncology.",causedBy:"a new program entering the clinic"}],notes:"No news that day — this comes purely from the trial registry."},{date:"2025-09-11",endDate:"2025-09-23",signals:[],expectedDrafts:[]},{id:"R6",date:"2025-09-24",signals:[{summary:"New trial registered: RYZ101 for progressive/recurrent brain metastases.",ctUpdateIds:["cc44898b-fe6a-4bd6-a923-4b844205eb81"]}],expectedDrafts:[{topic:"Reach out on the newly registered RYZ101 brain-mets trial",email:"Noticed the new RYZ101 trial in brain metastases go live — if you’re still building out the study team, we can introduce CROs with CNS oncology experience.",causedBy:"another new program entering the clinic"}]},{date:"2025-09-25",endDate:"2025-12-21",signals:[],expectedDrafts:[]},{id:"R7",date:"2025-12-22",signals:[{summary:"RYZ101 brain-mets trial: start date moved earlier.",ctUpdateIds:["cd5e38ac-97aa-4918-920c-a044b915b208"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Just a start-date tweak on an existing trial — not worth an email on its own."},{date:"2025-12-23",endDate:"2026-01-19",signals:[],expectedDrafts:[]},{id:"R8",date:"2026-01-20",signals:[{summary:"RYZ101 SSTR+ GEP-NET pivotal: primary completion date pushed out.",ctUpdateIds:["6c8d4732-3974-4843-a11f-eba53c7a53ae"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A completion-date slip — minor housekeeping, no reason to reach out."},{date:"2026-01-21",endDate:"2026-03-17",signals:[],expectedDrafts:[]},{id:"R9",date:"2026-03-18",signals:[{summary:"225Ac-DOTATATE (RYZ101) breast-cancer trial: status change.",ctUpdateIds:["1f926cf7-6f47-49d4-91c5-10fa995583d1"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A bare status change with no detail — skip."},{date:"2026-03-19",endDate:"2026-04-12",signals:[],expectedDrafts:[]},{id:"R10",date:"2026-04-13",signals:[{summary:"Theranostic pair RYZ811 / RYZ801 advances a phase.",ctUpdateIds:["13e9df1b-3f81-4e4f-bb17-f35dbbbe97e4"]},{summary:"RYZ401 solid-tumor trial (registered back in September) is now starting.",ctUpdateIds:["71185b9f-b127-4808-8ae0-ce5d02b09200"]},{summary:"RYZ101 + standard-of-care combination trial: status change and date push.",ctUpdateIds:["3a7a8bd1-d745-457f-8cb7-f103a6875a5f"]}],expectedDrafts:[{topic:"Reach out on the RYZ811/RYZ801 phase advancement",email:"Congrats on the RYZ811/RYZ801 theranostic pair advancing a phase — as it scales, we can help find CROs set up for paired diagnostic/therapeutic studies.",causedBy:"a real program milestone"},{topic:"Follow up: the RYZ401 trial is now dosing",email:"Following up on RYZ401 — great to see it now dosing; let me know if CRO introductions would help for the next stages.",causedBy:"a continuation of the September registration we already reached out on"}],flags:["follow-up"],notes:"Three updates land the same day; the combo-trial status change alone doesn’t need its own email."},{id:"R11",date:"2026-04-17",signals:[{summary:"RYZ101 brain-mets trial: status change.",ctUpdateIds:["f587c102-9a58-4170-9e14-a9b2e1
783d3fe99"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Another bare status change — skip."},{date:"2026-04-18",endDate:"2026-05-21",signals:[],expectedDrafts:[]},{id:"R12",date:"2026-05-22",signals:[{summary:"RYZ101 brain-mets trial: status change.",ctUpdateIds:["951aec94-4b75-4abf-981f-aa0a8cbe8f5b"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Status change again — skip."},{date:"2026-05-23",endDate:"2026-06-01",signals:[],expectedDrafts:[]},{id:"R13",date:"2026-06-02",signals:[{summary:"RayzeBio planning $150M in new radiopharmaceutical facilities in Whitestown.",newsIds:["2bf5ea54-89a7-4be8-9e13-a11ad156820e"]}],expectedDrafts:[{topic:"Reach out on the Whitestown facility expansion",email:"Congrats on the $150M Whitestown expansion — as capacity ramps, happy to help line up CRO partners to match the growth.",causedBy:"a fresh, concrete expansion announcement"}]}]},{companyName:"Spinogenix, Inc.",canonicalCompanyId:"374ed525-d057-48f6-94d9-1245adbb129c",story:"CNS biotech. One product story (SPG302 in ALS → a registrational trial → phase advancement) threads across many months and both sources — later emails should read as follow-ups, not cold opens. Also a competitor-news call.",runs:[{id:"S1",date:"2025-06-27",signals:[{summary:"SPG302 ALS extension study now enrolling.",ctUpdateIds:["e6c2f845-7368-49e3-877a-2e0c3bebcd38"]}],expectedDrafts:[{topic:"Reach out on the ALS extension study starting",email:"Saw the SPG302 ALS extension study is now enrolling — happy to connect you with CROs experienced in neuromuscular trials if useful.",causedBy:"a trial reaching a real milestone (enrolling)"}]},{id:"S2",date:"2025-06-29",signals:[{summary:"SPG302 healthy-volunteer/ALS study: status change and completion-date push.",ctUpdateIds:["729d27fc-b02d-4a1f-a6bc-9e2b416059de"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A status/date tweak on another SPG302 study two days later — minor, skip."},{date:"2025-06-30",endDate:"2025-07-24",signals:[],expectedDrafts:[]},{id:"S3",date:"2025-07-25",signals:[{summary:"SPG302 schizophrenia study: completion date pushed out.",ctUpdateIds:["21a6daa8-3e93-4cef-bb2e-c8e4399449b4"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A completion-date slip — minor, skip."},{id:"S4",date:"2025-07-28",signals:[{summary:"New expanded-access program registered (intermediate-size population).",ctUpdateIds:["4f8a7270-af9b-4248-9e82-4f540f54f203"]}],expectedDrafts:[{topic:"Reach out on the new expanded-access program",email:"Noticed the new SPG302 expanded-access program register — as it scales, we can help source CROs set up for EAP logistics and monitoring.",causedBy:"a new program patients can enroll in"}]},{date:"2025-07-29",endDate:"2025-08-16",signals:[],expectedDrafts:[]},{id:"S5",date:"2025-08-17",signals:[{summary:"SPG302 mild-to-moderate Alzheimer’s study: status change.",ctUpdateIds:["27ad4c48-01df-4615-9b2f-b7e42753fd53"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A bare status change — skip."},{date:"2025-08-18",endDate:"2025-09-24",signals:[],expectedDrafts:[]},{id:"S6",date:"2025-09-25",signals:[{summary:"Harmony’s cannabidiol drug flops in a pivotal Fragile X Syndrome trial.",newsIds:["f3da0e83-e2f1-495d-93b3-39ca15a08e87"]}],expectedDrafts:[{topic:"(maybe) Note a competitor’s Fragile X setback as an opening",email:"With the recent Fragile X trial news in the field, wanted to reach out — as you advance SPG601, we’d be glad to support your CRO needs there.",causedBy:"a competitor stumbling in a space Spinogenix is also in",contested:!0}],flags:["judgment-call"],notes:"This is a competitor’s failure, not Spinogenix’s own news. Use it as a “we’re still in this race” opening, or leave it alone? A real call to make."},{date:"2025-09-26",endDate:"2025-11-04",signals:[],expectedDrafts:[]},{id:"S7",date:"2025-11-05",signals:[{summary:"“Spinogenix’s ALS hopeful to advance to a registrational trial.”",newsIds:["4a47e122-b197-4737-96a4-2f279f52dfa3"]}],expectedDrafts:[{topic:"Reach out on the ALS program advancing to a registrational trial",email:"Congrats on the ALS program advancing toward a registrational trial — happy to help line up CROs ready for a pivotal-scale study.",causedBy:"a significant step forward for the lead program"}]}
783,{date:"2025-11-06",endDate:"2025-12-07",signals:[],expectedDrafts:[]},{id:"S8",date:"2025-12-08",signals:[{summary:"Alzheimer’s drug shows disease-modifying potential in Phase II.",newsIds:["2ced45da-858f-48b1-9621-d2d1ba57dd89","28348cb4-ee40-4df6-97c5-6ccc3703afcc"]}],expectedDrafts:[{topic:"Reach out on the positive Alzheimer’s Phase II data",email:"Congrats on the encouraging Alzheimer’s Phase II readout — as you plan next steps, we can connect you with CNS-focused CROs.",causedBy:"strong clinical results — clearly worth a note"}],notes:"Two write-ups, same readout, same day — one email."},{id:"S9",date:"2025-12-17",endDate:"2025-12-18",signals:[{summary:"ALS extension study: completion pulled earlier.",ctUpdateIds:["9a0ef14c-94f5-41e6-bc77-46e55fc1d624"]},{summary:"Alzheimer’s extension study: completion pulled earlier.",ctUpdateIds:["e7c3e9ef-1359-4487-b6b8-9e86435f1e78"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Two trials moving their completion dates earlier (finishing sooner) — arguably a good sign, but minor on their own. Probably skip."},{date:"2025-12-19",endDate:"2026-01-07",signals:[],expectedDrafts:[]},{id:"S10",date:"2026-01-08",signals:[{summary:"New trial registered: Tazbentetol in ALS — the registrational trial from November.",ctUpdateIds:["4ade47dd-0177-4206-b5e3-9c931593aa6a"]}],expectedDrafts:[{topic:"Follow up: the registrational ALS trial is now registered",email:"Following up on the ALS program — great to see the registrational Tazbentetol trial now registered; let me know if CRO introductions would help.",causedBy:"the trial we flagged in November showing up in the registry"}],flags:["follow-up","cross-source"],notes:"Should read as a continuation of the November story, not a fresh introduction."},{id:"S11",date:"2026-02-06",signals:[{summary:"Schizophrenia study: status change and completion-date push.",ctUpdateIds:["8862d846-38f9-47bb-9f05-82b63d64a089"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Status/date tweak — skip."},{date:"2026-02-07",endDate:"2026-02-19",signals:[],expectedDrafts:[]},{id:"S12",date:"2026-02-20",signals:[{summary:"Tazbentetol ALS trial advances a phase.",ctUpdateIds:["ded81c67-1a22-428b-9d5c-5549e3fd099c"]}],expectedDrafts:[{topic:"Follow up: the ALS trial advanced a phase",email:"Another nice step for the ALS program with the phase advancement — happy to help with CRO matching as it progresses.",causedBy:"another real step on the program we’ve been tracking"}],flags:["follow-up"]},{id:"S13",date:"2026-02-27",signals:[{summary:"New trial registered: SPG601 in Fragile X Syndrome.",ctUpdateIds:["c3d86a93-705b-4faf-bc43-6663692f8d2a"]}],expectedDrafts:[{topic:"Reach out on the new SPG601 Fragile X trial",email:"Saw the new SPG601 Fragile X trial register — we can help connect you with CROs experienced in rare-disease and pediatric studies.",causedBy:"a new program entering the clinic"}]},{date:"2026-02-28",endDate:"2026-03-01",signals:[],expectedDrafts:[]},{id:"S14",date:"2026-03-02",signals:[{summary:"FRAXA Research Foundation backs the PIs leading the Phase 2 (Fragile X).",newsIds:["55d9dd17-1048-4776-b8f8-d0b2a60a8326"]}],expectedDrafts:[{topic:"(maybe) Note the FRAXA foundation backing for the Fragile X program",email:"Great to see FRAXA backing the Fragile X Phase 2 — if you’re scaling it up, happy to help on the CRO side whenever useful.",causedBy:"supportive but minor news on a program we’re already tracking",contested:!0}],flags:["judgment-call"],notes:"On-story but small. Worth a light touch, or hold for something bigger?"},{date:"2026-03-03",endDate:"2026-05-25",signals:[],expectedDrafts:[]},{id:"S15",date:"2026-05-26",signals:[{summary:"SPG601 in adult men with Fragile X: results posted.",ctUpdateIds:["279c5246-f5d1-45fa-b2f6-94cf2a44934d"]}],expectedDrafts:[{topic:"Reach out on the SPG601 Fragile X results",email:"Congrats on posting the SPG601 Fragile X results — as you plan the next study, we can help source the right CRO partners.",causedBy:"a trial posting results"}]}]},{companyName:"Cartesian Therapeutics",canonicalCompanyId:"258e928b-21f2-4f2f-93c9-77efb4a82eea",story:"mRNA CAR-T company mid-pivot (Descartes-08 into myositis). A burst of related news over several days, then the pivot shows up in the trial registry months later — exercises not over-emailing a fast-moving story, and following up when it resurfaces.",runs:[{id:"C1",date:"2025-11-13",signals:[{summary:"Strong Phase 2 efficacy in myositis; 100% LLDAS in lupus; expanding Descartes-08 into myositis (five write-ups, one announcement).",newsIds:["f31d7d44-80f2-4490-8443-582d3dafab23","53c11507-7f99-444c-bc6f-391403d708f6","b46222e2-82f1-48e4-
783a624-92181995ab28","1a480226-0439-4f95-9043-f3406803e28a","f666f7b5-bd9b-4b77-aca5-c2497bd87d7e"]}],expectedDrafts:[{topic:"Reach out on the Phase 2 efficacy data and myositis expansion",email:"Congrats on the strong Phase 2 data and the move into myositis — happy to connect you with CROs experienced in autoimmune cell-therapy trials.",causedBy:"a major clinical readout"}],notes:"Five articles, one announcement — a single email, not one per headline."},{id:"C2",date:"2025-11-14",signals:[{summary:"Cartesian pauses its lupus and multiple-myeloma programs to focus on myositis.",newsIds:["4397a465-c27f-427a-a9d6-6bdb95ec6f46","09d68d82-fada-4ef0-822a-36baf7550af9"]}],expectedDrafts:[{topic:"(maybe) A short follow-up on the strategic pivot",email:"Following up — as you concentrate on myositis, we can help quickly line up CROs for the lead program if priorities are shifting.",causedBy:"genuinely new info (programs paused) the day after the big email",contested:!0}],flags:["judgment-call"],notes:"Real news, but one day after reaching out on the same program shift. Send a quick follow-up, or fold it into the first email and stay quiet?"},{id:"C3",date:"2025-11-17",signals:[{summary:"Analyst note maintaining a Buy rating on the myositis expansion.",newsIds:["0b568c28-2b38-4576-87c9-626d0fd9c01a"]}],expectedDrafts:[],flags:["same-story"],notes:"Third-party commentary on the same story — not a reason to reach out."},{id:"C4",date:"2025-11-24",signals:[{summary:"Descartes-15 multiple-myeloma trial: completion pulled.",ctUpdateIds:["49981c01-ef7d-4ed2-b7d1-2ad5f25f88a0"]},{summary:"Descartes-08 lupus trial: completion pushed.",ctUpdateIds:["7e41f246-3cdf-487a-a4c3-f350df818774"]}],expectedDrafts:[],flags:["cross-source"],notes:"The trial registry now reflects the lupus/MM wind-down from last week — corroborates the story, but no new reason to email."},{date:"2025-11-25",endDate:"2025-12-17",signals:[],expectedDrafts:[]},{id:"C5",date:"2025-12-18",endDate:"2025-12-19",signals:[{summary:"Adrian Bot appointed to the board of directors.",newsIds:["bf55977d-d111-48e1-ae3e-7c2527a0c256","3fb921e5-8d6b-4120-9170-73dcd181cff3"]}],expectedDrafts:[{topic:"Reach out on the new board appointment",email:"Congrats on adding Adrian Bot to the board — exciting time for the team; let me know if we can support CRO sourcing as you scale.",causedBy:"a notable leadership addition"}],notes:"Two write-ups across two days, one appointment — one email."},{date:"2025-12-20",endDate:"2026-01-05",signals:[],expectedDrafts:[]},{id:"C6",date:"2026-01-06",signals:[{summary:"New employment inducement grants.",newsIds:["df30c9ee-fd2c-49bc-b3c6-c89298e9e940"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A routine inducement-grant filing — not a reason to reach out."},{id:"C7",date:"2026-01-09",signals:[{summary:"2026 outlook and trial-progress update.",newsIds:["0d0088a7-275c-40b5-89b0-edb61a41d1f9","d50c840d-5ae7-475d-9859-c5260413fb64","6afd3ec3-c620-41eb-ad6f-1d91dc5516eb"]}],expectedDrafts:[{topic:"Reach out on the 2026 outlook and pipeline progress",email:"Enjoyed the 2026 outlook — as the pipeline advances, happy to help match CROs to your upcoming studies.",causedBy:"a substantive company update"}]},{date:"2026-01-10",endDate:"2026-02-05",signals:[],expectedDrafts:[]},{id:"C8",date:"2026-02-06",signals:[{summary:"New trial registered: Descartes-08 in autoantibody myositis — the November pivot.",ctUpdateIds:["e48cc33c-7819-4cad-ac10-1f346d218559"]}],expectedDrafts:[{topic:"Follow up: the myositis trial is now registered",email:"Following up on the myositis program — great to see the trial registered; happy to make CRO introductions whenever it’s useful.",causedBy:"the pivot we covered in November materializing in the registry"}],flags:["follow-up","cross-source"],notes:"Should land as a follow-up to the November story."},{date:"2026-02-07",endDate:"2026-03-23",signals:[],expectedDrafts:[]},{id:"C9",date:"2026-03-24",signals:[{summary:"Descartes-08 pediatric myasthenia gravis trial: dates pushed.",ctUpdateIds:["efeb49f5-936f-46e9-a171-63a2a4e1747a"]}],expectedDrafts:[],flags:["judgment-call"],notes:"Date shifts — minor, skip."},{id:"C10",date:"2026-03-27",signals:[{summary:"Descartes-08 lupus trial: completion pushed again.",ctUpdateIds:["51929a49-54ab-4828-970f-9a5c36e617d3"]}
783],expectedDrafts:[],flags:["judgment-call"],notes:"Another date push — skip."},{date:"2026-03-28",endDate:"2026-04-07",signals:[],expectedDrafts:[]},{id:"C11",date:"2026-04-08",signals:[{summary:"Pediatric myasthenia gravis trial: start pulled earlier.",ctUpdateIds:["4b9a7a74-b2f9-430f-a939-52b5f6c01591"]}],expectedDrafts:[],flags:["judgment-call"],notes:"A start-date tweak — skip."},{date:"2026-04-09",endDate:"2026-04-22",signals:[],expectedDrafts:[]},{id:"C12",date:"2026-04-23",signals:[{summary:"Descartes-08 myositis trial (registered in February) is now starting.",ctUpdateIds:["5c12a79c-5983-4a2a-9afe-b952552772b0"]}],expectedDrafts:[{topic:"Follow up: the myositis trial is now starting",email:"Quick note — great to see the myositis trial now starting; let me know if CRO support would help as you ramp enrollment.",causedBy:"another step on the story we’ve been tracking"}],flags:["follow-up"]},{date:"2026-04-24",endDate:"2026-05-25",signals:[],expectedDrafts:[]},{id:"C13",date:"2026-05-26",signals:[{summary:"Cartesian secures funding to accelerate its launch.",newsIds:["13dcd62d-92be-42fc-bc38-726d19ac87a8","8e69c921-334a-482b-a967-148c71cca226"]}],expectedDrafts:[{topic:"Reach out on the new funding",email:"Congrats on the new financing — as you accelerate toward launch, we can help line up CRO partners to match the timeline.",causedBy:"a concrete financing event"}],notes:"Two write-ups, one financing — one email."}]},{companyName:"Biosplice Therapeutics, Inc.",canonicalCompanyId:"b1553e01-041f-43d7-9aac-390f7e2e3a9b",story:"Lorecivivint (knee osteoarthritis): an NDA submission, then a steady drumbeat of trial results across several different studies over months. The hard call here is how many results emails are reasonable before it’s too much.",runs:[{id:"B1",date:"2025-12-22",signals:[{summary:"SLICK trial starting: small-cell lung cancer, cirtuvivint + irinotecan.",ctUpdateIds:["51721f6b-bdcb-4351-9083-9573d520c50f"]},{summary:"First patient dosed in a separate Phase 1 trial: cirtuvivint + olaparib in BRCA/HRD platinum-resistant ovarian cancer (same day, different trial).",newsIds:["34ae8efc-1fef-4136-ac90-479fe2e0f401"]}],expectedDrafts:[{topic:"Reach out on the SCLC (SLICK) trial starting",email:"Congrats on starting the SLICK trial in small-cell lung cancer — happy to connect you with CROs experienced in oncology combination studies.",causedBy:"a substantive trial-start milestone"},{topic:"Reach out on the ovarian-cancer first-patient-dosed milestone",email:"Congrats on dosing the first patient in the cirtuvivint + olaparib ovarian-cancer trial — happy to share CRO options for BRCA/HRD combination studies.",causedBy:"a distinct Phase 1 trial (different combo and indication) on the same day"}],flags:["cross-source"],notes:"Two genuinely distinct trials (cirtuvivint + irinotecan in SCLC vs. cirtuvivint + olaparib in ovarian cancer) landed the same day — two separate emails, not one. (Corrected: originally mis-bucketed as a single milestone.)"},{date:"2025-12-23",endDate:"2026-01-05",signals:[],expectedDrafts:[]},{id:"B2",date:"2026-01-06",signals:[{summary:"NDA submitted for lorecivivint — first knee-OA drug in two decades.",newsIds:["291a52ff-601f-4d85-9e8c-90b9ece6b6db","07a345ac-4e81-4f2f-bc92-f016db07e20b"]}],expectedDrafts:[{topic:"Reach out on the lorecivivint NDA submission",email:"Congrats on the lorecivivint NDA — a real milestone for knee OA; as you prep for what’s next, we can help with commercial-stage CRO support.",causedBy:"a major regulatory milestone"}]},{id:"B3",date:"2026-01-07",signals:[{summary:"More coverage of the NDA submission the next day.",newsIds:["f3aab81a-55ab-43c1-91cd-e186a2ab0968","d08acf12-589b-47bf-918f-02b6d45e3c13","9f6447a7-9549-4868-8a66-6ee899b784f3"]}],expectedDrafts:[],flags:["same-story"],notes:"Already reached out on the NDA — same story."},{id:"B4",date:"2026-01-12",signals:[{summary:"SM04690 bone-health study: results posted.",ctUpdateIds:["3ffb3545-7ede-42a9-9461-d32e4281eaf8"]}],expectedDrafts:[{topic:"Reach out on the bone-health study results",email:"Saw the bone-health study results post — as the program advances, happy to help match CROs for follow-on work.",causedBy:"first results posting — a clear reason to engage"}]},{date:"2026-01-13",endDate:"2026-01-21",signals:[],expectedDrafts:[]},{id:"B5",date:"2026-01-22",signals:[{summary:"“Biosplice nearing approval of first knee-OA drug in two decades.”",newsIds:["3264dcd4-00f7-46c0-b877-daee8ed89a04"]}],expectedDrafts:[{topic:"(maybe) A light nudge on the approach to approval",email:"Exciting to see lorecivivint nearing approval — let me know if we can help line up CRO support for post-approval studies.",causedBy:"the NDA storyline progressing two weeks later",contested:!0}],flags:["judgment-call"],notes:"Same NDA storyline, a couple weeks on. Send a fresh nudge, or let the first email stand?"},{date:"2026-01-23",endDate:"2026-02-03",signals:[],expectedDrafts:[]},{id:"B6",date:"2026-02-04",signals:[{summary:"Lorecivivint patient-reported-outcomes study: results posted.",ctUpdateIds:["6f8e7447-05b3-4bd6-aab0-d5a898c30550"]}],expectedDrafts:[{topic:"Reach out on the patient-reported-outcomes results",email:"Noticed the new patient-reported-outcomes results — as you build out the evidence package, we can connect you with CROs who specialize in OA outcomes.",causedBy:"fresh results from a different study, weeks after the last"}]},{id:"B7",date:"2026-02-13",signals:[{summary:"A different lorecivivint trial posts results, about a week later.",ctUpdateIds:["a55e8e9b-dec4-400f-b9f9-04894f6cc7d7"]}],expectedDrafts:[{topic:"(maybe) Another results email, or batch with the last one",email:"More lorecivivint results just posted — happy to help with CRO needs whenever you’re planning the next study.",causedBy:"yet another results posting soon after the previous",contested:!0}],flags:["judgment-call"],notes:"A different study, but the third results email in a month. Worth its own note, or is that too many? This is the call to settle for this company."},{id:"B8",date:"2026-02-17",signals:[{summary:"Industry roundup on the degenerative-disc-disease pipeline that name-checks them.",newsIds:["1e71d4ab-c40f-4415-a676-eca0655b5eb0"]}],expectedDrafts:[],notes:"A roundup that merely mentions them — not a reason to reach out."},{date:"2026-02-18",endDate:"2026-03-03",signals:[],expectedDrafts:[]},{id:"B9",date:"2026-03-04",signals:[{summary:"Lorecivivint MRI safety/efficacy study: results posted.",ctUpdateIds:["db4e3d1c-59dc-4366-911f-0f66723bb753"]}],expectedDrafts:[{topic:"(maybe) Another study’s results",email:"Saw another lorecivivint study post results — let me know if CRO introductions would be useful for upcoming work.",causedBy:"the results drumbeat continuing weeks later",contested:!0}],flags:["judgment-call"],notes:"Same question as before — how often is it reasonable to email about the next study’s results?"},{date:"2026-03-05",endDate:"2026-03-23",signals:[],expectedDrafts:[]},{id:"B10",date:"2026-03-24",signals:[{summary:"Long-term lorecivivint safety/efficacy study: results posted.",ctUpdateIds:["2f40bbdc-3af6-4f1f-85dd-c1f60689717d"]}],expectedDrafts:[{topic:"(maybe) Long-term results email",email:"Nice to see the long-term safety and efficacy data — happy to support CRO sourcing for the next phase whenever it’s helpful.",causedBy:"another results posting",contested:!0}],flags:["judgment-call"]},{id:"B11",date:"2026-03-25",signals:[{summary:"Industry roundup on the osteoarthritis pipeline that name-checks them.",newsIds:["a24b7f8b-a7ca-42fc-8c0a-5a483d9fefac"]}],expectedDrafts:[],notes:"Another roundup mention — skip."},{id:"B12",date:"2026-03-31",signals:[{summary:"3-year open-label study: results posted, a week after the last.",ctUpdateIds:["837118bb-f36d-41bf-940b-3d4ceec75e3a"]}],expectedDrafts:[],flags:["same-story"],notes:"Results again a week later — almost certainly fold into the recent wave rather than email anew."}]}],b2=e=>{const t=(e=>/<[a-z][\s\S]*>/i.test(e))(e)?e:e.split(/\n{2,}/).map(e=>`<p>${(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))(e).replace(/\n/g,"<br>")}</p>`).join("");return ar.sanitize(t,{USE_PROFILES:{html:!0}})},v2=(e,t=140)=>{const n=ar.sanitize(e,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]}).replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t).trimEnd()}…`:n},w2=u`
784  query OpsReveSimRuns($id: String!) {
785    opsReveSimRuns(canonical_company_id: $id) {
786      id
787      from_date
788      to_date
789      status
790      error
791      created_at
792      step_count
793      draft_count
794    }
795  }
796`,j2=u`
797  query OpsReveSimRunSteps($runId: String!) {
798    opsReveSimRunSteps(run_id: $runId) {
799      id
800      date
801      worker_ran
802      duration_ms
803      signals {
804        source_type
805        source_id
806        event_type
807        title
808        summary
809        published_at
810      }
811      contacts {
812        id
813        role
814        email
815      }
816      drafts {
817        draft_id
818        subject
819        body
820        reasoning
821        signal_title
822        signal_source_type
823      }
824    }
825  }
826`,C2=u`
827  mutation OpsStartReveSimRun($id: String!, $from: String!, $to: String!) {
828    opsStartReveSimRun(canonical_company_id: $id, from_date: $from, to_date: $to) {
829      id
830      status
831    }
832  }
833`,N2=u`
834  mutation OpsCancelReveSimRun($runId: String!) {
835    opsCancelReveSimRun(run_id: $runId) {
836      id
837      status
838    }
839  }
840`,k2=864e5,S2=e=>{const t=x2.find(t=>t.canonicalCompanyId===e);if(!t)return null;const n=t.runs.flatMap(e=>[e.date,e.endDate??e.date]).sort((e,t)=>e.localeCompare(t));return{from:n[0],to:n[n.length-1]}},E2=e=>e.slice(0,10),A2=e=>{const t=new Date(`${E2(e)}T00:00:00Z`);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})},O2=(e,t)=>Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/k2),_2=(e,t)=>new Date(Date.parse(`${e}T00:00:00Z`)+t*k2).toISOString().slice(0,10),P2={running:"bg-blue-50 text-blue-700",cancelling:"bg-amber-50 text-amber-700",complete:"bg-emerald-50 text-emerald-700",failed:"bg-rose-50 text-rose-700",cancelled:"bg-gray-100 text-gray-600"},I2=e=>"running"===e||"cancelling"===e,M2=({status:e})=>i.jsx("span",{className:`rounded px-1.5 py-0.5 text-xs font-medium ${P2[e]??"bg-gray-100 text-gray-600"}`,children:e}),T2=({company:e,disabled:t})=>{const r=S2(e.id),[a,s]=n.useState(r?.from??""),[o,l]=n.useState(r?.to??"");n.useEffect(()=>{const t=S2(e.id);s(t?.from??""),l(t?.to??"")},[e.id]);const[c,{loading:u,error:d}]=p(C2,{refetchQueries:["OpsReveSimRuns"]}),h=""!==a&&""!==o&&a<=o;return i.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[i.jsxs("label",{htmlFor:"sim-from",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"From"}),i.jsx("input",{id:"sim-from",type:"date",value:a,onChange:e=>s(e.target.value),className:"rounded-lg border border-gray-300 px-2 py-1.5 text-sm focus:border-blue-400 focus:outline-none"})]}),i.jsxs("label",{htmlFor:"sim-to",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"To"}),i.jsx("input",{id:"sim-to",type:"date",value:o,onChange:e=>l(e.target.value),className:"rounded-lg border border-gray-300 px-2 py-1.5 text-sm focus:border-blue-400 focus:outline-none"})]}),i.jsx("button",{type:"button",disabled:t||u||!h,onClick:()=>c({variables:{id:e.id,from:a,to:o}}),className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-gray-300",children:u?"Starting…":"Run simulation"})]}),i.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Steps one calendar day at a time across the range, invoking the outreach worker each day. The first day is slow (it rewinds the corpus); later days are quick. Only one run executes at a time."}),t&&i.jsx("p",{className:"mt-1 text-xs text-amber-700",children:"A run is already in progress. Wait for it to finish or cancel it."}),d&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:d.message})]})},R2=({signal:e})=>i.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5",children:[i.jsx("span",{className:"rounded px-1.5 py-0.5 text-xs font-medium "+("trial"===e.source_type?"bg-violet-100 text-violet-800":"bg-sky-100 text-sky-800"),children:"trial"===e.source_type?"CT.gov":"news"}),i.jsx("span",{className:"font-mono text-xs text-gray-500",children:A2(e.published_at)}),i.jsx("span",{className:"w-full text-sm text-gray-800",children:e.title}),e.summary&&i.jsx("span",{className:"w-full whitespace-pre-line text-xs text-gray-500",children:e.summary})]}),L2=({draft:e})=>i.jsxs("li",{className:"rounded-md border border-emerald-200 bg-emerald-50 p-2.5",children:[i.jsx("p",{className:"text-sm font-semibold text-gray-900",children:e.subject}),e.signal_title&&i.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["on"," ",i.jsxs("span",{className:"font-medium",children:["[",e.signal_source_type,"]"," ",e.signal_title]})]}),i.jsx("p",{className:"mt-1 text-xs italic text-gray-600",children:e.reasoning}),e.body&&i.jsxs("details",{className:"mt-1.5",children:[i.jsx("summary",{className:"cursor-pointer text-xs font-medium text-emerald-800",children:"email body"}),i.jsx("div",{className:"prose prose-sm mt-1 max-w-none rounded bg-white p-2 text-sm text-gray-800",dangerouslySetInnerHTML:{__html:b2(e.body)}})]})]}),D2=["Day","Updates that came in & drafts created"],F2=(e,t)=>
840e===t?`No updates · ${A2(e)}`:`No updates · ${A2(e)} – ${A2(t)} · ${((e,t)=>O2(e,t)+1)(e,t)} days`,q2=({date:e,signals:t,drafts:n})=>i.jsxs("tr",{className:"align-top hover:bg-gray-50",children:[i.jsx("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-sm text-gray-900",children:A2(e)}),i.jsxs("td",{className:"px-4 py-3",children:[t.length>0&&i.jsx("ul",{className:"space-y-1.5",children:t.map(e=>i.jsx(R2,{signal:e},e.source_id))}),n.length>0&&i.jsxs("div",{className:t.length>0?"mt-2.5":"",children:[i.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:"Drafts created"}),i.jsx("ul",{className:"space-y-1.5",children:n.map(e=>i.jsx(L2,{draft:e},e.draft_id))})]})]})]}),B2=({company:e})=>{const{data:t,loading:r}=d(w2,{variables:{id:e.id},pollInterval:3e3}),a=t?.opsReveSimRuns??[],s=a.find(e=>I2(e.status)),[o,l]=n.useState(null),c=s??a.find(e=>e.id===o)??a[0]??null,u=!!c&&I2(c.status),{data:h,loading:m}=d(j2,{variables:{runId:c?.id??""},skip:!c,pollInterval:u?2500:0}),f=n.useMemo(()=>h?.opsReveSimRunSteps??[],[h?.opsReveSimRunSteps]),g=n.useMemo(()=>(e=>{const t=new Map,n=e=>{const n=t.get(e);if(n)return n;const r={signals:[],drafts:[]};return t.set(e,r),r},r=new Set;e.forEach(e=>{e.signals.forEach(e=>{r.has(e.source_id)||(r.add(e.source_id),n(E2(e.published_at)).signals.push(e))}),e.drafts.forEach(t=>{n(E2(e.date)).drafts.push(t)})});const a=[...t.keys()].sort((e,t)=>e.localeCompare(t)),i=[];return a.forEach((e,n)=>{n>0&&O2(a[n-1],e)-1>=2&&i.push({kind:"quiet",from:_2(a[n-1],1),to:_2(e,-1)});const r=t.get(e);r&&i.push({kind:"day",date:e,signals:r.signals,drafts:r.drafts})}),i})(f),[f]),[y,{loading:x}]=p(N2,{refetchQueries:["OpsReveSimRuns"]});return i.jsxs("div",{className:"mt-4",children:[i.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Replay the outreach worker over a date range, one day at a time, and see what it drafted. Example companies prefill their test-case range."}),i.jsx(T2,{company:e,disabled:Boolean(s)}),r&&0===a.length&&i.jsx("p",{className:"mt-4 text-sm text-gray-400",children:"Loading runs…"}),!r&&0===a.length&&i.jsx("p",{className:"mt-4 text-sm text-gray-400",children:"No runs yet. Pick a date range and run a simulation."}),c&&i.jsxs("div",{className:"mt-4",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.length>1?i.jsx("select",{"aria-label":"Choose a simulation run",value:c.id,onChange:e=>l(e.target.value),className:"rounded-lg border border-gray-300 px-2 py-1.5 text-sm focus:border-blue-400 focus:outline-none",children:a.map(e=>i.jsx("option",{value:e.id,children:`${A2(e.from_date)} → ${A2(e.to_date)} · ${e.status}`},e.id))}):i.jsx("span",{className:"text-sm font-medium text-gray-800",children:`${A2(c.from_date)} → ${A2(c.to_date)}`}),i.jsx(M2,{status:c.status}),"running"===c.status&&i.jsx("button",{type:"button",disabled:x,onClick:()=>y({variables:{runId:c.id}}),className:"rounded border border-gray-300 px-2 py-1 text-xs text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:x?"Cancelling…":"Cancel"})]}),i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Each day the worker checked, oldest first: the updates that came in and any drafts it created. Quiet stretches collapse into one row."}),c.error&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:c.error}),0===g.length?i.jsx("p",{className:"mt-4 text-sm text-gray-400",children:m||u?"Loading days…":"No updates in this run."}):i.jsx("div",{className:"mt-4 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:D2.map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:g.map(e=>"quiet"===e.kind?i.jsx("tr",{className:"bg-gray-50/50",children:i.jsx("td",{colSpan:2,className:"px-4 py-1.5 text-center text-xs italic text-gray-400",children:F2(e.from,e.to)})},`quiet-${e.from}`):i.jsx(q2,{date:e.date,signals:e.signals,drafts:e.drafts},e.date))})]})})]})]})},U2=u`
841  query OpsSearchBioCompanies($query: String!) {
842    opsSearchBioCompanies(query: $query) {
843      id
844      company_name
845    }
846  }
847`,z2=u`
848  query OpsCompanySignals($id: String!) {
849    opsCompanySignals(canonical_company_id: $id) {
850      news {
851        id
852        title
853        source
854        url
855        event_type
856        published_at
857      }
858      ct_updates {
859        id
860        nct_id
861        trial_title
862        event_types
863        source_event_at
864      }
865      news_truncated
866      ct_updates_truncated
867    }
868  }
869`,H2={"same-story":"bg-gray-100 text-gray-700","follow-up":"bg-indigo-50 text-indigo-700","cross-source":"bg-teal-50 text-teal-700","judgment-call":"bg-amber-50 text-amber-800"},V2={"same-story":"An update about something already emailed about — no new email.","follow-up":"An email that builds on earlier outreach, not a cold open.","cross-source":"The same development shows up in both the news and the trial updates.","judgment-call":"A debatable call — would a person reach out here? Under discussion."},$2=864e5,W2=e=>x2.find(t=>t.canonicalCompanyId===e),Q2=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})},Z2=e=>e.slice(0,10),K2=(e,t)=>
869Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/$2),G2=(e,t)=>new Date(Date.parse(`${e}T00:00:00Z`)+t*$2).toISOString().slice(0,10),Y2=({label:e})=>i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600",children:e}),J2=({row:e})=>i.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5",children:[i.jsx("span",{className:"rounded bg-sky-100 px-1.5 py-0.5 text-xs font-medium text-sky-800",children:"news"}),i.jsx("span",{className:"font-mono text-xs text-gray-500",children:Q2(e.published_at)}),i.jsx(Y2,{label:e.event_type}),i.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"w-full text-sm text-gray-800 hover:underline",children:e.title}),i.jsx("span",{className:"text-xs text-gray-400",children:e.source})]}),X2=({row:e})=>i.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5",children:[i.jsx("span",{className:"rounded bg-violet-100 px-1.5 py-0.5 text-xs font-medium text-violet-800",children:"CT.gov"}),i.jsx("span",{className:"font-mono text-xs text-gray-500",children:Q2(e.source_event_at)}),e.event_types.map(e=>i.jsx(Y2,{label:e},e)),i.jsxs("span",{className:"w-full text-sm text-gray-800",children:[e.trial_title??"(untitled trial)"," ",i.jsx("a",{href:`https://clinicaltrials.gov/study/${e.nct_id}`,target:"_blank",rel:"noopener noreferrer",className:"whitespace-nowrap font-mono text-xs text-blue-600 hover:underline",children:e.nct_id})]})]}),e5=({id:e,table:t})=>i.jsxs("li",{className:"rounded border border-dashed border-rose-300 bg-rose-50 px-2 py-1 text-xs text-rose-700",children:["⚠"," ",t," ","row"," ",i.jsx("span",{className:"font-mono",children:e.slice(0,8)})," ","not in current corpus (drift)"]}),t5=({signal:e,rows:t})=>i.jsxs("li",{className:"rounded-md border border-gray-200 bg-gray-50 p-2",children:[i.jsx("p",{className:"text-sm font-medium text-gray-800",children:e.summary}),i.jsxs("ul",{className:"mt-1.5 space-y-1",children:[(e.newsIds??[]).map(e=>{const n=t.news.get(e);return n?i.jsx(J2,{row:n},e):i.jsx(e5,{id:e,table:"news"},e)}),(e.ctUpdateIds??[]).map(e=>{const n=t.ct.get(e);return n?i.jsx(X2,{row:n},e):i.jsx(e5,{id:e,table:"CT"},e)})]})]}),n5=({draft:e})=>i.jsxs("li",{className:"rounded-md border px-2 py-1.5 "+(e.contested?"border-amber-200 bg-amber-50":"border-emerald-200 bg-emerald-50"),children:[i.jsxs("p",{className:"text-sm font-medium text-gray-900",children:[e.topic,e.contested&&i.jsx("span",{className:"ml-1.5 rounded bg-amber-200 px-1.5 py-0.5 text-xs font-medium text-amber-900",children:"under discussion"})]}),i.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:e.causedBy})]}),r5=({label:e,colSpan:t})=>i.jsx("tr",{className:"bg-gray-50/50",children:i.jsx("td",{colSpan:t,className:"px-4 py-1.5 text-center text-xs italic text-gray-400",children:e})}),a5=(e,t)=>t?`No updates · ${Q2(e)} – ${Q2(t)} · ${((e,t)=>K2(e,t)+1)(e,t)} days`:`No updates · ${Q2(e)}`,i5=["","Day","Updates that came in","Would a person email?","Notes"],s5=({run:e,rows:t})=>i.jsxs("tr",{className:"align-top hover:bg-gray-50",children:[i.jsx("td",{className:"whitespace-nowrap px-4 py-3 text-sm font-semibold text-gray-900",children:e.id}),i.jsxs("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-sm text-gray-900",children:[e.date,e.endDate&&i.jsx("span",{className:"block font-sans text-xs text-gray-400",children:`through ${e.endDate}`})]}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("ul",{className:"space-y-2",children:e.signals.map(e=>i.jsx(t5,{signal:e,rows:t},e.summary))})}),i.jsx("td",{className:"px-4 py-3",children:0===e.expectedDrafts.length?i.jsx("p",{className:"text-sm font-medium text-gray-400",children:"no email"}):i.jsx("ul",{className:"space-y-1.5",children:e.expectedDrafts.map(e=>i.jsx(n5,{draft:e},e.topic))})}),i.jsxs("td",{className:"px-4 py-3",children:[e.flags&&i.jsx("div",{className:"mb-1 flex flex-wrap gap-1",children:e.flags.map(e=>i.jsx("span",{className:`rounded px-1.5 py-0.5 text-xs font-medium ${H2[e]}`,children:e},e))}),e.notes&&i.jsx("p",{className:"text-xs text-gray-600",children:e.notes})]})]}),o5=({testCase:e,signals:t})=>{const n={news:new Map(t.news.map(e=>[e.id,e])),ct:new Map(t.ct_updates.map(e=>[e.id,e]))};return i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:e.story}),i.jsx("div",{className:"mt-4 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:i5.map((e,t)=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e||t))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:e.runs.map(e=>
8690===e.signals.length?i.jsx(r5,{label:a5(e.date,e.endDate),colSpan:5},e.date):i.jsx(s5,{run:e,rows:n},e.id??e.date))})]})})]})},l5=["Day","Updates that came in"],c5=({signals:e,hasTestCase:t})=>{const n=(e=>{const t=new Map,n=e=>{const n=t.get(e);if(n)return n;const r={news:[],ct:[]};return t.set(e,r),r};e.news.forEach(e=>n(Z2(e.published_at)).news.push(e)),e.ct_updates.forEach(e=>n(Z2(e.source_event_at)).ct.push(e));const r=[...t.keys()].sort((e,t)=>e.localeCompare(t)),a=[];return r.forEach((e,n)=>{if(n>0){const t=r[n-1];K2(t,e)-1>=2&&a.push({kind:"quiet",from:G2(t,1),to:G2(e,-1)})}const{news:i,ct:s}=t.get(e);a.push({kind:"day",date:e,news:i,ct:s})}),a.reverse()})(e),r=e.news_truncated||e.ct_updates_truncated;return 0===n.length?i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"No news or clinical-trial updates found for this company in the corpus."}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mt-1 text-sm text-gray-500",children:t?"Updates only — the raw news and trial-update feed this company produced. The “would a person email?” judgment is on the Test case tab.":"Updates only — the “would a person email?” judgment isn’t available for arbitrary companies yet."}),r&&i.jsx("p",{className:"mt-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",children:"Showing the most recent 500 of each — this company has more updates than are displayed."}),i.jsx("div",{className:"mt-4 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:l5.map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:n.map(e=>"quiet"===e.kind?i.jsx(r5,{label:a5(e.from,e.to),colSpan:2},e.from):i.jsxs("tr",{className:"align-top hover:bg-gray-50",children:[i.jsx("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-sm text-gray-900",children:e.date}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("ul",{className:"space-y-1.5",children:[e.news.map(e=>i.jsx(J2,{row:e},e.id)),e.ct.map(e=>i.jsx(X2,{row:e},e.id))]})})]},e.date))})]})})]})},u5=({active:e,onClick:t,children:n})=>i.jsx("button",{type:"button",onClick:t,className:"-mb-px border-b-2 px-3 py-2 text-sm font-medium "+(e?"border-blue-600 text-blue-700":"border-transparent text-gray-500 hover:text-gray-700"),children:n}),d5=({selection:e,onClear:t})=>{const{data:r,loading:a,error:s}=d(z2,{variables:{id:e.id}}),o=W2(e.id),l=r?.opsCompanySignals,[c,u]=n.useState("simulation");return i.jsxs("div",{className:"mt-6",children:[i.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:e.name}),o?i.jsx("span",{className:"rounded-full bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-700",children:"full test-case example"}):i.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-600",children:"updates only"}),i.jsx("button",{type:"button",onClick:t,className:"text-sm text-blue-600 hover:underline",children:"clear"})]}),i.jsxs("div",{className:"mt-4 flex gap-1 border-b border-gray-200",children:[i.jsx(u5,{active:"simulation"===c,onClick:()=>u("simulation"),children:"Simulation"}),o&&i.jsx(u5,{active:"test-case"===c,onClick:()=>u("test-case"),children:"Test case"}),i.jsx(u5,{active:"updates"===c,onClick:()=>u("updates"),children:"Updates timeline"})]}),"simulation"===c&&i.jsx(B2,{company:e}),("test-case"===c||"updates"===c)&&i.jsxs("div",{className:"mt-4",children:[a&&i.jsx("p",{className:"text-sm text-gray-500",children:"Loading updates…"}),s&&i.jsx("p",{className:"text-sm text-red-600",children:"Failed to load updates. This page reads the local sim corpus, so it needs to run against a DB that has it."}),l&&("test-case"===c&&o?i.jsx(o5,{testCase:o,signals:l}):i.jsx(c5,{signals:l,hasTestCase:Boolean(o)}))]})]})},p5=({onSelect:e})=>{const[t,r]=n.useState(""),[a,s]=n.useState("");n.useEffect(()=>{const e=setTimeout(()=>s(t),200);return()=>clearTimeout(e)},[t]);const{data:o,loading:l}=d(U2,{variables:{query:a},skip:a.trim().length<2}),c=o?.opsSearchBioCompanies??[],u=t.trim().length>=2;return i.jsxs("div",{className:"relative max-w-md",children:[i.jsx("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:"Search any company by name…",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),u&&i.jsxs("div",{className:"absolute z-10 mt-1 w-full overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm",children:[l&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"Searching…"}),!l&&0===c.length&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"No companies match."}),c.map(t=>i.jsxs("button",{type:"button",onClick:()=>{e({id:t.id,name:t.company_name}),r("")},className:"flex w-full items-center justify-between px-3 py-2 text-left text-sm text-gray-800 hover:bg-gray-50",children:[t.company_name,W2(t.id)&&i.jsx("span",{className:"ml-2 shrink-0 rounded bg-emerald-50 px-1.5 py-0.5 text-xs font-medium text-emerald-700",children:"example"})]},t.id))]})]})},h5=()=>i.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",children:[i.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"How to read this"}),i.jsxs("ul",{className:"mt-2 list-disc space-y-1 pl-4 text-sm text-gray-600",children:[i.jsxs("li",{children:["Picture a person checking a company's news and trial updates"," ",i.jsx("em",{children:"once a day"}),". Each row is one day's check: the updates that came in. Long stretches with no updates collapse into a single"," ",i.jsx("em",{children:"no updates"})," ","row."]}),i.jsxs("li",{children:["The"," ",i.jsx("span",{className:"font-medium text-emerald-700",children:"full test-case examples"})," ","also show what we'd expect a person to do — which updates are worth an email. That judgment is hand-reviewed, so it only exists for those companies for now."]}),i.jsxs("li",{children:["Search any other company to see its updates timeline (the"," ",i.jsx("span",{className:"font-medium text-gray-700",children:"would-a-person-email"})," ","judgment isn't generated for those yet)."]}),i.jsx("li",{children:"The updates are fetched live from the bio DB — the actual article / trial update."})]})]}),i.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Flags (on the full examples)"}),i.jsx("ul",{className:"mt-2 space-y-1.5",children:Object.keys(V2).map(e=>i.jsxs("li",{className:"flex items-baseline gap-2 text-sm text-gray-600",children:[i.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium ${H2[e]}`,children:e}),V2[e]]},e))})]})]}),m5=()=>{const[e,t]=n.useState(null);return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Reve outreach — company updates"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"A day-by-day view of the updates the outreach worker would see for a company — with hand-reviewed “would a person email?” examples, plus search for any other company."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsx(h5,{}),i.jsxs("div",{className:"mt-8",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Full test-case examples"}),i.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:x2.map(n=>i.jsx("button",{type:"button",onClick:()=>t({id:n.canonicalCompanyId,name:n.companyName}),className:"rounded-full border px-3 py-1 text-sm "+(e?.id===n.canonicalCompanyId?"border-emerald-300 bg-emerald-50 text-emerald-800":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"),children:n.companyName},n.canonicalCompanyId))})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Or search any company"}),i.jsx("div",{className:"mt-2",children:i.jsx(p5,{onSelect:t})})]}),e?i.jsx(d5,{selection:e,onClear:()=>t(null)},e.id):i.jsx("p",{className:"mt-8 text-sm text-gray-400",children:"Pick an example or search a company to see its update timeline."})]})})},f5="\n  id\n  owner {\n    id\n    email\n    first_name\n    last_name\n  }\n  name\n  status\n  goal\n  detail\n  supporting_context\n  signal_types\n  target_roles\n  include_crm_contacts\n  approval_mode\n  send_window_days\n  send_window_start_hour\n  send_window_end_hour\n  send_window_tz\n  per_contact_cooldown_days\n  daily_send_cap\n  signal_freshness_days\n  outreach_trigger\n  companies {\n    id\n    canonical_company_id\n    company_name\n    status\n  }\n  company_count\n  last_activity_at\n  created_at\n  updated_at\n",g5=u`
870  query OpsReveJobs($ownerEmail: String, $status: String) {
871    opsReveJobs(owner_email: $ownerEmail, status: $status) {
872      id
873      owner {
874        id
875        email
876        first_name
877        last_name
878      }
879      name
880      status
881      goal
882      signal_types
883      company_count
884      mini_run_count
885      last_activity_at
886      created_at
887      updated_at
888    }
889  }
890`,y5=u`
891  query OpsReveJob($id: String!) {
892    opsReveJob(id: $id) {
893      ${f5}
894    }
895  }
896`,x5=u`
897  query OpsReveMiniRuns($jobId: String!) {
898    opsReveMiniRuns(job_id: $jobId) {
899      id
900      created_at
901      input_summary
902      output_summary
903      langfuse_url
904    }
905  }
906`,b5=u`
907  query OpsReveOwnerByEmail($email: String!) {
908    opsUserByEmail(email: $email) {
909      id
910      email
911      first_name
912      last_name
913    }
914  }
915`,v5=u`
916  query OpsReveSearchBioCompanies($query: String!) {
917    opsSearchBioCompanies(query: $query) {
918      id
919      company_name
920    }
921  }
922`,w5=u`
923  mutation OpsCreateReveJob($ownerUserId: String!, $input: CreateReveJobInput!) {
924    opsCreateReveJob(owner_user_id: $ownerUserId, input: $input) {
925      ${f5}
926    }
927  }
928`,j5=u`
929  mutation OpsUpdateReveJob($jobId: String!, $input: UpdateReveJobInput!) {
930    opsUpdateReveJob(job_id: $jobId, input: $input) {
931      ${f5}
932    }
933  }
934`,C5=u`
935  mutation OpsSetReveJobOwner($jobId: String!, $ownerUserId: String!) {
936    opsSetReveJobOwner(job_id: $jobId, owner_user_id: $ownerUserId) {
937      ${f5}
938    }
939  }
940`,N5=u`
941  mutation OpsSetReveJobStatus($jobId: String!, $status: String!) {
942    opsSetReveJobStatus(job_id: $jobId, status: $status) {
943      ${f5}
944    }
945  }
946`,k5=u`
947  mutation OpsSetReveJobCompanies($jobId: String!, $companyIds: [String!]!) {
948    opsSetReveJobCompanies(job_id: $jobId, canonical_company_ids: $companyIds) {
949      ${f5}
950    }
951  }
952`,S5=u`
953  mutation OpsDeleteReveJob($jobId: String!) {
954    opsDeleteReveJob(job_id: $jobId)
955  }
956`,E5=u`
957  mutation OpsDuplicateReveJob($jobId: String!) {
958    opsDuplicateReveJob(job_id: $jobId) {
959      ${f5}
960    }
961  }
962`,A5=u`
963  query OpsAgentFile($id: ID!) {
964    opsAgentFile(id: $id) {
965      id
966      type
967      title
968      rowCount
969    }
970  }
971`,O5=u`
972  query OpsAgentFileDownload($id: ID!) {
973    opsAgentFile(id: $id) {
974      id
975      filename
976      downloadContent
977    }
978  }
979`,_5=["CLINICAL","FUNDING","HIRING","LAYOFFS","MERGERS_AND_ACQUISITIONS","NEWS","PARTNERSHIP","PIPELINE","REGULATORY"],P5=["mon","tue","wed","thu","fri","sat","sun"],I5=["every","auto"],M5=["signal","proactive"],T5={approval_mode:"every",send_window_days:["mon","tue","wed","thu","fri"],send_window_start_hour:9,send_window_end_hour:17,send_window_tz:"__local",per_contact_cooldown_days:30,daily_send_cap:250,outreach_trigger:"signal",include_crm_contacts:!0},R5={signal:30,proactive:180},L5=e=>R5[e]??R5.signal,D5=({picked:e,onAdd:n})=>{const[r,a]=t.useState(""),[s,o]=t.useState("");t.useEffect(()=>{const e=setTimeout(()=>o(r),200);return()=>clearTimeout(e)},[r]);const{data:l,loading:c}=d(v5,{variables:{query:s},skip:s.trim().length<2}),u=l?.opsSearchBioCompanies??[],p=new Set(e.map(e=>e.id)),h=r.trim().length>=2;return i.jsxs("div",{className:"relative max-w-md",children:[i.jsx("input",{type:"text",value:r,onChange:e=>a(e.target.value),placeholder:"Search a company by name to add…",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),h&&i.jsxs("div",{className:"absolute z-10 mt-1 w-full overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm",children:[c&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"Searching…"}),!c&&0===u.length&&i.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:"No companies match."}),u.map(e=>{const t=p.has(e.id);return i.jsxs("button",{type:"button",disabled:t,onClick:()=>{n({id:e.id,name:e.company_name}),a("")},className:"flex w-full items-center justify-between px-3 py-2 text-left text-sm text-gray-800 hover:bg-gray-50 disabled:cursor-not-allowed disabled:text-gray-300",children:[e.company_name,t&&i.jsx("span",{className:"ml-2 shrink-0 text-xs text-gray-400",children:"added"})]},e.id)})]})]})},F5=({value:e,onChange:t})=>i.jsxs("div",{children:[i.jsx(D5,{picked:e,onAdd:n=>{e.some(e=>e.id===n.id)||t([...e,n])}}),0===e.length?i.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"No companies yet. A job needs companies to watch before it can draft."}):i.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:e.map(n=>i.jsxs("li",{className:"flex items-center gap-1.5 rounded-full border border-gray-200 bg-gray-50 py-1 pl-3 pr-1.5 text-sm text-gray-800",children:[n.name,i.jsx("button",{type:"button","aria-label":`Remove ${n.name}`,onClick:()=>{return r=n.id,void t(e.filter(e=>e.id!==r));var r},className:"flex h-5 w-5 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200 hover:text-gray-700",children:"×"})]},n.id))})]}),q5=/File\(id=([^)\s]+)\)/g,B5=e=>e.toLowerCase().endsWith(".csv")?"text/csv;charset=utf-8":"text/plain;charset=utf-8",U5="flex items-center gap-2 rounded-lg border px-2.5 py-1.5 text-xs",z5=({id:e})=>{const[n,r]=t.useState(null),{data:a,loading:s}=d(A5,{variables:{id:e}}),o=a?.opsAgentFile??null,[l,{loading:c}]=An(O5,{fetchPolicy:"no-cache",onCompleted:e=>{const t=e.opsAgentFile;t?.downloadContent?((e,t)=>{const n=new Blob([t],{type:B5(e)}),r=URL.createObjectURL(n),a=document.createElement("a");a.href=r,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(r)})(t.filename,t.downloadContent):r("This file has nothing to download.")},onError:()=>r("Download failed.")});return s?i.jsx("span",{className:`${U5} border-gray-200 bg-white text-gray-400`,children:"Loading file…"}):o?i.jsxs("span",{className:"flex flex-col items-start gap-1 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs text-gray-700",children:[i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-medium text-gray-800",children:o.title||"Untitled file"}),i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-gray-500",children:o.type}),"table"===o.type&&null!=o.rowCount&&i.jsx("span",{className:"text-gray-500",children:`${o.rowCount} rows`}),i.jsx("button",{type:"button",onClick:()=>{r(null),l({variables:{id:e}})}
979,disabled:c,className:"rounded border border-blue-300 px-2 py-0.5 font-medium text-blue-700 hover:bg-blue-50 disabled:opacity-50",children:c?"Downloading…":"Download"}),n&&i.jsx("span",{className:"text-rose-600",children:n})]}),i.jsx("span",{className:"font-mono text-[11px] text-gray-400",title:"agent_file_id",children:e})]}):i.jsx("span",{className:`${U5} border-gray-200 bg-gray-50 text-gray-400`,title:e,children:`Unknown file (${e.slice(0,8)}…)`})},H5=({supportingContext:e})=>{const n=t.useMemo(()=>(e=>{const t=Array.from(e.matchAll(q5),e=>e[1]);return Array.from(new Set(t))})(e),[e]);return 0===n.length?null:i.jsxs("div",{className:"mt-2",children:[i.jsx("span",{className:"block text-xs font-medium text-gray-500",children:"Linked files"}),i.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:n.map(e=>i.jsx(z5,{id:e},e))})]})},V5=e=>[e.first_name,e.last_name].filter(Boolean).join(" ")||e.email||"—",$5=({value:e,onChange:n})=>{const[r,a]=t.useState(""),[s,o]=t.useState(!1),[l,{loading:c}]=An(b5,{fetchPolicy:"network-only",onCompleted:e=>{const t=e.opsUserByEmail;o(!t),n(t??null)},onError:()=>o(!0)});return i.jsxs("div",{children:[i.jsxs("form",{onSubmit:e=>{e.preventDefault();const t=r.trim();t&&(o(!1),n(null),l({variables:{email:t}}))},className:"flex gap-2",children:[i.jsx("input",{type:"email",value:r,onChange:e=>a(e.target.value),placeholder:"[email protected]",className:"w-full max-w-sm rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:c||!r.trim(),className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:c?"Looking up…":"Look up"})]}),s&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:"No user found with that email."}),e&&i.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium text-gray-900",children:V5(e)}),i.jsx("span",{className:"ml-2 text-gray-600",children:e.email})]}),i.jsx("button",{type:"button",onClick:()=>{n(null),a("")},className:"text-sm text-gray-500 hover:underline",children:"change"})]})]})},W5=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}},Q5=e=>"number"==typeof e&&Number.isFinite(e)?e:null,Z5=e=>"string"==typeof e?e:null,K5=e=>Array.isArray(e)?e.filter(e=>null!==e&&"object"==typeof e&&!Array.isArray(e)):[],G5=e=>null===e?"—":String(e),Y5=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})},J5=e=>{if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)},X5=["","When","Companies","Drafts","Skipped","Freshness","Trace"],e3="whitespace-nowrap px-4 py-2 text-gray-700",t3=({url:e})=>e?i.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:"trace"}):i.jsx("span",{className:"text-gray-400",children:"—"}),n3=({companies:e,companyCount:t})=>{const n=e.filter(e=>e.signals.length>0||e.contacts.length>0),r=0===e.length&&t&&t>0?"Per-company inputs weren't recorded for this run (it predates input-detail capture).":"No signals or contacts were seen for this run.";return i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Inputs"}),0===n.length?i.jsx("p",{className:"mt-1 text-xs text-gray-400",children:r}):i.jsx("ul",{className:"mt-2 space-y-3",children:n.map((e,t)=>i.jsxs("li",{className:"rounded-md border border-gray-200 bg-white p-3",children:[i.jsx("p",{className:"text-sm font-medium text-gray-800",children:e.companyName??e.companyId??"Unknown company"}),i.jsxs("div",{className:"mt-1.5",children:[i.jsx("p",{className:"text-xs font-medium text-gray-500",children:"Signals seen"}),0===e.signals.length?i.jsx("p",{className:"text-xs text-gray-400",children:"None"}):i.jsx("ul",{className:"mt-0.5 space-y-0.5",children:e.signals.map(e=>i.jsxs("li",{className:"text-xs text-gray-600",children:[i.jsx("span",{className:"rounded bg-gray-100 px-1 py-0.5 font-mono text-[10px] uppercase text-gray-500",children:e.eventType??e.sourceType??"signal"})," ",e.title??"(untitled)"," ",i.jsx("span",{className:"text-gray-400",children:J5(e.publishedAt)})]},`${e.eventType??""}|${e.title??""}|${e.publishedAt??""}`))})]}),i.jsxs("div",{className:"mt-1.5",children:[i.jsx("p",{className:"text-xs font-medium text-gray-500",children:"Contacts"}),0===e.contacts.length?i.jsx("p",{className:"text-xs text-gray-400",children:"None"}):i.jsx("p",{className:"text-xs text-gray-600",children:e.contacts.map(e=>e.role??e.email??"contact").join(", ")})]})]},e.companyId??`company-${t}`))})]})},r3=({drafts:e,draftsCreated:t})=>{const n=t&&t>0?`${t} ${1===t?"draft":"drafts"} produced — details weren't recorded for this run (it predates draft-detail capture).`:"This run produced no drafts.";return i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Drafts (outputs)"}
979),0===e.length?i.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n}):i.jsx("ul",{className:"mt-2 space-y-2",children:e.map(e=>i.jsxs("li",{className:"rounded-md border border-gray-200 bg-white p-3",children:[i.jsx("p",{className:"text-sm font-medium text-gray-800",children:e.subject??"(no subject)"}),i.jsxs("p",{className:"text-xs text-gray-500",children:[e.companyName??e.companyId??"Unknown company",e.signalTitle?` · on “${e.signalTitle}”`:"",e.signalSourceType?` (${e.signalSourceType})`:""]}),e.reasoning&&i.jsx("p",{className:"mt-1 text-xs text-gray-600",children:e.reasoning})]},`${e.companyId??""}|${e.subject??""}|${e.signalTitle??""}`))})]})},a3=({input:e,output:t,langfuseUrl:n})=>i.jsx("tr",{children:i.jsxs("td",{colSpan:X5.length,className:"bg-gray-50 px-4 py-4",children:[i.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[i.jsx(n3,{companies:e.companies,companyCount:e.companyCount}),i.jsx(r3,{drafts:t.drafts,draftsCreated:t.draftsCreated})]}),n&&i.jsxs("p",{className:"mt-4 text-xs text-gray-500",children:["Full prompts + generated bodies:"," ",i.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:"open the Langfuse session"}),"."]})]})}),i3=({run:e})=>{const[n,r]=t.useState(!1),a=(e=>{const t=W5(e)??{};return{companies:Q5(t.companies),draftsCreated:Q5(t.draftsCreated),skippedNoContacts:Q5(t.skippedNoContacts),skippedNoSignal:Q5(t.skippedNoSignal),drafts:K5(t.drafts).map(e=>({companyId:Z5(e.companyId),companyName:Z5(e.companyName),subject:Z5(e.subject),reasoning:Z5(e.reasoning),signalTitle:Z5(e.signalTitle),signalSourceType:Z5(e.signalSourceType)}))}})(e.output_summary),s=(e=>{const t=W5(e)??{};return{companyCount:Array.isArray(t.companyIds)?t.companyIds.length:null,signalFreshnessDays:Q5(t.signalFreshnessDays),companies:K5(t.companies).map(e=>({companyId:Z5(e.companyId),companyName:Z5(e.companyName),signals:K5(e.signals).map(e=>({eventType:Z5(e.eventType),sourceType:Z5(e.sourceType),title:Z5(e.title),publishedAt:Z5(e.publishedAt)})),contacts:K5(e.contacts).map(e=>({role:Z5(e.role),email:Z5(e.email)}))}))}})(e.input_summary);return i.jsxs(i.Fragment,{children:[i.jsxs("tr",{className:"cursor-pointer align-top hover:bg-gray-50",onClick:()=>r(e=>!e),children:[i.jsx("td",{className:`${e3} text-gray-400`,children:i.jsx("button",{type:"button","aria-expanded":n,"aria-label":n?"Collapse run":"Expand run",onClick:e=>{e.stopPropagation(),r(e=>!e)},className:"text-gray-500 hover:text-gray-700",children:n?"▾":"▸"})}),i.jsx("td",{className:`${e3} text-gray-500`,children:Y5(e.created_at)}),i.jsx("td",{className:e3,children:G5(a.companies??s.companyCount)}),i.jsx("td",{className:`${e3} font-medium`,children:G5(a.draftsCreated)}),i.jsxs("td",{className:`${e3} text-gray-500`,children:[G5(a.skippedNoContacts)," no-contact · ",G5(a.skippedNoSignal)," no-signal"]}),i.jsx("td",{className:e3,children:null===s.signalFreshnessDays?"—":`${s.signalFreshnessDays}d`}),i.jsx("td",{className:e3,onClick:e=>e.stopPropagation(),children:i.jsx(t3,{url:e.langfuse_url})})]}),n&&i.jsx(a3,{input:s,output:a,langfuseUrl:e.langfuse_url})]})},s3=({jobId:e})=>{const{data:t,loading:n,error:r}=d(x5,{variables:{jobId:e},fetchPolicy:"cache-and-network"}),a=t?.opsReveMiniRuns??[];return i.jsxs("section",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsxs("h3",{className:"text-sm font-semibold text-gray-900",children:["Mini run history",a.length>0?` (${a.length})`:""]}),i.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["One row per background Reve Mini run for this job, newest first (50 most recent). Each run writes a row even when it drafted nothing. Click a row to see the signals/contacts that run saw and the drafts it produced. Generate runs with the"," ",i.jsx("span",{className:"font-medium",children:"Reve job simulator"}),"."]}),n&&0===a.length&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading runs…"}),r&&i.jsx("p",{className:"mt-3 text-sm text-rose-600",children:"Failed to load runs."}),!n&&!r&&0===a.length&&i.jsx("p",{className:"mt-3 text-sm text-gray-400",children:"No runs recorded yet."}),a.length>0&&i.jsx("div",{className:"mt-3 overflow-x-auto rounded-lg border border-gray-200",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:X5.map((e,t)=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e||`col-${t}`))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:a.map(e=>i.jsx(i3,{run:e},e.id))})]})})]})},o3={draft:"bg-gray-100 text-gray-600",active:"bg-emerald-50 text-emerald-700",paused:"bg-amber-50 text-amber-700",complete:"bg-blue-50 text-blue-700"},l3=({status:e})=>i.jsx("span",{className:`rounded px-1.5 py-0.5 text-xs font-medium ${o3[e]??"bg-gray-100 text-gray-600"}`,children:e}),c3=e=>e.split(/[\n,]/).map(e=>
979e.trim()).filter(Boolean),u3=()=>({name:"",goal:"",detail:"",supportingContext:"",signalTypes:[],targetRolesText:"",includeCrmContacts:T5.include_crm_contacts,approvalMode:T5.approval_mode,outreachTrigger:T5.outreach_trigger,sendWindowDays:[...T5.send_window_days],sendWindowStartHour:T5.send_window_start_hour,sendWindowEndHour:T5.send_window_end_hour,sendWindowTz:T5.send_window_tz,perContactCooldownDays:T5.per_contact_cooldown_days,dailySendCap:T5.daily_send_cap,signalFreshnessDays:L5(T5.outreach_trigger),signalFreshnessSet:!1,companies:[]}),d3=e=>({name:e.name,goal:e.goal,detail:e.detail??"",supportingContext:e.supporting_context??"",signalTypes:[...e.signal_types],targetRolesText:e.target_roles.join("\n"),includeCrmContacts:e.include_crm_contacts,approvalMode:e.approval_mode,outreachTrigger:e.outreach_trigger,sendWindowDays:[...e.send_window_days],sendWindowStartHour:e.send_window_start_hour,sendWindowEndHour:e.send_window_end_hour,sendWindowTz:e.send_window_tz,perContactCooldownDays:e.per_contact_cooldown_days,dailySendCap:e.daily_send_cap,signalFreshnessDays:e.signal_freshness_days,signalFreshnessSet:!0,companies:e.companies.map(e=>({id:e.canonical_company_id,name:e.company_name??e.canonical_company_id}))}),p3=e=>({name:e.name.trim(),goal:e.goal.trim(),detail:e.detail.trim()||null,supporting_context:e.supportingContext.trim()||null,signal_types:e.signalTypes,target_roles:c3(e.targetRolesText),include_crm_contacts:e.includeCrmContacts,approval_mode:e.approvalMode,outreach_trigger:e.outreachTrigger,send_window_days:e.sendWindowDays,send_window_start_hour:e.sendWindowStartHour,send_window_end_hour:e.sendWindowEndHour,send_window_tz:e.sendWindowTz.trim(),per_contact_cooldown_days:e.perContactCooldownDays,daily_send_cap:e.dailySendCap,signal_freshness_days:e.signalFreshnessDays}),h3=({label:e,hint:t,children:n})=>i.jsxs("div",{children:[i.jsx("span",{className:"block text-sm font-medium text-gray-700",children:e}),t&&i.jsx("span",{className:"block text-xs text-gray-500",children:t}),i.jsx("div",{className:"mt-1.5",children:n})]}),m3="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none",f3=({options:e,selected:t,onToggle:n,format:r})=>i.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const a=t.includes(e);return i.jsx("button",{type:"button",onClick:()=>n(e),className:"rounded-full border px-3 py-1 text-sm "+(a?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-white text-gray-600 hover:border-gray-300"),children:r?r(e):e},e)})}),g3=({job:e,busy:t,onSetStatus:n,onDuplicate:r,onDelete:a})=>{const s="rounded-lg bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",o="rounded-lg border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50";return i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:["draft"===e.status&&i.jsx("button",{type:"button",disabled:t,onClick:()=>n("active"),className:s,children:"Launch"}),"paused"===e.status&&i.jsx("button",{type:"button",disabled:t,onClick:()=>n("active"),className:s,children:"Resume"}),"active"===e.status&&i.jsx("button",{type:"button",disabled:t,onClick:()=>n("paused"),className:o,children:"Pause"}),"complete"!==e.status&&i.jsx("button",{type:"button",disabled:t,onClick:()=>n("complete"),className:o,children:"Complete"}),i.jsx("button",{type:"button",disabled:t,onClick:r,className:o,children:"Duplicate"}),"active"!==e.status&&i.jsx("button",{type:"button",disabled:t,onClick:a,className:"rounded-lg border border-rose-300 px-3 py-1.5 text-sm font-medium text-rose-700 hover:bg-rose-50 disabled:opacity-50",children:"Delete"})]})},y3=e=>`${String(e).padStart(2,"0")}:00`,x3=({form:e,setForm:t,disabled:n})=>{const r=(e,n)=>{t(t=>{const r=t[e],a=r.includes(n)?r.filter(e=>e!==n):[...r,n];return{...t,[e]:a}})};return i.jsxs("fieldset",{disabled:n,className:"space-y-5 disabled:opacity-60",children:[i.jsx(h3,{label:"Name",children:i.jsx("input",{type:"text",value:e.name,onChange:e=>t(t=>({...t,name:e.target.value})),className:m3})}),i.jsx(h3,{label:"Goal",hint:"What this objective is trying to do.",children:i.jsx("textarea",{rows:2,value:e.goal,onCh
979ange:e=>t(t=>({...t,goal:e.target.value})),className:m3})}),i.jsx(h3,{label:"Detail",hint:"Optional grey sub-line shown under the goal.",children:i.jsx("input",{type:"text",value:e.detail,onChange:e=>t(t=>({...t,detail:e.target.value})),className:m3})}),i.jsxs(h3,{label:"Supporting context",hint:"Extra instructions passed to the agent. Reference a working file as File(id=...) here to let the agent read it with read_file.",children:[i.jsx("textarea",{rows:6,value:e.supportingContext,onChange:e=>t(t=>({...t,supportingContext:e.target.value})),className:m3}),i.jsx(H5,{supportingContext:e.supportingContext})]}),i.jsx(h3,{label:"Outreach trigger",hint:"Signal-driven reacts to a fresh signal; proactive reaches out first-touch toward the goal even with no signal.",children:i.jsx("select",{value:e.outreachTrigger,onChange:e=>t(t=>({...t,outreachTrigger:e.target.value,signalFreshnessDays:t.signalFreshnessSet?t.signalFreshnessDays:L5(e.target.value)})),className:m3,children:M5.map(e=>i.jsx("option",{value:e,children:"signal"===e?"Signal-driven (react to a new signal)":"Proactive (first-touch, no signal needed)"},e))})}),i.jsx(h3,{label:"Signal types",hint:"Which events trigger outreach.",children:i.jsx(f3,{options:_5,selected:e.signalTypes,onToggle:e=>r("signalTypes",e)})}),i.jsx(h3,{label:"Target roles",hint:"One per line (e.g. CEO, VP Clinical Operations).",children:i.jsx("textarea",{rows:3,value:e.targetRolesText,onChange:e=>t(t=>({...t,targetRolesText:e.target.value})),className:m3})}),i.jsxs("label",{htmlFor:"include-crm-contacts",className:"flex items-center gap-2 text-sm text-gray-700",children:[i.jsx("input",{id:"include-crm-contacts",type:"checkbox",checked:e.includeCrmContacts,onChange:e=>t(t=>({...t,includeCrmContacts:e.target.checked})),className:"h-4 w-4 rounded border-gray-300"}),"Include CRM contacts"]}),i.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[i.jsx(h3,{label:"Approval mode",children:i.jsx("select",{value:e.approvalMode,onChange:e=>t(t=>({...t,approvalMode:e.target.value})),className:m3,children:I5.map(e=>i.jsx("option",{value:e,children:"every"===e?"every (manual approval)":"auto (auto-send)"},e))})}),i.jsx(h3,{label:"Send-window timezone",children:i.jsx("input",{type:"text",value:e.sendWindowTz,onChange:e=>t(t=>({...t,sendWindowTz:e.target.value})),className:m3})})]}),i.jsx(h3,{label:"Send-window days",children:i.jsx(f3,{options:P5,selected:e.sendWindowDays,onToggle:e=>r("sendWindowDays",e),format:e=>e.toUpperCase()})}),i.jsxs("div",{className:"grid grid-cols-2 gap-5 sm:grid-cols-4",children:[i.jsx(h3,{label:"Start hour",children:i.jsx("select",{value:e.sendWindowStartHour,onChange:e=>t(t=>({...t,sendWindowStartHour:Number(e.target.value)})),className:m3,children:Array.from({length:24},(e,t)=>i.jsx("option",{value:t,children:y3(t)},t))})}),i.jsx(h3,{label:"End hour",children:i.jsx("select",{value:e.sendWindowEndHour,onChange:e=>t(t=>({...t,sendWindowEndHour:Number(e.target.value)})),className:m3,children:Array.from({length:24},(e,t)=>i.jsx("option",{value:t,children:y3(t)},t))})}),i.jsx(h3,{label:"Cooldown (days)",children:i.jsx("input",{type:"number",min:1,value:e.perContactCooldownDays,onChange:e=>t(t=>({...t,perContactCooldownDays:Number(e.target.value)})),className:m3})}),i.jsx(h3,{label:"Daily send cap",children:i.jsx("input",{type:"number",min:1,value:e.dailySendCap,onChange:e=>t(t=>({...t,dailySendCap:Number(e.target.value)})),className:m3})})]}),i.jsx(h3,{label:"Signal freshness (days)",hint:"How recent a signal must be to act on. Defaults to 30 for signal-driven jobs, 180 for proactive ones.",children:i.jsx("input",{type:"number",min:1,value:e.signalFreshnessDays,onChange:e=>t(t=>({...t,signalFreshnessDays:Number(e.target.value),signalFreshnessSet:!0})),className:`${m3} max-w-[12rem]`})}),i.jsx(h3,{label:"Companies to watch",children:i.jsx(F5,{value:e.companies,onChange:e=>t(t=>({...t,companies:e}))})})]})},b3=e=>e instanceof Error?e.message:"Something went wrong.",v3=({active:e,onClick:t,children:n})=>i.jsx("button",{type:"button",onClick:t,className:"-mb-px border-b-2 px-1 pb-2 text-sm font-medium "+(e?"border-blue-600 text-blue-700":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),children:n}),w3=({jobId:e,onClose:r})=>{const a=null===e,{data:s,loading:o}=d(y5,{variables:{id:e??""},skip:a,fetchPolicy:"cache-and-network"}),l=s?.opsReveJob??null,[c,u]=t.useState(u3),[h,m]=t.useState(null),[f,g]=t.useState(!1),[y,x]=t.useState(null),[b,v]=t.useState(null),[w,j]=t.useState(null),[C,N]=t.useState("config"),k=l?.id??null;n.useEffect(()=>{l&&u(d3(l))},[k]);const S={refetchQueries:["OpsReveJobs"]},[E,A]=p(w5,S),[O,_]=p(j5,S),[P,I]=p(k5,S),[M,T]=p(C5,S),[R,L]=p(N5,S),[D,F]=p(S5,S),[q,B]=p(E5,S),U=A.loading||_.loading||I.loading||T.loading||L.loading||F.loading||B.loading,z="complete"===l?.status,H=c.sendWindowStartHour<c.sendWindowEndHour,V=""!==c.name.trim()&&""!==c.goal.trim()&&H&&(!a||null!==h),$=async e=>{if(h){v(null);
979try{await E({variables:{ownerUserId:h.id,input:{...p3(c),initial_company_ids:c.companies.map(e=>e.id),status:e}}}),r()}catch(t){v(b3(t))}}},W=!a&&null!==l&&"runs"===C;return i.jsxs("div",{className:"mx-auto "+(W?"max-w-5xl":"max-w-3xl"),children:[i.jsx("button",{type:"button",onClick:r,className:"text-sm text-blue-600 hover:underline",children:"← Back to jobs"}),i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:a?"New Reve job":l?.name??"Reve job"}),l&&i.jsx(l3,{status:l.status})]}),!a&&l&&i.jsxs("div",{className:"mt-4 flex gap-4 border-b border-gray-200",children:[i.jsx(v3,{active:"config"===C,onClick:()=>N("config"),children:"Config"}),i.jsx(v3,{active:"runs"===C,onClick:()=>N("runs"),children:"Mini run history"})]}),!a&&o&&!l&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading job…"}),!a&&!o&&!l&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:"Job not found."}),(a||l)&&i.jsxs("div",{className:"mt-5 space-y-6",children:[!a&&l&&"config"===C&&i.jsxs("section",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Lifecycle"}),i.jsxs("div",{className:"mt-1",children:[f?i.jsxs("div",{children:[i.jsx($5,{value:h,onChange:m}),i.jsxs("div",{className:"mt-2 flex gap-2",children:[i.jsx("button",{type:"button",disabled:!h||U,onClick:async()=>{if(l&&h){x(null);try{await M({variables:{jobId:l.id,ownerUserId:h.id}}),g(!1),m(null),x({ok:!0,text:`Owner reassigned to ${h.email??h.id}.`})}catch(e){x({ok:!1,text:b3(e)})}}},className:"rounded-lg bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:"Reassign owner"}),i.jsx("button",{type:"button",onClick:()=>{g(!1),m(null)},className:"rounded-lg border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Cancel"})]})]}):i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs("p",{className:"text-xs text-gray-500",children:["Owner:"," ",V5(l.owner),l.owner.email?` · ${l.owner.email}`:""]}),i.jsx("button",{type:"button",onClick:()=>{m(null),x(null),g(!0)},className:"text-xs text-blue-600 hover:underline",children:"Change owner"})]}),y&&i.jsx("p",{className:"mt-2 text-xs "+(y.ok?"text-emerald-700":"text-rose-600"),children:y.text})]}),i.jsx("div",{className:"mt-3",children:i.jsx(g3,{job:l,busy:U,onSetStatus:async e=>{if(l){v(null);try{await R({variables:{jobId:l.id,status:e}})}catch(t){v(b3(t))}}},onDuplicate:async()=>{if(l){v(null);try{await q({variables:{jobId:l.id}}),r()}catch(e){v(b3(e))}}},onDelete:async()=>{if(l&&window.confirm("Delete this job and all its drafts? This cannot be undone.")){v(null);try{await D({variables:{jobId:l.id}}),r()}catch(e){v(b3(e))}}}})}),z&&i.jsx("p",{className:"mt-2 text-xs text-amber-700",children:"This job is complete and read-only. Its settings can no longer be edited."})]}),a&&i.jsxs("section",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Owner"}),i.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"The user this job belongs to. They'll see it in their app."}),i.jsx("div",{className:"mt-3",children:i.jsx($5,{value:h,onChange:m})})]}),(a||"config"===C)&&i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsx("h3",{className:"mb-4 text-sm font-semibold text-gray-900",children:"Configuration"}),i.jsx(x3,{form:c,setForm:u,disabled:z})]}),!H&&i.jsx("p",{className:"text-sm text-rose-600",children:"Send-window start hour must be earlier than the end hour."}),b&&i.jsx("p",{className:"rounded border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700",children:b}),w&&i.jsx("p",{className:"text-sm text-emerald-700",children:w}),!z&&i.jsx("div",{className:"flex flex-wrap gap-3",children:a?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",disabled:!V||U,onClick:()=>$("draft"),className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:U?"Saving…":"Save as draft"}),i.jsx("button",{type:"button",disabled:!V||U,onClick:()=>$("active"),className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Create & launch"})]}):i.jsx("button",{type:"button",disabled:!V||U,onClick:async()=>
979{if(l){v(null),j(null);try{await O({variables:{jobId:l.id,input:p3(c)}}),((e,t)=>{if(e.length!==t.length)return!1;const n=new Set(e.map(e=>e.id));return t.every(e=>n.has(e.id))})(c.companies,d3(l).companies)||await P({variables:{jobId:l.id,companyIds:c.companies.map(e=>e.id)}}),j("Saved.")}catch(e){v(b3(e))}}},className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:U?"Saving…":"Save changes"})})]}),!a&&l&&"runs"===C&&i.jsx(s3,{jobId:l.id})]})]})},j3=["draft","active","paused","complete"],C3=["Name","Owner","Status","Signals","Companies","Runs","Updated"],N3=e=>{if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},k3=({email:e,setEmail:t,onApplyEmail:n,status:r,setStatus:a})=>i.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[i.jsxs("form",{onSubmit:e=>{e.preventDefault(),n()},className:"flex items-end gap-2",children:[i.jsxs("label",{htmlFor:"owner-email",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"Owner email"}),i.jsx("input",{id:"owner-email",type:"email",value:e,onChange:e=>t(e.target.value),placeholder:"exact email…",className:"w-64 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"})]}),i.jsx("button",{type:"submit",className:"rounded-lg border border-gray-300 px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Filter"})]}),i.jsxs("label",{htmlFor:"status-filter",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"Status"}),i.jsxs("select",{id:"status-filter",value:r,onChange:e=>a(e.target.value),className:"rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none",children:[i.jsx("option",{value:"",children:"all"}),j3.map(e=>i.jsx("option",{value:e,children:e},e))]})]})]}),S3=({job:e,onOpen:t})=>i.jsxs("tr",{className:"cursor-pointer align-top hover:bg-gray-50",onClick:t,children:[i.jsxs("td",{className:"px-4 py-2.5 text-sm font-medium text-gray-900",children:[e.name,i.jsx("span",{className:"block max-w-md truncate text-xs font-normal text-gray-500",children:e.goal})]}),i.jsxs("td",{className:"px-4 py-2.5 text-sm text-gray-700",children:[V5(e.owner),e.owner.email&&i.jsx("span",{className:"block text-xs text-gray-400",children:e.owner.email})]}),i.jsx("td",{className:"px-4 py-2.5",children:i.jsx(l3,{status:e.status})}),i.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-500",children:e.signal_types.length>0?e.signal_types.join(", "):"—"}),i.jsx("td",{className:"px-4 py-2.5 text-sm text-gray-700",children:e.company_count}),i.jsx("td",{className:"px-4 py-2.5 text-sm text-gray-700",children:e.mini_run_count}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 text-sm text-gray-500",children:N3(e.updated_at)})]}),E3=({email:e,setEmail:t,appliedEmail:n,applyEmail:r,status:a,setStatus:s,onCreate:o,onOpen:l})=>{const{data:c,loading:u,error:p}=d(g5,{variables:{ownerEmail:n.trim()||null,status:a||null},fetchPolicy:"cache-and-network"}),h=c?.opsReveJobs??[];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[i.jsx(k3,{email:e,setEmail:t,onApplyEmail:r,status:a,setStatus:s}),i.jsx("button",{type:"button",onClick:o,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700",children:"+ New job"})]}),u&&0===h.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading jobs…"}),p&&i.jsx("p",{className:"mt-6 text-sm text-rose-600",children:"Failed to load jobs."}),!u&&!p&&0===h.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-400",children:"No jobs match these filters."}),h.length>0&&i.jsx("div",{className:"mt-6 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:C3.map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:h.map(e=>i.jsx(S3,{job:e,onOpen:()=>l(e.id)},e.id))})]})})]})},A3=()=>{const[e,n]=t.useState({mode:"list"}),[r,a]=t.useState(""),[s,l]=t.useState(""),[c,u]=t.useState(""),d=()=>n({mode:"list"});return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Reve jobs & objectives"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Create and edit Reve outreach jobs across users — goals, signal types, target roles, send window, caps, companies, and status."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsxs("div",{className:"mt-8",children:["list"===e.mode&&i.jsx(E3,{email:r,setEmail:a,appliedEmail:s,applyEmail:()=>l(r),status:c,setStatus:u,onCreate:()=>n({mode:"create"}),onOpen:e=>n({mode:"edit",jobId:e})}),"create"===e.mode&&i.jsx(w3,{jobId:null,onClose:d}),"edit"===e.mode&&i.jsx(w3,{jobId:e.jobId,onClose:d})]})]})})},O3=u`
980  query OpsReveJobSim($jobId: String!) {
981    opsReveJobSim(job_id: $jobId) {
982      job_id
983      simulated_through
984      current_day
985      sim_in_progress
986      accounts {
987        company_id
988        company_name
989        simulated_through
990        run_status
991      }
992      drafts {
993        company_id
994        company_name
995        source_type
996        signal_title
997        signal_tag
998        signal_published_at
999        subject
1000        body
1001        reasoning
1002        created_at
1003      }
1004    }
1005  }
1006`,_3=u`
1007  query OpsReveJobSimSignals($jobId: String!, $from: String!, $to: String!) {
1008    opsReveJobSimSignals(job_id: $jobId, from_date: $from, to_date: $to) {
1009      company_id
1010      company_name
1011      signals {
1012        source_type
1013        event_type
1014        title
1015        url
1016        published_at
1017      }
1018    }
1019  }
1020`,P3=u`
1021  mutation OpsStartReveJobSim($jobId: String!, $from: String!, $to: String!) {
1022    opsStartReveJobSim(job_id: $jobId, from_date: $from, to_date: $to) {
1023      job_id
1024      simulated_through
1025      sim_in_progress
1026      accounts {
1027        company_id
1028        company_name
1029        simulated_through
1030        run_status
1031      }
1032    }
1033  }
1034`,I3=u`
1035  mutation OpsStartReveJobSimUntilDraft($jobId: String!, $from: String!) {
1036    opsStartReveJobSimUntilDraft(job_id: $jobId, from_date: $from) {
1037      job_id
1038      simulated_through
1039      sim_in_progress
1040      accounts {
1041        company_id
1042        company_name
1043        simulated_through
1044        run_status
1045      }
1046    }
1047  }
1048`,M3=e=>e.slice(0,10),T3=e=>e?new Date(`${M3(e)}T00:00:00Z`).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}):"—",R3=(e,t)=>`${e} ${t}${1===e?"":"s"}`,L3={running:"bg-blue-50 text-blue-700",complete:"bg-emerald-50 text-emerald-700",failed:"bg-rose-50 text-rose-700",cancelled:"bg-gray-100 text-gray-600"},D3="rounded-lg border border-gray-300 px-2 py-1.5 text-sm focus:border-blue-400 focus:outline-none",F3=({value:e,onCh
1048ange:t})=>{const{data:n,loading:r}=d(g5,{fetchPolicy:"cache-and-network"}),a=n?.opsReveJobs??[];return i.jsxs("select",{"aria-label":"Choose a Reve job",value:e,onChange:e=>t(e.target.value),className:"w-full max-w-lg rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none",children:[i.jsx("option",{value:"",children:r?"Loading jobs…":"Select a job…"}),a.map(e=>i.jsx("option",{value:e.id,children:`${e.name} · ${e.status} · ${e.owner.email??e.owner.id}`},e.id))]})},q3=({name:e,signals:t})=>i.jsxs("details",{className:"rounded-md border border-gray-200 bg-white p-3",children:[i.jsx("summary",{className:"cursor-pointer text-sm font-medium text-gray-800",children:`${e} · ${R3(t.length,"signal")}`}),t.length>0&&i.jsx("ul",{className:"mt-2 space-y-1.5",children:t.map(e=>i.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5",children:[i.jsx("span",{className:"rounded px-1.5 py-0.5 text-xs font-medium "+("trial"===e.source_type?"bg-violet-100 text-violet-800":"bg-sky-100 text-sky-800"),children:"trial"===e.source_type?"CT.gov":"news"}),i.jsx("span",{className:"font-mono text-xs text-gray-500",children:T3(e.published_at)}),i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600",children:e.event_type}),i.jsx("span",{className:"w-full text-sm text-gray-800",children:e.title})]},`${e.source_type}-${e.title}-${e.published_at}`))})]}),B3={trial:"bg-violet-100 text-violet-800",news:"bg-sky-100 text-sky-800"},U3=({draft:e})=>i.jsxs("div",{className:"rounded-md border border-gray-200 bg-white p-3",children:[i.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[i.jsx("span",{className:"text-sm font-medium text-gray-900",children:e.company_name??e.company_id}),i.jsx("span",{className:`rounded px-1.5 py-0.5 text-xs font-medium ${B3[e.source_type]??"bg-gray-100 text-gray-600"}`,children:e.source_type}),e.signal_tag&&i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600",children:e.signal_tag}),i.jsx("span",{className:"font-mono text-xs text-gray-500",children:T3(e.signal_published_at)}),i.jsx("span",{className:"text-xs text-gray-500",children:e.signal_title})]}),i.jsx("p",{className:"mt-1.5 text-sm font-medium text-gray-800",children:e.subject}),e.reasoning&&i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:e.reasoning}),i.jsxs("details",{className:"mt-1.5",children:[i.jsx("summary",{className:"cursor-pointer text-xs text-blue-600",children:"View body"}),i.jsx("p",{className:"mt-1 whitespace-pre-wrap text-sm text-gray-700",children:e.body})]})]}),z3=({drafts:e})=>i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:`Drafts created this run · ${e.length}`}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"New drafts the worker wrote during the run — they land in the job's review queue."}),i.jsx("div",{className:"mt-3 space-y-2",children:e.map(e=>i.jsx(U3,{draft:e},`${e.company_id}-${e.created_at}-${e.subject}`))})]}),H3=({jobId:e,from:t,to:n})=>{const{data:r,loading:a}=d(_3,{variables:{jobId:e,from:t,to:n},fetchPolicy:"cache-and-network"}),s=r?.opsReveJobSimSignals??[],o=s.reduce((e,t)=>e+t.signals.length,0),l=a?"Loading signals…":`${R3(o,"signal")} across ${R3(s.length,"account")} — including recent ones from before the start that fall in the worker's freshness lookback.`;return i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Signals the worker would consider"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:l}),s.length>0&&i.jsx("div",{className:"mt-3 space-y-2",children:s.map(e=>i.jsx(q3,{name:e.company_name??e.company_id,signals:e.signals},e.company_id))})]})},V3=(e,t,n,r,a,i)=>{const s=e.filter(e=>((e,t)=>"failed"===e.run_status||"cancelled"===e.run_status||Boolean(e.simulated_through&&M3(e.simulated_through)>=t))(e,t)).length,o=e.length>0&&s===e.length,l=n&&("until"===r?a&&!i:o);return{settledCount:s,finished:l,polling:i||n&&!l}},$3=({account:e,currentDay:t})=>{const n="running"===e.run_status&&t?t:e.simulated_through;return i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:e.company_name??e.company_id}),i.jsx("td",{className:"px-4 py-2 text-sm text-gray-700",children:T3
1048(n)}),i.jsx("td",{className:"px-4 py-2 text-sm",children:e.run_status?i.jsx("span",{className:`rounded px-1.5 py-0.5 text-xs font-medium ${L3[e.run_status]??"bg-gray-100 text-gray-600"}`,children:e.run_status}):i.jsx("span",{className:"text-xs text-gray-400",children:"—"})})]})},W3=({accounts:e,currentDay:t,progressLabel:n,finished:r,jobId:a})=>i.jsxs("section",{className:"mt-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Accounts"}),n&&i.jsx("span",{className:"text-sm text-gray-600",children:n})]}),i.jsx("div",{className:"mt-3 overflow-hidden rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:["Account","Simulated through","Last run"].map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:e.map(e=>i.jsx($3,{account:e,currentDay:t},e.company_id))})]})}),r&&i.jsx(o,{to:b.ReveJob(a),className:"mt-3 inline-block text-sm font-medium text-blue-600 hover:underline",children:"View drafts in job →"})]}),Q3=({canRunRange:e,canRunUntil:t,startingRange:n,startingUntil:r,inProgress:a,runMode:s,onRunRange:o,onRunUntilDraft:l})=>i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",disabled:!e,onClick:o,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-gray-300",children:n||a&&"range"===s?"Simulating…":"Run simulation"}),i.jsx("button",{type:"button",disabled:!t,onClick:l,title:"Step day by day from the start date until the first new draft (capped at ~120 days). No end date needed.",className:"rounded-lg border border-blue-600 px-4 py-2 text-sm font-medium text-blue-700 hover:bg-blue-50 disabled:cursor-not-allowed disabled:border-gray-300 disabled:text-gray-400",children:r||a&&"until"===s?"Walking…":"Run until next draft"})]}),Z3=({jobId:e,onJobChange:t,from:n,onFromChange:r,to:a,onToChange:s,through:o,inProgress:l,runMode:c,startingRange:u,startingUntil:d,runError:p,onRunRange:h,onRunUntilDraft:m})=>{const f=!l&&!u&&!d,g=""!==n&&""!==a&&n<=a,y=Boolean(e)&&g&&f,x=Boolean(e)&&""!==n&&f,b=o?`Last simulated through ${T3(o)}. Pick up from the next day.`:"Never simulated yet. Pick a start date in the past where the accounts had signals.";return i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Job"}),i.jsx("div",{className:"mt-2",children:i.jsx(F3,{value:e,onChange:t})}),e&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mt-4 text-sm text-gray-700",children:b}),i.jsxs("div",{className:"mt-3 flex flex-wrap items-end gap-3",children:[i.jsxs("label",{htmlFor:"sim-from",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"From"}),i.jsx("input",{id:"sim-from",type:"date",value:n,onChange:e=>r(e.target.value),className:D3})]}),i.jsxs("label",{htmlFor:"sim-to",className:"text-sm text-gray-600",children:[i.jsx("span",{className:"mb-1 block font-medium text-gray-700",children:"To"}),i.jsx("input",{id:"sim-to",type:"date",value:a,onChange:e=>s(e.target.value),className:D3})]}),i.jsx(Q3,{canRunRange:y,canRunUntil:x,startingRange:u,startingUntil:d,inProgress:l,runMode:c,onRunRange:h,onRunUntilDraft:m})]}),i.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"“Run until next draft” needs only a start date — it steps forward a day at a time until an account drafts (or ~120 days)."}),""!==n&&""!==a&&n>a&&i.jsx("p",{className:"mt-2 text-xs text-rose-600",children:"From must be on or before To."}),p&&i.jsx("p",{className:"mt-2 rounded border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700",children:p})]})]})},K3=()=>{const[e,n]=t.useState(""),[r,a]=t.useState(""),[s,l]=t.useState(""),[c,u]=t.useState(!1),[h,m]=t.useState(null),[f,g]=t.useState(!1),[y,x]=t.useState(null),{data:b,refetch:v}=d(O3,{variables:{jobId:e},skip:!e,fetchPolicy:"cache-and-network"}),w=b?.opsReveJobSim??null,j=w?.accounts??[],C=w?.drafts??[],N=w?.sim_in_progress??!1,{settledCount:k,finished:S,polling:E}=V3(j,s,c,h,f,N);t.useEffect(()=>{N&&g(!0)},[N]),t.useEffect(()=>{if(!E||!e)return;const t=setInterval(()=>v(),2500);return()=>clearInterval(t)},[E,e,v]),t.useEffect(()=>{a(""),l(""),u(!1),m(null),g(!1),x(null)},[e]);const A=w?.simulated_through??null;t.useEffect(()=>{A&&""===r&&a(((e,t)=>new Date(Date.parse(`${e}T00:00:00Z`)+864e5*t).toISOString().slice(0,10))(M3(A),1))},[A,r]);const[O,{loading:_}]=p(P3),[P,{loading:I}]=p(I3),M=async(e,t)=>{x(null),m(e),g(!1),u(!0);try{await t(),v()}catch(n){u(!1),x((e=>e instanceof Error?e.message:"Something went wrong.")(n))}},T=((e,t,n,r,a)=>e?t?"until"===n?"Done — view drafts in the job.":"Done.":"until"===n?"Walking day by day until a draft…":`Simulating… ${r}/${a} accounts`:null)(c,S,h,k,j.length),R=""!==r&&""!==s&&r<=s;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Reve job draft simulator"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Replay the outreach worker over a job's accounts for a past date range — or run from a start date until the next draft appears. Drafts accumulate in the job's review queue; view them in the job. Local data only."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsx(Z3,{jobId:e,onJobChange:n,from:r,onFromChange:a,to:s,onToChange:l,through:A,inProgress:N,runMode:h,startingRange:_,startingUntil:I,runError:y,onRunRange:()=>M("range",()=>O({variables:{jobId:e,from:r,to:s}})),onRunUntilDraft:()=>M("until",()=>P({variables:{jobId:e,from:r}}))}),e&&j.length>0&&i.jsx(W3,{accounts:j,currentDay:w?.current_day??null,progressLabel:T,finished:S,jobId:e}),e&&C.length>0&&i.jsx(z3,{drafts:C}),e&&R&&i.jsx(H3,{jobId:e,from:r,to:s})]})})},G3=u`
1049  query OpsAgentSessions(
1050    $limit: Int
1051    $offset: Int
1052    $search: String
1053    $filter: String
1054  ) {
1055    opsAgentSessions(
1056      limit: $limit
1057      offset: $offset
1058      search: $search
1059      filter: $filter
1060    ) {
1061      items {
1062        id
1063        title
1064        preview
1065        user_turn_count
1066        generated
1067        created_at
1068        last_accessed_at
1069        cleared_at
1070        user {
1071          id
1072          email
1073          first_name
1074          last_name
1075          company_name
1076        }
1077        review {
1078          human_count
1079          judge_count
1080        }
1081        open_comment_count
1082      }
1083      total_count
1084    }
1085  }
1086`,Y3=u`
1087  query OpsAgentSession($id: ID!) {
1088    opsAgentSession(id: $id) {
1089      id
1090      title
1091      status
1092      generated
1093      created_at
1094      updated_at
1095      cleared_at
1096      messages_truncated
1097      user {
1098        id
1099        email
1100        first_name
1101        last_name
1102        company_name
1103      }
1104      messages {
1105        id
1106        role
1107        content
1108        kind
1109        agentFileId
1110        toolCalls
1111        quickReplies {
1112          label
1113          value
1114        }
1115        thinking {
1116          text
1117          level
1118          toolName
1119        }
1120        createdAt
1121      }
1122      agentFiles {
1123        id
1124        type
1125        title
1126        rowCount
1127        kind
1128      }
1129      assessments {
1130        id
1131        turn_index
1132        source
1133        grade
1134        comment
1135        updated_at
1136        reviewer {
1137          id
1138          email
1139          first_name
1140          last_name
1141          company_name
1142        }
1143      }
1144      comments {
1145        id
1146        turn_index
1147        body
1148        created_at
1149        resolved_at
1150        author {
1151          id
1152          email
1153          first_name
1154          last_name
1155          company_name
1156        }
1157        resolved_by {
1158          id
1159          email
1160          first_name
1161          last_name
1162          company_name
1163        }
1164      }
1165    }
1166  }
1167`,J3=u`
1168  mutation OpsSaveAgentAssessment(
1169    $session_id: ID!
1170    $turn_index: Int!
1171    $grade: String!
1172    $comment: String
1173  ) {
1174    opsSaveAgentAssessment(
1175      session_id: $session_id
1176      turn_index: $turn_index
1177      grade: $grade
1178      comment: $comment
1179    ) {
1180      id
1181      turn_index
1182      source
1183      grade
1184      comment
1185      updated_at
1186      reviewer {
1187        id
1188        email
1189        first_name
1190        last_name
1191        company_name
1192      }
1193    }
1194  }
1195`,X3=u`
1196  mutation OpsAddAgentComment(
1197    $session_id: ID!
1198    $turn_index: Int!
1199    $body: String!
1200  ) {
1201    opsAddAgentComment(
1202      session_id: $session_id
1203      turn_index: $turn_index
1204      body: $body
1205    ) {
1206      id
1207      turn_index
1208      body
1209      created_at
1210      resolved_at
1211      author {
1212        id
1213        email
1214        first_name
1215        last_name
1216        company_name
1217      }
1218      resolved_by {
1219        id
1220        email
1221        first_name
1222        last_name
1223        company_name
1224      }
1225    }
1226  }
1227`,e4=u`
1228  mutation OpsEditAgentComment($id: ID!, $body: String!) {
1229    opsEditAgentComment(id: $id, body: $body) {
1230      id
1231      turn_index
1232      body
1233      created_at
1234      resolved_at
1235      author {
1236        id
1237        email
1238        first_name
1239        last_name
1240        company_name
1241      }
1242      resolved_by {
1243        id
1244        email
1245        first_name
1246        last_name
1247        company_name
1248      }
1249    }
1250  }
1251`,t4=u`
1252  mutation OpsResolveAgentComment($id: ID!, $resolved: Boolean!) {
1253    opsResolveAgentComment(id: $id, resolved: $resolved) {
1254      id
1255      turn_index
1256      body
1257      created_at
1258      resolved_at
1259      author {
1260        id
1261        email
1262        first_name
1263        last_name
1264        company_name
1265      }
1266      resolved_by {
1267        id
1268        email
1269        first_name
1270        last_name
1271        company_name
1272      }
1273    }
1274  }
1275`,n4=u`
1276  mutation OpsDeleteAgentComment($id: ID!) {
1277    opsDeleteAgentComment(id: $id)
1278  }
1279`,r4=u`
1280  query OpsAgentFileContent($id: ID!, $limit: Int) {
1281    agentFile: opsAgentFileContent(id: $id) {
1282      id
1283      type
1284      title
1285      rowCount
1286      columns {
1287        name
1288        label
1289        description
1290      }
1291      rows(limit: $limit)
1292      cellMetadata(limit: $limit)
1293      text
1294    }
1295  }
1296`,a4=u`
1297  query OpsBioCompanyNames($ids: [String!]!) {
1298    opsBioCompanyNames(ids: $ids) {
1299      id
1300      company_name
1301    }
1302  }
1303`,i4=["good","ok","bad"],s4=[{value:"all",label:"All"},{value:"needs_review",label:"Needs review"},{value:"reviewed",label:"Reviewed"},{value:"generated",label:"Generated runs"}],o4=e=>
1303[e.first_name,e.last_name].filter(Boolean).join(" ").trim()||e.email||e.id,l4=e=>([e.first_name,e.last_name].filter(Boolean).map(e=>e.trim().charAt(0)).join("")||o4(e).charAt(0)).toUpperCase()||"?",c4=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},u4=({active:e,onClick:t,children:n})=>i.jsx("button",{type:"button",onClick:t,className:"rounded-full border px-3 py-1 text-sm font-medium "+(e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-600 hover:bg-gray-50"),children:n}),d4=({session:e,onOpen:t})=>{const n=(e=>{const t=e.user_turn_count+1,{human_count:n,judge_count:r}=e.review;return n>=t?{label:"reviewed ✓",className:"bg-emerald-50 text-emerald-700"}:n>0?{label:`in review · ${n}/${t}`,className:"bg-amber-50 text-amber-700"}:r>0?{label:"judge draft ready",className:"bg-blue-50 text-blue-700"}:{label:"no review",className:"bg-gray-100 text-gray-600"}})(e),r=e.open_comment_count;return i.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-start gap-4 px-4 py-3 text-left hover:bg-gray-50",children:[i.jsx("span",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-gray-200 text-xs font-semibold text-gray-700",children:l4(e.user)}),i.jsxs("span",{className:"min-w-0 flex-1",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium text-gray-900",children:o4(e.user)}),e.user.company_name&&i.jsx("span",{className:"text-sm text-gray-500",children:e.user.company_name})]}),i.jsx("span",{className:"mt-0.5 block truncate text-sm text-gray-600",children:e.preview??i.jsx("span",{className:"italic text-gray-400",children:"no messages"})}),i.jsxs("span",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-gray-400",children:[i.jsx("span",{children:e.title}),i.jsx("span",{children:c4(e.created_at)}),i.jsx("span",{children:`${e.user_turn_count} ${1===e.user_turn_count?"turn":"turns"}`}),i.jsx("span",{children:`last activity ${c4(e.last_accessed_at)}`}),e.cleared_at&&i.jsx("span",{children:`cleared ${c4(e.cleared_at)}`})]})]}),r>0&&i.jsx("span",{className:"shrink-0 rounded bg-blue-50 px-1.5 py-0.5 text-xs font-medium text-blue-700",children:`💬 ${r} open`}),i.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium ${n.className}`,children:n.label})]})},p4=()=>{const e=m(),[t,r]=n.useState(0),[a,s]=n.useState("all"),[l,c]=n.useState(""),[u,p]=n.useState("");n.useEffect(()=>{const e=setTimeout(()=>{p(l),r(0)},300);return()=>clearTimeout(e)},[l]);const h=u.trim(),{data:f,previousData:g,loading:y,error:x}=d(G3,{variables:{limit:50,offset:t,search:h||void 0,filter:a},fetchPolicy:"cache-and-network"}),b=f?.opsAgentSessions,v=b??(x?void 0:g?.opsAgentSessions),w=v?.items??[],j=v?.total_count??0,C=0===j?0:t+1,N=Math.min(t+50,j),k=Boolean(b)&&t>0,S=Boolean(b)&&t+50<j,E="all"!==a||Boolean(h);return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Reve QA"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Every Reve conversation, across all users, most recently active first. A session is one conversation up to a “clear chat” — click one to review it."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[i.jsx("input",{id:"session-search",type:"text",value:l,onChange:e=>c(e.target.value),placeholder:"Search title, name, email, or company",className:"w-72 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),s4.map(e=>i.jsx(u4,{active:a===e.value,onClick:()=>{return t=e.value,s(t),void r(0);var t},children:e.label},e.value))]}),y&&!v&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),x&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load Reve QA sessions."}),v&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`Showing ${C.toLocaleStr
1303ing()}–${N.toLocaleString()} of ${j.toLocaleString()}`,y&&i.jsx("span",{className:"ml-2 text-gray-400",children:"updating…"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:!k,onClick:()=>r(e=>Math.max(e-50,0)),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"← Prev"}),i.jsx("button",{type:"button",disabled:!S,onClick:()=>r(e=>e+50),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Next →"})]})]}),i.jsx("div",{className:"mt-2 divide-y divide-gray-100 overflow-hidden rounded-lg border border-gray-200 bg-white",children:0===w.length?i.jsx("p",{className:"px-4 py-10 text-center text-sm text-gray-500",children:E?"No sessions match the current search and filter.":"No Reve QA sessions found."}):w.map(t=>i.jsx(d4,{session:t,onOpen:()=>e(Yw.reveSession(t.id))},t.id))})]})]})})},h4=({header:e,main:t,chat:n,isMainOpen:r,isChatOpen:a,chatOpenWidth:o})=>{const l=!r,c=!l&&a&&void 0!==o;return i.jsxs("div",{className:"h-full flex flex-col bg-white",children:[e,i.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[i.jsx("div",{className:s("flex flex-col bg-gray-50 transition-all duration-500 ease-out overflow-hidden",r?"flex-1 opacity-100":"w-0 opacity-0"),children:r&&t}),i.jsx("div",{className:s("flex flex-col bg-white transition-all duration-500 ease-out",l&&"flex-1",!l&&a&&"border-l border-gray-200",!l&&a&&!c&&"w-80 xl:w-96",!l&&!a&&"w-0 overflow-hidden",c&&"flex-none transition-none"),style:c?{width:o}:void 0,children:n})]})]})},m4=({tabs:e,activeTab:n,onTabChange:r,id:a="tabs"})=>{const o=t.useRef(new Map),l=t.useCallback(e=>t=>{t?o.current.set(e,t):o.current.delete(e)},[]);return i.jsx("div",{role:"tablist",tabIndex:-1,className:"flex gap-1",onKeyDown:t=>{const a=e.findIndex(e=>e.id===n);let i=-1;if("ArrowRight"===t.key?i=(a+1)%e.length:"ArrowLeft"===t.key?i=(a-1+e.length)%e.length:"Home"===t.key?i=0:"End"===t.key&&(i=e.length-1),i>=0){t.preventDefault();const n=e[i];r(n.id),o.current.get(n.id)?.focus()}},children:e.map(e=>{const t=n===e.id;return i.jsxs("button",{ref:l(e.id),id:`${a}-tab-${e.id}`,type:"button",role:"tab","aria-selected":t,"aria-controls":`${a}-panel-${e.id}`,tabIndex:t?0:-1,onClick:()=>r(e.id),className:s("px-4 py-3 text-sm font-medium","border-b-2 transition-colors",t?"text-gray-900 border-gray-900":"text-gray-500 border-transparent hover:text-gray-700"),children:[e.label,null!=e.count&&e.count>0&&i.jsx("span",{className:s("ml-2 px-1.5 py-0.5 text-xs rounded-full",t?"bg-gray-900 text-white":"bg-gray-100 text-gray-600"),children:e.count})]},e.id)})})},f4=z("rounded text-gray-400 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-gray-400 disabled:hover:bg-transparent",{variants:{variant:{default:"hover:text-gray-700 hover:bg-gray-100",danger:"hover:text-red-600 hover:bg-red-50",primary:"hover:text-blue-600 hover:bg-blue-50"},size:{sm:"p-1",md:"p-1.5"}},defaultVariants:{variant:"default",size:"md"}}),g4=n.forwardRef(({className:e,variant:t,size:n,...r},a)=>i.jsx("button",{type:"button",ref:a,className:s(f4({variant:t,size:n,className:e})),...r}));g4.displayName="IconButton";const y4=({onClose:e,tabs:t,activeTab:n,onTabChange:r,header:a,subheader:s,actions:o,children:l})=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex-shrink-0 bg-white border-b border-gray-200 px-4 sm:px-6",children:[i.jsxs("div",{className:"flex items-start justify-between py-3",children:[i.jsxs("div",{className:"flex flex-col gap-1",children:[a&&i.jsx("div",{className:"flex items-center gap-2",children:a}),t&&n&&r&&i.jsx("div",{className:a?"":"-mb-3",children:i.jsx(m4,{tabs:t,activeTab:n,onTabChange:r})})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[o,i.jsx(g4,{size:"sm","aria-label":"Close panel",onClick:e,children:i.jsx(Sn,{className:"w-4 h-4"})})]})]}),s]}),i.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:i.jsx("div",{className:"h-full px-4 sm:px-6 py-4 sm:py-6",children:l})})]}),x4=u`
1304  query AgentCurrentUserName {
1305    user {
1306      id
1307      first_name
1308      is_admin
1309    }
1310  }
1311`;u`
1312  query GetAgentSessions {
1313    agentSessions {
1314      id
1315      title
1316      status
1317      createdAt
1318      updatedAt
1319    }
1320  }
1321`;const b4=u`
1322  query GetAgentSessionStatus($sessionId: ID!) {
1323    agentSessionStatus(sessionId: $sessionId)
1324  }
1325`,v4=u`
1326  mutation AgentGetOrCreateSession {
1327    agentGetOrCreateSession
1328  }
1329`,w4=u`
1330  mutation AgentClearHistory($sessionId: ID!) {
1331    agentClearHistory(sessionId: $sessionId)
1332  }
1333`,j4=u`
1334  mutation AgentRenameFile($fileId: ID!, $title: String!) {
1335    agentRenameFile(fileId: $fileId, title: $title) {
1336      id
1337      title
1338    }
1339  }
1340`,C4=u`
1341  mutation AgentRemoveFileRows($fileId: ID!, $rowIds: [ID!]!) {
1342    agentRemoveFileRows(fileId: $fileId, rowIds: $rowIds) {
1343      id
1344      rowCount
1345    }
1346  }
1347`,N4=u`
1348  mutation AgentUndoRemoveFileRows($fileId: ID!) {
1349    agentUndoRemoveFileRows(fileId: $fileId) {
1350      id
1351      rowCount
1352    }
1353  }
1354`,k4=u`
1355  mutation AgentSendMessage(
1356    $sessionId: ID!
1357    $message: String!
1358    $systemPromptOverride: String
1359    $playbookOverrides: [RevePlaybookOverrideInput!]
1360  ) {
1361    agentSendMessage(
1362      sessionId: $sessionId
1363      message: $message
1364      systemPromptOverride: $systemPromptOverride
1365      playbookOverrides: $playbookOverrides
1366    )
1367  }
1368`,S4=u`
1369  query ReveDefaultSystemPrompt {
1370    reveDefaultSystemPrompt
1371  }
1372`,E4=u`
1373  query RevePlaybooks {
1374    revePlaybooks {
1375      name
1376      content
1377    }
1378  }
1379`,A4=u`
1380  mutation AgentInterrupt($sessionId: ID!) {
1381    agentInterrupt(sessionId: $sessionId)
1382  }
1383`,O4=u`
1384  mutation AgentUploadFile($sessionId: ID!, $file: Upload!) {
1385    agentUploadFile(sessionId: $sessionId, file: $file) {
1386      path
1387      agentFileId
1388    }
1389  }
1390`,_4=u`
1391  mutation AgentDiscardUpload($sessionId: ID!, $path: String!) {
1392    agentDiscardUpload(sessionId: $sessionId, path: $path)
1393  }
1394`,P4=u`
1395  mutation UnlockReveAudience($agentFileIds: [ID!]!, $toolCallId: ID!) {
1396    unlockReveAudience(agentFileIds: $agentFileIds, toolCallId: $toolCallId) {
1397      success
1398      message
1399      people
1400      ready
1401      creditsSpent
1402      emptyReveals
1403      notInDb
1404      noEmail
1405      creditsRemainingToday
1406      resetInfo
1407      capExceeded
1408    }
1409  }
1410`,I4=u`
1411  query GetAgentSession($sessionId: ID!) {
1412    agentSession(sessionId: $sessionId) {
1413      id
1414      title
1415      status
1416      hasMoreMessages
1417      liveTurn {
1418        step
1419        task
1420        thinking {
1421          text
1422          level
1423          toolName
1424        }
1425      }
1426      messages {
1427        id
1428        role
1429        content
1430        kind
1431        agentFileId
1432        toolCalls
1433        quickReplies {
1434          label
1435          value
1436        }
1437        thinking {
1438          text
1439          level
1440          toolName
1441        }
1442        createdAt
1443      }
1444      agentFiles {
1445        id
1446        type
1447        title
1448        rowCount
1449        kind
1450        isUpload
1451        createdAt
1452      }
1453      createdAt
1454      updatedAt
1455    }
1456  }
1457`,M4=u`
1458  query GetAgentSessionMessages($sessionId: ID!, $before: Date, $limit: Int) {
1459    agentSessionMessages(sessionId: $sessionId, before: $before, limit: $limit) {
1460      nextCursor
1461      messages {
1462        id
1463        role
1464        content
1465        kind
1466        agentFileId
1467        toolCalls
1468        quickReplies {
1469          label
1470          value
1471        }
1472        thinking {
1473          text
1474          level
1475          toolName
1476        }
1477        createdAt
1478      }
1479    }
1480  }
1481`,T4=u`
1482  query GetAgentFile($id: ID!, $limit: Int) {
1483    agentFile(id: $id) {
1484      id
1485      type
1486      title
1487      rowCount
1488      columns {
1489        name
1490        label
1491        description
1492      }
1493      searchSummary
1494      rows(limit: $limit)
1495      cellMetadata(limit: $limit)
1496      text
1497    }
1498  }
1499`,R4=u`
1500  query ContactsLiveState($contactIds: [String!]!) {
1501    contactsByIds(contactIds: $contactIds) {
1502      id
1503      email
1504      isUnlocked
1505      contactStatus
1506      linkedinUrl
1507    }
1508  }
1509`,L4=u`
1510  query CompanyCrmLinks($companyIds: [String!]!) {
1511    companyCrmLinks(companyIds: $companyIds) {
1512      companyId
1513      url
1514    }
1515  }
1516`,D4=u`
1517  subscription AgentStream($sessionId: ID!) {
1518    agentStream(sessionId: $sessionId) {
1519      type
1520      step {
1521        text
1522        task
1523      }
1524      thinking {
1525        text
1526        level
1527        toolName
1528      }
1529      message {
1530        id
1531        content
1532        agentFile {
1533          id
1534          type
1535          title
1536          rowCount
1537          kind
1538        }
1539        quickReplies {
1540          label
1541          value
1542        }
1543      }
1544      toolCall {
1545        id
1546        name
1547        summary
1548        task
1549        args
1550        result
1551        isError
1552        durationMs
1553      }
1554    }
1555  }
1556`,F4=({item:e})=>{const t=Xn(e.url),n=s("flex items-start gap-2 p-2 rounded bg-white transition-colors",t&&"hover:bg-gray-50"),r=i.jsxs(i.Fragment,{children:[i.jsx(rs,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[e.tag&&i.jsx("span",{className:"inline-block px-1.5 py-0.5 rounded text-[10px] font-medium bg-gray-50 text-gray-600 mb-1 capitalize",children:e.tag.replace(/_/g," ")}),i.jsx("div",{className:"text-sm font-medium text-gray-900",children:e.title}),(e.date||e.source)&&i.jsxs("div",{className:"text-xs text-gray-500 mt-0.5 flex items-center gap-1.5",children:[e.date&&i.jsx("span",{children:e.date}),e.date&&e.source&&i.jsx("span",{children:"·"}),e.source&&i.jsx("span",{children:e.source})]}),e.snippet&&i.jsx("div",{className:"text-xs text-gray-500 mt-0.5 line-clamp-2",children:e.snippet})]})]});return t?i.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:n,children:r}):i.jsx("div",{className:n,children:r})},q4=({columnLabel:e,entityName:t,badge:n,body:r,references:a,onClose:s})=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"px-6 py-4 border-b border-gray-100",children:[i.jsx("div",{className:"text-sm text-gray-500 mb-2",children:e}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:t}),n]})]}),i.jsx("div",{className:"px-6 py-4",children:r}),a.length>0&&i.jsxs("div",{className:"px-6 py-4 border-t border-gray-100 bg-gray-50",children:[i.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"References"}),i.jsx("div",{className:"space-y-2",children:a.map(e=>i.jsx(F4,{item:e},`${e.url}-${e.title}`))})]}),i.jsx("div",{className:"px-6 py-3 border-t border-gray-100 flex justify-end",children:i.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-900",children:"Close"})})]}),B4={match:"bg-green-100 text-green-700",partial:"bg-green-100 text-green-700",miss:"bg-gray-100 text-gray-500",unclear:"bg-amber-100 text-amber-600",pending:"bg-gray-100 text-gray-400"},U4={match:"Match",partial:"Match",miss:"Miss",unclear:"Unclear",pending:"Pending"};const z4=({criterion:e,criterionLabel:n,entityName:r})=>{const[a,o]=t.useState(!1),l=e.references.length>0;return"pending"===e.status?i.jsxs("span",{className:s("inline-flex items-center gap-1.5 px-1.5 py-0.5 rounded text-xs",B4.pen
1556ding),children:[i.jsx("span",{className:"inline-block w-3 h-3 border-2 border-gray-300 border-t-gray-500 rounded-full animate-spin"}),"Pending"]}):i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button","aria-label":`View ${n} details for ${r}`,onClick:()=>o(!0),className:"inline-flex items-center gap-1.5 hover:opacity-80",children:[i.jsx("span",{className:s("px-1.5 py-0.5 rounded text-xs",B4[e.status]??B4.pending),children:U4[e.status]??"Unknown"}),l&&i.jsx("span",{className:"text-gray-400 text-xs",children:"↗"})]}),i.jsx(to,{isOpen:a,onClose:()=>o(!1),children:i.jsx(q4,{columnLabel:n,entityName:r,badge:i.jsx("span",{className:s("px-2 py-0.5 rounded text-xs font-medium",B4[e.status]??B4.pending),children:U4[e.status]??"Unknown"}),body:i.jsx("p",{className:"text-gray-700 leading-relaxed",children:e.detail}),references:(c=e.references,c.map(e=>({url:e.url,title:e.label,tag:e.eventType,date:e.date,source:e.source,snippet:e.summary}))),onClose:()=>o(!1)})})]});var c},H4=t.createContext(null),V4=H4.Provider;function $4(){const e=t.useContext(H4);if(!e)throw new Error("useContactsCell must be used inside <ContactsCellContext>");return e}const W4=["ready","locked","no_email","not_in_db"];function Q4(e){return"string"==typeof e&&W4.includes(e)}const Z4={locked:{label:"Locked · 1 credit",className:"bg-amber-100 text-amber-700",tooltip:"Unlocking this email costs 1 credit."},not_in_db:{label:"Not in database · up to 1 credit",className:"bg-hoki-100 text-hoki-500",tooltip:"This person is not in our database yet. Reve will search for them when you unlock; a credit is spent only if an email is actually found."},no_email:{label:"No email",className:"bg-hoki-100 text-hoki-500",tooltip:"No email address available."}};function K4({state:e}){const t=Z4[e];return i.jsx(qe,{placement:"top",className:"z-50",tooltip:i.jsx("div",{className:"max-w-xs text-xs",children:t.tooltip}),children:i.jsx("span",{className:s("inline-flex items-center whitespace-nowrap rounded-full px-2 py-0.5 text-xs font-medium",t.className),children:t.label})})}const G4=({state:e,contactId:t})=>{const{liveContactsById:n}=$4(),r=t?n.get(t):void 0;return r?.isUnlocked?r.email?i.jsx("span",{className:"truncate",children:r.email}):i.jsx(K4,{state:"no_email"}):"ready"===e?void 0===r?i.jsx("span",{className:"text-gray-400",children:"…"}):i.jsx(K4,{state:"locked"}):i.jsx(K4,{state:"not_in_db"===e?"locked":e})};function Y4(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function J4(e,t){const n=new Map(t.map(e=>[e.id,e])),r=e.columns.filter(e=>!e.name.startsWith("_")),a=r.map(e=>e.label?.trim()||er(e.name)),i=e.rows.map(t=>{const a=t._row_id,i="string"==typeof a?e.cellMetadata?.[a]:void 0,s=function(e,t){const n=e._contact_id;if("string"==typeof n&&n)return n;const r=t?.contact?.id;return"string"==typeof r?r:void 0}(t,i),o=s?n.get(s):void 0;return r.map(e=>{const n=t[e.name];return"email"===e.name&&Q4(n)?function(e,t){return t?.isUnlocked?t.email||Z4.no_email.label:"ready"===e?Z4.locked.label:Z4[e].label}(n,o):function(e,t){if("contact"===t?.type)return"string"==typeof t.name&&t.name?t.name:Y4(e);if("criterion"===t?.type){const e="string"==typeof t.status?t.status:"pending";return U4[e]??"Unknown"}return"badge"===t?.type&&"string"==typeof t.label?t.label:"string"==typeof t?.error?t.error:Y4(e)}(n,i?.[e.name])}).map(cw).join(",")});return[a.map(cw).join(","),...i].join("\n")}const X4=({agentFileId:e,title:n,query:r=T4})=>{const a=A(),{toastError:s}=v(),[o,l]=t.useState(!1),c=t.useCallback(async()=>{l(!0);try{const{data:t}=await a.query({query:r,variables:{id:e},fetchPolicy:"network-only"}),i=t.agentFile;if(!i?.columns||!i.rows)return void s("This file can’t be downloaded.");const o=i.cellMetadata??null,l=function(e){if(!e)return[];const t=new Set;return Object.values(e).forEach(e=>{Object.values(e).forEach(e=>{"contact"===e.type&&"string"==typeof e.id&&t.add(e.id)})}),Array.from(t).sort((e,t)=>e.localeCompare(t))}(o),c=l.length>0?await a.query({query:R4,variables:{contactIds:l}}):void 0,u=J4({columns:i.columns,rows:i.rows,cellMetadata:o},c?.data.contactsByIds??[]);!function(e,t){yw(e,t,"text/csv")}(function(e){return`${e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-/,"").replace(/-$/,"")||"table"}.csv`}(n),u)}catch{s("Could not download the table. Please try again.")}finally{l(!1)}},[a,r,e,n,s]);return i.jsx(qe,{tooltip:"Download CSV",placement:"top",children:i.jsx(g4,{size:"sm","aria-label":"Download CSV",onClick:c,disabled:o,children:o?i.jsx(gs,{className:"w-4 h-4 animate-spin"}):i.jsx(ts,{className:"w-4 h-4"})})})},e6=({agentFileId:e,title:n,type:r,query:a=T4})=>{const s=A(),{toastError:o}=v(),[l,c]=t.useState(!1),u=t.useCallback(async()=>{c(!0);try{const{data:t}=await s.query({query:a,variables:{id:e},fetchPolicy:"network-only"}),i=t.agentFile?.text;if("string"!=typeof i)return void o("This file can’t be downloaded.");yw(function(e,t){const n="text"===t?".txt":".md";return e.toLowerCase().endsWith(n)?e:`${e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-/,"").replace(/-$/,"")||"document"}${n}`}(n,r),i,"text/plain")}catch{o("Could not download the file. Please try again.")}finally{c(!1)}},[s,a,e,n,r,o]);return i.jsx(qe,{tooltip:"Download file",placement:"top",children:i.jsx(g4,{size:"sm","aria-label":"Download file",onClick:u,disabled:l,children:l?i.jsx(gs,{className:"w-4 h-4 animate-spin"}):i.jsx(ts,{className:"w-4 h-4"})})})},t6=t.createContext(!1),n6=({children:e})=>i.jsx(t6.Provider,{value:!0,children:e}),r6=()=>t.useContext(t6),a6="Analyzing your request",i6="You can attach up to 5 files at a time.";function s6(e,t){const n=e.agentFileId?t.get(e.agentFileId):void 0,{content:r,attachments:a}="user"===e.role?function(e){const t=[];let n=e;for(;;){const e=/(?:\n\n)?\[Attached file: ([^\]]+)\]\s*$/.exec(n);if(!e)break;t.unshift(e[1].trim()),n=n.slice(0,e.index)}return 0===t.length?{content:e}:{content:n,attachments:t.map(e=>({filename:e}))}}(e.content):{content:e.content,attachments:void 0};let i;if("tool_call"===e.kind&&Array.isArray(e.toolCalls)&&e.toolCalls.length>0){const t=e.toolCalls[0];t&&"object"==typeof t&&"string"==typeof t.name&&(i={id:e.id,name:t.name,summary:t.summary??t.name,args:t.args??"",result:t.result??"",isError:t.isError??!1,..."string"==typeof t.task&&{task:t.task},..."number"==typeof t.durationMs&&{durationMs:t.durationMs},..."boolean"==typeof t.unlocked&&{unlocked:t.unlocked},...(s=t.outcome,"object"==typeof s&&null!==s&&"number"==typeof s.ready&&"number"==typeof s.creditsSpent&&{outcome:t.outcome})})}var s;return{id:e.id,role:e.role,content:r,kind:e.kind,createdAt:e.createdAt,...n&&{artifact:n},...a&&a.length>0&&{attachments:a},...i&&{toolCall:i},...e.thinking&&e.thinking.length>0&&{thinking:e.thinking}}}function o6(e){if(!e)return"";const t=Vn(e);if(!t.isValid())return"";const n=Vn().startOf("day");return t.isSame(n,"day")?"Today":t.isSame(n.subtract(1,"day"),"day")?"Yesterday":t.isAfter(n.subtract(7,"day"))?t.format("dddd"):t.format("MMM D, YYYY")}function l6(e){return e.reduce((e,t)=>
1556{const n=e[e.length-1],r=n?.messages[n.messages.length-1];var a,i;return n&&(a=r?.createdAt,!(i=t.createdAt)||a&&Vn(a).isSame(Vn(i),"day"))?n.messages.push(t):e.push({key:t.id,label:o6(t.createdAt),messages:[t]}),e},[])}function c6(e){return"markdown"===e||"text"===e}function u6(e){const t=e.toLowerCase();return t.endsWith(".md")?"markdown":t.endsWith(".txt")?"text":"table"}function d6(e){if("markdown"===e.type||"text"===e.type)return{id:e.id,type:e.type,title:e.title||"Document",count:0,totalCount:0,agentFileId:e.id,createdAt:e.createdAt??null,isUpload:e.isUpload??!1};const t=function(e){return"table"===e.type?{id:e.id,type:"table",title:e.title??null,rowCount:e.rowCount??null,kind:e.kind??null,createdAt:e.createdAt??null,isUpload:e.isUpload??!1}:null}(e);return t?function(e){const t=e.rowCount??0;return{id:e.id,type:e.type,title:e.title||"Table",count:Math.min(t,10),totalCount:t,agentFileId:e.id,kind:e.kind??null,createdAt:e.createdAt??null,isUpload:e.isUpload??!1}}(t):null}const p6=e=>{return{id:"__greeting__",role:"assistant",content:(t=e?.trim()?` ${e.trim()}`:"",`Hi${t} — I'm Reve, your new teammate. Point me at the accounts you want to win and what you're after, and I'll do the legwork: dig into each one, find the right person, and write an email grounded in what's actually happening there. Every draft comes to you before it sends, and you can redirect me any time — just talk to me like you would anyone on your team. What should I take on first?`),kind:"message"};var t},h6=(e,t)=>({id:`${t?.isLoading?"loading":"msg"}-${Date.now()}`,role:"assistant",content:e,createdAt:(new Date).toISOString(),...t?.isLoading&&{isLoading:!0,stepStartedAt:Date.now()}});const m6=(e,t)=>({id:`user-${Date.now()}`,role:"user",content:e,createdAt:(new Date).toISOString(),...t&&t.length>0?{attachments:t}:{}}),f6={icon:Li,bg:"bg-blue-50",fg:"text-blue-600"},g6={icon:Ws,bg:"bg-green-50",fg:"text-green-600"},y6={icon:qs,bg:"bg-gray-100",fg:"text-gray-600"},x6={icon:is,bg:"bg-violet-50",fg:"text-violet-600"};const b6=e=>{if(!e)return{style:f6};if("markdown"===e.type||"text"===e.type)return{style:x6,subtitle:"Document"};var t;return{style:"contacts"===(t=e.kind)?g6:"companies"===t?f6:y6,subtitle:e.totalCount>0?`${e.count} of ${e.totalCount} results shown`:"Click to view results"}},v6=/@\[([^\]\n]+)\]\(file:([^)\s]+)\)/g;function w6(e,t){if(0===t.length||!e.includes("@"))return e?[{kind:"text",text:e}]:[];const n=[...t].sort((e,t)=>t.title.length-e.title.length),r=e.toLowerCase(),a=[];let i=0,s=e.indexOf("@");for(;-1!==s;){const t=s,o=n.find(e=>r.startsWith(e.title.toLowerCase(),t+1));o?(t>i&&a.push({kind:"text",text:e.slice(i,t)}),a.push({kind:"mention",artifact:o}),i=t+1+o.title.length,s=e.indexOf("@",i)):s=e.indexOf("@",t+1)}return i<e.length&&a.push({kind:"text",text:e.slice(i)}),a}function j6(e,t){const n=new Map(t.map(e=>[e.id,e])),r=[];let a=0;v6.lastIndex=0;let i=v6.exec(e);for(;null!==i;){const[s,o,l]=i;r.push(...w6(e.slice(a,i.index),t));const c=n.get(l);r.push(c?{kind:"mention",artifact:c}:{kind:"text",text:`@${o}`}),a=i.index+s.length,i=v6.exec(e)}return r.push(...w6(e.slice(a),t)),r.length>0?r:[{kind:"text",text:e}]}const C6="_row_id";function N6(e){const n=A(),[r]=NC(),{toastError:a,toastInfo:i}=v(),s=t.useRef(e);return s.current=e,t.useCallback(async(e,t)=>{let o=!1;try{const n=await r({variables:{contactIds:[e],trigger:t}});o=n.data?.unlockContacts?.success??!1,o||i(n.data?.unlockContacts?.message||"Failed to unlock contact")}catch{return a("Failed to unlock contact"),!1}const l=s.current?.refetchQueries??[];return n.refetchQueries({include:[Vv,...l]}).catch(()=>{}),o},[r,n,a,i])}const k6="sticky bg-inherit",S6="!border-r-2 !border-r-gray-200";const E6=i.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-gray-100 text-gray-400",children:"Pending"}),A6=({direction:e})=>i.jsxs("span",{className:"ml-1 inline-block w-3 text-gray-400",children:["asc"===e&&"↑","desc"===e&&"↓",!e&&"↕"]}),O6=({checked:e,indeterminate:t,onChange:r,className:a})=>{const s=n.useRef(null);return n.useEffect(()=>{s.current&&(s.current.indeterminate=t)}
1556,[t]),i.jsx("input",{ref:s,type:"checkbox",checked:e,onChange:r,className:a})};function _6({columns:e,rows:n,getRowKey:r,selectedKeys:a,onSelectionChange:o,sort:l,onSortChange:c,toolbar:u,pendingRows:d=[],showRowNumbers:p=!0,resizableColumns:h=!1,className:m,onLoadMore:f,loadingMore:g=!1}){const y=!!o,x=n.map(r),b=y&&x.length>0&&x.every(e=>a?.has(e)),v=y&&!b&&x.some(e=>a?.has(e)),[w,j]=t.useState({}),C=t.useMemo(()=>e.filter(e=>e.sticky).map(e=>e.key),[e]),N=t.useRef({}),[k,S]=t.useState({});t.useEffect(()=>{if(0===C.length)return;const e=()=>{let e=0;const t={};C.forEach(n=>{t[n]=e,e+=N.current[n]?.offsetWidth??0}),S(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}(e,t)?e:t)};e();const t=new ResizeObserver(e);return C.forEach(e=>{const n=N.current[e];n&&t.observe(n)}),()=>t.disconnect()},[C,w]);const E=C[C.length-1],A=p||y,O=t.useRef(null),_=t.useCallback((t,n)=>{n.preventDefault();const r=n.target.closest("th"),a=r?.offsetWidth??w[t]??150;O.current={key:t,startX:n.clientX,startWidth:a};const i=t=>{if(!O.current)return;const n=t.clientX-O.current.startX,r=e.find(e=>e.key===O.current.key)?.minWidth??60,a=Math.max(r,O.current.startWidth+n);j(e=>({...e,[O.current.key]:a}))},s=()=>{O.current=null,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",s)},[w,e]);return i.jsxs("div",{className:s("bg-white","flex flex-col",m),children:[u&&i.jsx("div",{className:"flex-shrink-0 px-3 py-2 bg-gray-50 border-b border-gray-200",children:u}),i.jsx("div",{className:"overflow-auto flex-1",children:i.jsxs("table",{className:"w-full text-sm border-separate border-spacing-0",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-gray-50 text-left text-xs whitespace-nowrap",children:[A&&i.jsx("th",{className:"px-3 py-2 w-8 border-r border-gray-200 text-center","aria-label":y?"Select all":"Row number",children:y&&i.jsx(O6,{checked:b,indeterminate:v,onChange:()=>{o&&o(b?new Set:new Set(x))},className:"w-4 h-4 rounded border-gray-300 text-gray-900 !ring-offset-0 focus:!ring-offset-0 focus:ring-0"})}),e.map((t,n)=>{const r=w[t.key]??t.width,a=l?.key===t.key,o=n===e.length-1;return i.jsxs("th",{ref:e=>
1556{t.sticky&&(N.current[t.key]=e)},className:s("px-3 py-2 font-medium text-gray-500 relative",!o&&"border-r border-gray-200",t.sticky&&k6,t.key===E&&S6,t.sticky&&"z-20"),style:{...r?{width:r,minWidth:r}:{},...t.sticky?{left:k[t.key]??0}:{}},children:[t.sortable?i.jsxs("button",{type:"button",onClick:()=>(e=>{if(!e.sortable||!c)return;const t=l?.key===e.key&&"asc"===l.direction?"desc":"asc";c({key:e.key,direction:t})})(t),className:"inline-flex items-center cursor-pointer select-none",children:[t.header,i.jsx(A6,{direction:a?l.direction:void 0})]}):i.jsx("span",{className:"inline-flex items-center",children:t.header}),t.description&&i.jsx("p",{className:"text-[10px] font-normal text-gray-400 whitespace-normal leading-tight mt-0.5",children:t.description}),h&&i.jsx("button",{type:"button","aria-label":`Resize ${t.header} column`,tabIndex:-1,className:s("absolute right-0 top-0 bottom-0 w-1","cursor-col-resize hover:bg-blue-400","appearance-none bg-transparent border-0 p-0"),onMouseDown:e=>_(t.key,e)})]},t.key)})]})}),i.jsxs("tbody",{children:[n.map((t,l)=>{const c=r(t),u=a?.has(c),d=l===n.length-1;return i.jsxs("tr",{className:s("group whitespace-nowrap",u?"bg-blue-50":"bg-white hover:bg-gray-50"),children:[A&&i.jsx("td",{className:s("px-3 py-2 text-gray-400 text-xs border-r border-gray-200 w-8 text-center",!d&&"border-b"),children:y?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:s("group-hover:hidden",u&&"hidden"),children:p?l+1:""}),i.jsx("input",{type:"checkbox",checked:u??!1,onChange:()=>(e=>{if(!o||!a)return;const t=new Set(a);t.has(e)?t.delete(e):t.add(e),o(t)})(c),className:s("w-4 h-4 rounded border-gray-300 text-gray-900 !ring-offset-0 focus:!ring-offset-0 focus:ring-0","hidden group-hover:inline-block",u&&"!inline-block")})]}):l+1}),e.map((n,r)=>i.jsx("td",{className:s("px-3 py-2",n.alignTop&&"align-top",r!==e.length-1&&"border-r border-gray-200",!d&&"border-b border-gray-200",n.sticky&&k6,n.key===E&&S6,n.sticky&&"z-10"),style:n.sticky?{left:k[n.key]??0}:void 0,children:n.maxWidth?i.jsx("div",{style:{maxWidth:n.maxWidth},children:n.renderCell(t,l)}):n.renderCell(t,l)},n.key))]},c)}),d.map((t,r)=>i.jsxs("tr",{className:"whitespace-nowrap bg-amber-50/40",children:[(p||y)&&i.jsx("td",{className:"px-3 py-2 text-gray-300 text-xs border border-gray-200 text-center",children:p?n.length+r+1:""}),e.map(e=>i.jsx("td",{className:"px-3 py-2 border border-gray-200",children:t.cells[e.key]??E6},e.key))]},`pending-${String(r)}`))]})]})}),f&&i.jsx("div",{className:"flex-shrink-0 border-t border-gray-200 py-2 text-center",children:i.jsx("button",{type:"button",onClick:f,disabled:g,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:text-gray-400 disabled:no-underline",children:g?"Loading...":"Load more"})})]})}const P6={positive:"bg-shamrock-100 text-shamrock-700",amber:"bg-amber-100 text-amber-700",neutral:"bg-hoki-100 text-hoki-500",info:"bg-azura-blue-100 text-azura-blue-700"};function I6({prompt:e,model:t}){const{toastSuccess:n,toastError:r}=v();return i.jsxs("div",{className:"mt-2 pt-2 border-t border-white/20",children:[i.jsx("p",{className:"text-[10px] italic text-white/60",children:"(Visible to Cromatic staff only)"}),t&&i.jsxs("p",{className:"mt-1 text-[10px] text-white/70",children:["Judge model:"," ",t]}),i.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[i.jsxs("p",{className:"text-[10px] font-medium text-white/70",children:["Prompt"," ",i.jsx("span",{className:"font-normal text-white/50",children:"(scroll for the rest)"})]}),i.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>n("Prompt copied to clipboard")).catch(()=>r("Failed to copy prompt"))},className:"rounded border border-white/25 px-1.5 py-0.5 text-[10px] text-white/80 hover:bg-white/10",children:"Copy"})]}),i.jsx("pre",{className:"mt-0.5 max-h-80 overflow-auto overscroll-contain rounded border border-white/20 bg-black/20 p-1.5 whitespace-pre text-[10px] leading-tight text-white/80",children:e})]})}const M6=({label:e,tone:t,reason:n,prompt:r,model:a,url:o})=>{const l=s("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",P6[t]??P6.neutral),c=o?i.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:s(l,"hover:underline"),children:e}):i.jsx("span",{className:l,children:e});
1556return n||r?i.jsx(qe,{placement:"top",interactive:!0,className:"z-50",tooltip:i.jsxs("div",{className:s("text-xs select-text",r?"w-[28rem]":"max-w-xs"),children:[n,r&&i.jsx(I6,{prompt:r,model:a})]}),children:c}):c},T6=u`
1557  query BigBrainUser {
1558    user {
1559      id
1560      email
1561    }
1562  }
1563`,R6=e=>d(T6,{skip:e?.skip}),L6=u`
1564  query GetCompanyProfile(
1565    $slug: String!
1566    $includeFundingHistory: Boolean!
1567    $includeFundingSources: Boolean!
1568  ) {
1569    companyProfile(slug: $slug) {
1570      id
1571      slug
1572      name
1573      display_name
1574      isDoNotContact
1575      brief_description
1576      logo_url
1577      website_url
1578      linkedin_url
1579      funding_stage
1580      employee_count_range
1581      development_stages
1582      service_provider_clinical_phases
1583      therapeutic_areas
1584      treatment_modalities
1585      target_classes
1586      therapeutic_sub_types
1587      platform_business_models
1588      platform_technologies
1589      clinical_uses
1590      medtech_product_categories
1591      medtech_regulatory_statuses
1592      medtech_target_care_settings
1593      medtech_technology_types
1594      diagnostics_sample_types
1595      diagnostics_types
1596      diagnostics_regulatory_statuses
1597      service_provider_types
1598      service_categories
1599      types
1600      classification {
1601        reasoning
1602        confidence_level
1603        secondary_types
1604        classifier_version
1605        classifier_model
1606        classified_at
1607        source
1608        evidence_urls
1609      }
1610      year_founded
1611      ownership
1612      locations {
1613        id
1614        city
1615        state
1616        country
1617        street_address
1618        postal_code
1619        is_hq
1620      }
1621      num_contacts
1622      signalCount
1623      availableContactCount
1624      hasContactInCampaign
1625      inCrm
1626      crmContactCount
1627      crmUrl
1628      pipeline_extraction_status
1629      pipelines {
1630        id
1631        interventionName
1632        interventionType
1633        treatmentModality
1634        interventionDescription
1635        alternativeNames
1636        targetClass
1637        target
1638        territory
1639        clinicalStage
1640        indication
1641        therapeuticArea
1642        trials {
1643          nctId
1644          trialStatus
1645        }
1646        partners {
1647          name
1648          displayName
1649          slug
1650        }
1651        dosingMethod
1652        formulation
1653        deviceClass
1654        regulatoryPathway
1655      }
1656      tagging {
1657        companyType
1658        reasoning
1659        evidenceUrls
1660        taggerVersion
1661        taggerModel
1662        taggedAt
1663      }
1664      fieldTags {
1665        fieldKey
1666        companyType
1667        rawTags
1668        mappedValues
1669        mappingReasoning
1670      }
1671      lifecycle {
1672        isActive
1673        status
1674        summary
1675        acquiredBy {
1676          id
1677          name
1678          displayName
1679          slug
1680          websiteUrl
1681          relationshipType
1682          isAbsorbed
1683        }
1684        acquisitions {
1685          id
1686          name
1687          displayName
1688          slug
1689          websiteUrl
1690          relationshipType
1691          isAbsorbed
1692        }
1693      }
1694      funding_history @include(if: $includeFundingHistory) {
1695        id
1696        round_type
1697        announced_date
1698        amount_raised
1699        amount_raised_currency
1700        financing_type
1701        investors {
1702          id
1703          investor_name
1704          investor_role
1705        }
1706        source_urls @include(if: $includeFundingSources)
1707      }
1708    }
1709  }
1710`,D6="pending",F6="in_progress";function q6(e){return e===D6||e===F6}const B6=e=>{const t=!1,{data:n,loading:r}=R6({skip:!0}),a=n?.user?.id,i=!!a&&"".split(",").map(e=>e.trim()).includes(a),{data:s,loading:o,error:l,refetch:c}=d(L6,{variables:{slug:e,includeFundingHistory:t,includeFundingSources:t},skip:!e});return{profile:s?.companyProfile??null,loading:o,error:l,refetch:c,canSeeFundingSources:i,isFundingSourceAccessResolved:!0}},U6={sm:{container:"w-6 h-6",icon:"w-3 h-3",fallbackBg:"bg-gray-100",fallbackIcon:"text-gray-400"},md:{container:"w-10 h-10",icon:"w-5 h-5",fallbackBg:"bg-lima-100",fallbackIcon:"text-lima-700"}},z6=({logoUrl:e,name:n,size:r="sm"})=>{const[a,s]=t.useState(!1),o=U6[r];return t.useEffect(()=>{s(!1)},[e]),!e||a?i.jsx("div",{className:`${o.container} rounded ${o.fallbackBg} flex items-center justify-center flex-shrink-0`,children:i.jsx(Li,{className:`${o.icon} ${o.fallbackIcon}`})}):i.jsx("img",{src:e,alt:n?`${n} logo`:"",className:`${o.container} rounded object-cover flex-shrink-0`,onError:()=>s(!0)})},H6=e=>[e.city,e.state,e.country].map(e=>(e??"").toLowerCase().trim()).join("::"),V6=e=>{const t=new Map;
1710return e.forEach(e=>{const n=H6(e),r=t.get(n);r?e.is_hq&&!r.is_hq&&t.set(n,{...r,is_hq:!0}):t.set(n,e)}),[...t.values()]};var $6=(e=>(e.FundingStages="fundingStages",e.EventTypes="eventTypes",e.CompanySize="companySize",e.DevelopmentStages="developmentStages",e.TherapeuticAreas="therapeuticAreas",e.TreatmentModalities="treatmentModalities",e.TargetClasses="targetClasses",e.TherapeuticSubTypes="therapeuticSubTypes",e.PlatformTechnologies="platformTechnologies",e.PlatformBusinessModels="platformBusinessModels",e.ClinicalUses="clinicalUses",e.MedtechProductCategories="medtechProductCategories",e.MedtechTargetCareSettings="medtechTargetCareSettings",e.MedtechRegulatoryStatuses="medtechRegulatoryStatuses",e.MedtechTechnologyTypes="medtechTechnologyTypes",e.DiagnosticsTypes="diagnosticsTypes",e.DiagnosticsRegulatoryStatuses="diagnosticsRegulatoryStatuses",e.DiagnosticsSampleTypes="diagnosticsSampleTypes",e.ServiceProviderTypes="serviceProviderTypes",e.ServiceCategories="serviceCategories",e.ServiceProviderClinicalPhases="serviceProviderClinicalPhases",e.CompanyTypeCategories="companyTypeCategories",e.DevelopmentStagesExcluded="developmentStagesExcluded",e.TherapeuticAreasExcluded="therapeuticAreasExcluded",e.TreatmentModalitiesExcluded="treatmentModalitiesExcluded",e.TargetClassesExcluded="targetClassesExcluded",e.TherapeuticSubTypesExcluded="therapeuticSubTypesExcluded",e.PlatformTechnologiesExcluded="platformTechnologiesExcluded",e.PlatformBusinessModelsExcluded="platformBusinessModelsExcluded",e.ClinicalUsesExcluded="clinicalUsesExcluded",e.MedtechProductCategoriesExcluded="medtechProductCategoriesExcluded",e.MedtechTargetCareSettingsExcluded="medtechTargetCareSettingsExcluded",e.MedtechRegulatoryStatusesExcluded="medtechRegulatoryStatusesExcluded",e.MedtechTechnologyTypesExcluded="medtechTechnologyTypesExcluded",e.DiagnosticsTypesExcluded="diagnosticsTypesExcluded",e.DiagnosticsSampleTypesExcluded="diagnosticsSampleTypesExcluded",e.DiagnosticsRegulatoryStatusesExcluded="diagnosticsRegulatoryStatusesExcluded",e.ServiceProviderTypesExcluded="serviceProviderTypesExcluded",e.ServiceCategoriesExcluded="serviceCategoriesExcluded",e.ServiceProviderClinicalPhasesExcluded="serviceProviderClinicalPhasesExcluded",e))($6||{});const W6=["funding","clinical","hiring","layoffs","partnership","regulatory","pipeline","mergers_and_acquisitions","news","sec_filing"],Q6=["Therapeutic","Vendor","Platform","Medtech","Diagnostics"],Z6=e=>0===e.contactCount&&!(e.inCrm&&e.crmContactCount>0)&&0===e.availableContactCount,K6=e=>!(!e||0===e.length)&&e.some(e=>{const t=e.toLowerCase();return Q6.some(e=>t.includes(e.toLowerCase()))}),G6={"Novel Therapeutic":"Develops its own proprietary pipeline of novel drug candidates - the IP is the drug itself.","Commercial/Specialty Pharma":"Markets approved or in-licensed drugs rather than discovering novel ones.","Generic/Biosimilar Pharma":"Produces off-patent equivalents - generic small molecules or biosimilars."};var Y6=(e=>(e.Medtech="medtech",e.Diagnostics="diagnostics",e.Therapeutics="therapeutics",e.Platform="platform",e.ServiceProvider="service_provider",e.Academic="academic",e))(Y6||{});const J6=[{label:"Therapeutics",value:"therapeutics",tooltip:"Biotech or pharma companies that develop their own therapeutic products (IP is the drug candidate itself, advancing through discovery → preclinical → clinical → commercialization)"},{label:"Platform",value:"platform",tooltip:"Companies that develop in-house, reusable, and scalable technologies for drug discovery and apply them internally or license the resulting capabilities externally"},{label:"Medtech",value:"medtech",tooltip:"Companies that develop medical devices or technological solutions used in diagnosis, monitoring, or treatment of patients"},{label:"Diagnostics",value:"diagnostics",tooltip:"Companies that develop biologically based tests or assays to detect, identify, or measure diseases or biomarkers, without providing treatment"},{label:"Service Provider",value:"service_provider",tooltip:"Companies that provide services or products to other life sciences companies, such as CROs, CDMOs, CMOs, testing services, raw material reagents, consumables, laboratory instruments, pharma equipment, or distributors"},{label:"Academic",value:"academic",tooltip:"Academic institutions"}];var X6=(e=>(e.TherapeuticAreas="therapeuticAreas",e.TreatmentModalities="treatmentModalities",e.TargetClasses="targetClasses",e.TherapeuticSubTypes="therapeuticSubTypes",e.PlatformTechnologies="platformTechnologies",e.PlatformBusinessModels="platformBusinessModels",e.ClinicalUses="clinicalUses",e.MedtechProductCategories="medtechProductCategories",e.MedtechTargetCareSettings="medtechTargetCareSettings",e.MedtechRegulatoryStatuses="medtechRegulatoryStatuses",e.MedtechTe
1710chnologyTypes="medtechTechnologyTypes",e.DiagnosticsTypes="diagnosticsTypes",e.DiagnosticsRegulatoryStatuses="diagnosticsRegulatoryStatuses",e.DiagnosticsSampleTypes="diagnosticsSampleTypes",e.DevelopmentStages="developmentStages",e.ServiceProviderTypes="serviceProviderTypes",e.ServiceCategories="serviceCategories",e.ServiceProviderClinicalPhases="serviceProviderClinicalPhases",e))(X6||{});const e7={therapeuticAreas:{label:"Therapeutic Areas",icon:Ss,fieldKey:"therapeuticAreas"},treatmentModalities:{label:"Modalities",icon:Ji,fieldKey:"treatmentModalities"},targetClasses:{label:"Target Classes",icon:Bs,fieldKey:"targetClasses"},therapeuticSubTypes:{label:"Business Category",icon:Gi,fieldKey:"therapeuticSubTypes"},platformTechnologies:{label:"Platform Technologies",icon:Gi,fieldKey:"platformTechnologies"},platformBusinessModels:{label:"Business Models",icon:Li,fieldKey:"businessModels"},medtechProductCategories:{label:"Product Categories",icon:Ti,fieldKey:"productCategories"},clinicalUses:{label:"Clinical Uses",icon:ws,fieldKey:"clinicalUses"},medtechTargetCareSettings:{label:"Target Care Settings",icon:Li,fieldKey:"targetCareSettings"},medtechRegulatoryStatuses:{label:"Regulatory Statuses",icon:Ls,fieldKey:"regulatoryStatuses"},medtechTechnologyTypes:{label:"Technology Types",icon:Gi,fieldKey:"technologyTypes"},diagnosticsTypes:{label:"Diagnostics Types",icon:Gi,fieldKey:"diagnosticTypes"},diagnosticsRegulatoryStatuses:{label:"Regulatory Statuses",icon:Ls,fieldKey:"regulatoryStatuses"},diagnosticsSampleTypes:{label:"Sample Types",icon:ls,fieldKey:"sampleTypes"},developmentStages:{label:"Development Stages",icon:ls,fieldKey:"developmentStages"},serviceProviderTypes:{label:"Service Provider Type",icon:Li,fieldKey:"serviceProviderTypes"},serviceCategories:{label:"Service Categories",icon:Gi,fieldKey:"serviceCategories"},serviceProviderClinicalPhases:{label:"Clinical Phases",icon:ls,fieldKey:"clinicalPhases"}},t7={therapeutics:["therapeuticAreas","treatmentModalities","targetClasses","therapeuticSubTypes","developmentStages"],platform:["therapeuticAreas","treatmentModalities","targetClasses","developmentStages","platformTechnologies","platformBusinessModels"],medtech:["therapeuticAreas","medtechProductCategories","clinicalUses","medtechTargetCareSettings","medtechRegulatoryStatuses","medtechTechnologyTypes"],diagnostics:["therapeuticAreas","diagnosticsTypes","clinicalUses","diagnosticsSampleTypes","diagnosticsRegulatoryStatuses"],service_provider:["serviceCategories","serviceProviderClinicalPhases"]},n7=["bg-violet-50 text-violet-700","bg-amber-50 text-amber-700","bg-fuchsia-50 text-fuchsia-700"],r7=["bg-gray-100 text-gray-600"],a7=[{title:"Funding Stage",options:["Grant","Angel","Pre-seed","Seed","Series A","Series B","Series C","Series D+","IPO","Venture (Series Unknown)","Private Corporate","Subsidiary / Corporate-Owned","Other"],key:"fundingStages",icon:Wi},{title:"Event Type",options:W6,key:"eventTypes",icon:Ii},{title:"Company Size",options:["1-10","11-50","51-200","201-500","501-1,000","1,001-5,000","5,001-10,000","10,000+"],key:"companySize",icon:Ws}],i7=[{title:"Business Category",options:["Novel Therapeutic","Commercial/Specialty Pharma","Generic/Biosimilar Pharma"],key:"therapeuticSubTypes",icon:Gi,categories:["therapeutics"]},{title:"Therapeutic Area",options:["Oncology","Neuro/Neuropathic","Cardiovascular","Immunology","Metabolic","Infectious Disease","Rare Disease","Ophthalmology","Respiratory","Dermatology","Gastroenterology","Hematology","Musculoskeletal","Endocrinology","Longevity","Regenerative","Other"],key:"therapeuticAreas",icon:Ss,categories:["therapeutics","platform","medtech","diagnostics"]},{title:"Development Stage",options:["Discovery","Preclinical","IND-enabling","Phase I","Phase II","Phase III","Phase IV","Commercial"],key:"developmentStages",icon:ls,categories:["therapeutics","platform"]},{title:"Treatment Modality",options:["Small Molecule","Lipid Nano Particles","Biologics > Monoclonal Antibody > Originator mAb","Biologics > Monoclonal Antibody > Biosimilar mAb","Biologics > Nanobodies","Biologics > Bispecific / Multispecific Antibody","Biologics > Fusion Protein","Biologics > Cytokine / Hormone","Biologics > ADC","Biologics > Protein Therapeutic (non-antibodies)","Biologics > Vaccine > Protein-based","Biologics > Vaccine > Viral delivery","Nucleic Acid Therapeutics > RNAi / siRNA","Nucleic Acid Therapeutics > mRNA","Nucleic Acid Therapeutics > ASO (Antisense)","Nucleic Acid Therapeutics > CRISPR / Gene Editing Constructs","Cell & Gene > Cell Therapy > Autologous","Cell & Gene > Cell Therapy > Allogeneic","Cell & Gene > Cell Therapy > T cell","Cell & Gene > Cell Therapy > NK cell","Cell & Gene > Cell Therapy > B cell","Cell & Gene > Gene Therapy > AAV","Cell & Gene > Gene Therapy > Lentiviral","Cell & Gene > Gene Therapy > Other Viral","Cell & Gene > Oncolytic Virus","Protein Degraders > PROTAC","Protein Degraders > Molecular Glue","Emerging Modalities > Peptide Therapeutics","Emerging Modalities > Microbiome Therapeutics","Other"],key:"treatmentModalities",icon:Ji,isHierarchical:!0,categories:["therapeutics","platform"]},{title:"Target Class",options:["GPCR","Kinase","Protease","Ion Channel","Nuclear Receptor","Cytokine Receptor","Neurotransmitter Receptor","Transcription Factor / Signaling Node","Protein-Protein Interaction (PPI)","Epigenetic Regulator","Non-protein Target","DNA","RNA","Viral","Bacterial","Scaffold / Structural Proteins","Undisclosed","Other"],key:"targetClasses",icon:Bs,categories:["therapeutics","platform"]},{title:"Platform Technology",options:["AI / ML / In Silico","Robotics","Cloud Lab","Gene Editing","Delivery Methods","High-Throughput Screening","Other"],key:"platformTechnologies",icon:Gi,categories:["platform"]},{title:"Business Model",options:["Pipeline","Partnership","Software-as-a-Service / Software Tooling","Lab-as-a-Service","Other"],key:"platformBusinessModels",icon:Li,categories:["platform"]},{title:"Product Category",options:["Medical Device","Surgical Tool","Implant","Wearable","Digital Therapeutic","Imaging Hardware","Robotics","Other"],key:"medtechProductCategories",icon:Ti,categories:["medtech"]},{title:"Diagnostics Type",options:["Molecular","Genomic","Proteomic","Imaging","Point-of-Care","Liquid Biopsy","Companion Diagnostic","Other"],key:"diagnosticsTypes",icon:Gi,categories:["diagnostics"]},{title:"Clinical Use",options:["Diagnostic","Therapeutic","Monitoring","Preventive","Assistive","Screening","Prognosis","Treatment Selection","Other"],key:"clinicalUses",
1710icon:ws,categories:["medtech","diagnostics"]},{title:"Target Care Setting",options:["Hospital","Outpatient","Home","Ambulatory Surgery Center","Other"],key:"medtechTargetCareSettings",icon:Li,categories:["medtech"]},{title:"Regulatory Status",options:["R&D","FDA Cleared (510k)","FDA Approved (PMA)","CE Marked","Other"],key:"medtechRegulatoryStatuses",icon:Ls,categories:["medtech"]},{title:"Technology Type",options:["Software","Hardware","AI-enabled","IoT","Other"],key:"medtechTechnologyTypes",icon:Gi,categories:["medtech"]},{title:"Sample Type",options:["Blood","Tissue","Saliva","Urine","Stool","Other"],key:"diagnosticsSampleTypes",icon:ls,categories:["diagnostics"]},{title:"Regulatory Status",options:["RUO","LDT","FDA Cleared","FDA Approved","Other"],key:"diagnosticsRegulatoryStatuses",icon:Ls,categories:["diagnostics"]},{title:"Service Provider Type",options:["CRO","CDMO","CMO","Testing","Raw Material Reagents","Consumables","Laboratory Instruments","Pharma Equipment","Distributor"],key:"serviceProviderTypes",icon:Gi,categories:["service_provider"]},{title:"Clinical Phase",options:["Discovery","Preclinical","Clinical","Commercial"],key:"serviceProviderClinicalPhases",icon:ls,categories:["service_provider"]},{title:"Service Category",options:["Active Pharmaceutical Ingredients (API) Manufacturing","ADME (Absorption, Distribution, Metabolism, and Excretion) Profiling","Agricultural & Agrochemical","Analytical & Bioanalytical","Antibody","Bioinformatics","Biologics","Biomarker Discovery & Validation","Biophysical Assays","Biorepository & Cryopreservation","Cardiovascular","Cell Biology","Cell Therapy","Chemical Synthesis & Analysis","Clinical Diagnostic","Clinical Trials","Cosmetic","Dermatology","Drug Product Manufacturing","Endocrinology","Environmental Science","Food Safety Testing","Gastroenterology","Gene Therapy","Genomics & Transcriptomics","Hit-to-Lead Discovery","Hematology","Immunology & Inflammation","Industrial Hygiene","Infectious Disease","Lead Optimization","Longevity","Material Science","Materials Testing","Medical Device","Medicinal Chemistry","Metabolic","Microbiology","Molecular Biology","Musculoskeletal","Neuroscience","Nutraceutical","Oncology","Ophthalmology","Pathology","Pharmacodynamics and Pharmacokinetics Studies (PD/PK)","Preclinical Research Models","Pre-Formulation & Formulation Development & Manufacturing","Product Design","Protein Biochemistry","Proteomics & Metabolomics","Quality Control / Quality Assurance","Rare Disease","Regulatory & Packaging","Regenerative","Respiratory","Structural Biology","Synthetic Biology","Target Identification & Validation","Toxicology","Virology","Other"],key:"serviceCategories",icon:Gi,categories:["service_provider"]}],s7={"Active Pharmaceutical Ingredients (API) Manufacturing":"API Manufacturing","ADME (Absorption, Distribution, Metabolism, and Excretion) Profiling":"ADME Profiling","Pharmacodynamics and Pharmacokinetics Studies (PD/PK)":"PD/PK Studies","Pre-Formulation & Formulation Development & Manufacturing":"Pre-Formulation / Formulation"},o7=Object.fromEntries(J6.map(({label:e,value:t})=>[t,e])),l7=({icon:e,label:t,value:n})=>i.jsxs("div",{className:"border border-hoki-200 rounded-lg p-3 flex flex-col gap-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",children:[e,t]}),i.jsx("div",{className:"text-sm font-medium text-hoki-900",children:n})]}),c7=({label:e,value:t})=>i.jsxs("div",{className:"flex-1 px-3 py-3 flex flex-col gap-1 min-w-0",children:[i.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:e}),i.jsx("div",{className:"text-sm font-medium text-hoki-900 truncate",children:t})]}),u7=({profile:e})=>{const t=e.lifecycle?.isActive,n=[];var r;return e.employee_count_range&&n.push({key:"employees",label:"Employees",value:i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Ws,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),e.employee_count_range]})}),e.lifecycle&&n.push({key:"status",label:"Status",value:i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx("span",{"aria-hidden":!0,
1710className:"w-1.5 h-1.5 rounded-full flex-shrink-0 "+(t?"bg-green-500":"bg-gray-400")}),t?"Active":"Inactive"]})}),e.types.length>0&&n.push({key:"type",label:"Type",value:(r=e.types,r.map(e=>o7[e]??e).join(", "))}),0===n.length?null:i.jsx("div",{className:"border border-hoki-200 rounded-lg flex divide-x divide-hoki-200",children:n.map(e=>i.jsx(c7,{label:e.label,value:e.value},e.key))})},d7=({locations:e})=>{const[n,r]=t.useState(!1),a=e.length-1,s=a>0,o=n?e:e.slice(0,1);return i.jsxs("div",{className:"border border-hoki-200 rounded-lg p-3 flex flex-col gap-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",children:[i.jsx(vs,{className:"w-3.5 h-3.5"}),"Locations",i.jsxs("span",{className:"text-hoki-400 normal-case tracking-normal",children:["·"," ",e.length]})]}),s?i.jsxs("button",{type:"button",onClick:()=>r(e=>!e),className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-hoki-700","aria-expanded":n,"aria-label":n?"Collapse locations":"Show all locations",children:[n?null:i.jsxs("span",{children:["+",a," ","more"]}),i.jsx(qi,{className:"w-3.5 h-3.5 transition-transform "+(n?"rotate-180":"")})]}):null]}),i.jsx("div",{className:"flex flex-col gap-1.5 max-h-64 overflow-y-auto",children:o.map(e=>i.jsxs("div",{className:"flex items-center justify-between text-sm",children:[i.jsx("span",{className:"text-hoki-900 truncate",children:e.label}),e.isHq?i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-hoki-700",children:[i.jsx("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-green-500 flex-shrink-0"}),"HQ"]}):null]},e.id))})]})},p7=({href:e,icon:t,label:n})=>i.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-hoki-200 text-sm text-hoki-700 hover:bg-hoki-50 hover:text-hoki-900 transition-colors",children:[t,i.jsx("span",{children:n}),i.jsx(rs,{className:"w-3 h-3 text-hoki-400 flex-shrink-0"})]}),h7=({isOpen:e,onClose:n,profile:r,slug:a,fallbackName:s,fallbackLogoUrl:o})=>{const l=t.useMemo(()=>(e=>e&&0!==e.length?V6(e).map(e=>{const t=[e.city,e.state,e.country].filter(Boolean),n=t.length>0?t.join(", "):"Unknown location";return{id:H6(e),label:n,isHq:e.is_hq}}).sort((e,t)=>Number(t.isHq)-Number(e.isHq)||e.label.localeCompare(t.label)):[])(r.locations),[r.locations]),c=b.CompanyProfile(a),u=r.display_name??s,d=r.logo_url??o;return i.jsx(no,{isOpen:e,onClose:n,icon:i.jsx(z6,{logoUrl:d,name:u,size:"md"}),title:u,hideHeaderBorder:!0,renderFooter:()=>i.jsxs("div",{className:"flex justify-end gap-2 px-6 py-4",children:[i.jsx(ro,{text:"Close",onClick:n,variant:"secondary"}),i.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors",children:"Open Cromatic profile"})]}),children:i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsx(u7,{profile:r}),i.jsxs("section",{className:"flex flex-col gap-1.5",children:[i.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"About"}),i.jsx("p",{className:"text-sm text-hoki-700 leading-relaxed",children:r.brief_description??"No description available."})]}),r.funding_stage?i.jsx(l7,{icon:i.jsx(Wi,{className:"w-3.5 h-3.5"}),label:"Funding",value:r.funding_stage}):null,l.length>0?i.jsx(d7,{locations:l}):null,(r.website_url||r.linkedin_url)&&i.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.website_url&&i.jsx(p7,{href:nr(r.website_url),icon:i.jsx(us,{className:"w-3.5 h-3.5 text-hoki-400"}),label:tr(r.website_url)}),r.linkedin_url&&i.jsx(p7,{href:nr(r.linkedin_url),icon:i.jsx(iC,{className:"w-3.5 h-3.5 text-hoki-400"}),label:"LinkedIn"})]})]})})},m7=({company:e})=>{const[n,r]=t.useState(!1),[a,s]=t.useState(!1),{toastError:o}=v(),{profile:l,loading:c}=B6(n&&e.slug?e.slug:void 0),u=a&&!c&&!!l,d=a&&c;t.useEffect(()=>{!a||c||l||(s(!1),o(`Couldn't load details for ${e.name}.`))}
1710,[a,c,l,e.name,o]);const p=t.useCallback(()=>{e.slug&&r(!0)},[e.slug]),h=t.useCallback(()=>{e.slug&&(r(!0),s(!0))},[e.slug]),m=i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d?i.jsx("div",{className:"flex-shrink-0",children:i.jsx(O,{size:"lg"})}):i.jsx(z6,{logoUrl:e.logoUrl,name:e.name}),i.jsx("span",{className:"truncate",children:e.name})]});return e.slug?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:h,onMouseEnter:p,onFocus:p,className:"text-left hover:text-blue-600 transition-colors max-w-full",children:m}),l?i.jsx(h7,{isOpen:u,onClose:()=>s(!1),profile:l,slug:e.slug,fallbackName:e.name,fallbackLogoUrl:e.logoUrl}):null]}):m},f7=({contact:e,onUnlock:t,isLoading:n=!1})=>{const{toastSuccess:r,toastError:a}=v(),s=e.linkedinUrl?.trim(),o=!n&&s&&/^https?:\/\//i.test(s),l=!(!e.isUnlocked||!e.email),c=e.contactStatus===me.Reachable||e.contactStatus===me.Unlockable,u=!n&&(l||c);return i.jsx("div",{className:"w-full min-w-0",children:i.jsx(HC,{contact:(d=e,{...d,role:d.jobTitle??"",linkedIn:d.linkedinUrl??void 0}),containerClassName:"flex items-center gap-2 min-w-0",isContactUnlocked:t=>(t.isUnlocked??!1)||(e.inCrm??!1),handleLinkedInClick:o?()=>{s&&(e.isUnlocked?window.open(s,"_blank","noopener,noreferrer"):t(e.id,ce.LinkedinClick).then(e=>{e&&s&&window.open(s,"_blank","noopener,noreferrer")}))}:()=>{},handleEmailClick:u?()=>{if(e.isUnlocked&&e.email)return n=e.email,void navigator.clipboard.writeText(n).then(()=>r("Email copied to clipboard")).catch(()=>a("Failed to copy email"));var n;c&&t(e.id,ce.EmailSend)}:void 0,hideAvatar:!0})});var d};function g7(e,t){const n=t?.contactStatus??me.Unlockable;return{id:"string"==typeof e.id?e.id:"",name:"string"==typeof e.name?e.name:"",jobTitle:"string"==typeof e.jobTitle?e.jobTitle:"",city:"string"==typeof e.city?e.city:void 0,state:"string"==typeof e.state?e.state:void 0,country:"string"==typeof e.country?e.country:void 0,email:t?.email??void 0,isUnlocked:t?.isUnlocked??!1,inCrm:!0===e.inCrm,contactStatus:n,linkedinUrl:t?.linkedinUrl??void 0}}const y7=({metadata:e})=>{const{liveContactsById:t,onUnlock:n}=$4(),r="string"==typeof e.id?t.get(e.id):void 0;return i.jsx(f7,{contact:g7(e,r),onUnlock:n,isLoading:void 0===r})};function x7(e){if("object"!=typeof e||null===e)return{description:"",urls:[]};const{description:t,urls:n}=e;return{description:"string"==typeof t?t:"",urls:Array.isArray(n)?n.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(e=>""!==e):[]}}const b7=({value:e,isEmpty:n,citations:r,columnLabel:a,entityName:o})=>{const[l,c]=t.useState(!1),u=n||!e?"—":e;return i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button","aria-label":`Show sources for ${a}`,onClick:()=>c(!0),className:s("inline-flex items-start gap-1 text-left hover:opacity-80 max-w-full"),children:[i.jsx("span",{className:"line-clamp-2 break-words",children:u}),i.jsx("span",{className:"text-gray-400 text-xs flex-shrink-0 mt-0.5",children:"↗"})]}),i.jsx(to,{isOpen:l,onClose:()=>c(!1),children:i.jsx(q4,{columnLabel:a,entityName:o??(e||"—"),body:i.jsx("p",{className:"text-gray-700 leading-relaxed whitespace-pre-line",children:r.description||"No description."}),references:(d=r.urls,d.map(e=>({url:e,title:e}))),onClose:()=>c(!1)})})]});var d};function v7(e){return Boolean(e)&&"object"==typeof e&&"string"==typeof e.label&&"string"==typeof e.value&&e.value.trim().length>0}const w7=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"");const j7=({criteria:e,max:t=4,containerClassName:n="flex flex-wrap gap-1.5 mt-2"})=>{const r=function(e){if(!e||"object"!=typeof e)return[];const{facets:t}=e;return Array.isArray(t)?t.filter(v7):[]}(e).slice(0,t);return 0===r.length?null:i.jsx("div",{className:n,children:r.map(e=>{const t=function(e){const t=e.split(">"),n=t[t.length-1].trim()||e;return n.length>42?`${n.slice(0,41).trimEnd()}…`:n}(e.value),n=!!e.label&&!function(e,t){const n=w7(e),r=w7(t);return!(!n||!r)&&!/^\d+$/.test(t.trim())&&(n.includes(r)||r.includes(n))}(e.label,t),r=i.jsxs(i.Fragment,{children:[n&&i.jsx("span",{className:"text-blue-400 shrink-0",children:e.label}),i.jsx("span",{className:"font-medium text-blue-700 truncate",children:t})]}),a="inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-blue-50 text-xs font-normal max-w-full",s=`${e.label}: ${e.full??e.value}`;return e.url&&/^https?:\/\//.test(e.url)?i.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:`${a} no-underline hover:bg-blue-100`,title:s,onClick:e=>e.stopPropagation(),children:[r,i.jsx(rs,{className:"w-3 h-3 text-blue-400 shrink-0"})]},`${e.label}:${e.value}`):i.jsx("span",{className:a,title:s,children:r},`${e.label}:${e.value}`)})})};function C7(e){if(null==e)return"—";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}
1710function N7(e,t,n){const r="string"==typeof e.label?e.label:C7(t),a="string"==typeof e.tone?e.tone:void 0,s="string"==typeof e.reason?e.reason:void 0,o="string"==typeof e.prompt?e.prompt:void 0,l="string"==typeof e.model?e.model:void 0;return i.jsx(M6,{label:r,tone:a,reason:s,prompt:o,model:l,url:n??void 0})}function k7(e){return{status:"string"==typeof e.status?e.status:"pending",detail:"string"==typeof e.detail?e.detail:"",references:Array.isArray(e.references)?e.references:[]}}const S7="in_crm",E7=["contact","company"];function A7(e,t){const n=e._contact_id;if("string"==typeof n&&n.length>0)return n;const r=t?.contact?.id;return"string"==typeof r?r:void 0}function O7(e,t){const n=e._company_id;if("string"==typeof n&&n.length>0)return n;const r=t?.company?.id;return"string"==typeof r?r:void 0}function _7({message:e}){return i.jsx("span",{className:"text-gray-400 italic",title:e,children:"(error)"})}const P7="fit_reason",I7="matched_criteria",M7="contact",T7="company";function R7(e,t){return e===P7?640:e===I7?420:e===M7?360:e===T7||t?320:void 0}const L7=[M7,T7],D7=[P7,I7];function F7(e,t){return!L7.includes(e)&&(t||D7.includes(e))}function q7({value:e}){const[n,r]=function(e){const n=t.useRef(null),[r,a]=t.useState(!1);return t.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>a(e.scrollHeight>e.clientHeight);t();const r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[e]),[n,r]}(e);return i.jsx(qe,{placement:"top",interactive:!0,className:"z-50",tooltip:r?i.jsx("div",{className:"max-w-md max-h-64 overflow-y-auto text-xs select-text whitespace-pre-wrap break-words",children:e}):void 0,children:i.jsx("span",{ref:n,className:"line-clamp-2 whitespace-normal break-words",children:e})})}const B7=({file:e,onLoadMore:n,loadingMore:r,selectedRows:a,onSelectionChange:s})=>{const o=t.useMemo(()=>e.columns.filter(e=>!e.name.startsWith("_")),[e.columns]),l=t.useMemo(()=>function(e,t){if(!t)return{};const n=e.map(e=>{const n=e[C6];if("string"!=typeof n)return null;const r=t[n];if(!r)return null;const a=Object.entries(r).find(([,e])=>"company"===e.type)?.[0];if(!a)return null;const i=e[a];return"string"==typeof i?[n,i]:null}).filter(e=>null!==e);return Object.fromEntries(n)}(e.rows,e.cellMetadata),[e.rows,e.cellMetadata]),c=t.useMemo(()=>{if(!o.some(e=>e.name===S7))return[];const t=new Set;return e.rows.forEach(n=>{const r=n[C6],a="string"==typeof r?e.cellMetadata?.[r]:void 0;if(!a?.[S7])return;const i=O7(n,a);i&&t.add(i)}),[...t].sort((e,t)=>e.localeCompare(t))},[o,e.rows,e.cellMetadata]),{data:u}=d(L4,{variables:{companyIds:c},skip:0===c.length}),p=t.useMemo(()=>new Map((u?.companyCrmLinks??[]).map(e=>[e.companyId,e.url])),[u]),h=t.useMemo(()=>{const t=o.filter(t=>e.rows.some(e=>{return"string"==typeof(n=e[t.name])&&n.length>60;var n})).map(e=>e.name);return new Set(t)},[o,e.rows]),m=t.useMemo(()=>new Set(E7.filter(e=>o.some(t=>t.name===e))),[o]),f=t.useMemo(()=>o.map(t=>{const n=t.label?.trim()||er(t.name),r=h.has(t.name);return{key:t.name,header:n,description:t.description??void 0,width:t.name===P7?640:void 0,maxWidth:R7(t.name,r),alignTop:F7(t.name,r),sticky:m.has(t.name),renderCell:a=>{const s=a[C6],o="string"==typeof s?s:"",c=o?e.cellMetadata?.[o]:void 0,u=a[t.name],d=c?.[S7];if(t.name===S7&&d){const e=O7(a,c)??"";return N7(d,u,p.get(e))}return"email"===t.name&&Q4(u)?i.jsx(G4,{state:u,contactId:A7(a,c)}):function(e,t,n){if("contact"===t?.type)return i.jsx(y7,{metadata:t});if("company"===t?.type){const n={id:"string"==typeof t.id?t.id:void 0,name:C7(e),slug:"string"==typeof t.slug?t.slug:void 0,logoUrl:"string"==typeof t.logoUrl?t.logoUrl:void 0};return i.jsx(m7,{company:n})}if("criterion"===t?.type)return i.jsx(z4,{criterion:k7(t),criterionLabel:n.columnHeader,entityName:n.entityName});if("facets"===t?.type)return i.jsx(j7,{criteria:t,containerClassName:"flex flex-wrap gap-1 py-1"});if("badge"===t?.type)return N7(t,e);if(void 0!==t?.citations)return i.jsx(b7,{value:C7(e),isEmpty:null==e,citations:x7(t.citations),columnLabel:n.columnHeader,entityName:n.entityName||null});if("string"==typeof t?.error)return i.jsx(_7,{message:t.error});const r=C7(e);return n.isLongText?i.jsx(q7,{value:r}):i.jsx(i.Fragment,{children:r})}(u,c?.[t.name],{entityName:l[o]??"",columnHeader:n,isLongText:r})}}}),[o,e.cellMetadata,l,h,m,p]);return i.jsx(_6,{columns:f,rows:e.rows,getRowKey:e=>e[C6],onLoadMore:n,loadingMore:r,selectedKeys:a,onSelectionChange:s})};const U7=async()=>!1,z7=({agentFileId:e,selectedRows:n,onSelectionChange:r,onSearchSummary:a,onShownCount:s,query:o=T4})=>{const[l,c]=t.useState(10),u=r6(),{data:p,previousData:h,loading:m,error:f}=d(o,{variables:{id:e,limit:l},fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0}),g=p?.agentFile??h?.agentFile??null,y=g?.id===e?g:null,x=t.useMemo(()=>y?function(e){if("table"===e.type&&null!=e.rowCount&&null!=e.columns&&null!=e.rows){const t=e.rows.map((e,t)=>{const n=e[C6];return"string"==typeof n&&n.length>0?e:{...e,[C6]:`__row_${t}`}});return{id:e.id,type:"table",title:e.title,rowCount:e.rowCount,columns:e.columns.map(e=>({name:e.name,label:e.label,description:e.description})),rows:t,cellMetadata:e.cellMetadata??null,searchSummary:e.searchSummary??null}}return null}(y):null,[y]),b=t.useMemo(()=>function(e){if(!e)return[];const t=new Set;
1710return Object.values(e).forEach(e=>{Object.values(e).forEach(e=>{"contact"===e.type&&"string"==typeof e.id&&t.add(e.id)})}),Array.from(t).sort((e,t)=>e.localeCompare(t))}(x?.cellMetadata??null),[x?.cellMetadata]),v="table"===x?.type?x.searchSummary??null:null,w="table"===x?.type?x.rows.length:0;t.useEffect(()=>{a?.(v),s?.(w)},[a,s,v,w]);const{data:j}=d(R4,{variables:{contactIds:b},skip:0===b.length}),C=t.useMemo(()=>new Map((j?.contactsByIds??[]).map(e=>[e.id,{id:e.id,email:e.email??null,isUnlocked:e.isUnlocked,contactStatus:e.contactStatus,linkedinUrl:e.linkedinUrl??null}])),[j]),N=N6({refetchQueries:[R4]}),k=u?U7:N,S=t.useMemo(()=>({liveContactsById:C,onUnlock:k}),[C,k]);if(m&&!y)return i.jsx("div",{className:"p-4 text-sm text-gray-500",children:"Loading…"});if(f||!y)return i.jsx("div",{className:"p-4 text-sm text-red-600",children:"Failed to load file"});if(!x)return i.jsxs("div",{className:"p-4 text-sm text-gray-500",children:["Unsupported file type:"," ",y.type]});if("table"===x.type){const e=x.rows.length<x.rowCount,t=()=>c(e=>e+25);return i.jsx(V4,{value:S,children:i.jsx("div",{className:"flex flex-col min-h-0 flex-1",children:i.jsx(B7,{file:x,onLoadMore:e?t:void 0,loadingMore:m&&e,selectedRows:n,onSelectionChange:r})})})}return null},H7=({text:e})=>i.jsx(Wn,{remarkPlugins:[Qn],components:{h1:({node:e,children:t,className:n,...r})=>i.jsx("h1",{...r,className:s("text-xl font-bold mt-4 mb-2",n),children:t}),h2:({node:e,children:t,className:n,...r})=>i.jsx("h2",{...r,className:s("text-lg font-bold mt-3 mb-2",n),children:t}),h3:({node:e,children:t,className:n,...r})=>i.jsx("h3",{...r,className:s("text-base font-semibold mt-3 mb-1",n),children:t}),h4:({node:e,children:t,className:n,...r})=>i.jsx("h4",{...r,className:s("text-sm font-semibold mt-2 mb-1",n),children:t}),p:({node:e,className:t,...n})=>i.jsx("p",{...n,className:s("mb-2 last:mb-0",t)}),ul:({node:e,className:t,...n})=>i.jsx("ul",{...n,className:s("list-disc pl-5 mb-2",t)}),ol:({node:e,className:t,...n})=>i.jsx("ol",{...n,className:s("list-decimal pl-5 mb-2",t)}),li:({node:e,className:t,...n})=>i.jsx("li",{...n,className:s("mb-0.5",t)}),a:({node:e,children:t,className:n,...r})=>i.jsx("a",{...r,className:s("text-blue-600 hover:text-blue-800 underline",n),target:"_blank",rel:"noopener noreferrer",children:t}),strong:({node:e,className:t,...n})=>i.jsx("strong",{...n,className:s("font-semibold",t)}),code:({node:e,className:t,...n})=>i.jsx("code",{...n,className:s("bg-gray-100 rounded px-1 py-0.5 text-sm font-mono",t)}),hr:({node:e,className:t,...n})=>i.jsx("hr",{...n,className:s("my-3 border-gray-200",t)})},children:e}),V7=({agentFileId:e,query:t=T4})=>{const{data:n,loading:r,error:a}=d(t,{variables:{id:e},fetchPolicy:"cache-and-network"});if(r&&!n?.agentFile)return i.jsxs("div",{className:"flex h-full items-center justify-center text-gray-400",children:[i.jsx(gs,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading…"]});if(a||!n?.agentFile)return i.jsx("div",{className:"p-4 text-sm text-red-600",children:"Failed to load markdown artifact."});const s=n.agentFile,o="string"==typeof s.text&&s.text.length>0?s.text:"_Empty markdown file._";return i.jsx("div",{className:"h-full overflow-y-auto bg-white p-6",children:i.jsx("div",{className:"prose prose-sm max-w-none",children:i.jsx(H7,{text:o})})})},$7=({agentFileId:e,query:t=T4})=>{const{data:n,loading:r,error:a}=d(t,{variables:{id:e},fetchPolicy:"cache-and-network"});if(r&&!n?.agentFile)return i.jsxs("div",{className:"flex h-full items-center justify-center text-gray-400",children:[i.jsx(gs,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading…"]});if(a||!n?.agentFile)return i.jsx("div",{className:"p-4 text-sm text-red-600",children:"Failed to load text file."});const{text:s}=n.agentFile,o="string"!=typeof s||0===s.length;return i.jsx("div",{className:"h-full overflow-auto bg-white p-6",children:o?i.jsx("p",{className:"text-sm italic text-gray-400",children:"Empty file."}):i.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-sm text-gray-800 select-text",children:s})})},W7=({summary:e})=>e?.trim()?i.jsx("div",{className:"pb-3",children:i.jsx("p",{className:"border-l-2 border-gray-200 pl-3 text-xs text-gray-500 whitespace-pre-wrap",children:e})}):null,Q7=({className:e})=>i.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"})}),Z7=({artifact:e,isActive:t,onClick:n,style:r={icon:Q7,bg:"bg-gray-100",fg:"text-gray-600"},subtitle:a=`${e.count} of ${e.totalCount}
1710 shown`})=>{const o=r.icon;return i.jsx("div",{role:"button",tabIndex:0,onClick:()=>{window.getSelection()?.toString()||n()},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n())},className:s("w-full text-left border rounded-lg p-3 transition-all cursor-pointer",t?"border-gray-900 bg-gray-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"),children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i.jsx("div",{className:s("w-8 h-8 rounded flex items-center justify-center flex-shrink-0",r.bg,r.fg),children:i.jsx(o,{className:"w-4 h-4"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[i.jsx("span",{className:"text-sm font-medium text-gray-900 select-text truncate",title:e.title,children:e.title}),i.jsx(Yj,{text:e.title,tooltipContent:"Copy name",className:"flex-shrink-0"})]}),i.jsx("div",{className:"text-xs text-gray-500",children:a})]})]}),i.jsx("div",{className:"text-xs text-gray-400 flex-shrink-0",children:t?"Viewing":"Click to view"})]})})};function K7(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return n>0?`${n}m ${r}s`:`${r}s`}function G7(e){const[n,r]=t.useState(()=>Date.now());if(t.useEffect(()=>{if(void 0===e)return;r(Date.now());const t=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(t)},[e]),void 0===e)return null;const a=n-e;return a<4e3?null:K7(a)}const Y7={"\n":"\\n","\r":"\\r","\t":"\\t"};function J7(e,t){return"\\"===e?'"\\/bfnrtu'.includes(t)?[e+t,2]:["\\\\",1]:[Y7[e]??e,1]}function X7(e){const t=function(e){let t="",n=!1,r=0;for(;r<e.length;){const a=e[r];if(n)if('"'===a)n=!1,t+=a,r+=1;else{const[n,i]=J7(a,e[r+1]);t+=n,r+=i}else t+=a,'"'===a&&(n=!0),r+=1}return t}(e);return[e,t,`${t}"}`,`${t}}`].reduce((e,t)=>{if(void 0!==e)return e;try{return JSON.parse(t)}catch{return}},void 0)}function e9(e){if("string"==typeof e)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}const t9=({isError:e,isRunning:t})=>e?i.jsx(Vi,{className:"w-3 h-3 flex-shrink-0 text-red-500"}):t?i.jsx(gs,{className:"w-3 h-3 flex-shrink-0 animate-spin text-gray-400"}):i.jsx(Qs,{className:"w-3 h-3 flex-shrink-0 text-gray-400"}),n9=({value:e})=>i.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre rounded bg-white/70 p-2 font-mono text-[11px] leading-relaxed text-gray-700 ring-1 ring-gray-100",children:e9(e)});const r9=({name:e,value:t})=>function(e){return null===e||"number"==typeof e||"boolean"==typeof e||"string"==typeof e&&!e.includes("\n")&&e.length<=80}(t)?i.jsxs("div",{className:"flex gap-2 font-mono text-[11px]",children:[i.jsx("span",{className:"text-gray-400",children:e}),i.jsx("span",{className:"break-all text-gray-700",children:e9(t)})]}):i.jsxs("div",{children:[i.jsx("div",{className:"mb-1 font-mono text-[11px] text-gray-400",children:e}),i.jsx(n9,{value:t})]}),a9=({raw:e})=>{const t=X7(e);if("object"==typeof(n=t)&&null!==n&&!Array.isArray(n)){const e=Object.entries(t);if(e.length>0)return i.jsx("div",{className:"space-y-1.5",children:e.map(([e,t])=>i.jsx(r9,{name:e,value:t},e))})}var n;return i.jsx(n9,{value:void 0===t?e:t})},i9=({label:e,text:t})=>i.jsxs("div",{children:[i.jsx("div",{className:"mb-1 font-medium text-gray-500",children:e}),i.jsx(a9,{raw:t})]}),s9=({toolCall:e})=>{const[n,r]=t.useState(!1),a="number"==typeof e.durationMs?K7(e.durationMs):null,s=!e.isError&&""===e.result&&null===a,[o]=t.useState(()=>Date.now()),l=G7(s?o:void 0),c=s?l:a;return i.jsxs("div",{className:"rounded-md border border-gray-100 bg-gray-50 text-xs",children:[i.jsxs("button",{type:"button",onClick:()=>r(e=>!e),className:"flex w-full items-center gap-2 px-3 py-2 text-left",children:[i.jsx(t9,{isError:e.isError,isRunning:s}),i.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[i.jsx("span",{className:"flex-shrink-0 text-gray-700",children:e.summary}),e.task&&i.jsx("span",{className:"truncate text-gray-400",children:e.task})]}),c&&i.jsx("span",{className:"flex-shrink-0 tabular-nums text-gray-400",children:c}),n?i.jsx(qi,{className:"w-3 h-3 flex-shrink-0 text-gray-400"}):i.jsx(Ui,{className:"w-3 h-3 flex-shrink-0 text-gray-400"})]}),n&&i.jsxs("div",{className:"space-y-2 border-t border-gray-100 px-3 py-2",children:[e.args&&i.jsx(i9,{label:"Input",text:e.args}),e.result&&i.jsx(i9,{label:"Output",text:e.result})]})]})},o9=u`
1711  mutation CreateReveJob($input: CreateReveJobInput!) {
1712    createReveJob(input: $input) {
1713      id
1714      name
1715      status
1716      goal
1717      signal_types
1718      target_roles
1719      include_crm_contacts
1720      approval_mode
1721      send_window_days
1722      send_window_start_hour
1723      send_window_end_hour
1724      send_window_tz
1725      per_contact_cooldown_days
1726      daily_send_cap
1727      signal_freshness_days
1728      created_at
1729      updated_at
1730    }
1731  }
1732`;function l9(e){if(!e||"object"!=typeof e)return null;const t=e;return"number"!=typeof t.ready_people?null:{ready_people:t.ready_people,companies:Number(t.companies??0),companies_without_contact:Number(t.companies_without_contact??0),no_email_excluded:Number(t.
1732no_email_excluded??0)}}const c9=(e,t,n)=>`${e} ${1===e?t:n}`;const u9=({children:e})=>i.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.04em] text-hoki-500",children:e});const d9=({toolCall:e})=>{const{addToast:n}=Y.useToasts(),r=m(),[a,s]=t.useState("idle"),[o,{loading:l}]=p(o9,{refetchQueries:["ReveJobsSidebar"]}),c=r6(),u=function(e){if(!e)return null;try{const t=JSON.parse(e);return"string"!=typeof t?.goal?null:{goal:t.goal,display_context:String(t.display_context??""),supporting_context:String(t.supporting_context??""),company_ids:Array.isArray(t.company_ids)?t.company_ids.filter(e=>"string"==typeof e):[],outreach_trigger:"proactive"===t.outreach_trigger?"proactive":"signal",audience:l9(t.audience)}}catch{return null}}(e.result);if(e.isError)return null;if(!u)return i.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-hoki-200 bg-white px-4 py-3 text-[13px] text-hoki-600",children:[i.jsx(gs,{className:"h-3.5 w-3.5 animate-spin text-primary"}),"Preparing the objective…"]});const d=u.audience?function(e){const t=[];if(e.ready_people>0){const n=e.companies-e.companies_without_contact,r=n>0?` across ${c9(n,"company","companies")}`:"";t.push(`${c9(e.ready_people,"person","people")} ready${r} — all emails ready.`)}return e.companies_without_contact>0&&t.push(`${c9(e.companies_without_contact,"company","companies")} with no named contact.`),e.no_email_excluded>0&&t.push(`${c9(e.no_email_excluded,"person","people")} left out — no email found.`),t}(u.audience):null,h=u.display_context,f=new Map,g=function(e){const t=e.split(/\n+/).map(e=>e.trim()).filter(Boolean),n=t.length>1?t:e.split(/(?<=\.)\s+(?=[A-Z(])/).map(e=>e.trim()).filter(Boolean);return n.slice(0,6)}(h).map(e=>{const t=(f.get(e)??0)+1;return f.set(e,t),{key:`${e.slice(0,24)}#${t}`,text:e}});return i.jsxs("div",{className:"overflow-hidden rounded-xl border border-azura-blue-200 bg-white",children:[i.jsxs("div",{className:"flex items-center gap-2 border-b border-azura-blue-100 bg-azura-blue-50 px-4 py-2.5",children:[i.jsx(Mi,{size:15,className:"text-primary"}),i.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.04em] text-primary",children:"New objective"})]}),i.jsxs("div",{className:"px-4 pb-1 pt-4",children:[i.jsx(u9,{children:"The goal"}),i.jsx("div",{className:"mt-1.5 text-[15px] font-semibold leading-snug text-hoki-900",children:u.goal})]}),d&&d.length>0&&i.jsxs("div",{className:"px-4 pb-1 pt-3.5",children:[i.jsx(u9,{children:"Who you'll reach"}),i.jsx("div",{className:"mt-1.5 flex flex-col gap-1 text-[13px] leading-snug text-hoki-800",children:d.map(e=>i.jsx("span",{children:e},e))})]}),g.length>0&&i.jsxs("div",{className:"px-4 pb-1 pt-3.5",children:[i.jsx(u9,{children:"What I'm working with"}),i.jsx("ul",{className:"mt-2 flex flex-col gap-2",children:g.map(e=>i.jsxs("li",{className:"flex items-start gap-2.5 text-[13px] leading-snug text-hoki-800",children:[i.jsx("span",{className:"mt-[7px] h-[5px] w-[5px] flex-shrink-0 rounded-full bg-primary"}),i.jsx("span",{children:e.text})]},e.key))})]}),i.jsxs("div",{className:"border-t border-hoki-100 bg-hoki-50/60 px-4 py-3",children:["started"===a&&i.jsxs("span",{className:"flex items-center gap-1.5 text-[12.5px] font-medium text-shamrock-700",children:[i.jsx(Nn,{size:14,strokeWidth:2.5}),"Started — I'll draft each one for your review."]}),"refining"===a&&i.jsx("span",{className:"text-[12.5px] text-hoki-500",children:"Okay — tell me what to adjust."}),"idle"===a&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mb-2.5 text-[12px] leading-relaxed text-hoki-600",children:"I'll draft an intro for each person and queue them for your review. Nothing sends until you approve. You can steer me any time, in plain language."}),i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i.jsx(En,{variant:"text",color:"hoki",className:"rounded-lg border border-hoki-200 py-1.5 text-[13px] enabled:hover:shadow-none",isDisabled:c,onClick:()=>s("refining"),children:"Keep refining"}),i.jsx(En,{className:"rounded-lg py-1.5 text-[13px] enabled:hover:shadow-none hover:bg-bleu-700",leftElement:i.jsx(Es,{size:12,strokeWidth:2}),isLoading:l,isDisabled:c,onClick:()=>{var e;c||!u||l||"started"===a||(0!==u.company_ids.length?o({variables:{input:(e
1732=u,{name:e.goal.length>80?`${e.goal.slice(0,79)}…`:e.goal,goal:e.goal,supporting_context:e.supporting_context,outreach_trigger:e.outreach_trigger,initial_company_ids:e.company_ids,status:"active"})}}).then(e=>{s("started");const t=e.data?.createReveJob.id;n(t?(e=>i.jsxs("span",{children:["Objective started — Reve is drafting for your review."," ",i.jsx("a",{href:b.ReveJob(e),onClick:t=>{(function(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button})(t)||(t.preventDefault(),r(b.ReveJob(e)))},className:"font-semibold underline underline-offset-2",children:"View objective"})]}))(t):"Objective started — Reve is drafting for your review.",{appearance:"success",autoDismissTimeout:1e4})}).catch(()=>{n("Couldn’t start the objective — please try again.",{appearance:"error"})}):n("I couldn't tell which companies to include from the working list — keep refining so the list is attached.",{appearance:"error"}))},children:l?"Starting…":"Start & review drafts"})]})]})]})]})};function p9(e){return`${e} ${1===e?"credit":"credits"}`}const h9=({label:e,value:t,note:n})=>i.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[i.jsxs("span",{className:"text-hoki-200",children:[e,n&&i.jsx("span",{className:"text-hoki-400",children:` · ${n}`})]}),i.jsx("span",{className:"font-semibold tabular-nums",children:t})]}),m9=({outcome:e,left:t})=>{const n=e.notInDb+e.noEmail;return i.jsxs("div",{className:"flex w-max max-w-[220px] flex-col gap-1 text-[12px] leading-snug",children:[i.jsx(h9,{label:"Ready to reach",value:e.ready}),i.jsx(h9,{label:"Credits spent",value:e.creditsSpent}),e.emptyReveals>0&&i.jsx(h9,{label:"No email found",value:e.emptyReveals,note:"no charge"}),n>0&&i.jsx(h9,{label:"No email, left out",value:n}),i.jsx(h9,{label:`Credits ${t}`,value:e.creditsRemainingToday})]})},f9=({icon:e,label:t,count:n,note:r})=>i.jsxs("li",{className:"flex items-start gap-2.5 text-[13px] leading-snug text-hoki-800",children:[i.jsx("span",{className:"mt-[2px] flex-shrink-0 text-hoki-400",children:e}),i.jsxs("span",{children:[t,": ",i.jsx("span",{className:"font-semibold",children:n}),r&&i.jsx("span",{className:"text-hoki-500",children:` · ${r}`})]})]}),g9=({toolCall:e,onAction:n})=>{const[r,a]=t.useState(null),[s,o]=t.useState(null),l=A(),[c,{loading:u,error:h}]=p(P4,{refetchQueries:[R4,Vv,T4],awaitRefetchQueries:!0}),m=r6(),{data:f}=d(Vv,{skip:m}),g=f?.contactsUnlockInfo.period,y=g?`left ${g}`:"left",x=function(e){try{const t=JSON.parse(e);return Array.isArray(t?.file_ids)?t.file_ids.filter(e=>"string"==typeof e):[]}catch{return[]}}(e.args),b=function(e){try{const t=JSON.parse(e);return"number"==typeof t?.people?t:null}catch{return null}}(e.result);if(e.isError)return null;if(!b)return i.jsx(s9,{toolCall:e});const v=b.needs_unlock&&b.max_credits>b.credits_remaining_today,w=s??e.outcome??null,j=Boolean(s?.success),C=!0===e.unlocked&&b.needs_unlock,N=j||C;return i.jsxs("div",{className:"overflow-hidden rounded-xl border border-azura-blue-200 bg-white",children:[i.jsxs("div",{className:"flex items-center gap-2 border-b border-azura-blue-100 bg-azura-blue-50 px-4 py-2.5",children:[i.jsx(bs,{size:15,className:"text-primary"}),i.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.04em] text-primary",children:"Get emails for your list"})]}),i.jsxs("div",{className:"px-4 pb-1 pt-4",children:[i.jsx("div",{className:"text-[15px] font-semibold leading-snug text-hoki-900",children:`${b.people} ${1===b.people?"person":"people"} on your list`}),i.jsxs("ul",{className:"mt-3 flex flex-col gap-2",children:[b.ready>0&&i.jsx(f9,{icon:i.jsx(Nn,{size:14}),label:"Ready",count:b.ready}),b.locked+b.not_in_db>0&&i.jsx(f9,{icon:i.jsx(xs,{size:14}),label:"Locked in our database",count:b.locked+b.not_in_db,note:`up to ${p9(b.locked+b.not_in_db)}`}),b.no_email>0&&i.jsx(f9,{icon:i.jsx(Sn,{size:14}),label:"No email",count:b.no_email,note:"will be left out, no charge"})]})]}),i.jsxs("div",{className:"mt-3 border-t border-hoki-100 bg-hoki-50/60 px-4 py-3",children:["declined"===r&&i.jsx("span",{className:"text-[12.5px] text-hoki-500",children:"Okay — nothing unlocked. Tell me how you'd like to proceed."}),"narrowing"===r&&i.jsx("span",{className:"text-[12.5px] text-hoki-500",children:`Okay — narrowing the list to what you can unlock ${g??"now"}.`}),!r&&N&&i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsxs("span",{className:"flex items-center gap-1.5 text-[12.5px] font-medium text-shamrock-700",children:[i.jsx(Nn,{size:14,strokeWidth:2.5}),"Emails unlocked."]}),w&&i.jsx(qe,{placement:"top",className:"z-50",tooltip:i.jsx(m9,{outcome:w,left:y}),children:i.jsx("button",{type:"button","aria-label":"Unlock summary",className:"flex text-hoki-400 transition-colors hover:text-hoki-600",children:i.jsx(ms,{size:13})})})]}),!r&&!N&&!b.needs_unlock&&i.jsxs("span",{className:"flex items-center gap-1.5 text-[12.5px] font-medium text-shamrock-700",children:[i.jsx(Nn,{size:14,strokeWidth:2.5}),"Every email is ready — no credits needed."]}),!r&&!N&&b.needs_unlock&&i.jsxs(i.Fragment,{children:[v?i.jsx("div",{className:"mb-2.5 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2",children:i.jsxs("ul",{className:"list-disc space-y-0.5 pl-4 text-[12px] leading-snug text-amber-800 marker:text-amber-500",children:[i.jsx("li",{children:`Needs up to ${p9(b.max_credits)} — you have ${b.credits_remaining_today} left. ${b.reset_info}`}),i.jsx("li",{children:"Unlocking is all-or-nothing, so this list can't be unlocked as it stands."})]})}):i.jsx("p",{className:"mb-2.5 text-[12px] leading-relaxed text-hoki-600",children:`Total: up to ${p9(b.max_credits)} · you have ${b.credits_remaining_today} ${y}. A credit is only spent when an email is actually found.`}),(s||h)&&i.jsx("p",{className:"mb-2.5 text-[12px] leading-relaxed text-bittersweet-700",children:s?.message??"Couldn't unlock those emails"}),i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i.jsx(En,{variant:"text",color:"hoki",className:"rounded-lg border border-hoki-200 py-1.5 text-[13px] enabled:hover:shadow-none",isDisabled:u||m,onClick:()=>{m||(a("declined"),n?.("Not now — don't unlock any emails yet."))},children:"Not now"}),v?i.jsx(En,{className:"rounded-lg py-1.5 text-[13px] enabled:hover:shadow-none hover:bg-bleu-700",leftElement:i.jsx(Ps,{size:12,strokeWidth:2}),isDisabled:m,onClick:()=>{m||(a("narrowing"),n?.(`That's more credits than I have left. Narrow the list to the ${b.credits_remaining_today} I can unlock ${g??"now"} and quote it again.`))},children:"Narrow the list"}):i.jsx(En,{className:"rounded-lg py-1.5 text-[13px] enabled:hover:shadow-none hover:bg-bleu-700",isDisabled:0===x.length||m,isLoading:u,leftElement:i.jsx(xs,{size:12,strokeWidth:2}),onClick:async()=>{var t;if(!m)try{const n=await c({variables:{agentFileIds:x,toolCallId:e.id}}),r=n.data?.unlockReveAudience;if(!r)return;o(r),r.success&&(t=r.creditsRemainingToday,l.cache.updateQuery({query:Vv},e=>{const n=e?.contactsUnlockInfo;return n?{contactsUnlockInfo:{...n,count:Math.max(0,n.limit-t)}}:e}))}catch{}},children:"Unlock"})]})]})]})]})};const y9=({iso:e,align:t="left"})=>{const n=function(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}(e);return n?i.jsx("span",{className:s("text-[10px] text-gray-400","right"===t?"text-right":"text-left"),children:n}):null},x9=({segment:e,onArtifactClick:t})=>{if("text"===e.kind)return i.jsx(i.Fragment,{children:e.text});const{artifact:n}=e,r=`@${n.title}`;return t?i.jsx("button",{type:"button",onClick:()=>t(n),className:"rounded bg-white/20 px-1 font-medium underline decoration-white/40 underline-offset-2 hover:bg-white/30",children:r}):i.jsx(i.Fragment,{children:r})},b9="flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-2.5 py-1 text-xs text-gray-700",v9=({filename:e,artifact:t,onArtifactClick:n})=>{const r=i.jsxs(i.Fragment,{children:[i.jsx(js,{className:"h-3 w-3 text-gray-400"}),i.jsx("span",{className:"max-w-[220px] truncate",children:e})]});return t&&n?i.jsx("button",{type:"button",onClick:()=>n(t),className:s(b9,"cursor-pointer transition-colors hover:border-gray-300 hover:bg-gray-50"),children:r}):i.jsx("div",{className:b9,children:r})},w9=({message:e,isCentered:t,mentionable:n=[],onArtifactClick:r})=>i.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[e.content.trim()&&i.jsx("div",{className:s("bg-primary text-white rounded-3xl",t?"max-w-[85%] px-4 py-3 text-[15px]":"max-w-[85%] px-3 py-2 text-sm rounded-2xl"),children:i.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",children:j6(e.content,n).map((e,t)=>i.jsx(x9,{segment:e,onArtifactClick:r},t))})}),e.attachments?.map(e=>i.jsx(v9,{filename:e.filename,artifact:n.find(t=>t.title===e.filename),onArtifactClick:r},e.filename)),i.jsx(y9,{iso:e.createdAt,align:"right"})]}),j9="bg-gradient-to-r from-gray-400 via-gray-200 to-gray-400 bg-clip-text text-transparent animate-pulse-text bg-[length:200%_100%]",C9=({entry:e})=>"tool"===e.level?i.jsxs("div",{className:"ml-3 my-1 border-l border-gray-200 pl-2",children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wide text-gray-300 font-medium mb-0.5",children:(e.toolName??"tool").replace(/_/g," ")}),i.jsx("div",{className:"text-[11px] text-gray-300 leading-snug whitespace-pre-wrap",children:e.text})]}):i.jsx("div",{className:"text-xs text-gray-400 leading-relaxed whitespace-pre-wrap",children:e.text});function N9(e){const t=new Map;return e.map(e=>{const n=`${e.level??"agent"}-${e.toolName??""}
1732`,r=(t.get(n)??0)+1;return t.set(n,r),{entry:e,key:`${n}-${r}`}})}const k9=({entries:e,isStreaming:n})=>{const[r,a]=t.useState(n),s=t.useRef(null);return t.useEffect(()=>{n&&r&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[e,n,r]),i.jsxs("div",{className:"mb-3 rounded-lg border border-gray-100 bg-gray-50/50 overflow-hidden",children:[i.jsxs("button",{type:"button",className:"flex items-center gap-1.5 w-full px-3 py-1.5 text-xs text-gray-400 hover:text-gray-500 transition-colors",onClick:()=>a(e=>!e),children:[i.jsx(Cn,{className:"w-3 h-3 flex-shrink-0"}),i.jsx("span",{className:"font-medium",children:"Thinking"}),n&&i.jsx("span",{className:"ml-1 animate-pulse",children:"..."}),r?i.jsx(qi,{className:"w-3 h-3 ml-auto flex-shrink-0"}):i.jsx(Ui,{className:"w-3 h-3 ml-auto flex-shrink-0"})]}),r&&i.jsx("div",{ref:s,className:"px-3 pb-2 text-xs text-gray-400 leading-relaxed whitespace-pre-wrap max-h-20 overflow-y-auto scrollbar-always-visible",children:N9(e).map(({entry:e,key:t})=>i.jsx(C9,{entry:e},t))})]})},S9=({content:e,thinking:t,stepStartedAt:n,task:r})=>{const a=G7(n);return i.jsxs("div",{className:"text-gray-400",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(gs,{className:"w-4 h-4 animate-spin flex-shrink-0 text-gray-300"}),i.jsx("span",{className:s("min-w-0 truncate first-letter:uppercase",j9),children:r||e||"Working..."}),a&&i.jsx("span",{className:"flex-shrink-0 text-xs text-gray-300 tabular-nums",children:a})]}),t&&t.length>0&&i.jsx(k9,{entries:t,isStreaming:!0})]})},E9=({content:e,task:t})=>i.jsxs("div",{className:s("flex flex-wrap items-baseline gap-x-2",j9),children:[i.jsx("span",{className:"whitespace-pre-wrap",children:e}),t&&i.jsx("span",{className:"text-gray-400",children:t})]}),A9=({content:e,animate:n=!1})=>{const{displayText:r}=function(e,n){const[r,a]=t.useState(n?0:e.length),i=t.useRef();return t.useEffect(()=>{if(!n)return void a(e.length);a(0);let t=0;const r=()=>{t=Math.min(t+2,e.length),a(t),t<e.length&&(i.current=setTimeout(r,12))};return i.current=setTimeout(r,12),()=>{i.current&&clearTimeout(i.current)}},[e,n]),{displayText:e.slice(0,r),isDone:r>=e.length}}(e,n);return i.jsx("div",{className:"text-gray-900",children:i.jsx(H7,{text:r})})},O9=({message:e,isCentered:t,activeArtifactId:n,onArtifactClick:r,getArtifactStyle:a,onCardAction:o,artifacts:l=[]})=>{if("user"===e.role)return i.jsx(w9,{message:e,isCentered:t,mentionable:l,onArtifactClick:r});if("tool_call"===e.kind&&e.toolCall)return"propose_reve_job"===e.toolCall.name?i.jsx(d9,{toolCall:e.toolCall}):"propose_email_unlock"===e.toolCall.name?i.jsx(g9,{toolCall:e.toolCall,onAction:o}):i.jsx(s9,{toolCall:e.toolCall});const c=!e.isLoading&&"step"!==e.kind,u=e.artifact?l.find(t=>t.id===e.artifact?.id)??e.artifact:null;return i.jsxs("div",{className:"flex gap-3",children:[i.jsx("div",{className:"mt-0.5 flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full bg-primary",children:i.jsx(Mi,{className:"h-4 w-4 text-white"})}),i.jsxs("div",{className:"min-w-0 flex-1 space-y-3",children:[i.jsx("div",{className:s("leading-relaxed",t?"text-[15px]":"text-sm"),children:e.isLoading?i.jsx(S9,{content:e.content,thinking:e.thinking,stepStartedAt:e.stepStartedAt,task:e.task}):"step"===e.kind?i.jsx(E9,{content:e.content,task:e.task}):i.jsxs(i.Fragment,{children:[e.thinking&&e.thinking.length>0&&i.jsx(k9,{entries:e.thinking,isStreaming:!1}),i.jsx(A9,{content:e.content,animate:e.animate})]})}),u&&r&&i.jsx(Z7,{artifact:u,isActive:n===u.id,onClick:()=>r(u),...a?.(u)??{}}),c&&i.jsx(y9,{iso:e.createdAt})]})]})},_9={good:{border:"border-emerald-300",wash:"bg-emerald-50",text:"text-emerald-700"},ok:{border:"border-amber-300",wash:"bg-amber-50",text:"text-amber-700"},bad:{border:"border-rose-300",wash:"bg-rose-50",text:"text-rose-700"}},P9=e=>i4.includes(e),I9="rounded-xl p-3 shadow-sm",M9="border border-gray-200 bg-white",T9="text-xs font-medium uppercase tracking-wider text-gray-400",R9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},L9=({grade:e})=>
1732i.jsx("span",{className:s("rounded border bg-white px-1.5 py-0.5 text-xs font-semibold uppercase tracking-wide",P9(e)?s(_9[e].border,_9[e].text):"border-gray-200 text-gray-500"),children:e}),D9=({label:e,initial:n,onSave:r,onCancel:a})=>{const[o,l]=t.useState(n.grade),[c,u]=t.useState(n.comment),[d,p]=t.useState(!1),[h,m]=t.useState(null);return i.jsxs("div",{className:s(I9,M9),children:[i.jsx("span",{className:T9,children:e}),i.jsx("div",{className:"mt-2 flex gap-1.5",children:i4.map(e=>i.jsx("button",{type:"button",onClick:()=>l(e),"aria-pressed":o===e,className:s("flex-1 rounded-md border px-2 py-1 text-xs font-semibold uppercase tracking-wide",o===e?s(_9[e].border,_9[e].wash,_9[e].text):"border-gray-200 bg-white text-gray-400 hover:border-gray-400"),children:e},e))}),i.jsx("textarea",{value:c,onChange:e=>u(e.target.value),placeholder:"What was right or wrong, and why…","aria-label":`${e} comment`,className:"mt-2 min-h-[4rem] w-full resize-y rounded-md border border-gray-200 p-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-gray-400 focus:outline-none"}),h&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:h}),i.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:async()=>{if(o){p(!0),m(null);try{await r({grade:o,comment:c})}catch(Fr){m(Fr instanceof Error?Fr.message:"Could not save this grade.")}finally{p(!1)}}},disabled:!o||d,className:"inline-flex items-center gap-1 rounded-md bg-blue-600 px-3 py-1 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-gray-300",children:[d&&i.jsx(gs,{className:"h-3 w-3 animate-spin"}),"Save"]}),a&&i.jsx("button",{type:"button",onClick:a,className:"text-sm text-gray-500 hover:underline",children:"Cancel"})]})]})},F9=({label:e,assessment:n,onSave:r})=>{const[a,o]=t.useState(!1);if(a||!n)return i.jsx(D9,{label:e,initial:{grade:n?.grade,comment:n?.comment??""},onSave:async e=>{await r(e),o(!1)},onCancel:n&&(()=>o(!1))});const l=P9(n.grade)?_9[n.grade]:void 0;return i.jsxs("div",{className:s(I9,l?s("border-2",l.border,l.wash):M9),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:T9,children:e}),i.jsx(L9,{grade:n.grade}),i.jsx("button",{type:"button",onClick:()=>o(!0),className:"ml-auto text-sm text-blue-600 hover:underline",children:"edit"})]}),n.comment&&i.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-relaxed text-gray-600",children:n.comment}),i.jsx("p",{className:"mt-2 text-xs text-gray-400",children:`saved · ${n.reviewer?o4(n.reviewer):"unknown reviewer"} · ${R9(n.updated_at)}`})]})},q9=e=>{const t=new Date(e).getTime();if(Number.isNaN(t))return"";const n=Math.floor((Date.now()-t)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const a=Math.floor(r/24);return 1===a?"yesterday":a<7?`${a}d ago`:new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric"})},B9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{month:"short",day:"numeric"})},U9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},z9=["bg-violet-200 text-violet-800","bg-emerald-200 text-emerald-800","bg-blue-200 text-blue-800","bg-pink-200 text-pink-800","bg-amber-200 text-amber-800"],H9=e=>{const t=[...e].reduce((e,t)=>e+t.charCodeAt(0),0);return z9[t%z9.length]},V9=({author:e})=>i.jsx("span",{className:s("flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-[10px] font-semibold",e?H9(e.id):"bg-gray-200 text-gray-500"),children:e?l4(e):"?"}),$9="rounded px-1 py-0.5 text-[11px] text-gray-500 hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",W9="ml-[26px]",Q9="mt-1 text-[11px] text-rose-600",Z9=(e,t)=>e instanceof Error?e.message:t,K9=({initial:e,placeholder:n,submitLabel:r,autoFocus:a,onSubmit:s,onCancel:o})=>{const[l,c]=t.useState(e),[u,d]=t.useState(!1),[p,h]=t.useState(null);return i.jsxs("div",{className:"rounded-lg border border-blue-600 bg-white px-2.5 py-2 ring-[3px] ring-blue-600/10",children:[i.jsx("textarea",{value:l,onCh
1732ange:e=>c(e.target.value),placeholder:n,"aria-label":n,autoFocus:a,disabled:u,className:"block min-h-[2.5rem] w-full resize-none border-none p-0 text-xs leading-relaxed text-gray-900 placeholder:text-gray-400 focus:border-none focus:outline-none focus:ring-0 disabled:bg-white disabled:text-gray-400"}),p&&i.jsx("p",{className:Q9,children:p}),i.jsxs("div",{className:"mt-2 flex items-center justify-end gap-3",children:[i.jsx("button",{type:"button",onClick:o,disabled:u,className:"text-xs text-gray-500 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),i.jsxs("button",{type:"button",onClick:async()=>{if(l.trim()){d(!0),h(null);try{await s(l)}catch(Fr){h(Z9(Fr,"Could not save this comment."))}finally{d(!1)}}},disabled:!l.trim()||u,className:"inline-flex items-center gap-1 rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-gray-300",children:[u&&i.jsx(gs,{className:"h-3 w-3 animate-spin"}),r]})]})]})},G9=({comment:e,onEdit:n,onDelete:r,onResolve:a})=>{const[o,l]=t.useState(!1),[c,u]=t.useState(!1),[d,p]=t.useState(null),h=Boolean(e.resolved_at),m=async(e,t)=>{u(!0),p(null);try{await e()}catch(Fr){p(Z9(Fr,t))}finally{u(!1)}};return o?i.jsx(K9,{initial:e.body,placeholder:"Edit comment…",submitLabel:"Save",autoFocus:!0,onSubmit:async t=>{await n(e.id,t),l(!1)},onCancel:()=>l(!1)}):i.jsxs("div",{className:s("rounded-[10px] border border-gray-200 bg-white px-2.5 py-2.5",h&&"opacity-60"),children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(V9,{author:e.author}),i.jsx("span",{className:"truncate text-xs font-medium text-gray-900",children:e.author?o4(e.author):"unknown reviewer"}),i.jsx("span",{className:"flex-shrink-0 text-[11px] text-gray-400",title:U9(e.created_at),children:q9(e.created_at)}),i.jsxs("span",{className:"ml-auto flex flex-shrink-0 items-center",children:[!h&&i.jsx("button",{type:"button",disabled:c,onClick:()=>m(()=>a(e.id,!0),"Could not resolve this comment."),className:$9,children:"Resolve"}),i.jsx("button",{type:"button",disabled:c,onClick:()=>l(!0),className:$9,children:"edit"}),i.jsx("button",{type:"button",disabled:c,onClick:()=>m(()=>r(e.id),"Could not delete this comment."),className:$9,children:"delete"})]})]}),i.jsx("p",{className:s(W9,"mt-1.5 whitespace-pre-wrap break-words text-xs leading-relaxed text-gray-700"),children:e.body}),h&&e.resolved_at&&i.jsxs("p",{className:s(W9,"mt-1.5 text-[11px] text-gray-400"),children:[`resolved · ${e.resolved_by?o4(e.resolved_by):"unknown reviewer"} · `,i.jsx("span",{title:U9(e.resolved_at),children:B9(e.resolved_at)})," · ",i.jsx("button",{type:"button",disabled:c,onClick:()=>m(()=>a(e.id,!1),"Could not reopen this comment."),className:"text-[11px] text-blue-600 hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:"reopen"})]}),d&&i.jsx("p",{className:s(W9,Q9),children:d})]})},Y9=({onAdd:e})=>{const[n,r]=t.useState(!1);return n?i.jsx(K9,{initial:"",placeholder:"Add a comment…",submitLabel:"Comment",autoFocus:!0,onSubmit:async t=>{await e(t),r(!1)},onCancel:()=>r(!1)}):i.jsx("button",{type:"button",onClick:()=>r(!0),className:"block w-full cursor-text rounded-lg border border-gray-200 bg-white px-2.5 py-2 text-left text-xs text-gray-400 hover:border-gray-300",children:"Add a comment…"})},J9=({comments:e,onAdd:n,onEdit:r,onDelete:a,onResolve:s})=>
1732{const[o,l]=t.useState(!1),c=e.filter(e=>!e.resolved_at),u=e.filter(e=>e.resolved_at),d={onEdit:r,onDelete:a,onResolve:s};return i.jsxs("div",{className:"flex flex-col gap-3",children:[e.length>0&&i.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[i.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-gray-400",children:"comments"}),i.jsx("span",{className:"rounded bg-blue-50 px-1.5 py-0.5 text-[10px] font-semibold text-blue-700",children:`${c.length} open`})]}),c.map(e=>i.jsx(G9,{comment:e,...d},e.id)),u.length>0&&i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsxs("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1.5 self-start rounded-md px-1 py-0.5 text-[11px] text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:[i.jsx("span",{className:"font-bold text-emerald-500",children:"✓"}),`${u.length} resolved — ${o?"hide":"show"}`]}),o&&u.map(e=>i.jsx(G9,{comment:e,...d},e.id))]}),i.jsx(Y9,{onAdd:n})]})},X9=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),e8=e=>{if(!e)return null;try{const t=JSON.parse(e);return X9(t)?t:null}catch{return null}},t8=(e,t="")=>"string"==typeof e?e:t,n8=/File\(id=([^)\s]+)\)/g,r8=e=>{if(!e)return[];const t=[];let n=0;const r=new RegExp(n8.source,"g");let a=r.exec(e);for(;null!==a;)a.index>n&&t.push({kind:"text",text:e.slice(n,a.index)}),t.push({kind:"file",text:a[0],fileId:a[1]}),n=a.index+a[0].length,a=r.exec(e);return n<e.length&&t.push({kind:"text",text:e.slice(n)}),t},a8=e=>{if(!e)return"";try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}},i8=({label:e,children:t,count:n})=>i.jsxs("section",{className:"border-t border-gray-200 pt-4 first:border-t-0 first:pt-0",children:[e&&i.jsxs("h4",{className:"mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400",children:[e,void 0!==n&&i.jsx("span",{className:"ml-1.5 font-normal normal-case tracking-normal text-gray-400",children:`(${n})`})]}),t]}),s8=({label:e,className:t})=>i.jsx("span",{className:s("rounded-full px-2 py-0.5 text-xs font-medium",t),children:e}),o8=({value:e})=>i.jsx("code",{className:"select-text break-all font-mono text-[11px] text-gray-500",children:e}),l8=({proposal:e})=>i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(s8,{label:`trigger: ${e.outreach_trigger}`,className:"proactive"===e.outreach_trigger?"bg-violet-50 text-violet-700":"bg-gray-100 text-gray-600"}),null===e.angle_confirmed?i.jsx(s8,{label:"angle_confirmed: —",className:"bg-gray-100 text-gray-500"}):i.jsx(s8,{label:`angle_confirmed: ${e.angle_confirmed}`,className:e.angle_confirmed?"bg-emerald-50 text-emerald-700":"bg-amber-50 text-amber-700"})]}),c8=[{key:"ready_people",label:"ready people"},{key:"companies",label:"companies"},{key:"companies_without_contact",label:"no named contact"},{key:"no_email_excluded",label:"no email, excluded"}],u8=({audience:e})=>i.jsx("dl",{className:"grid grid-cols-2 gap-2",children:c8.map(({key:t,label:n})=>i.jsxs("div",{className:"rounded border border-gray-200 px-3 py-2",children:[i.jsx("dt",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:n}),i.jsx("dd",{className:"text-sm font-semibold tabular-nums text-gray-900",children:e[t]})]},t))}),d8=({text:e,fileTitles:t,onOpenFile:r})=>i.jsx("pre",{className:"select-text whitespace-pre-wrap break-words rounded border border-gray-200 bg-gray-50 p-3 font-mono text-[11px] leading-relaxed text-gray-700",children:r8(e).map((e,a)=>{const s="file"===e.kind&&t.get(e.fileId);return"file"===e.kind&&s?i.jsx("button",{type:"button",title:s,onClick:()=>r(e.fileId),className:"font-medium text-blue-600 underline underline-offset-2 hover:text-blue-700",children:e.text},a):i.jsx(n.Fragment,{children:e.text},a)})}),p8=({companyIds:e})=>{const{data:t,loading:n,error:r}=d(a4,{variables:{ids:e},skip:0===e.length}),a=new Map((t?.opsBioCompanyNames??[]).map(e=>[e.id,e.company_name])),s=Boolean(t)&&!n;return 0===e.length?i.jsx("p",{className:"text-xs text-gray-500",children:"No companies on this proposal."}):i.jsxs(i.Fragment,{children:[n&&!t&&i.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-xs text-gray-400",children:[i.jsx(gs,{className:"h-3 w-3 animate-spin"}),"Naming companies…"]}),r&&i.jsx("p",{className:"mb-2 text-xs text-amber-700",children:`Couldn't look these companies up — ${r.message}`}),i.jsx("ul",{className:"space-y-1.5",children:e.map(e=>i.jsxs("li",{className:"flex flex-col",children:[a.has(e)&&i.jsx("span",{className:"select-text text-sm text-gray-900",children:a.get(e)}),s&&!a.has(e)&&i.jsx(s8,{label:"not found",className:"self-start bg-red-50 text-red-700"}),i.jsx(o8,{value:e})]},e))})]})},h8=({label:e,raw:t})=>i.jsxs("div",{children:[i.jsx("div",{className:"mb-1 font-mono text-[10px] uppercase tracking-wide text-gray-400",children:e}),i.jsx("pre",{className:"max-h-96 select-text overflow-auto whitespace-pre rounded border border-gray-200 bg-gray-50 p-3 font-mono text-[11px] leading-relaxed text-gray-700",children:t?a8(t):"(empty)"})]}),m8=({toolCall:e,defaultOpen:n})=>{const[r,a]=t.useState(n),s=r?qi:Ui;return i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wider text-gray-400 hover:text-gray-600",children:[i.jsx(s,{className:"h-3 w-3"}),"Raw tool call"]}),r&&i.jsxs("div",{className:"mt-2 space-y-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-600",children:[i.jsx("span",{className:"font-mono text-[11px] text-gray-500",children:e.name}),i.jsx(s8,{label:e.isError?"isError: true":"isError: false",className:e.isError?"bg-red-50 text-red-700":"bg-gray-100 text-gray-600"}),e.summary&&i.jsx("span",{className:"text-gray-500",children:e.summary})]}),i.jsx(h8,{label:"args",raw:e.args}),i.jsx(h8,{label:"result",raw:e.result})]})]})},f8=({toolCall:e,fileTitles:t,onOpenFile:n})=>{const r=(e=>{const t=e8(e.result);if(!t||"string"!=typeof t.goal)return null;const n=e8(e.args);return{goal:t.goal,display_context:t8(t.display_context),supporting_context:t8(t.supp
1732orting_context),outreach_trigger:t8(t.outreach_trigger,"signal"),angle_confirmed:n&&"boolean"==typeof n.angle_confirmed?n.angle_confirmed:null,company_ids:Array.isArray(t.company_ids)?t.company_ids.filter(e=>"string"==typeof e):[],audience:(r=t.audience,X9(r)?"number"!=typeof r.ready_people?null:{ready_people:r.ready_people,companies:Number(r.companies??0),companies_without_contact:Number(r.companies_without_contact??0),no_email_excluded:Number(r.no_email_excluded??0)}:null)};var r})(e);return r?i.jsxs("div",{className:"space-y-4",children:[i.jsxs(i8,{label:"Goal",children:[i.jsx("p",{className:"select-text text-sm font-medium leading-snug text-gray-900",children:r.goal}),i.jsx("div",{className:"mt-2",children:i.jsx(l8,{proposal:r})})]}),i.jsx(i8,{label:"Display context — what the user saw",children:i.jsx("p",{className:"select-text whitespace-pre-wrap text-sm leading-relaxed text-gray-700",children:r.display_context||"—"})}),i.jsx(i8,{label:"Supporting context — the worker brief",children:r.supporting_context?i.jsx(d8,{text:r.supporting_context,fileTitles:t,onOpenFile:n}):i.jsx("p",{className:"text-sm text-gray-500",children:"—"})}),i.jsx(i8,{label:"Audience",children:r.audience?i.jsx(u8,{audience:r.audience}):i.jsx("p",{className:"text-xs text-gray-500",children:"No reach recorded on this proposal."})}),i.jsx(i8,{label:"Companies",count:r.company_ids.length,children:i.jsx(p8,{companyIds:r.company_ids})}),i.jsx(i8,{children:i.jsx(m8,{toolCall:e,defaultOpen:!1})})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-xs text-gray-500",children:e.isError?"This proposal was rejected — the server returned an error instead of a payload.":"This call carries no readable proposal payload."}),i.jsx(m8,{toolCall:e,defaultOpen:!0})]})},g8=-1;const y8=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},x8=e=>{let t="";return e.map(e=>{const n=(e=>{const t=new Date(e??"");return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})})(e.userMessage.createdAt),r=Boolean(n)&&n!==t;return n&&(t=n),r?`turn ${e.index+1} · ${n}`:`turn ${e.index+1}`})},b8=({label:e,className:t})=>i.jsx("span",{className:s("rounded-full px-2 py-0.5 text-xs font-medium",t),children:e}),v8=({session:e,turnCount:t,progress:n})=>{const r=n.graded>=n.total,a=e.assessments.some(e=>"judge"===e.source),s={label:e.messages_truncated?`${n.graded} graded`:`${n.graded}/${n.total} graded`,className:(r&&!e.messages_truncated?"bg-emerald-50 text-emerald-700":n.graded>0&&"bg-amber-50 text-amber-700")||"bg-gray-100 text-gray-600"};return i.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between gap-4 border-b border-gray-200 bg-gray-50 px-4 py-2.5",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h1",{className:"truncate text-sm font-semibold text-gray-900",children:o4(e.user)}),e.user.company_name&&i.jsx("span",{className:"truncate text-xs text-gray-500",children:e.user.company_name})]}),i.jsx("p",{className:"truncate text-xs text-gray-500",children:`${e.title} · ${y8(e.created_at)} · ${t} ${1===t?"turn":"turns"}`})]}),i.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[0===n.graded&&a&&i.jsx(b8,{label:"judge draft ready",className:"bg-blue-50 text-blue-700"}),i.jsx(b8,{label:s.label,className:s.className}),i.jsx(o,{to:Yw.reveSessions,className:"text-sm text-blue-600 hover:underline",children:"← Reve QA"})]})]})},w8=(e,t)=>e.identify({__typename:"OpsAgentSessionDetail",id:t}),j8=(e,{sessionId:t,field:n,typename:r,id:a})=>{e.modify({id:w8(e,t),fields:{[n]:(e,{readField:t,toReference:n})=>{const i=Array.isArray(e)?e:[],s=i.some(e=>t("id",e)===a),o=n({__typename:r,id:a});return s||!o?e:[...i,o]}}})},C8=()=>Math.max(window.innerWidth-384,448),N8=()=>Math.round(Math.min(Math.max(.36*window.innerWidth,520),832)),k8=({onWidth:e})=>i.jsx("button",{type:"button","aria-label":"Resize the file and review panes",onMouseDown:t=>{t.preventDefault();const n=document.body.style.userSelect;document.body.style.userSelect="none",document.body.style.cursor="col-resize";const r=t=>{e(window.innerWidth-t.clientX)},a=()=>{document.body.style.userSelect=n,document.body.style.cursor="",window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},className:"absolute -left-1 top-0 z-10 h-full w-2 cursor-col-resize bg-transparent transition-colors hover:bg-blue-300"}),S8=({children:e})=>i.jsx("div",{className:"flex h-screen items-center justify-center bg-gray-50 text-sm text-gray-500",children:e}),E8=({isActive:e,onOpen:t,children:n})=>i.jsx("div",{role:"button",tabIndex:0,"aria-label":"Open the objective's proposal payload",onClick:()=>{window.getSelection()?.toString()||t()},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())},className:s("cursor-pointer rounded-xl transition-shadow","[&_button:disabled]:pointer-events-none",e?"ring-2 ring-blue-500 ring-offset-2":"hover:ring-2 hover:ring-blue-200 hover:ring-offset-2"),children:n}),A8=({summary:e})=>i.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-red-200 bg-red-50/60 px-4 py-3 text-[13px] text-red-800",children:[i.jsx(Vi,{className:"h-3.5 w-3.5 flex-shrink-0"}),i.jsxs("span",{className:"truncate",children:[e||"Objective proposal"," — rejected"]})]}),O8=({marker:e,conversation:t,assessment:n})=>i.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_20rem] gap-6 border-t-2 border-gray-300 py-5 first:border-t-0",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-gray-400",children:e}),i.jsx("div",{className:"space-y-4",children:t})]}),n&&i.jsx("div",{className:"sticky top-4 self-start",children:n})]}),_8=()=>{const{sessionId:e}=he(),[n,r]=t.useState(null),[a,l]=t.useState(null),[c,u]=t.useState(N8),h="file"===n?.kind?n.artifactId:null;t.useEffect(()=>l(null),[h]);const m=t.useCallback(e=>{u(Math.min(Math.max(e,448),C8()))},[]);t.useEffect(()=>{const e=()=>{u(e=>Math.min(e,C8()))};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const{data:f,loading:g,error:y}=d(Y3,{variables:{id:e},fetchPolicy:"cache-and-network",errorPolicy:"all"}),x=f?.opsAgentSession,[b]=p(J3),[v]=p(X3),[w]=p(e4),[j]=p(n4),[C]=p(t4),N=t.useCallback(async(t,n)=>{await b({variables:{session_id:e,turn_index:t,grade:n.grade,comment:n.comment.trim()||null}
1732,update:(t,n)=>{const r=n.data?.opsSaveAgentAssessment;r&&e&&j8(t,{sessionId:e,field:"assessments",typename:"OpsAgentTurnAssessment",id:r.id})}})},[b,e]),k=t.useCallback(async(t,n)=>{await v({variables:{session_id:e,turn_index:t,body:n},update:(t,n)=>{const r=n.data?.opsAddAgentComment;r&&e&&j8(t,{sessionId:e,field:"comments",typename:"OpsAgentTurnComment",id:r.id})}})},[v,e]),S=t.useCallback(async(e,t)=>{await w({variables:{id:e,body:t}})},[w]),E=t.useCallback(async t=>{await j({variables:{id:t},update:(n,r)=>{r.data?.opsDeleteAgentComment&&e&&((e,t,n)=>{e.modify({id:w8(e,t),fields:{comments:(e,{readField:t})=>(Array.isArray(e)?e:[]).filter(e=>t("id",e)!==n)}}),e.evict({id:e.identify({__typename:"OpsAgentTurnComment",id:n})}),e.gc()})(n,e,t)}})},[j,e]),A=t.useCallback(async(e,t)=>{await C({variables:{id:e,resolved:t}})},[C]),O=t.useMemo(()=>{const e=new Map;return(x?.agentFiles??[]).forEach(t=>{const n=d6(t);n&&e.set(n.id,n)}),e},[x?.agentFiles]),_=t.useMemo(()=>x?[p6(x.user.first_name),...x.messages.filter(e=>"message"===e.kind||"tool_call"===e.kind).map(e=>s6(e,O))]:[],[x,O]),P=t.useMemo(()=>new Map([...O.values()].map(e=>[e.id,e.title])),[O]),I=t.useCallback(e=>{r({kind:"file",artifactId:e})},[]),M=t.useCallback(e=>{r(t=>"file"===t?.kind&&t.artifactId===e.id?null:{kind:"file",artifactId:e.id})},[]),T=t.useCallback(e=>{r(t=>"proposal"===t?.kind&&t.messageId===e?null:{kind:"proposal",messageId:e})},[]),R=t.useCallback(()=>r(null),[]);if(g&&!x)return i.jsxs(S8,{children:[i.jsx(gs,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading conversation…"]});if(!x)return i.jsx(S8,{children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{children:y?"Could not load this session.":"No such session."}),i.jsx(o,{to:Yw.reveSessions,className:"mt-2 inline-block text-blue-600 hover:underline",children:"← Reve QA"})]})});const L=function(e){return e.reduce((e,t)=>("user"===t.role?e.push({index:e.length,userMessage:t,messages:[t]}):e[e.length-1]?.messages.push(t),e),[])}(_),D=x8(L),F=_.findIndex(e=>"user"===e.role),q=-1===F?_:_.slice(0,F),B=new Map(x.assessments.filter(e=>"human"===e.source).map(e=>[e.turn_index,e])),U={graded:[...L.map(e=>e.index),g8].filter(e=>B.has(e)).length,total:L.length+1},z=h?O.get(h):void 0,H=b6(z).style,V="table"===z?.type?`Showing ${z.count} of ${z.totalCount} results`:"",$="proposal"===n?.kind?_.find(e=>e.id===n.messageId)?.toolCall:void 0,W=e=>e.map(e=>{const t=i.jsx(O9,{message:e,isCentered:!1,activeArtifactId:h,onArtifactClick:M,getArtifactStyle:b6},e.id);return r=e.toolCall,"propose_reve_job"!==r?.name?t:i.jsx(E8,{isActive:"proposal"===n?.kind&&n.messageId===e.id,onOpen:()=>T(e.id),children:e.toolCall?.isError?i.jsx(A8,{summary:e.toolCall.summary}):t},e.id);var r}),Q=new Map;x.comments.forEach(e=>{const t=Q.get(e.turn_index)??[];t.push(e),Q.set(e.turn_index,t)});const Z=(e,t)=>i.jsxs("div",{className:"space-y-4",children:[i.jsx(F9,{label:t,assessment:B.get(e),onSave:t=>N(e,t)},B.get(e)?.id??"ungraded"),i.jsx(J9,{comments:Q.get(e)??[],onAdd:t=>k(e,t),onEdit:S,onDelete:E,onResolve:A})]}),K=z&&i.jsxs(y4,{onClose:R,actions:z.agentFileId?i.jsxs(i.Fragment,{children:["table"===z.type&&i.jsx(X4,{agentFileId:z.agentFileId,title:z.title,query:r4}),c6(z.type)&&i.jsx(e6,{agentFileId:z.agentFileId,title:z.title,type:z.type,query:r4})]}):void 0,header:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:s("w-8 h-8 rounded flex items-center justify-center",H.bg,H.fg),children:i.jsx(H.icon,{className:"w-4 h-4"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium text-gray-900",children:z.title}),V&&i.jsx("p",{className:"text-xs text-gray-500",children:V})]})]}),subheader:i.jsx(W7,{summary:a}),children:[z.agentFileId&&"markdown"===z.type&&i.jsx(V7,{agentFileId:z.agentFileId,query:r4}),z.agentFileId&&"text"===z.type&&i.jsx($7,{agentFileId:z.agentFileId,query:r4}),z.agentFileId&&"table"===z.type&&i.jsx(z7,{agentFileId:z.agentFileId,query:r4,onSearchSummary:l},z.agentFileId)]}),G=$&&i.jsx(y4,{onClose:R,header:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-azura-blue-50 text-primary",children:i.jsx(Mi,{className:"h-4 w-4"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium text-gray-900",children:"Objective proposal"}),i.jsx("p",{className:"text-xs text-gray-500",children:"propose_reve_job · read-only"})]})]}),children:i.jsx(f8,{toolCall:$,fileTitles:P,onOpenFile:I})})||K;return i.jsx("div",{className:"h-screen",children:i.jsx(n6,{children:i.jsx(h4,{header:i.jsx(v8,{session:x,turnCount:L.length,progress:U}),main:G,chat:i.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[G&&i.jsx(k8,{onWidth:m}),x.messages_truncated&&i.jsx("div",{className:"flex-shrink-0 border-b border-amber-200 bg-amber-50 px-4 py-2 text-xs text-amber-800",children:"This conversation is longer than the review view loads — the turns below stop short of the end."}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overflow-x-auto",children:i.jsxs("div",{className:"mx-auto w-full min-w-[52rem] max-w-[70rem] px-6 py-6",children:[q.length>0&&i.jsx(O8,{marker:"start of session",conversation:W(q)}),L.map((e,t)=>i.jsx(O8,{marker:D[t],conversation:W(e.messages),assessment:Z(e.index,"Assessment")},e.userMessage.id)),i.jsx(O8,{marker:"end of session",conversation:i.jsx("p",{className:"text-xs text-gray-400",children:"Grade the conversation as a whole on the right."}),assessment:Z(g8,"Overall assessment")})]})})]}),isMainOpen:Boolean(G),isChatOpen:!0,chatOpenWidth:c})})})},P8=({threshold:e=100,behavior:n="auto"}={})=>{const r=t.useRef(null),a=t.useRef(null),i=t.useRef(!0),s=t.useRef(!1),o=t.useRef(!1),l=t.useCallback(e=>{const t=r.current;t&&(i.current=!0,t.scrollTo({top:t.scrollHeight,behavior:e??n}))},[n]);return t.useEffect(()=>{const t=r.current,n=a.current;if(!t||!n)return;const c=()=>{s.current=!0,o.current=!0,requestAnimationFrame(()=>{s.current=!1})},u=()=>{t.scrollHeight-t.scrollTop-t.clientHeight<=e?i.current=!0:s.current&&(i.current=!1)},d=new ResizeObserver(()=>{i.current&&l()});return d.observe(n),d.observe(t),t.addEventListener("scroll",u,{passive:!0}),t.addEventListener("wheel",c,{passive:!0}),t.addEventListener("touchmove",c,{passive:!0}),t.addEventListener("pointerdown",c,{passive:!0}),t.addEventListener("keydown",c),()=>{d.disconnect(),t.removeEventListener("scroll",u),t.removeEventListener("wheel",c),t.removeEventListener("touchmove",c),t.removeEventListener("pointerdown",c),t.removeEventListener("keydown",c)}},[l,e]),{scrollRef:r,contentRef:a,userHasScrolledRef:o,scrollToBottom:l}},I8=({label:e})=>e?i.jsx("div",{className:"sticky top-0 z-10 flex justify-center py-3",children:i.jsx("span",{className:"rounded-full bg-gray-100 px-2.5 py-0.5 text-[11px] text-gray-400",children:e})}):null,M8=({messages:e,isCentered:n,activeArtifactId:r,onArtifactClick:a,getArtifactStyle:s,onCardAction:o,artifacts:l,hasMoreMessages:c=!1,isLoadingOlderMessages:u=!1,onLoadOlderMessages:d,children:p})=>{const{scrollRef:h,contentRef:m,userHasScrolledRef:f}=P8({threshold:100,behavior:"smooth"}),g=t.useRef(null),y=t.useRef(null),x=t.useRef(!1);t.useEffect(()=>{const e=h.current,t=g.current;if(!e||!t||!d)return;const n=new IntersectionObserver(t=>{t[0]?.isIntersecting&&f.current&&c&&!x.current&&(x.current=!0,y.current=e.scrollHeight,d())},{root:e,rootMargin:"400px 0px 0px 0px"});return n.observe(t),()=>n.disconnect()},[c,d,h,f]),t.useEffect(()=>{u||(x.current=!1)},[u]),t.useLayoutEffect(()=>{const e=h.current;e&&null!==y.current&&(e.scrollTop=e.scrollHeight-y.current,y.current=null,x.current=!1)},[e,h]);const b=t.useMemo(()=>l6(e),[e]);return i.jsx("div",{ref:h,className:"flex-1 min-h-0 overflow-y-auto",children:i.jsxs("div",{ref:m,className:"px-6 py-8 mx-auto w-full max-w-md",children:[i.jsx("div",{ref:g}),u&&i.jsx("div",{className:"flex justify-center py-2 text-xs text-gray-400",children:"Loading earlier messages…"}),b.map(e=>i.jsxs("div",{children:[i.jsx(I8,{label:e.label}),i.jsx("div",{className:"space-y-4",children:e.messages.map(e=>i.jsx(O9,{message:e,isCentered:n,activeArtifactId:r,onArtifactClick:a,getArtifactStyle:s,onCardAction:o,artifacts:l},e.id))})]},e.key)),p]})})},T8=({options:e,onSelect:t})=>0===e.length?null:i.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:e.map(e=>i.jsx("button",{type:"button",onClick:()=>t(e),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-full hover:bg-gray-50 hover:border-gray-300 transition-colors",children:e},e))});
1732const R8=({value:e,onChange:n,onSend:r,placeholder:a="Type a message...",disabled:o=!1,onAttach:l,attaching:c=!1,pendingAttachments:u=[],onRemoveAttachment:d,isRunning:p=!1,onStop:h,stopping:m=!1,mentionable:f=[]})=>{const g=t.useRef(null),y=t.useRef(null),x=function(e){const[n,r]=t.useState(null),[a,i]=t.useState(0),s=t.useMemo(()=>{if(!n)return[];const t=n.query.toLowerCase();return e.filter(e=>e.title.toLowerCase().includes(t)).slice(0,6)},[e,n]),o=t.useCallback((e,t)=>{r(function(e,t){const n=e.slice(0,t),r=n.lastIndexOf("@");if(-1===r)return null;const a=0===r?"":n[r-1];if(a&&!/\s/.test(a))return null;const i=n.slice(r+1);return i.includes("\n")?null:{start:r,query:i}}(e,t)),i(0)},[]),l=t.useCallback((e,t)=>{if(!n)return t;const a=t.slice(n.start+1+n.query.length),i=`${t.slice(0,n.start)}@${e.title}`;return r(null),a.startsWith(" ")?`${i}${a}`:`${i} ${a}`},[n]),c=t.useCallback(e=>{i(t=>0===s.length?0:(t+e+s.length)%s.length)},[s.length]);return{suggestions:s,highlighted:a,isOpen:s.length>0,onCaretChange:o,complete:l,moveHighlight:c,close:t.useCallback(()=>r(null),[])}}(f),b=u.length>=5,v=(!!e.trim()||u.length>0)&&!o&&!c;t.useEffect(()=>{o||g.current?.focus()},[o]),t.useLayoutEffect(()=>{const e=g.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,160)}px`,e.style.overflowY=e.scrollHeight>160?"auto":"hidden")},[e]);const w=t=>{n(x.complete(t,e)),requestAnimationFrame(()=>g.current?.focus())};return i.jsx("div",{className:"flex-shrink-0 bg-white p-4 border-t border-gray-100",children:i.jsxs("div",{className:"max-w-md mx-auto relative",children:[x.isOpen&&i.jsx("ul",{className:"absolute bottom-full left-0 right-0 z-50 mb-2 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",children:x.suggestions.map((e,t)=>i.jsx("li",{children:i.jsx("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>w(e),className:s("block w-full truncate px-3 py-1.5 text-left text-sm",t===x.highlighted?"bg-gray-100 text-gray-900":"text-gray-700"),children:e.title})},e.id))}),i.jsxs("form",{onSubmit:e=>{e.preventDefault(),v&&(r(),requestAnimationFrame(()=>g.current?.focus()))},className:"flex flex-col gap-2 px-4 py-3 bg-gray-100 rounded-2xl",children:[c&&i.jsx("div",{className:"self-start text-xs text-gray-500",children:"Attaching…"}),u.length>0&&i.jsx("div",{className:"flex flex-wrap gap-2 self-start",children:u.map(e=>i.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-2.5 py-1 text-xs text-gray-700",children:[i.jsx(js,{className:"h-3 w-3 text-gray-400"}),i.jsx("span",{className:"max-w-[220px] truncate",children:e.filename}),d&&i.jsx("button",{type:"button","aria-label":`Remove ${e.filename}`,onClick:()=>d(e.id),className:"text-gray-400 hover:text-gray-600",children:i.jsx(Sn,{className:"h-3 w-3"})})]},e.id))}),i.jsxs("div",{className:"flex items-end gap-3",children:[l&&i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:y,type:"file",multiple:!0,accept:".csv,.docx,.md,.txt,.xls,.xlsx",className:"hidden",onChange:e=>{e.target.files?.length&&l(e.target.files),e.target.value=""}}),i.jsx(qe,{placement:"top",className:"!z-50",tooltip:b?"You can attach up to 5 files":"Attach files (CSV, Word, Excel, text)",children:i.jsx("button",{type:"button","aria-label":"Attach files",disabled:o||c||b,onClick:()=>y.current?.click(),className:"flex-shrink-0 mb-2 text-gray-400 hover:text-gray-600 disabled:cursor-not-allowed disabled:opacity-50",children:c?i.jsx(gs,{className:"w-4 h-4 animate-spin"}):i.jsx(js,{className:"w-4 h-4"})})})]}),i.jsx("textarea",{ref:g,rows:1,value:e,onChange:e=>{n(e.target.value),x.onCaretChange(e.target.value,e.target.selectionStart??0)},onKeyDown:e=>{if(x.isOpen){if("ArrowDown"===e.key||"ArrowUp"===e.key)return e.preventDefault(),void x.moveHighlight("ArrowDown"===e.key?1:-1);if("Enter"===e.key||"Tab"===e.key)return e.preventDefault(),void w(x.suggestions[x.highlighted]);if("Escape"===e.key)return e.preventDefault(),void x.close()}"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&r())},onBlur:x.close,"aria-label":"Message input",placeholder:a,className:"flex-1 min-w-0 resize-none bg-transparent border-0 outline-none focus:outline-none focus:ring-0 placeholder:text-gray-400 text-sm leading-5 py-1.5",disabled:o}),p&&h?i.jsx("button",{type:"button","aria-label":"Stop",onClick:h,disabled:m,className:s("flex-shrink-0 p-2 rounded-full transition-colors","bg-gray-900 text-white hover:bg-gray-800","disabled:opacity-60 disabled:cursor-not-allowed"),children:m?i.jsx(gs,{className:"w-4 h-4 animate-spin"}):i.jsx(Ds,{className:"w-4 h-4 fill-current"})}):i.jsx("button",{type:"submit","aria-label":"Send message",disabled:!v,className:s("flex-shrink-0 p-2 rounded-full transition-colors",v?"bg-gray-900 text-white hover:bg-gray-800":"text-gray-300 cursor-not-allowed"),children:i.jsx(Ms,{className:"w-4 h-4"})})]})]})]})})},L8=({messages:e,isCentered:t,activeArtifactId:n,onArtifactClick:r,getArtifactStyle:a,onCardAction:s,hasMoreMessages:o,isLoadingOlderMessages:l,onLoadOlderMessages:c,quickReplies:u=[],onQuickReply:d,showQuickReplies:p=!0,composerValue:h,onComposerChange:m,onSend:f,composerPlaceholder:g,composerDisabled:y,composerFooter:x,onAttach:b,attaching:v,pendingAttachments:w,onRemoveAttachment:j,isRunning:C,onStop:N,stopping:k,artifacts:S,actionSlot:E,title:A,subtitle:O,isVisible:_=!0})=>_?i.jsxs(i.Fragment,{children:[!t&&A&&i.jsxs("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-100",children:[i.jsx("span",{className:"text-sm font-medium text-gray-900",children:A}),O&&i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:O})]}),i.jsxs(M8,{messages:e,isCentered:t,activeArtifactId:n,onArtifactClick:r,getArtifactStyle:a,onCardAction:s,artifacts:S,hasMoreMessages:o,isLoadingOlderMessages:l,onLoadOlderMessages:c,children:[p&&u.length>0&&d&&i.jsx(T8,{options:u,onSelect:d}),E]}),i.jsx(R8,{value:h,onChange:m,onSend:f,placeholder:g,disabled:y,onAttach:b,attaching:v,pendingAttachments:w,onRemoveAttachment:j,isRunning:C,onStop:N,stopping:k,mentionable:S}),x&&i.jsx("div",{className:"flex-shrink-0 px-4 pb-3 text-center text-xs text-gray-400",children:x})]}):null,D8=({artifact:e,isActive:n,onOpen:r,onRename:a})=>{const[o,l]=t.useState(!1),[c,u]=t.useState(e.title),d=t.useRef(null),{style:p}=b6(e),h=p.icon,m=!e.isUpload;t.useEffect(()=>{o&&(d.current?.focus(),d.current?.select())}
1732,[o]);const f=()=>{l(!1),a(c).catch(()=>u(e.title))};return i.jsx("li",{children:i.jsxs("div",{role:"button",tabIndex:o?-1:0,onClick:()=>{o||r()},onKeyDown:e=>{o||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r())},className:s("group flex items-center gap-2 rounded-lg px-2 py-1.5",o?"bg-gray-100":"cursor-pointer",n&&!o?"bg-gray-100":"hover:bg-gray-50"),children:[i.jsx("div",{className:s("flex h-6 w-6 flex-shrink-0 items-center justify-center rounded",p.bg,p.fg),children:i.jsx(h,{className:"h-3.5 w-3.5"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[o?i.jsx("input",{ref:d,value:c,onChange:e=>u(e.target.value),onBlur:f,onClick:e=>e.stopPropagation(),onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),f()),"Escape"===t.key&&(t.preventDefault(),u(e.title),l(!1))},"aria-label":"File name",className:"w-full rounded border border-gray-200 bg-white px-1.5 py-0 text-sm text-gray-900 focus:border-gray-300 focus:outline-none focus:ring-0"}):i.jsx("span",{className:"block truncate text-sm text-gray-900",title:e.title,children:e.title}),i.jsx("span",{className:"block truncate text-xs text-gray-400",children:[e.totalCount?`${e.totalCount} rows`:e.type,e.createdAt?fv(e.createdAt):null].filter(Boolean).join(" · ")})]}),m&&(o?i.jsx("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),f()},"aria-label":"Save name",title:"Done",className:"flex-shrink-0 rounded p-1 text-gray-400 hover:bg-gray-200 hover:text-gray-600",children:i.jsx(Nn,{className:"h-3 w-3"})}):i.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),u(e.title),l(!0)},"aria-label":`Rename ${e.title}`,title:"Rename",className:"flex-shrink-0 rounded p-1 text-gray-400 opacity-0 hover:bg-gray-200 hover:text-gray-600 focus:opacity-100 group-hover:opacity-100",children:i.jsx(ks,{className:"h-3 w-3"})}))]})})},F8=({artifacts:e,activeArtifactId:t,onOpen:n,onRename:r,onClose:a})=>i.jsxs("div",{className:"flex max-h-96 w-80 flex-col rounded-lg border border-gray-200 bg-white shadow-lg",children:[i.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between border-b border-gray-100 px-3 py-2",children:[i.jsx("span",{className:"text-xs font-medium text-gray-500",children:`Files (${e.length})`}),i.jsx("button",{type:"button",onClick:a,"aria-label":"Close files",className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:i.jsx(Sn,{className:"h-3.5 w-3.5"})})]}),0===e.length?i.jsx("p",{className:"px-3 py-6 text-center text-xs text-gray-400",children:"Tables and documents Reve makes will collect here."}):i.jsx("ul",{className:"flex-1 overflow-y-auto p-1.5",children:e.map(e=>i.jsx(D8,{artifact:e,isActive:e.id===t,onOpen:()=>n(e),onRename:t=>r(e.id,t)},e.id))})]}),q8=({count:e,removing:t,onRemove:n,onClear:r})=>0===e?null:i.jsxs("div",{className:"mr-1 flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"text-gray-600",children:`${e} selected`}),i.jsx("button",{type:"button",onClick:n,disabled:t,className:"rounded border border-red-200 px-2 py-1 font-medium text-red-600 hover:bg-red-50 disabled:opacity-50",children:t?"Removing…":`Remove ${e}`}),i.jsx("button",{type:"button",onClick:r,disabled:t,className:"text-gray-500 hover:text-gray-700 disabled:opacity-50",children:"Clear"})]});function B8(e,t,n){const r=e.findIndex(e=>e.id===n);return-1===r?[...e,t]:[...e.slice(0,r),t,...e.slice(r)]}function U8({sessionId:e,systemPromptOverride:n,playbookOverrides:r}){const[a,i]=t.useState([]),[s,o]=t.useState(!1),[l,c]=t.useState(!1),[u,h]=t.useState([]),[m,f]=t.useState(new Map),[g,y]=t.useState(""),[x,b]=t.useState(!1),[v,w]=t.useState(!1),[j,C]=t.useState(null),[N,k]=t.useState(!1),[S,E]=t.useState([]),O=t.useRef(0),_=t.useRef(""),P=t.useRef(!1),I=t.useRef(Date.now()),[M]=p(k4),[T]=p(w4),[R]=p(O4),[L]=p(A4),[D]=p(j4),[F]=p(_4),{addToast:q}=Y.useToasts(),{cache:B}=A(),{data:U,loading:z,error:H,refetch:V}=d(I4,{variables:{sessionId:e},fetchPolicy:"network-only",errorPolicy:"all"}),[$,{loading:W}]=An(M4,{fetchPolicy:"network-only"}),[Q]=An(b4,{fetchPolicy:"network-only"}),Z=!z&&!U?.agentSession&&!!H,K=t.useCallback(()=>{o(!1),c(!1),y("")},[]),G=t.useCallback(e=>{i(t=>[...t.filter(e=>!e.isLoading),e]),K()},[K]),J=t.useCallback(e=>{const t=e.agentFile?d6(e.agentFile):null;t&&(f(e=>new Map(e).set(t.id,t)),C(t),B.evict({id:B.identify({__typename:"AgentFile",id:t.id})}),B.gc(),i(n=>B8(n,{id:e.id,role:"assistant",content:"",artifact:t,createdAt:(new Date).toISOString()},_.current)))},[B]),X=t.useCallback(e=>{const t=e.agentFile?d6(e.agentFile):null;t&&(f(e=>new Map(e).set(t.id,t)),C(t),B.evict({id:B.identify({__typename:"AgentFile",id:t.id})}),B.gc(),i(e=>e.map(e=>e.artifact?.id===t.id?{...e,artifact:t}:e)))},[B]),ee=t.useCallback(e=>{const{agentFile:t,quickReplies:n,id:r,content:a}=e,s=t?d6(t):null;s&&(f(e=>new Map(e).set(s.id,s)),C(s),B.evict({id:B.identify({__typename:"AgentFile",id:s.id})}),B.gc()),n&&h(n),i(e=>{const t=e.find(e=>e.id===_.current),n=t?.thinking;return[...e.filter(e=>!e.isLoading),{id:r,role:"assistant",content:a,animate:!0,createdAt:(new Date).toISOString(),...s&&{artifact:s},...n&&n.length>0&&{thinking:n}}]}),K()},[K,B]),te=t.useCallback(e=>{const t=e.message;if(!t)return;"artifact"===e.type||!t.content&&!!t.agentFile?J(t):ee(t)},[J,ee]),ne=t.useCallback(e=>{switch(e.type){case"step":{if(!e.step)return;const{text:t,task:n}=e.step;y(t),i(e=>e.map(e=>e.id===_.current?{...e,content:t,task:n,stepStartedAt:Date.now()}:e));break}case"thinking":{if(!e.thinking)return;const t=e.thinking;i(e=>e.map(e=>e.id===_.current?{...e,thinking:t}:e));break}case"artifact":case"message":te(e);break;case"artifact_updated":e.message&&X(e.message);break;case"done":i(e=>e.filter(e=>!e.isLoading)),K();break;case"tool_call":if(e.toolCall){const t=e.toolCall;i(e=>{if(e.some(e=>e.id===t.id))return e;return B8(e,{id:t.id,role:"assistant",content:t.summary,kind:"tool_call",toolCall:t},_.current)})}break;case"tool_call_updated":if(e.toolCall){const t=e.toolCall;i(e=>e.map(e=>e.id===t.id?{...e,content:t.summary,toolCall:t}:e))}}},[K,te,X]);st(D4,{variables:{sessionId:e},onData:({data:e})=>{e.data?.agentStream&&(I.current=Date.now(),ne(e.data.agentStream))}});const re=t.useCallback(async()=>
1732{if(Date.now()-I.current<6e4)return;const{data:t}=await Q({variables:{sessionId:e}}),n=t?.agentSessionStatus;n&&"running"!==n&&(i(e=>e.filter(e=>!e.isLoading)),K(),await V(),b(!1))},[Q,e,K,V]);t.useEffect(()=>{if(!s)return;const e=setInterval(()=>{re().catch(()=>{})},15e3);return()=>clearInterval(e)},[s,re]),t.useEffect(()=>{if(x)return;const e=U?.agentSession;if(!e)return;const t=new Map;(e.agentFiles??[]).forEach(e=>{const n=d6(e);n&&t.set(n.id,n)});const n=e.messages.filter(e=>"message"===e.kind||"tool_call"===e.kind),r=n.map(e=>s6(e,t));i(r),f(t),w(Boolean(e.hasMoreMessages)),b(!0);const a=function(e,t=Date.now()){if("running"!==e.status)return null;const{messages:n}=e,r=n[n.length-1];if(!r)return null;const a=new Date(r.createdAt).getTime();if(Number.isNaN(a)||t-a>9e5)return null;let i;for(let o=n.length-1;o>=0&&"user"!==n[o].role;o-=1)if("step"===n[o].kind){i=n[o];break}const s=e.liveTurn;return{text:s?.step||i?.content||a6,task:s?.task??void 0,startedAt:new Date(i?.createdAt??r.createdAt).getTime(),thinking:s?.thinking?.length?s.thinking:void 0}}(e);if(!a)return;const s=h6(a.text,{isLoading:!0});_.current=s.id,I.current=Date.now(),y(a.text),o(!0),i([...r,{...s,task:a.task,thinking:a.thinking,stepStartedAt:a.startedAt}])},[U,x]);const ae=t.useCallback(async()=>{if(!v||W)return;const t=a.find(e=>e.createdAt);if(!t?.createdAt)return;const{data:n}=await $({variables:{sessionId:e,before:t.createdAt}}),r=n?.agentSessionMessages;if(!r)return;const s=r.messages.filter(e=>"message"===e.kind||"tool_call"===e.kind).map(e=>s6(e,m));i(e=>[...s,...e]),w(null!=r.nextCursor)},[v,W,a,$,e,m]),ie=t.useCallback(async t=>{const n=Array.from(t);if(0===n.length)return;const r=5-S.length;if(r<=0)q(i6,{appearance:"error",autoDismiss:!0});else{n.length>r&&q(i6,{appearance:"error",autoDismiss:!0}),k(!0);try{const t=(await Promise.all(n.slice(0,r).map(async t=>{if(t.size>26214400)return q("That file is too large — please upload a file under 25 MB.",{appearance:"error",autoDismiss:!0}),null;try{const n=await R({variables:{sessionId:e,file:t}}),r=n.data?.agentUploadFile,a=r?.path?.split("/").pop()||t.name;if(r?.agentFileId){const e={id:r.agentFileId,agentFileId:r.agentFileId,type:u6(a),title:a,count:0,totalCount:0,isUpload:!0};f(t=>new Map(t).set(e.id,e))}return O.current+=1,{id:`att-${O.current}`,filename:a,path:r?.path??"",agentFileId:r?.agentFileId??null}}catch{return q("Couldn't upload that file. Please try again.",{appearance:"error",autoDismiss:!0}),null}}))).filter(e=>null!==e);t.length>0&&E(e=>[...e,...t])}finally{k(!1)}}},[R,e,q,S.length]),se=t.useCallback(async t=>{const n=S.find(e=>e.id===t);if(E(e=>e.filter(e=>e.id!==t)),!n?.path)return;const{agentFileId:r}=n;r&&(f(e=>{if(!e.has(r))return e;const t=new Map(e);return t.delete(r),t}),B.evict({id:B.identify({__typename:"AgentFile",id:r})}),B.gc());try{await F({variables:{sessionId:e,path:n.path}})}
1732catch{q("Couldn't remove that file from this session.",{appearance:"error",autoDismiss:!0})}},[S,F,e,B,q]),oe=t.useMemo(()=>[...m.values()].sort((e,t)=>e.createdAt?t.createdAt?e.createdAt.localeCompare(t.createdAt):-1:1),[m]),le=t.useCallback((e,t)=>{f(n=>{const r=n.get(e);if(!r)return n;const a=new Map(n);return a.set(e,{...r,totalCount:t,count:Math.min(t,10)}),a})},[]),ce=t.useCallback((e,t)=>{f(n=>{const r=n.get(e);return r&&r.count!==t?new Map(n).set(e,{...r,count:t}):n})},[]),ue=t.useCallback(async(e,t)=>{const n=t.trim(),r=m.get(e);if(n&&r&&n!==r.title){f(t=>{const r=t.get(e);if(!r)return t;const a=new Map(t);return a.set(e,{...r,title:n}),a});try{await D({variables:{fileId:e,title:n}})}catch(a){throw f(t=>{const n=new Map(t);return n.set(e,r),n}),a}}},[m,D]),de=t.useCallback(async(t,a)=>{const s=a??[];if(!t.trim()&&0===s.length||P.current)return;P.current=!0;const l=function(e,t){return w6(e,t).map(e=>"text"===e.kind?e.text:`@[${e.artifact.title}](file:${e.artifact.id})`).join("")}(t,oe),c=s.map(e=>`[Attached file: ${e.filename}]`),u=[l,...c].filter(Boolean).join("\n\n");i(e=>[...e,m6(l,s)]),E([]),I.current=Date.now(),o(!0),h([]),y(a6);const d=h6(a6,{isLoading:!0});_.current=d.id,i(e=>[...e,d]);try{await M({variables:{sessionId:e,message:u,systemPromptOverride:n,playbookOverrides:r}})}catch{G(h6("Sorry, failed to connect. Please try again."))}finally{P.current=!1}},[M,e,n,r,G,oe]),pe=t.useCallback(async()=>{if(s&&!l){c(!0);try{await L({variables:{sessionId:e}})}catch{c(!1)}}},[L,e,s,l]),he=U?.agentSession?.title,me=t.useCallback(async()=>{const{data:t}=await T({variables:{sessionId:e}});return t?.agentClearHistory??null},[T,e]);return{messages:a,isLoading:s,isInterrupting:l,isSessionLoaded:x,sessionNotFound:Z,sessionTitle:he,quickReplies:u,currentStep:g,send:de,interrupt:pe,clearHistory:me,uploadFiles:ie,attaching:N,pendingAttachments:S,removeAttachment:se,clearQuickReplies:t.useCallback(()=>h([]),[]),getArtifact:t.useCallback(e=>m.get(e),[m]),artifacts:oe,renameArtifact:ue,setArtifactRowCount:le,setArtifactShownCount:ce,latestStreamArtifact:j,hasMoreMessages:v,isLoadingOlderMessages:W,loadOlderMessages:ae}}const z8={refetchQueries:["GetAgentFile"],awaitRefetchQueries:!0},H8=i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(gs,{className:"h-3.5 w-3.5 animate-spin"}),"Restoring rows…"]});function V8(e,n){const[r,a]=t.useState(new Set),[s,o]=t.useState(!1),[l]=p(C4),[c]=p(N4),{toastSuccess:u,toastCatchError:d}=v(),{addToast:h,removeToast:m,updateToast:f}=Y.useToasts();t.useEffect(()=>a(new Set),[e]);const g=t.useCallback(async(e,t)=>{t&&f(t,{content:H8,autoDismiss:!1});try{const{data:t}=await c({variables:{fileId:e},...z8}),r=t?.agentUndoRemoveFileRows?.rowCount;"number"==typeof r&&n(e,r),u("Rows restored")}catch(r){d(r)}finally{t&&m(t)}},[c,n,f,m,u,d]),y=t.useCallback(async()=>{if(!e||0===r.size)return;const t=r.size;o(!0);try{const{data:s}=await l({variables:{fileId:e,rowIds:[...r]},...z8}),o=s?.agentRemoveFileRows?.rowCount;let c;"number"==typeof o&&n(e,o),a(new Set);h(((e,t)=>i.jsxs("span",{className:"flex w-full items-center justify-between gap-4",children:[`Removed ${e} ${1===e?"row":"rows"}`,i.jsx("button",{type:"button",onClick:t,className:"flex-shrink-0 font-medium underline underline-offset-2",children:"Undo"})]}))(t,()=>{g(e,c).catch(()=>{})}),{appearance:"success"},e=>{c=e})}catch(s){d(s)}finally{o(!1)}},[e,r,l,n,h,d,g]);return{selected:r,setSelected:a,clear:t.useCallback(()=>a(new Set),[]),remove:y,removing:s}}const $8=()=>{const{data:e}=$v(),t=e?.contactsUnlockInfo;if(!t)return null;const n=t.period?` ${t.period}`:"";return i.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[i.jsxs("span",{className:"text-gray-500",children:[i.jsx("span",{className:"font-medium text-gray-900",children:t.count}),`/${t.limit} contacts unlocked${n}`]}),t.period&&t.resetInfo&&i.jsx(qe,{tooltip:t.resetInfo,placement:"top",children:i.jsx(ms,{className:"w-4 h-4 text-gray-400"})})]})},W8="reve-dev-view",Q8=new Set(["propose_reve_job","propose_email_unlock"]),Z8=({sessionId:e,systemPromptOverride:n,playbookOverrides:r,onSessionRotated:a})=>{const[o,l]=t.useState(""),[c,u]=t.useState(null),[p,h]=t.useState(!1),[m,f]=t.useState(!1),[g,y]=t.useState(!1),[x,v]=t.useState(""),w=t.useRef(null),[j,C]=t.useState(()=>"undefined"!=typeof window&&"true"===window.localStorage.getItem(W8)),{messages:N,isLoading:k,isInterrupting:S,isSessionLoaded:E,quickReplies:A,send:O,interrupt:_,clearQuickReplies:P,clearHistory:I,getArtifact:M,sessionNotFound:R,artifacts:L,renameArtifact:D,setArtifactRowCount:F,setArtifactShownCount:q,latestStreamArtifact:B,sessionTitle:U,uploadFiles:z,attaching:H,pendingAttachments:V,removeAttachment:$,hasMoreMessages:W,isLoadingOlderMessages:Q,loadOlderMessages:Z}=U8({sessionId:e,systemPromptOverride:n,playbookOverrides:r}),{data:K}=d(x4),G=K?.user?.first_name?.trim(),Y=!!K?.user?.is_admin,J=Y&&j,X=t.useCallback(()=>{C(e=>(window.localStorage.setItem(W8,String(!e)),!e))},[]),ee=t.useMemo(()=>{const e=J?N:N.filter(e=>"tool_call"!==e.kind||Q8.has(e.toolCall?.name??""));return!E||W?e:[p6(G),...e]},[E,W,N,G,J]);t.useEffect(()=>{B&&u(B.id)},[B]);const te=c?M(c):null,ne=V8(te?.agentFileId,F),re=t.useCallback(async()=>
1732{if(!o.trim()&&0===V.length)return;const e=o;l(""),await O(e,V)},[o,V,O]),ae=t.useCallback(e=>{u(t=>t===e.id?null:e.id)},[]),ie=t.useCallback(async e=>{P(),await O(e)},[P,O]),se=t.useCallback(async e=>{await O(e)},[O]),oe=t.useCallback(async()=>{if(!p&&window.confirm("Clear chat history? This permanently removes every message and file in this conversation.")){h(!0);try{const e=await I();e&&a?.(e)}finally{h(!1)}}},[p,I,a]),le=t.useCallback(()=>{u(null)},[]);t.useEffect(()=>{g&&(w.current?.focus(),w.current?.select())},[g]),t.useEffect(()=>y(!1),[c]);const[ce,ue]=t.useState(null);t.useEffect(()=>ue(null),[c]);const de=t.useCallback(e=>{c&&e>0&&q(c,e)},[c,q]),pe=t.useCallback(()=>{y(!1),c&&D(c,x).catch(()=>{})},[c,D,x]),he=t.useCallback(e=>{u(e.id),f(!1)},[]),me=`Files (${L.length})`,ge=0===ee.length,ye=!!te,xe=b6(te).style,be=te&&"table"===te.type?`Showing ${te.count} of ${te.totalCount} results`:"";return e&&R?i.jsx(T,{to:b.App,replace:!0}):i.jsxs(i.Fragment,{children:[U&&i.jsx(fe,{children:i.jsx("title",{children:`${U} - Cromatic`})}),i.jsx(h4,{header:i.jsxs("div",{className:"relative flex-shrink-0 px-4 py-3 border-b border-gray-100 bg-white flex items-center justify-between",children:[i.jsx("span",{className:"text-sm font-semibold text-primary",children:"Reve"}),J&&i.jsxs("a",{href:Yw.reveSession(e),target:"_blank",rel:"noreferrer",className:"absolute left-1/2 hidden -translate-x-1/2 items-center gap-1.5 rounded-md border border-yellow-500 bg-yellow-400 px-3 py-1.5 text-sm font-medium text-yellow-950 shadow-sm hover:bg-yellow-300 xl:inline-flex",children:[i.jsx(rs,{className:"h-3.5 w-3.5"}),"Reve QA"]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative",children:[i.jsxs("button",{type:"button",onClick:()=>f(e=>!e),className:s("flex items-center gap-1.5 rounded-md px-2 py-1 text-xs",m?"bg-gray-100 text-gray-900":"text-gray-500 hover:bg-gray-50"),children:[i.jsx(ss,{className:"h-3.5 w-3.5"}),L.length?me:"Files"]}),m&&i.jsx("div",{className:"absolute right-0 top-full z-50 mt-1",children:i.jsx(F8,{artifacts:L,activeArtifactId:c,onOpen:he,onRename:D,onClose:()=>f(!1)})})]}),i.jsx($8,{})]})]}),main:ye&&te&&i.jsxs(y4,{onClose:le,actions:i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(q8,{count:ne.selected.size,removing:ne.removing,onRemove:()=>{ne.remove().catch(()=>{})},onClear:ne.clear}),!te.isUpload&&i.jsx(qe,{tooltip:g?"Done":"Rename",placement:"top",children:i.jsx(g4,{size:"sm","aria-label":g?"Save name":"Rename file",onMouseDown:e=>e.preventDefault(),onClick:()=>{g?pe():(v(te.title),y(!0))},children:g?i.jsx(Nn,{className:"w-4 h-4"}):i.jsx(ks,{className:"w-4 h-4"})})}),"table"===te.type&&te.agentFileId&&i.jsx(X4,{agentFileId:te.agentFileId,title:te.title}),c6(te.type)&&te.agentFileId&&i.jsx(e6,{agentFileId:te.agentFileId,title:te.title,type:te.type})]}),header:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:s("w-8 h-8 rounded flex items-center justify-center",xe.bg,xe.fg),children:i.jsx(xe.icon,{className:"w-4 h-4"})}),i.jsxs("div",{children:[g?i.jsx("input",{ref:w,value:x,onChange:e=>v(e.target.value),onBlur:pe,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),pe()),"Escape"===e.key&&(e.preventDefault(),y(!1))},"aria-label":"File name",className:"w-64 rounded border border-gray-200 bg-white px-1.5 py-0 text-base font-medium text-gray-900 focus:border-gray-300 focus:outline-none focus:ring-0"}):i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("h3",{className:"text-base font-medium text-gray-900 select-text",children:te.title}),i.jsx(Yj,{text:te.title,tooltipContent:"Copy name"})]}),be&&i.jsx("p",{className:"text-xs text-gray-500",children:be})]})]}),subheader:i.jsx(W7,{summary:ce}),children:[te.agentFileId&&"markdown"===te.type&&i.jsx(V7,{agentFileId:te.agentFileId}),te.agentFileId&&"text"===te.type&&i.jsx($7,{agentFileId:te.agentFileId}),te.agentFileId&&"table"===te.type&&i.jsx(z7,{agentFileId:te.agentFileId,selectedRows:ne.selected,onSelectionChange:ne.setSelected,onSearchSummary:ue,onShownCount:de},te.agentFileId)]}),chat:i.jsx(L8,{messages:ee,isCentered:ge,activeArtifactId:c,onArtifactClick:ae,getArtifactStyle:b6,onCardAction:se,artifacts:L,hasMoreMessages:W,isLoadingOlderMessages:Q,onLoadOlderMessages:Z,composerValue:o,onComposerChange:l,onSend:re,composerPlaceholder:"Message Reve...",composerDisabled:k,isRunning:k,onStop:_,stopping:S,onAttach:z,attaching:H,pendingAttachments:V,onRemoveAttachment:$,composerFooter:i.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5",children:[i.jsx("span",{children:"Tell me what you want to take on — I'll shape it into an objective."}),J&&i.jsx("button",{type:"button",onClick:oe,disabled:p,className:"underline underline-offset-2 hover:text-gray-600 disabled:opacity-50",children:"Clear chat history"})]}),quickReplies:A.map(e=>e.label),onQuickReply:ie,showQuickReplies:A.length>0}),isMainOpen:ye,isChatOpen:!0}),Y&&i.jsx("div",{className:"fixed bottom-2 right-3 z-40 opacity-50 transition-opacity hover:opacity-100",children:i.jsx(ej,{id:"reve-dev-view-toggle",checked:j,onChange:X,label:"Dev view",labelClassName:"text-xs",inputClassName:"h-3.5 w-3.5 focus:ring-0 focus:ring-offset-0",tooltip:"Show Reve's tool calls in the chat and the clear-chat-history control. Only Cromatic staff see this toggle."})})]})}
1732,K8="/home/user/workspace",G8=u`
1733  query ReveWorkspaceFiles($sessionId: ID!) {
1734    reveWorkspaceFiles(sessionId: $sessionId)
1735  }
1736`,Y8=u`
1737  query ReveWorkspaceFile($sessionId: ID!, $path: String!) {
1738    reveWorkspaceFile(sessionId: $sessionId, path: $path)
1739  }
1740`,J8=e=>e.replace(`${K8}/`,""),X8=/"(?:[^"\\]|\\.)*"?|[{}[\],:]|[^\s{}[\],:"]+/g,eee=e=>{let t=0;const n=()=>`\n${"  ".repeat(t)}`;return(e.match(X8)??[]).map(e=>"{"===e||"["===e?(t+=1,e+n()):"}"===e||"]"===e?(t=Math.max(0,t-1),n()+e):","===e?`,${n()}`:":"===e?": ":e).join("")},tee=(e,t)=>/\.(ndjson|jsonl)$/.test(e)?t.split("\n").filter(e=>e.trim()).map(eee).join("\n\n"):e.endsWith(".json")?eee(t):t,nee=({sessionId:e})=>{const[n,r]=t.useState(null),{data:a,loading:s,error:o,refetch:l}=d(G8,{variables:{sessionId:e},pollInterval:5e3}),{data:c,loading:u}=d(Y8,{variables:{sessionId:e,path:n},skip:!n,pollInterval:5e3});if(o)return i.jsx("div",{className:"flex-1 px-4 py-3 text-xs text-red-600",children:"Couldn't read the sandbox workspace. Retry, or send a message to start the VM."});if(n){const e=c?.reveWorkspaceFile;return i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-100 px-4 py-2",children:[i.jsxs("button",{type:"button",onClick:()=>r(null),className:"flex items-center gap-1 text-xs text-blue-600 hover:underline",children:[i.jsx(_i,{className:"h-3.5 w-3.5"}),"Files"]}),i.jsx("span",{className:"truncate font-mono text-xs text-gray-500",children:J8(n)})]}),u&&!c?i.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400",children:i.jsx(gs,{className:"h-4 w-4 animate-spin"})}):i.jsx("div",{className:"flex-1 overflow-auto px-4 py-3",children:e?i.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-gray-800",children:tee(n,e)}):i.jsx("p",{className:"text-xs text-gray-400",children:"Not previewable — binary formats (.parquet, .xlsx, …) only show up in the list."})})]})}const p=a?.reveWorkspaceFiles??[];return i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 px-4 py-2",children:[i.jsx("span",{className:"font-mono text-xs text-gray-500",children:K8}),i.jsx("button",{type:"button",onClick:()=>l(),"aria-label":"Refresh workspace files",className:"text-gray-400 hover:text-gray-700",children:i.jsx(_s,{className:"h-3.5 w-3.5"})})]}),s&&!a?i.jsx("div",{className:"flex flex-1 items-center justify-center text-gray-400",children:i.jsx(gs,{className:"h-4 w-4 animate-spin"})}):i.jsxs("div",{className:"flex-1 overflow-auto py-1",children:[0===p.length&&i.jsx("p",{className:"px-4 py-2 text-xs text-gray-400",children:"The workspace is empty."}),[...p].sort((e,t)=>e.localeCompare(t)).map(e=>i.jsx("button",{type:"button",onClick:()=>r(e),className:"block w-full truncate px-4 py-1.5 text-left font-mono text-xs text-gray-700 hover:bg-gray-50",children:J8(e)},e))]})]})},ree="system",aee=()=>{const[e]=p(v4),[n,r]=t.useState(null),[a,l]=t.useState(!1),c=t.useRef(!1),{data:u,loading:h,error:m}=d(S4),{data:f,loading:g,error:y}=d(E4),x=h||g,b=m||y,v=t.useMemo(()=>{const e={};return u?.reveDefaultSystemPrompt&&(e[ree]=u.reveDefaultSystemPrompt),(f?.revePlaybooks??[]).forEach(t=>{e[t.name]=t.content}),e},[u,f]),w=t.useMemo(()=>[ree,...(f?.revePlaybooks??[]).map(e=>e.name)],[f]),[j,C]=t.useState({}),[N,k]=t.useState(!1),[S,E]=t.useState(ree);t.useEffect(()=>{!N&&!x&&Object.keys(v).length>0&&(C(v),k(!0))},[v,x,N]),t.useEffect(()=>{c.current||(c.current=!0,e().then(({data:e})=>{e?.agentGetOrCreateSession?r(e.agentGetOrCreateSession):l(!0)}).catch(()=>l(!0)))},[e]);const[A,O]=t.useState("edit"),[_,P]=t.useState(440),I=t.useRef(null),M=t.useCallback(e=>{e.preventDefault(),I.current={startX:e.clientX,startWidth:_};const t=e=>{if(!I.current)return;const t=e.clientX-I.current.startX,n=Math.max(280,window.innerWidth-420);P(Math.min(n,Math.max(280,I.current.startWidth+t)))},n=()=>{I.current=null,document.body.style.userSelect="",document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.body.style.userSelect="none",document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)},[_]);t.useEffect(()=>{const e=()=>{P(e=>Math.min(e,Math.max(280,window.innerWidth-420)))};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const T=j[S]??"",R=T!==(v[S]??""),L=""===T.trim(),D=w.filter(e=>(j[e]??"")!==(v[e]??"")).length,F=(()=>{const e=S===ree?"prompt":"playbook";return L?`Blank — the agent will run the shipped ${e}`:R?`Modified from shipped ${e}`:`Matches shipped ${e}`})(),q=t.useMemo(()=>w.filter(e=>e!==ree&&""!==(j[e]??"").trim()).map(e=>({name:e,content:j[e]})),[w,j]);return i.jsxs("div",{className:"flex h-screen bg-gray-50",children:[i.jsxs("div",{style:{width:_},className:"flex flex-shrink-0 flex-col bg-white",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 px-4 py-3",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("h1",{className:"text-sm font-semibold text-gray-900",children:"System prompt playground"}),i.jsx("p",{className:"truncate text-xs text-gray-500",children:"Edits apply to each message you send in this session."})]}),i.jsx(o,{to:Yw.base,className:"flex-shrink-0 text-sm text-blue-600 hover:underline",children:"← Ops"})]}),i.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-gray-100 px-4 py-2",children:[i.jsx("select",{value:S,onChange:e=>E(e.target.value),disabled:x,className:"min-w-0 flex-1 rounded-md border border-gray-200 bg-white px-2 py-1 text-xs font-medium text-gray-900 focus:outline-none disabled:bg-gray-50",children:w.map(e=>{const t=e===ree?"System prompt":`Playbook: ${e}`,n=(j[e]??"")!==(v[e]??"");return i.jsx("option",{value:e,children:n?`${t} •`:t},e)})}),i.jsx("div",{className:"flex flex-shrink-0 gap-0.5",children:["edit","preview","files"].map(e=>i.jsx("button",{type:"button",onClick:()=>
1740O(e),className:s("rounded-md px-2.5 py-1 text-xs font-medium capitalize transition-colors",A===e?"bg-gray-100 text-gray-900":"text-gray-500 hover:text-gray-800"),children:e},e))})]}),"files"===A?n?i.jsx(nee,{sessionId:n}):i.jsx("div",{className:"flex-1 px-4 py-3 text-xs text-gray-400",children:"Waiting for the session…"}):b?i.jsx("div",{className:"flex-1 px-4 py-3 text-xs text-red-600",children:"Couldn't load the Reve prompt docs. Reload to try again."}):"preview"===A?i.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 text-sm text-gray-800",children:L?i.jsx("p",{className:"text-xs text-gray-400",children:"Nothing to preview."}):i.jsx(H7,{text:T})}):i.jsx("textarea",{value:T,onChange:e=>C(t=>({...t,[S]:e.target.value})),spellCheck:!1,disabled:x,className:"flex-1 resize-none border-0 px-4 py-3 font-mono text-xs leading-relaxed text-gray-800 focus:outline-none focus:ring-0 disabled:bg-gray-50",placeholder:"Loading the current Reve prompt docs…"}),"files"!==A&&i.jsxs("div",{className:"flex items-center justify-between border-t border-gray-100 px-4 py-2.5",children:[i.jsxs("span",{className:"text-xs "+(L?"text-amber-600":"text-gray-500"),children:[F,D>0&&` · ${D} doc${1===D?"":"s"} modified`]}),i.jsx("button",{type:"button",onClick:()=>C(e=>({...e,[S]:v[S]??""})),disabled:!R||!v[S],className:"rounded-md border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Reset to default"})]})]}),i.jsx("button",{type:"button","aria-label":"Resize system prompt panel",tabIndex:-1,onMouseDown:M,onDoubleClick:()=>P(440),className:"w-1 flex-shrink-0 cursor-col-resize appearance-none border-0 bg-gray-200 p-0 transition-colors hover:bg-blue-400"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[n&&i.jsx(Z8,{sessionId:n,systemPromptOverride:j[ree]??"",playbookOverrides:q,onSessionRotated:r},n),!n&&a&&i.jsx("div",{className:"flex h-full w-full items-center justify-center px-6 text-center text-sm text-red-600",children:"Couldn't open the playground session. Reload to try again."}),!n&&!a&&i.jsx("div",{className:"flex h-full w-full items-center justify-center text-gray-400",children:i.jsx(gs,{className:"h-5 w-5 animate-spin"})})]})]})},iee=({rows:e})=>i.jsx("dl",{className:"grid grid-cols-[10rem_1fr] gap-x-4 gap-y-2 text-sm",children:e.map(([e,t])=>i.jsxs(n.Fragment,{children:[i.jsx("dt",{className:"text-gray-500",children:e}),i.jsx("dd",{className:"break-words text-gray-900",children:t??"—"})]},e))}),see=({title:e,children:t})=>i.jsxs("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsx("h3",{className:"text-base font-medium text-gray-900",children:e}),i.jsx("div",{className:"mt-3",children:t})]}),oee=u`
1741  query OpsEvidenceFrameFacets {
1742    opsEvidenceFrameFacets {
1743      frames {
1744        key
1745        fills
1746      }
1747      fillers {
1748        key
1749        fills
1750      }
1751      source_types {
1752        key
1753        fills
1754      }
1755    }
1756  }
1757`,lee=u`
1758  query OpsEvidenceFrames(
1759    $frame: String
1760    $filler: String
1761    $sourceType: String
1762    $sourceId: String
1763    $observationId: ID
1764    $current: Boolean
1765    $slot: String
1766    $value: String
1767    $role: String
1768    $entity: String
1769    $q: String
1770    $limit: Int
1771    $cursor: String
1772  ) {
1773    opsEvidenceFrames(
1774      frame: $frame
1775      filler: $filler
1776      source_type: $sourceType
1777      source_id: $sourceId
1778      observation_id: $observationId
1779      current: $current
1780      slot: $slot
1781      value: $value
1782      role: $role
1783      entity: $entity
1784      q: $q
1785      limit: $limit
1786      cursor: $cursor
1787    ) {
1788      items {
1789        id
1790        frame_id
1791        frame_version
1792        filler_version
1793        observation_id
1794        source_type
1795        source_id
1796        native_id
1797        created_at
1798        instance_count
1799        current
1800        invalidated
1801        roles {
1802          role
1803          entity
1804        }
1805        slots {
1806          slot
1807          value
1808        }
1809      }
1810      total
1811      next
1812      computed_at
1813    }
1814  }
1815`,cee=u`
1816  query OpsEvidenceFrame($id: ID!) {
1817    opsEvidenceFrame(id: $id) {
1818      current
1819      fill {
1820        id
1821        frame_id
1822        frame_version
1823        filler_version
1824        router_version
1825        content_hash
1826        created_at
1827        instances
1828        validation
1829      }
1830      observation {
1831        id
1832        statement
1833        extractor_method
1834        extractor_version
1835        invalidated
1836        invalidation {
1837          method
1838          reason
1839          created_at
1840          invalidated_by
1841        }
1842      }
1843      source {
1844        id
1845        native_id
1846        source_type
1847        source_version
1848        source_url
1849        retrieved_at
1850      }
1851      definition {
1852        id
1853        version
1854        gist
1855        slots {
1856          name
1857          kind
1858          description
1859        }
1860      }
1861    }
1862  }
1863`,uee=u`
1864  mutation OpsInvalidateObservation($observationId: ID!, $reason: String!) {
1865    opsInvalidateObservation(observation_id: $observationId, reason: $reason) {
1866      id
1867      statement
1868      extractor_method
1869      extractor_version
1870      invalidated
1871      invalidation {
1872        method
1873        reason
1874        created_at
1875        invalidated_by
1876      }
1877    }
1878  }
1879`,dee=u`
1880  mutation OpsReloadEvidenceFrameCounts($scope: OpsEvidenceFrameReload!) {
1881    opsReloadEvidenceFrameCounts(scope: $scope)
1882  }
1883`,pee="cache-and-network",hee=[{key:"slot",label:"Slot",placeholder:"e.g. phase"},{key:"value",label:"Slot value",placeholder:"exact value, as filled"},{key:"role",label:"Role",placeholder:"e.g. sponsor"},{key:"entity",label:"Role entity",placeholder:"exact name, as filled"},{key:"q",label:"Search",placeholder:"Words anywhere in the fill, or an id"}],mee=u`
1884  query OpsServedFrameReadings {
1885    opsServedFrameReadings {
1886      frame_id
1887      served {
1888        key
1889        frame_id
1890        frame_version
1891        extractor_method
1892        extractor_version
1893        filler_version
1894        latest
1895        writable
1896        served
1897      }
1898      chosen_by
1899      chosen_at
1900      chosen_coverage {
1901        key
1902        sources
1903        missing_observations
1904        missing_fills
1905        retracted
1906        ready
1907        measured_at
1908      }
1909      versions {
1910        key
1911        frame_id
1912        frame_version
1913        extractor_method
1914        extractor_version
1915        filler_version
1916        latest
1917        writable
1918        served
1919      }
1920    }
1921  }
1922`,fee=u`
1923  query OpsFrameReadingCoverage($frameId: String!, $key: String!) {
1924    opsFrameReadingCoverage(frame_id: $frameId, key: $key) {
1925      key
1926      sources
1927      missing_observations
1928      missing_fills
1929      retracted
1930      ready
1931      measured_at
1932    }
1933  }
1934`,gee=u`
1935  mutation OpsServeFrameReading(
1936    $frameId: String!
1937    $key: String!
1938    $acceptIncompleteCoverage: Boolean
1939  ) {
1940    opsServeFrameReading(
1941      frame_id: $frameId
1942      key: $key
1943      accept_incomplete_coverage: $acceptIncompleteCoverage
1944    ) {
1945      frame_id
1946      served {
1947        key
1948        frame_id
1949        frame_version
1950        extractor_method
1951        extractor_version
1952        filler_version
1953        latest
1954        writable
1955        served
1956      }
1957      chosen_by
1958      chosen_at
1959      chosen_coverage {
1960        key
1961        sources
1962        missing_observations
1963        missing_fills
1964        retracted
1965        ready
1966        measured_at
1967      }
1968      versions {
1969        key
1970        frame_id
1971        frame_version
1972        extractor_method
1973        extractor_version
1974        filler_version
1975        latest
1976        writable
1977        served
1978      }
1979    }
1980  }
1981`,yee=e=>{if(!e)return"—";const t=new Date(e);
1981return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},xee=(e,t,n)=>`${e.toLocaleString()} ${1===e?t:n}`,bee=({tone:e,title:t,children:n})=>i.jsx("span",{title:t,className:`whitespace-nowrap rounded px-1.5 py-0.5 text-xs font-medium ${e}`,children:n}),vee=({version:e})=>i.jsxs("span",{className:"flex flex-wrap gap-1",children:[e.served&&i.jsx(bee,{tone:"bg-green-50 text-green-700",title:"Search answers from this version now.",children:"Served"}),e.latest&&i.jsx(bee,{tone:"bg-blue-50 text-blue-700",title:"This release's latest frame, extractor and filler build this version.",children:"Latest"}),e.writable&&i.jsx(bee,{tone:"bg-gray-100 text-gray-700",title:"Newly ingested records still receive this version.",children:"Writable"})]}),wee=({version:e})=>i.jsx(iee,{rows:[["Frame",`${e.frame_id} version ${e.frame_version}`],["Extractor",`${e.extractor_method} ${e.extractor_version}`],["Filler",e.filler_version],["Key",i.jsx("span",{className:"font-mono text-xs",children:e.key})]]}),jee=({coverage:e})=>{const t=[];0===e.sources&&t.push("No stored sources were found, so this version has nothing to answer from."),e.missing_observations>0&&t.push(`${xee(e.missing_observations,"source has","sources have")} no observation at this version.`),e.missing_fills>0&&t.push(`${xee(e.missing_fills,"source has an observation","sources have an observation")} at this version with no fill.`);const n=e.ready?"border-green-200 bg-green-50 text-green-800":"border-amber-200 bg-amber-50 text-amber-800";return i.jsxs("div",{className:`mt-3 rounded-lg border p-3 text-sm ${n}`,role:"status",children:[i.jsx("p",{className:"font-medium",children:e.ready?"Ready. Every stored source has an observation at this version, and every standing observation has a fill.":"Not ready. Serving it now leaves these sources out of search until they are backfilled."}),t.map(e=>i.jsx("p",{className:"mt-1",children:e},e)),e.retracted>0&&i.jsx("p",{className:"mt-1",children:`${xee(e.retracted,"source has a retracted observation","sources have a retracted observation")}, which needs no fill.`}),i.jsx("p",{className:"mt-1 text-xs opacity-80",children:`Measured across ${xee(e.sources,"stored source","stored sources")} at ${yee(e.measured_at)}.`})]})},Cee=e=>e.missing_observations+e.missing_fills,Nee=({frameId:e,version:n,servedKey:r,switching:a,failure:s,onServe:o})=>{const[l,c]=t.useState(!1),[u,{data:d,loading:p,error:h}]=An(fee,{fetchPolicy:"network-only"}),m=d?.opsFrameReadingCoverage??null;return i.jsxs("li",{className:"py-4",children:[i.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx(vee,{version:n}),i.jsx("div",{className:"mt-2",children:i.jsx(wee,{version:n})})]}),!n.served&&i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:()=>{c(!1),u({variables:{frameId:e,key:n.key}}).catch(()=>{})},disabled:p||a,className:"rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:p?"Checking coverage…":"Check coverage"}),i.jsx("button",{type:"button",onClick:()=>{m?c(!0):u({variables:{frameId:e,key:n.key}}).then(e=>{e.data&&c(!0)}).catch(()=>{})},disabled:p||a||l,className:"rounded bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50",children:"Serve this version"})]})]}),n.served&&i.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Search answers from this version now."}),p&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Measuring coverage across every stored source. This takes several seconds."}),h&&!p&&i.jsx("p",{className:"mt-3 text-sm text-red-700",children:`Coverage could not be measured: ${h.message}`}),m&&!p&&!n.served&&i.jsx(jee,{coverage:m}),l&&m&&!n.served&&i.jsxs("div",{className:"mt-3 rounded-lg border p-4 "+(m.ready?"border-amber-200 bg-amber-50":"border-red-200 bg-red-50"),children:[i.jsx("p",{className:"text-sm font-medium "+(m.ready?"text-amber-900":"text-red-900"),children:m.ready?"Serve this version":"This version does not cover every stored source"}),!m.ready&&i.jsx("p",{className:"mt-1 text-sm text-red-800",children:`${xee(Cee(m),"stored source has","stored sources have")} no usable reading at this version, out of ${xee(m.sources,"stored source","stored sources")}. They drop out of search until they are backfilled.`}),i.jsx("p",{className:"mt-1 text-sm "+(m.ready?"text-amber-800":"text-red-800"),children:`Every search that starts after this reads ${n.key}. Searches already running finish on the current version, ${r}.`}),i.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[i.jsxs("button",{type:"button",onClick:()=>{m&&o(n.key,!m.ready).then(e=>{e&&c(!1)})},disabled:a,className:"rounded px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50 "+(m.ready?"bg-amber-600 hover:bg-amber-700":"bg-red-600 hover:bg-red-700"),children:[a&&"Switching…",!a&&(m.ready?"Yes, serve this version":"Serve anyway")]}),i.jsx("button",{type:"button",onClick:()=>c(!1),disabled:a,className:"text-sm text-gray-600 hover:underline",children:"Cancel"})]})]}),s&&i.jsx("p",{className:"mt-2 text-sm text-red-700",children:`The served version was not changed: ${s}`})]})},kee=({reading:e})=>{const[n,r]=t.useState(!1),[a,s]=t.useState(null),[o,{loading:l}]=p(gee,{refetchQueries:[{query:mee}]}),{served:c}=e,u=async(t,n)=>{s(null);try{const{data:r}=await o({variables:{frameId:e.frame_id,key:t,acceptIncompleteCoverage:n}});return Boolean(r)}catch(r){return s({key:t,message:r instanceof Error?r.message:"The server refused the switch."}),!1}};return i.jsxs(see,{title:`${e.frame_id} readings`,children:[i.jsx(wee,{version:c}),i.jsx("div",{className:"mt-2",children:i.jsx(iee,{rows:[["Chosen",e.chosen_at?i.jsxs(i.Fragment,{children:["By ",i.jsx("span",{className:"font-mono text-xs",children:e.chosen_by??"no recorded person"}),` on ${yee(e.chosen_at)}`]}):"No one has chosen a version, so the release default applies."]]})}),e.chosen_coverage&&!e.chosen_coverage.ready&&i.jsx("p",{className:"mt-3 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-800",role:"status",children:`Served while incomplete: when it was chosen, ${xee(Cee(e.chosen_coverage),"stored source had","stored sources had")} no usable reading at this version, out of ${xee(e.chosen_coverage.sources,"stored source","stored sources")}.`}),i.jsx("button",{type:"button",onClick:()=>r(!n),className:"mt-4 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-50",children:n?"Hide versions":"Change served version"}),n&&i.jsx("ul",{className:"mt-2 divide-y divide-gray-100",children:e.versions.map(t=>i.jsx(Nee,{frameId:e.frame_id,version:t,servedKey:c.key,switching:l,failure:a?.key===t.key?a.message:null,onServe:u},t.key))})]})},See=()=>{const{data:e,loading:t,error:n}=d(mee,{fetchPolicy:pee}),r=e?.opsServedFrameReadings;return i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Served reading versions"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Search answers from one version of each frame's readings. Changing it affects production: every search that starts afterwards reads the new version."}),t&&!r&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading…"}),n&&!r&&i.jsx("p",{className:"mt-3 text-sm text-red-600",children:"Failed to load the served reading versions."}),0===r?.length&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No frame has a served reading version."}),r?.map(e=>i.jsx(kee,{reading:e},e.frame_id))]})},Eee=e=>{const t=new Date(e);
1981return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},Aee=e=>{const t=t=>e.get(t)||void 0,n=e.get("current");return{frame:t("frame"),filler:t("filler"),sourceType:t("sourceType"),sourceId:t("sourceId"),observationId:t("observationId"),current:null===n?void 0:"yes"===n,slot:t("slot"),value:t("value"),role:t("role"),entity:t("entity"),q:t("q")}},Oee=e=>{const t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{void 0!==n&&""!==n&&t.set(e,"boolean"==typeof n?n?"yes":"no":n)}),t},_ee=e=>{const t=Oee(e).toString();return t?`${Yw.evidenceFrames}?${t}`:Yw.evidenceFrames},Pee=({current:e,invalidated:t})=>t?i.jsx("span",{className:"whitespace-nowrap rounded bg-red-50 px-1.5 py-0.5 text-xs font-medium text-red-700",children:"Observation invalidated"}):e?i.jsx("span",{className:"whitespace-nowrap rounded bg-green-50 px-1.5 py-0.5 text-xs font-medium text-green-700",children:"Current"}):i.jsx("span",{className:"whitespace-nowrap rounded bg-amber-50 px-1.5 py-0.5 text-xs font-medium text-amber-700",children:"Words changed since fill"}),Iee=e=>{const t=e.slice(0,3).map(e=>`${e.slot}: ${e.value??"—"}`),n=e.length-t.length;return t.join(" · ")+(n>0?` · +${n} more`:"")},Mee=({name:e,label:t,value:n,options:r,anyLabel:a,onChange:s})=>i.jsxs("label",{htmlFor:`filter-${e}`,className:"flex flex-col gap-1 text-xs font-medium text-gray-600",children:[t,i.jsxs("select",{id:`filter-${e}`,value:n??"",onChange:e=>s(e.target.value||void 0),className:"w-48 rounded-md border border-gray-300 px-2 py-1.5 text-sm font-normal text-gray-900 focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:a}),r.map(e=>i.jsx("option",{value:e.key,children:`${e.key} (${e.fills.toLocaleString()})`},e.key))]})]}),Tee=["Frame","Slots","Standing","Source","Filled"],Ree=({fill:e,onOpen:t})=>{const n=e.roles.map(e=>e.entity).filter(Boolean).join(", ");return i.jsxs("tr",{className:"cursor-pointer align-top hover:bg-gray-50",onClick:t,children:[i.jsxs("td",{className:"px-4 py-2 text-sm",children:[i.jsx("span",{className:"font-medium text-gray-900",children:`${e.frame_id} v${e.frame_version}`}),i.jsx("span",{className:"block text-xs text-gray-500",children:n||"No roles"})]}),i.jsxs("td",{className:"px-4 py-2 text-sm text-gray-700",children:[Iee(e.slots)||"—",e.instance_count>1&&i.jsx("span",{className:"block text-xs text-gray-500",children:`${e.instance_count} instances`})]}),i.jsx("td",{className:"px-4 py-2",children:i.jsx(Pee,{current:e.current,invalidated:e.invalidated})}),i.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500",children:[e.native_id??e.source_id,i.jsx("span",{className:"block",children:e.source_type})]}),i.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-xs text-gray-500",children:Eee(e.created_at)})]})},Lee=()=>{const e=m(),[t,r]=P(),a=Aee(t),s=t.toString(),[l,c]=n.useState([]);n.useEffect(()=>c([]),[s]);const u=l[l.length-1],[h,f]=n.useState(a);n.useEffect(()=>f(Aee(new URLSearchParams(s))),[s]);const{data:g,refetch:y}=d(oee,{fetchPolicy:pee}),x=g?.opsEvidenceFrameFacets,{data:b,previousData:v,loading:w,error:j,refetch:C}=d(lee,{variables:{...a,limit:50,cursor:u},fetchPolicy:pee}),N=(b??v)?.opsEvidenceFrames,k=N?.items??[],S=N?.total??0,E=e=>r(Oee(e)),A=(e,t)=>{E({...h,[e]:t})},[O,{loading:_,error:I}]=p(dee),M=async e=>{await O({variables:{scope:e}}
1981),await Promise.all("ALL"===e?[C(),y()]:[C()])},T=N?.computed_at?new Date(N.computed_at):null,R=null!==T&&Date.now()-T.getTime()>5e3;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Evidence frames"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Frame fills from the evidence store — what each observation was read to say, in typed form. Newest first."})]}),i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"})]}),i.jsx(See,{}),i.jsxs("form",{className:"mt-6 flex flex-wrap items-end gap-3 rounded-lg border border-gray-200 bg-white p-4",onSubmit:e=>{e.preventDefault(),E(h)},children:[i.jsx(Mee,{name:"frame",label:"Frame",value:a.frame,options:x?.frames??[],anyLabel:"All frames",onChange:e=>A("frame",e)}),i.jsx(Mee,{name:"filler",label:"Filler version",value:a.filler,options:x?.fillers??[],anyLabel:"Any filler",onChange:e=>A("filler",e)}),i.jsx(Mee,{name:"sourceType",label:"Source type",value:a.sourceType,options:x?.source_types??[],anyLabel:"All source types",onChange:e=>A("sourceType",e)}),i.jsxs("label",{htmlFor:"filter-current",className:"flex flex-col gap-1 text-xs font-medium text-gray-600",children:["Standing",i.jsxs("select",{id:"filter-current",value:void 0===a.current?"":a.current?"yes":"no",onChange:e=>A("current",e.target.value||void 0),className:"w-48 rounded-md border border-gray-300 px-2 py-1.5 text-sm font-normal text-gray-900 focus:border-blue-500 focus:outline-none",children:[i.jsx("option",{value:"",children:"Current and retired"}),i.jsx("option",{value:"yes",children:"Current only"}),i.jsx("option",{value:"no",children:"Retired or invalidated only"})]})]}),hee.map(e=>i.jsxs("label",{htmlFor:`filter-${e.key}`,className:"flex flex-col gap-1 text-xs font-medium text-gray-600",children:[e.label,i.jsx("input",{id:`filter-${e.key}`,type:"text",value:h[e.key]??"",placeholder:e.placeholder,onChange:t=>f({...h,[e.key]:t.target.value}),className:"w-48 rounded-md border border-gray-300 px-2 py-1.5 text-sm font-normal text-gray-900 focus:border-blue-500 focus:outline-none"})]},e.key)),i.jsx("button",{type:"submit",className:"rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700",children:"Apply"}),""!==s&&i.jsx("button",{type:"button",onClick:()=>E({}),className:"rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:"Clear"})]}),w&&!N&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),j&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load frame fills."}),N&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("p",{className:"text-sm text-gray-500",children:[`${S.toLocaleString()} ${1===S?"fill matches":"fills match"}`,w&&i.jsx("span",{className:"ml-2 text-gray-400",children:"updating…"}),R&&T&&i.jsx("span",{className:"ml-2 text-gray-400",children:`Counts as of ${T.toLocaleTimeString()}.`}),I&&i.jsx("span",{className:"ml-2 text-red-600",children:"Could not reload the counts."})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:_,onClick:()=>M("FRAMES").catch(()=>{}),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Reload frames"}),i.jsx("button",{type:"button",disabled:_,onClick:()=>M("ALL").catch(()=>{}),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Reload all"})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:0===l.length,onClick:()=>c(e=>e.slice(0,-1)),className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"← Prev"}),i.jsx("button",{type:"button",disabled:w||!N.next,onClick:()=>{N.next&&c(e=>[...e,N.next])},className:"rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40",children:"Next →"})]})]}),i.jsx("div",{className:"mt-2 overflow-x-auto rounded-lg border border-gray-200 bg-white",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsx("tr",{children:Tee.map(e=>i.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:0===k.length?i.jsx("tr",{children:i.jsx("td",{colSpan:Tee.length,className:"px-4 py-10 text-center text-sm text-gray-500",children:"No frame fills match these filters."})}):k.map(t=>i.jsx(Ree,{fill:t,onOpen:()=>
1981e(Yw.evidenceFrame(t.id))},t.id))})]})})]})]})})},Dee=e=>{if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},Fee=({to:e})=>i.jsx(o,{to:e,className:"whitespace-nowrap text-xs text-blue-600 hover:underline",children:"Find fills"}),qee=e=>{if(!e)return"Not validated";const t=e.conflictingFields??[];return t.length?`Conflicting fields: ${t.join(", ")}`:`No conflicts (validation v${e.version??"?"})`},Bee=({name:e,entries:t})=>{const n=[...new Set(t.flatMap(e=>Object.keys(e.values??{})))];return i.jsxs("div",{className:"mt-4",children:[i.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:`${e} · ${t.length.toLocaleString()}`}),0===t.length?i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"The filler read this collection and found no rows."}):i.jsx("div",{className:"mt-2 overflow-x-auto",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[i.jsx("thead",{children:i.jsx("tr",{children:[...n,"Quote"].map(e=>i.jsx("th",{className:"px-3 py-1.5 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:t.map((t,r)=>i.jsxs("tr",{className:"align-top",children:[n.map(e=>i.jsx("td",{className:"px-3 py-1.5 text-gray-900",children:t.values?.[e]??""},e)),i.jsx("td",{className:"px-3 py-1.5 italic text-gray-600",children:t.quote??""})]},`${e}-${r}`))})]})})]})},Uee=({instance:e,index:t,frame:n,slotDefinitions:r})=>{const a=e.roles??[],s=e.slots??[],o=Object.entries(e.collections??{});return i.jsxs(see,{title:`Instance ${t+1}`,children:[i.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:"Roles"}),0===a.length?i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"No roles."}):i.jsx("table",{className:"mt-2 min-w-full divide-y divide-gray-200 text-sm",children:i.jsx("tbody",{className:"divide-y divide-gray-100",children:a.map(e=>i.jsxs("tr",{className:"align-top",children:[i.jsx("td",{className:"w-40 px-3 py-1.5 text-gray-500",children:e.role}),i.jsx("td",{className:"px-3 py-1.5 font-medium text-gray-900",children:e.entity}),i.jsx("td",{className:"px-3 py-1.5 text-right",children:i.jsx(Fee,{to:_ee({frame:n,role:e.role,entity:e.entity})})})]},`${e.role}-${e.entity}`))})}),i.jsx("h4",{className:"mt-4 text-xs font-medium uppercase tracking-wide text-gray-500",children:"Slots"}),0===s.length?i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"No slots filled."}):i.jsx("div",{className:"mt-2 overflow-x-auto",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[i.jsx("thead",{children:i.jsx("tr",{children:["Slot","Value","Quote",""].map((e,t)=>i.jsx("th",{className:"px-3 py-1.5 text-left text-xs font-medium uppercase tracking-wide text-gray-500",children:e},e||t))})}),i.jsx("tbody",{className:"divide-y divide-gray-100",children:s.map(e=>{const t=r.get(e.slot);return i.jsxs("tr",{className:"align-top",children:[i.jsxs("td",{className:"px-3 py-1.5",title:t?.description??"",children:[i.jsx("span",{className:"text-gray-900",children:e.slot}),t&&i.jsx("span",{className:"block text-xs text-gray-500",children:t.kind})]}),i.jsx("td",{className:"px-3 py-1.5 font-medium text-gray-900",children:e.value}),i.jsx("td",{className:"px-3 py-1.5 italic text-gray-600",children:e.quote}),i.jsx("td",{className:"px-3 py-1.5 text-right",children:i.jsx(Fee,{to:_ee({frame:n,slot:e.slot,value:e.value})})})]},`${e.slot}-${e.value}`)})})]})}),o.map(([e,t])=>i.jsx(Bee,{name:e,entries:t},e))]})},zee=({observation:e,fills:n,onDisowned:r})=>{const[a,s]=t.useState(!1),[o,l]=t.useState(""),[c,{loading:u,error:d}]=p(uee),h=o.trim().length<10,m=()=>{s(!1),l("")};return a?i.jsxs("div",{className:"mt-4 rounded-lg border border-red-200 bg-red-50 p-4",children:[i.jsx("p",{className:"text-sm font-medium text-red-800",children:"Mark this observation invali
1981d"}),i.jsxs("p",{className:"mt-1 text-sm text-red-700",children:[`Every read of the evidence store will skip this statement and the ${n} `,1===n?"fill read from it":"fills read from it",". Nothing is deleted, and there is no undo from this page."]}),i.jsxs("label",{className:"mt-3 block text-sm text-red-800",htmlFor:"invalidation-reason",children:["Why is it wrong?",i.jsx("textarea",{id:"invalidation-reason",value:o,onChange:e=>l(e.target.value),rows:3,className:"mt-1 block w-full rounded border border-red-300 p-2 text-sm text-gray-900",placeholder:"What this statement gets wrong, in a sentence, for whoever reads the log later."})]}),h&&i.jsx("p",{className:"mt-1 text-xs text-red-700",children:"The reason is stored with the retraction, so give it at least 10 characters."}),i.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[i.jsx("button",{type:"button",onClick:()=>{c({variables:{observationId:e.id,reason:o.trim()}}).then(({data:e})=>{e&&(r(e.opsInvalidateObservation),m())}).catch(()=>{})},disabled:h||u,className:"rounded bg-red-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",children:u?"Marking invalid…":"Yes, mark it invalid"}),i.jsx("button",{type:"button",onClick:m,disabled:u,className:"text-sm text-gray-600 hover:underline",children:"Cancel"})]}),d&&i.jsx("p",{className:"mt-2 text-sm text-red-700",children:`It was not marked invalid: ${d.message}`})]}):i.jsx("button",{type:"button",onClick:()=>s(!0),className:"mt-4 rounded border border-red-300 px-3 py-1.5 text-sm font-medium text-red-700 hover:bg-red-50",children:"Mark observation invali
1981d"})},Hee=({observation:e,current:t,fills:n,onDisowned:r})=>i.jsxs(see,{title:"Observation",children:[i.jsx("p",{className:"text-sm text-gray-900",children:e.statement}),i.jsx("div",{className:"mt-3",children:i.jsx(iee,{rows:[["Standing",e.invalidated?"Invalidated":"Live"],["Words",t?"Unchanged since this fill was written":"Changed since this fill was written; the fill is retired"],["Extractor",`${e.extractor_method} ${e.extractor_version}`],["Fills from it",i.jsx(o,{to:_ee({observationId:e.id}),className:"text-blue-600 hover:underline",children:"Browse frames from this observation"})]]})}),e.invalidation?i.jsx("div",{className:"mt-4 rounded-lg border border-red-200 bg-red-50 p-4",children:i.jsx(iee,{rows:[["Why",e.invalidation.reason],["How",e.invalidation.method],["When",Dee(e.invalidation.created_at)],["By",e.invalidation.invalidated_by?i.jsx("span",{className:"font-mono text-xs",children:e.invalidation.invalidated_by}):"No person; the pipeline retracted it"]]})}):i.jsx(zee,{observation:e,fills:n,onDisowned:r})]}),Vee=/^https?:\/\/[^\s]+$/i,$ee=({value:e})=>Vee.test(e)?i.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"relative z-10 text-blue-600 hover:underline",children:e}):i.jsx(i.Fragment,{children:e}),Wee=({detail:e})=>{const t=(e.fill.instances??[]).length,n=[{label:"Source",value:i.jsxs(i.Fragment,{children:[i.jsx($ee,{value:e.source?.native_id??e.observation.id}),` · ${e.source?.source_type??"—"}`]}),to:e.source?_ee({sourceId:e.source.id}):void 0,linkLabel:"All fills from this source"},{label:"Observation",value:e.observation.statement,to:_ee({observationId:e.observation.id}),linkLabel:"All fills from this observation"},{label:"Frame",value:`${t} instance${1===t?"":"s"}`}];return i.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:n.map(({label:e,value:t,to:r,linkLabel:a},s)=>i.jsxs("div",{className:`relative max-w-sm flex-1 rounded-lg border p-3 ${s===n.length-1?"border-blue-300 bg-blue-50":"border-gray-200 bg-white"} ${r?"hover:border-blue-300 hover:bg-blue-50":""}`,children:[i.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:e}),i.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-gray-900",children:t}),r&&i.jsx(o,{to:r,className:"absolute inset-0 rounded-lg",children:i.jsx("span",{className:"sr-only",children:a})})]},e))})},Qee=()=>{const{fillId:e=""}=he(),{data:n,loading:r,error:a}=d(cee,{variables:{id:e},fetchPolicy:pee}),[s,l]=t.useState(null),c=n?.opsEvidenceFrame??null,u=s?.id===c?.observation.id?s:c?.observation??null;return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:c?`${c.fill.frame_id} v${c.fill.frame_version}`:"Frame fill"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"One fill from the evidence store, with the words each slot was read from."})]}),i.jsx(o,{to:Yw.evidenceFrames,className:"text-sm text-blue-600 hover:underline",children:"← Evidence frames"})]}),r&&!c&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),a&&i.jsx("p",{className:"mt-6 text-sm text-red-600",children:"Failed to load this frame fill."}),!r&&!a&&!c&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"No frame fill has this id."}),c&&u&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[i.jsx(Pee,{current:c.current,invalidated:u?.invalidated??!1}),i.jsx("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-700",children:c.fill.filler_version})]}),i.jsx(Wee,{detail:c}),i.jsx("p",{className:"mt-4 text-sm text-gray-600",children:c.definition?.gist??"This frame’s definition is not installed in this build, so slots are shown without their descriptions."}),i.jsx(see,{title:"Fill",children:i.jsx(iee,{rows:[["Frame",`${c.fill.frame_id} version ${c.fill.frame_version}`],["Filler",c.fill.filler_version],["Router",c.fill.router_version??"—"],["Content hash",i.jsx("span",{className:"font-mono text-xs",children:c.fill.content_hash})],["Validation",qee(c.fill.validation)],["Filled",Dee(c.fill.created_at)],["Id",i.jsx("span",{className:"font-mono text-xs",children:c.fill.id})]]})}),0===(c.fill.instances??[]).length?i.jsx(see,{title:"Instances",children:i.jsx("p",{className:"text-sm text-gray-500",children:"This fill holds no instances: the filler read the statement and found nothing for this frame."})}):(c.fill.instances??[]).map((e,t)=>i.jsx(Uee,{instance:e,index:t,frame:`${c.fill.frame_id}@${c.fill.frame_version}`,slotDefinitions:new Map((c.definition?.slots??[]).map(e=>[e.name,e]))},`instance-${t}`)),i.jsx(Hee,{observation:u,current:c.current,fills:(c.fill.instances??[]).length,onDisowned:l})]})]})})},Zee=(e,t="never")=>{if(!e)return t;const n=new Date(e);
1981return Number.isNaN(n.getTime())?t:n.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})},Kee=e=>null==e?"—":(e/1e6).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}),Gee=(e,t=Date.now())=>{if(!e)return"never";const n=new Date(e).getTime();if(Number.isNaN(n))return"never";const r=Math.max(0,Math.round((t-n)/1e3));if(r<60)return`${r}s ago`;const a=Math.round(r/60);if(a<60)return`${a}m ago`;const i=Math.round(a/60);return i<48?`${i}h ago`:`${Math.round(i/24)}d ago`},Yee=(e,t)=>(e??[]).filter(e=>e.state===t).reduce((e,t)=>e+t.count,0),Jee={succeeded:"bg-emerald-50 text-emerald-700",completed:"bg-emerald-50 text-emerald-700",published:"bg-emerald-50 text-emerald-700",running:"bg-blue-50 text-blue-700",dispatched:"bg-blue-50 text-blue-700",pending:"bg-gray-100 text-gray-600",draft:"bg-gray-100 text-gray-600",paused:"bg-amber-50 text-amber-700",uncertain:"bg-amber-50 text-amber-700",blocked:"bg-rose-50 text-rose-700",dead_lettered:"bg-rose-50 text-rose-700",failed:"bg-rose-50 text-rose-700",excluded:"bg-rose-50 text-rose-700",eligible:"bg-emerald-50 text-emerald-700",reachable:"bg-emerald-50 text-emerald-700",unreachable:"bg-rose-50 text-rose-700",polling:"bg-blue-50 text-blue-700",shutting_down:"bg-amber-50 text-amber-700",stopped:"bg-gray-100 text-gray-600",lost:"bg-rose-50 text-rose-700"},Xee=({status:e})=>i.jsx("span",{className:`inline-block rounded-full px-2 py-0.5 text-xs font-medium ${Jee[e]??"bg-gray-100 text-gray-600"}`,children:e}),ete=({about:e,children:t})=>{const r=n.useId();return i.jsx(qe,{placement:"top",tooltip:t,className:"max-w-xs text-xs",children:i.jsxs("button",{type:"button","aria-label":`About ${e}`,"aria-describedby":r,className:"-m-1.5 inline-flex p-1.5 text-gray-500 hover:text-gray-700",children:[i.jsx(ms,{className:"h-3.5 w-3.5","aria-hidden":"true"}),i.jsx("span",{id:r,className:"sr-only",children:t})]})})},tte=({title:e,caveat:t,children:n})=>i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:e}),t&&i.jsx(ete,{about:e,children:t})]}),i.jsx("div",{className:"mt-4",children:n})]}),nte=({label:e,value:t,caveat:n,caveatAbout:r,mono:a})=>i.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-x-4 border-t border-gray-100 py-2 first:border-t-0 first:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("span",{className:"text-sm text-gray-600",children:e}),n&&i.jsx(ete,{about:r??e,children:n})]}),i.jsx("span",{className:"text-sm text-gray-900 "+(a?"font-mono text-xs":""),children:t})]}),rte=({children:e})=>i.jsx("p",{className:"text-sm text-gray-500",children:e}),ate=({back:e,backLabel:t,backState:n,title:r,blurb:a,children:s})=>i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl",children:[i.jsx(o,{to:e,state:n,className:"text-sm text-blue-600 hover:underline",children:`← ${t}`}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:r}),a&&i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:a}),s]})}),ite=({value:e})=>i.jsx("pre",{className:"max-h-80 overflow-auto rounded border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:JSON.stringify(e,null,2)}),ste={fetchPolicy:"network-only",pollInterval:5e3,notifyOnNetworkStatusChange:!0},ote=({networkStatus:e,settled:n=!1})=>{const[r,a]=t.useState();t.useEffect(()=>{e===Z.ready&&a((new Date).toISOString())},[e]);return i.jsxs("p",{className:"mt-2 text-xs text-gray-500",role:"status",children:[e===Z.error?"Updates interrupted. Retrying automatically.":n?"Run status refresh stopped; this run has finished. The activity log below is still being read.":"Live · refreshes every 5 seconds.",r&&` Last checked ${Zee(r)}.`]})},lte=120,cte=32,ute={box:()=>200,label:()=>lte},dte=(e,t,n)=>Math.min(n,Math.max(t,Math.ceil(Math.max(t,...e)))),pte=(e,t,n=ute)=>{const r=new Map(e.map(e=>[e.key,e])),a=(e=>{const t=new Map;
1981return e.forEach(e=>{const n=`${e.from}\0${e.to}`,r=t.get(n)??{from:e.from,to:e.to,kinds:[],rules:[],enabled:!1,lane:null};r.kinds.includes(e.kind)||r.kinds.push(e.kind),r.rules.push(e.rule),r.enabled=r.enabled||e.enabled,t.set(n,r)}),[...t.values()]})(t).filter(e=>null!==(r.get(e.from)?.aqua??null)),i=new Set(a.map(e=>e.to)),s=e.filter(e=>null!==e.aqua),o=e.filter(e=>null===e.aqua&&i.has(e.key)),l=[...i].filter(e=>!r.has(e)).sort((e,t)=>e.localeCompare(t)),c=new Map([...s.map(e=>[e.key,"aqua"]),...o.map(e=>[e.key,"end"]),...l.map(e=>[e,"missing"])]),u=[...c.keys()],d=((e,t)=>{const n=new Map(e.map(e=>[e,[]]));t.forEach(e=>{e.from!==e.to&&n.get(e.to)?.push(e.from)});const r=new Map,a=new Set,i=e=>{const t=r.get(e);if(void 0!==t)return t;if(a.has(e))return-1;a.add(e);const s=Math.max(-1,...(n.get(e)??[]).map(i))+1;return a.delete(e),r.set(e,s),s};return e.forEach(i),r})(u,a),p=e=>r.get(e)?.aqua??r.get(e)?.name??e,h=e=>"aqua"===c.get(e)?76:44,m=[];u.forEach(e=>{const t=d.get(e)??0;m[t]=[...m[t]??[],e]});const f=new Map,g=new Map;let y=0;m.forEach((e,t)=>{const n=e=>{const n=a.filter(n=>n.to===e&&(d.get(n.from)??0)<t).map(e=>f.get(e.from)??0);return n.length?n.reduce((e,t)=>e+t,0)/n.length:0},r=[...e].sort((e,t)=>n(e)-n(t)||p(e).localeCompare(p(t)));let i=cte;r.forEach((e,t)=>{f.set(e,t),g.set(e,i),i+=h(e)+28}),y=Math.max(y,i-28+cte)});const x=[],b=[],v=[];let w=cte;m.forEach((e,t)=>{b[t]=dte((e??[]).map(e=>n.label(e,r.get(e)??null)),lte,280),x[t]=w+b[t];const a=(e??[]).flatMap(e=>{const t=r.get(e);return"aqua"===c.get(e)&&t?[n.box(t)]:[]});v[t]=a.length?dte(a,200,420):0,w=x[t]+(v[t]||8)+48});let j=0;const C=a.map(e=>(d.get(e.to)??0)<=(d.get(e.from)??0)?(j+=1,{...e,lane:j-1}):e);return{nodes:u.map(e=>{const t=d.get(e)??0;return{kind:c.get(e)??"missing",key:e,queue:r.get(e)??null,column:t,x:x[t]??152,y:g.get(e)??cte,queueLength:b[t]??lte,width:"aqua"===c.get(e)?v[t]??200:0,height:h(e)}}),edges:C,width:u.length?w-48+cte:0,height:u.length?y+14*j:0,lanesTop:y-cte+14}},hte=(e,t,n)=>`${e.toLocaleString()} ${1===e?t:n}`,mte=e=>{const t=Yee(e.counts,"dead_lettered"),n=Yee(e.counts,"blocked"),r=Math.max(0,Yee(e.counts,"dispatched")-e.failedRuns),a=[t>0?hte(t,"dead-lettered item","dead-lettered items"):null,n>0?hte(n,"blocked item","blocked items"):null,e.failedRuns>0?hte(e.failedRuns,"failed run waiting for a retry","failed runs waiting for a retry"):null].filter(e=>null!==e);let i="idle";return e.enabled?a.length>0?i="faulted":(e.eligible>0||r>0)&&(i="working"):i="stopped",{status:i,faults:a,inProgress:r}},fte=u("query OpsAqueductRunStatus($id: ID!) {\n  opsAqueductRun(id: $
1981id) {\n    id\n    name\n    status\n    availableActions\n    budgetMicrousd\n    generation\n    error\n    createdAt\n    updatedAt\n    steps {\n      id\n      key\n      position\n      status\n      attempts\n      published\n      error\n      updatedAt\n    }\n    calls {\n      id\n      requestKey\n      status\n      reservedMicrousd\n      actualMicrousd\n      acknowledgement\n      error\n      createdAt\n      updatedAt\n    }\n  }\n}\n"),gte=u`
1982  query OpsAqueductRuns {
1983    opsAqueductRuns {
1984      id
1985      name
1986      status
1987      createdAt
1988      updatedAt
1989    }
1990  }
1991`,yte=u`
1992  query OpsAqueductRun($id: ID!) {
1993    opsAqueductRun(id: $id) {
1994      id
1995      name
1996      status
1997      definition
1998      budgetMicrousd
1999      generation
2000      error
2001      createdAt
2002      updatedAt
2003      steps {
2004        id
2005        key
2006        position
2007        status
2008        attempts
2009        published
2010        output
2011        error
2012        updatedAt
2013      }
2014      calls {
2015        id
2016        requestKey
2017        request
2018        response
2019        status
2020        reservedMicrousd
2021        actualMicrousd
2022        acknowledgement
2023        error
2024        createdAt
2025        updatedAt
2026      }
2027    }
2028  }
2029`,xte=u`
2030  query OpsAqueductRunEvents($runId: ID!, $after: Int) {
2031    opsAqueductRunEvents(runId: $runId, after: $after) {
2032      id
2033      runId
2034      generation
2035      stepKey
2036      level
2037      message
2038      item
2039      createdAt
2040    }
2041  }
2042`,bte=u`
2043  mutation OpsAqueductControlRun($id: ID!, $action: OpsAqueductRunAction!) {
2044    opsAqueductControlRun(id: $id, action: $action) {
2045      id
2046      status
2047      generation
2048      updatedAt
2049    }
2050  }
2051`,vte=u`
2052  mutation OpsAqueductAcknowledgeCall($runId: ID!, $callId: ID!, $note: String!) {
2053    opsAqueductAcknowledgeCall(runId: $runId, callId: $callId, note: $note) {
2054      id
2055      requestKey
2056      request
2057      response
2058      status
2059      reservedMicrousd
2060      actualMicrousd
2061      acknowledgement
2062      error
2063      createdAt
2064      updatedAt
2065    }
2066  }
2067`,wte=u`
2068  query OpsAqueductInputQueues {
2069    opsAqueductInputQueues {
2070      key
2071      name
2072      namespace
2073      ordering
2074      enabled
2075      pipeline
2076      config
2077      createdAt
2078      updatedAt
2079      counts {
2080        state
2081        count
2082      }
2083    }
2084  }
2085`,jte=u`
2086  query OpsAqueductInputQueue($key: String!, $state: OpsAqueductItemState) {
2087    opsAqueductInputQueue(key: $key, state: $state) {
2088      queue {
2089        key
2090        name
2091        namespace
2092        ordering
2093        enabled
2094        pipeline
2095        config
2096        schedule {
2097          enabled
2098          intervalHours
2099        }
2100        deadLetterAfterMinutes
2101        createdAt
2102        updatedAt
2103      }
2104      counts {
2105        state
2106        count
2107      }
2108      excluded
2109      items {
2110        id
2111        sequence
2112        queueKey
2113        dedupeKey
2114        subjectType
2115        subjectId
2116        subjectName
2117        reason
2118        score
2119        state
2120        eligibility
2121        availableAt
2122        createdAt
2123        updatedAt
2124        outcome
2125        deadLetteredAt
2126        deadLetterCount
2127        run {
2128          id
2129          status
2130          error
2131        }
2132      }
2133    }
2134  }
2135`,Cte=u`
2136  query OpsAqueductInputQueueItem($key: String!, $id: ID!) {
2137    opsAqueductInputQueueItem(key: $key, id: $id) {
2138      item {
2139        id
2140        sequence
2141        queueKey
2142        dedupeKey
2143        subjectType
2144        subjectId
2145        subjectName
2146        payload
2147        reason
2148        trigger
2149        score
2150        scoreSnapshot
2151        scoreHistory
2152        state
2153        eligibility
2154        availableAt
2155        createdAt
2156        updatedAt
2157        outcome
2158        deadLetteredAt
2159        deadLetterCount
2160        run {
2161          id
2162          status
2163          error
2164        }
2165      }
2166      outcomes {
2167        id
2168        eventKey
2169        kind
2170        runId
2171        itemId
2172        data
2173        createdAt
2174        routedAt
2175        routingError
2176        movements {
2177          id
2178          outcomeId
2179          destinationKey
2180          itemId
2181          initiator
2182          reason
2183          createdAt
2184        }
2185      }
2186      arrivals {
2187        id
2188        outcomeId
2189        destinationKey
2190        itemId
2191        initiator
2192        reason
2193        createdAt
2194      }
2195    }
2196  }
2197`,Nte=u`
2198  query OpsAqueductInputQueuePipeline($key: String!) {
2199    opsAqueductInputQueuePipeline(key: $key) {
2200      name
2201      routing
2202      definition
2203    }
2204  }
2205`,kte=u`
2206  mutation OpsAqueductRetryInputQueueItem($key: String!, $id: ID!) {
2207    opsAqueductRetryInputQueueItem(key: $key, id: $id)
2208  }
2209`,Ste=u`
2210  mutation OpsAqueductRedriveDeadLetters($key: String!) {
2211    opsAqueductRedriveDeadLetters(key: $key)
2212  }
2213`,Ete=u`
2214  mutation OpsAqueductDiscardInputQueueItem($key: String!, $id: ID!) {
2215    opsAqueductDiscardInputQueueItem(key: $key, id: $id)
2216  }
2217`,Ate=u`
2218  mutation OpsAqueductSetInputQueueDeadLetter($key: String!, $afterMinutes: Int) {
2219    opsAqueductSetInputQueueDeadLetter(key: $key, afterMinutes: $afterMinutes) {
2220      key
2221      deadLetterAfterMinutes
2222    }
2223  }
2224`,Ote=u`
2225  mutation OpsAqueductSetInputQueueEnabled($key: String!, $enabled: Boolean!) {
2226    opsAqueductSetInputQueueEnabled(key: $key, enabled: $enabled) {
2227      key
2228      enabled
2229    }
2230  }
2231`,_te=u`
2232  mutation OpsAqueductSetInputQueueSchedule(
2233    $key: String!
2234    $enabled: Boolean!
2235    $intervalHours: Float!
2236  ) {
2237    opsAqueductSetInputQueueSchedule(
2238      key: $key
2239      enabled: $enabled
2240      intervalHours: $intervalHours
2241    ) {
2242      key
2243      schedule {
2244        enabled
2245        intervalHours
2246      }
2247    }
2248  }
2249`,Pte=u`
2250  mutation OpsAqueductScanClinicalTrials {
2251    opsAqueductScanClinicalTrials {
2252      workflowId
2253      alreadyRunning
2254      reason
2255    }
2256  }
2257`,Ite=u`
2258  mutation OpsAqueductCreateInputQueue(
2259    $key: String!
2260    $name: String!
2261    $namespace: String
2262  ) {
2263    opsAqueductCreateInputQueue(key: $key, name: $name, namespace: $namespace) {
2264      key
2265      name
2266      namespace
2267      ordering
2268      enabled
2269      pipeline
2270      config
2271      createdAt
2272      updatedAt
2273    }
2274  }
2275`;u`
2276  mutation OpsAqueductSetInputQueuePresentation(
2277    $key: String!
2278    $presentation: JSON!
2279  ) {
2280    opsAqueductSetInputQueuePresentation(key: $key, presentation: $presentation) {
2281      key
2282      name
2283      namespace
2284      ordering
2285      enabled
2286      pipeline
2287      config
2288      createdAt
2289      updatedAt
2290    }
2291  }
2292`;const Mte=u`
2293  query OpsAqueductPipelineSpending($window: String) {
2294    opsAqueductPipelineSpending(window: $window) {
2295      window
2296      since
2297      asOf
2298      pipelines {
2299        queueKey
2300        spentMicrousd
2301        heldMicrousd
2302        calls
2303      }
2304    }
2305  }
2306`,Tte=u`
2307  query OpsAqueductPipeline($key: String!, $offset: Int) {
2308    opsAqueductPipeline(key: $key, offset: $offset) {
2309      queue {
2310        key
2311        name
2312        enabled
2313        pipeline
2314      }
2315      name
2316      steps {
2317        key
2318        kind
2319        version
2320        position
2321        title
2322        summary
2323        detail
2324        reads
2325        writes
2326        paid
2327      }
2328      routing
2329      budgetMicrousd
2330      eligible
2331      total
2332      offset
2333      runs {
2334        id
2335        name
2336        status
2337        createdAt
2338        updatedAt
2339        steps {
2340          key
2341          status
2342          attempts
2343          updatedAt
2344        }
2345        stages {
2346          key
2347          kind
2348        }
2349      }
2350      assignedQueues {
2351        key
2352        name
2353      }
2354    }
2355  }
2356`,Rte=u("query OpsAqueductPipelineActivity {\n  opsAqueductPipelineActivity {\n    runs {\n      runId\n      queueKey\n      status\n      stepKey\n      stepTitle\n      stepStatus\n      inputLabel\n    }\n    queues {\n      queueKey\n      queued\n      running\n      paused\n    }\n  }\n}\n"),Lte=u`
2357  query OpsAqueductPipelineGraph {
2358    opsAqueductPipelineGraph {
2359      queues {
2360        key
2361        name
2362        namespace
2363        enabled
2364        aqua
2365        counts {
2366          state
2367          count
2368        }
2369        eligible
2370        failedRuns
2371      }
2372      routes {
2373        from
2374        to
2375        rule
2376        kind
2377        enabled
2378      }
2379    }
2380  }
2381`,Dte=u("query OpsAqueductTemporalStatus {\n  opsAqueductTemporalStatus {\n    address\n    namespace\n    taskQueue\n    reachable\n    workers\n    error\n    checkedAt\n  }\n}\n"),Fte=u`
2382  query OpsAqueductWorkers {
2383    opsAqueductWorkers {
2384      server {
2385        address
2386        namespace
2387        reachable
2388        version
2389        error
2390      }
2391      heartbeats
2392      taskQueues {
2393        name
2394        role
2395        liveWorkers
2396        lastPolledAt
2397      }
2398      workers {
2399        identity
2400        hostName
2401        processId
2402        status
2403        sdkVersion
2404        buildId
2405        startedAt
2406        lastSeenAt
2407        taskQueues {
2408          name
2409          status
2410          heartbeatAt
2411          lastPolledAt
2412          activitySlotsUsed
2413          activitySlotsAvailable
2414        }
2415      }
2416      checkedAt
2417    }
2418  }
2419`,qte=e=>e.y+e.height/2,Bte=24,Ute={stopped:{box:"border-gray-300 bg-gray-50 hover:bg-gray-100",pill:"bg-gray-200 text-gray-700",label:"stopped"},faulted:{box:"border-rose-400 bg-rose-50 hover:bg-rose-100",pill:"bg-rose-100 text-rose-700",label:"needs attention"},working:{box:"border-emerald-400 bg-emerald-50 hover:bg-emerald-100",pill:"bg-emerald-100 text-emerald-700",label:"working"},idle:{box:"border-sky-400 bg-sky-50 hover:bg-sky-100",pill:"bg-sky-100 text-sky-700",label:"idle"}},zte=e=>{const{inProgress:t}=mte(e);return`${t.toLocaleString()} in progress · ${e.eligible.toLocaleString()} ready`},Hte=e=>({waiting:`${Yee(e.counts,"pending").toLocaleString()} waiting`,deadLettered:Yee(e.counts,"dead_lettered")}),Vte=()=>{const e=document.createElement("canvas").getContext?.("2d")??null,t=getComputedStyle(document.body).fontFamily||"sans-serif",n=(n,r,a,i=t)=>e?(e.font=`${a} ${r}px ${i}`,e.measureText(n).width):n.length*r*.6;return{box:e=>{const t=n(Ute[mte(e).status].label,12,500)+16,r=n(e.aqua??"",14,500)+8+t,a=n(zte(e),12,400);return Math.max(r,a)+24+4+2},label:(e,t)=>
2419{if(!t)return Math.max(n(e,12,400,"ui-monospace, monospace"),n("Missing or archived",11,400))+8+2;const{waiting:r,deadLettered:a}=Hte(t),i=a>0?`${r} · ${a.toLocaleString()} dead-lettered`:r;return Math.max(n(t.name,12,400),n(i,11,400))+8+2}}},$te=({node:e})=>{const{queue:t}=e;if(!t||"aqua"!==e.kind)return null;const{status:n,faults:r}=mte(t),a=Ute[n];return i.jsxs(o,{to:Yw.aqueductPipeline(t.key),title:r.length>0?r.join(", "):void 0,style:{left:e.x,top:e.y,width:e.width,height:e.height},className:`absolute block rounded-lg border-2 px-3 py-2 ${a.box}`,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"truncate text-sm font-medium text-gray-900",children:t.aqua}),i.jsx("span",{className:`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${a.pill}`,children:a.label})]}),i.jsx("div",{className:"mt-1 text-xs text-gray-600",children:zte(t)})]})},Wte=({node:e})=>{const t=qte(e),n=e.x-e.queueLength,r=e.queueLength-8,{queue:a}=e,s=a?Hte(a):null;return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{left:n,top:t-22,width:r},className:"absolute truncate text-xs",children:a?i.jsx(o,{to:Yw.aqueductQueue(a.key),title:`${a.name} (${a.key})`,className:"text-blue-600 hover:underline",children:a.name}):i.jsx("span",{title:e.key,className:"font-mono text-rose-700",children:e.key})}),i.jsx("div",{style:{left:n,top:t+5,width:r},className:"absolute text-[11px] leading-tight text-gray-500",children:s?i.jsxs(i.Fragment,{children:[s.waiting,s.deadLettered>0&&i.jsx("span",{className:"text-rose-600",children:` · ${s.deadLettered.toLocaleString()} dead-lettered`})]}):i.jsx("span",{className:"text-rose-600",children:"Missing or archived"})})]})},Qte=({node:e,fed:t,marker:n})=>{const r=qte(e),a=e.x-e.queueLength,s="missing"===e.kind?"stroke-rose-400":"stroke-gray-500";return i.jsxs("g",{children:[i.jsx("path",{d:`M ${a} ${r} L ${e.x} ${r}`,fill:"none",strokeWidth:2,strokeDasharray:"missing"===e.kind?"5 4":void 0,className:s,markerEnd:"aqua"===e.kind?`url(#${n})`:void 0}),!t&&i.jsx("circle",{cx:a,cy:r,r:4,strokeWidth:1.5,className:"fill-white stroke-gray-500"}),"aqua"!==e.kind&&i.jsx("path",{d:`M ${e.x} ${r-8} L ${e.x} ${r+8}`,strokeWidth:2,className:s})]})},Zte=({edge:e,from:t,to:n,lanesTop:r})=>{const a=((e,t,n,r)=>{const a=[t.x+t.width,qte(t)],i=[n.x-n.queueLength,qte(n)];if(null===e.lane){const e=Math.max(24,(i[0]-a[0])/2);return`M ${a[0]} ${a[1]} C ${a[0]+e} ${a[1]}, ${i[0]-e} ${i[1]}, ${i[0]} ${i[1]}`}const s=r+14*e.lane,o=a[0]+Bte,l=i[0]-Bte;return[`M ${a[0]} ${a[1]}`,`Q ${o} ${a[1]}, ${o} ${a[1]+Bte}`,`L ${o} ${s-Bte}`,`Q ${o} ${s}, ${o-Bte} ${s}`,`L ${l+Bte} ${s}`,`Q ${l} ${s}, ${l} ${s-Bte}`,`L ${l} ${i[1]+Bte}`,`Q ${l} ${i[1]}, ${i[0]} ${i[1]}`].join(" ")})(e,t,n,r),s=`${e.kinds.join(", ")} · ${e.rules.length} ${1===e.rules.length?"rule":"rules"}: ${e.rules.join(", ")}${e.enabled?"":" (disabled)"}`;return i.jsxs("g",{children:[i.jsx("title",{children:s}),i.jsx("path",{d:a,fill:"none",strokeWidth:1.5,strokeDasharray:e.enabled?void 0:"5 4",className:e.enabled?"stroke-gray-400":"stroke-gray-300"}),i.jsx("path",{d:a,fill:"none",strokeWidth:12,className:"stroke-transparent",pointerEvents:"stroke"})]})},Kte=()=>{const e=`aqua-flow-arrow-${t.useId().replace(/:/g,"")}`,n=d(Lte,{...ste}),r=(()=>{const[e,n]=t.useState(Vte);return t.useEffect(()=>{let e=!0;return document.fonts?.ready.then(()=>{e&&n(Vte())}),()=>{e=!1}},[]),e})(),a=n.data?.opsAqueductPipelineGraph,s=a?pte(a.queues,a.routes,r):null,o=new Map(s?.nodes.map(e=>[e.key,e])??[]),l=new Set(s?.edges.map(e=>e.to)??[]),c=(s?.edges??[]).flatMap(e=>{const t=o.get(e.from),n=o.get(e.to);return t&&n?[{edge:e,from:t,to:n}]:[]}),u=s?.width??0,p=s?.height??0;return i.jsxs("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white px-4 py-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Flow"}),i.jsx(ete,{about:"the flow graph",children:"Each box is an aqua, coloured by its status: grey when it is stopped, red when it needs attention because its queue holds dead-lettered or blocked items or a failed run waiting for a retry, green when it has work ready or in progress, and blue when it is running with nothing to do. Hover over a red box to see what is wrong. The arrow into a box is that aqua’s input queue, named above the arrow with how much is waiting in it below. A curve from one aqua into another’s queue is every routing rule that publishes into it; hover over it to see the rules and the outcome kinds they carry. A dashed curve is a rule that is saved but disabled. An open circle means the queue is filled from outside Aqueduct, such as by a list upload or a registry scan. An arrow that ends in a bar is a queue no aqua runs, so routed work stops there, and a red one is a queue a rule names that is missing or archived. Waiting counts every item still pending, including ones a negative score keeps out of dispatch."})]}),i.jsx(ote,{networkStatus:n.networkStatus})]}),n.loading&&!a&&i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading…"}),n.error&&i.jsx("p",{className:"mt-3 text-sm text-rose-600",children:n.error.message}),s&&0===s.nodes.length&&i.jsx("div",{className:"mt-3",children:i.jsx(rte,{children:"No aquas yet."})}),s&&s.nodes.length>0&&i.jsx("div",{className:"mt-3 overflow-x-auto",children:i.jsxs("div",{role:"group","aria-label":"Aqua flow",className:"relative",style:{width:u,height:p},children:[i.jsxs("svg",{className:"absolute inset-0",width:u,height:p,children:[i.jsx("defs",{children:i.jsx("marker",{id:e,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-gray-500"})})}),c.map(({edge:e,from:t,to:n})=>i.jsx(Zte,{edge:e,from:t,to:n,lanesTop:s.lanesTop},`${e.from}->${e.to}`)),s.nodes.map(t=>i.jsx(Qte,{node:t,fed:l.has(t.key),marker:e},t.key))]}),s.nodes.map(e=>i.jsx(Wte,{node:e},e.key)),s.nodes.map(e=>i.jsx($te,{node:e},e.key))]})})]})},Gte={fetchPolicy:"network-only",pollInterval:15e3},Yte=()=>d(Dte,Gte).data?.opsAqueductTemporalStatus,Jte=({status:e})=>
2419{if(!e||e.reachable&&null!==e.workers&&e.workers>0)return null;const{title:t,body:n}=(e=>e.reachable?0===e.workers?{title:"No Aqueduct worker is running",body:`Temporal is connected, but no worker has asked the ${e.taskQueue} task queue for work in the last two minutes, so no Aqueduct run is executing. Runs shown as running, and the slots they hold, will not move until a worker starts.`}:{title:"Aqueduct could not check for workers",body:"Temporal is connected, but it would not say whether any worker is listening, so runs shown as running may not be progressing."}:{title:"Temporal is not connected",body:`The server cannot reach Temporal at ${e.address}, so no Aqueduct run is executing. Runs shown as running, and the slots they hold, are only what the database last recorded, and they will not move until Temporal is back.`})(e);return i.jsxs("div",{role:"alert",className:"mt-4 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:[i.jsx("p",{className:"font-medium",children:t}),i.jsx("p",{className:"mt-1",children:n}),e.error&&i.jsx("p",{className:"mt-1 font-mono text-xs text-amber-800",children:e.error})]})},Xte=(e,t)=>(e=>{const{config:t}=e;if("object"!=typeof t||null===t)return!1;const{binding:n}=t;return null!=n})(e)?t??"a saved binding":e.pipeline,ene=["5m","30m","1h","3h","6h","1d","3d","7d","all"],tne=[["running","running"],["queued","queued"],["paused","paused"]],nne=[["completed","completed"],["dispatched","dispatched"],["blocked","blocked"],["dead_lettered","dead-lettered"],["pending","waiting total"]],rne=e=>nne.map(([t,n])=>`${Yee(e,t).toLocaleString()} ${n}`).join(" · "),ane=e=>{if(!e.stepTitle)return"Between steps";return`${"running"===e.status&&"running"===e.stepStatus?"Step":"Next step"}: ${e.stepTitle}`},ine=({showManualRuns:e=!1})=>{const[n,r]=t.useState("1d"),a=d(Mte,{variables:{window:n},...ste}),s=d(wte,{...ste}),l=d(Rte,{...ste}),c=Yte(),u=new Map;l.data?.opsAqueductPipelineActivity.runs.forEach(e=>{const t=u.get(e.queueKey)??[];t.push(e),u.set(e.queueKey,t)});const p=new Map(l.data?.opsAqueductPipelineActivity.queues.map(e=>[e.queueKey,e])??[]);let h="Idle · No active runs";l.data||(h="Loading activity…"),l.error&&(h="Activity unavailable");const m=[l,a,s].find(e=>e.error)??l,f=a.data?.opsAqueductPipelineSpending,g=new Map(f?.pipelines.map(e=>[e.queueKey,e])??[]),y=(s.data?.opsAqueductInputQueues??[]).filter(e=>null!==Xte(e)),x=g.get(null);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-2",children:[ene.map(e=>i.jsx("button",{type:"button",onClick:()=>r(e),className:"rounded-full px-3 py-1 text-xs font-medium "+(n===e?"bg-blue-600 text-white":"border border-gray-300 text-gray-700 hover:bg-gray-50"),children:e},e)),f&&i.jsx("span",{className:"text-xs text-gray-500",children:`as of ${Zee(f.asOf)}`})]}),i.jsx(ote,{networkStatus:m.networkStatus}),i.jsx(Jte,{status:c}),(a.loading&&!a.data||s.loading&&!s.data)&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),a.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:a.error.message}),s.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:s.error.message}),l.error&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:`Activity unavailable. ${l.error.message}`}),y.length>0&&i.jsxs("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white px-4 py-3",children:[i.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-x-2",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Work done"}),i.jsx(ete,{about:"work done",children:"Counted over every item these queues have ever held, not over the spending window above. An item is completed once the aqua is finished with it, which includes one the dispatcher settled without making a run at all. A dispatched item is still with its run, including a failed run that is waiting to be resumed. A blocked item needs an operator before it can be dispatched, and a dead-lettered item is one whose run failed and was given up on, which waits for someone to redrive it."})]}),i.jsx("span",{className:"text-xs text-gray-500",children:`all time, across ${y.length} ${1===y.length?"aqua":"aquas"}`})]}),i.jsx("p",{className:"mt-1 text-sm text-gray-700",children:rne(y.flatMap(e=>e.counts??[]))})]}),i.jsxs("div",{className:"mt-4 space-y-2",children:[y.map(e=>{const t=g.get(e.key),n=u.get(e.key)??[],r=p.get(e.key),a=[...n.filter(e=>"paused"!==e.status),...n.filter(e=>"paused"===e.status)],s=tne.map(([e,t])=>[(r?.[e]??0)-n.filter(t=>t.status===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} more ${t}`);return i.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white",children:[i.jsxs(o,{to:Yw.aqueductPipeline(e.key),className:"block rounded-lg px-4 py-3 hover:bg-gray-50",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsxs("span",{className:"truncate font-medium text-gray-900",children:[e.name,!e.enabled&&i.jsx("span",{className:"ml-2 roun
2419ded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-600",children:"disabled"})]}),i.jsx("span",{className:"text-sm text-gray-900",children:`${Kee(t?.spentMicrousd??0)} spent`})]}),i.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",children:`${Xte(e)??"unbound"} · ${Kee(t?.heldMicrousd??0)} held · ${t?.calls??0} calls`}),i.jsx("div",{className:"mt-1 text-xs text-gray-600",children:`All time · ${rne(e.counts)}`})]}),i.jsxs("div",{className:"space-y-2 border-t border-gray-100 px-4 py-3 text-sm",children:[a.map(e=>i.jsxs(o,{to:Yw.aqueductRun(e.runId),className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded hover:bg-gray-50",children:[i.jsx(Xee,{status:e.status}),i.jsx("span",{className:"text-gray-700",children:ane(e)}),i.jsx("span",{className:"break-words text-blue-600",children:`Input: ${e.inputLabel}`})]},e.runId)),s.length>0&&i.jsx(o,{to:Yw.aqueductPipeline(e.key),className:"block text-blue-600 hover:underline",children:`${s.join(" · ")} · View aqua history`}),!u.has(e.key)&&i.jsx("span",{className:"text-gray-500",children:h})]})]},e.key)}),!s.loading&&0===y.length&&i.jsx(rte,{children:"No aquas yet."})]}),e&&x&&i.jsxs("div",{className:"mt-4 rounded-lg border border-dashed border-gray-300 px-4 py-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("span",{className:"font-medium text-gray-900",children:"Launched by hand"}),i.jsx("span",{className:"text-sm text-gray-900",children:`${Kee(x.spentMicrousd)} spent`})]}),i.jsx("div",{className:"mt-1 font-mono text-xs text-gray-500",children:`runs belonging to no queue · ${Kee(x.heldMicrousd)} held · ${x.calls} calls`})]})]})},sne=()=>i.jsx(ate,{back:Yw.aqueduct,backLabel:"Aqueduct",title:"Aquas",blurb:"What each aqua runs and what it has spent. Recorded costs and open reservations are kept apart, because adding them together would hide a run sitting on a reservation it never used.",children:i.jsx(ine,{showManualRuns:!0})}),one=()=>i.jsxs(ate,{back:Yw.base,backLabel:"Ops portal",title:"Aqueduct",children:[i.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-between gap-4",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Aquas"}),i.jsxs("nav",{"aria-label":"Aqueduct",className:"flex items-center gap-4 text-sm",children:[i.jsx(o,{to:Yw.aqueductRuns,className:"text-blue-600 hover:underline",children:"Runs"}),i.jsx(o,{to:Yw.aqueductQueues,className:"text-blue-600 hover:underline",children:"Queues"}),i.jsx(o,{to:Yw.aqueductWorkers,className:"text-blue-600 hover:underline",children:"Workers"})]})]}),i.jsx(Kte,{}),i.jsx(ine,{})]}),lne=e=>e.title??e.kind.replaceAll("-"," "),cne=({label:e,children:t})=>t?i.jsxs("div",{className:"mt-3",children:[i.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:e}),i.jsx("p",{className:"mt-1 text-sm text-gray-700",children:t})]}):null,une=({step:e,open:n,onToggle:r})=>{const a=t.useId(),s=n?qi:Ui;return i.jsxs("li",{className:"border-t border-gray-100 first:border-t-0",children:[i.jsxs("button",{type:"button",onClick:r,"aria-expanded":n,"aria-controls":a,className:"flex w-full items-start gap-3 py-3 text-left hover:bg-gray-50 focus-visible:outline-blue-600",children:[i.jsx("span",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-gray-100 text-xs font-medium tabular-nums text-gray-600",children:e.position}),i.jsxs("span",{className:"min-w-0 flex-1",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:"font-medium text-gray-900",children:lne(e)}),e.paid&&i.jsx("span",{className:"rounded-full bg-amber-50 px-2 py-0.5 text-xs font-medium text-amber-700",children:"spends money"})]}),e.summary&&i.jsx("span",{className:"mt-0.5 block text-sm text-gray-600",children:e.summary}),i.jsx("span",{className:"mt-0.5 block truncate font-mono text-xs text-gray-500",children:`${e.key} · ${e.kind}@${e.version}`})]}),i.jsx(s,{className:"mt-1 h-4 w-4 shrink-0 text-gray-400","aria-hidden":"true"})]}),i.jsx("div",{id:a,hidden:!n,className:"pb-4 pl-9",children:e.detail?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-sm text-gray-700",children:e.detail}),i.jsx(cne,{label:"Reads",children:e.reads}),i.jsx(cne,{label:"Writes",children:e.writes}),i.jsx(cne,{label:"Cost",children:e.paid?"This step reserves budget before it calls a provider and records what the call actually cost, so a run that stops mid-call leaves a visible reservation rather than a silent charge.":"This step calls no paid provider, so running it spends nothing."})]}):i.jsx(rte,{children:"Nothing has been written about this step yet, so there is nothing to show beyond its name. The descriptions live beside the runtime, which means a 
2419step added since this deployment reads as blank rather than as wrong."})})]})},dne=({steps:e})=>{const[n,r]=t.useState(null);return 0===e.length?i.jsx(rte,{children:"This aqua declares no steps."}):i.jsx("ol",{children:e.map(e=>i.jsx(une,{step:e,open:n===e.key,onToggle:()=>r(n===e.key?null:e.key)},e.key))})},pne=({queueKey:e,enabled:n,paid:r=!1,waiting:a,onChanged:s})=>{const[o,l]=t.useState(!1),[c,u]=t.useState(null),[d,{loading:h}]=p(Ote),m=async t=>{u(null);try{await d({variables:{key:e,enabled:t}}),l(!1),await s()}catch(n){u(n instanceof Error?n.message:"The aqua could not be switched.")}};return i.jsxs("div",{children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsx("button",{type:"button",onClick:()=>n?m(!1):r&&!o?(l(!0),Promise.resolve()):m(!0),disabled:h,className:"rounded px-3 py-1.5 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50 "+(n?"border border-gray-300 text-gray-700 hover:bg-gray-50":"bg-blue-600 text-white hover:bg-blue-700"),children:o?"Start anyway":h?n?"Stopping…":"Starting…":n?"Stop aqua":"Start aqua"}),o&&i.jsx("button",{type:"button",onClick:()=>l(!1),disabled:h,className:"rounded border border-gray-300 px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),i.jsx("p",{className:"text-sm text-gray-600",role:"status",children:n?"Running. The dispatcher is claiming work from this queue.":"Stopped. Items are kept and none of them are dispatched."})]}),o&&i.jsx("p",{className:"mt-2 text-sm text-amber-700",children:void 0===a?"This aqua has a step that calls a paid provider, and starting it claims the whole backlog at once.":`This aqua has a step that calls a paid provider, and starting it claims all ${a} waiting items at once.`}),c&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:c})]})},hne={error:"text-rose-600",warn:"text-amber-600",warning:"text-amber-600",info:"text-gray-700",debug:"text-gray-400"},mne=({runId:e,stepKey:n})=>{const r=t.useId(),[a,s]=t.useState([]),[o,l]=t.useState(!0),[c,u]=t.useState(null),d=t.useRef(0),p=t.useRef(!1),h=t.useRef(null),[m]=An(xte,{fetchPolicy:"network-only"}),f=t.useCallback(async()=>{if(!p.current){p.current=!0;try{const t=await m({variables:{runId:e,after:d.current}});if(t.error)return void u(t.error.message);const n=t.data?.opsAqueductRunEvents??[];if(u(null),0===n.length)return;d.current=n[n.length-1].id,s(e=>{const t=0===e.length?0:e[e.length-1].id;return[...e,...n.filter(e=>e.id>t)].slice(-1e3)})}catch(t){u(t instanceof Error?t.message:"The activity log could not be read.")}finally{p.current=!1}}},[m,e]);t.useEffect(()=>{f();const e=setInterval(f,3e3);return()=>clearInterval(e)},[f]),t.useEffect(()=>{o&&h.current?.scrollIntoView({block:"nearest"})},[a,o]);const g=n?a.filter(e=>e.stepKey===n):a;return i.jsxs("section",{className:"mt-6 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:n?"Step activity":"Live activity"}),i.jsxs("label",{htmlFor:r,className:"flex items-center gap-2 text-xs text-gray-600",children:[i.jsx("input",{id:r,type:"checkbox",checked:o,onChange:e=>l(e.target.checked)}),"Follow new events"]})]}),c&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:c}),i.jsxs("div",{className:"mt-4 max-h-96 overflow-auto rounded border border-gray-200 bg-gray-50 p-3",children:[0===g.length?i.jsx("p",{className:"text-sm text-gray-500",children:"Nothing logged yet. A quiet log does not mean the run stopped — a provider call can be waiting while the worker is healthy."}):i.jsx("ul",{className:"space-y-1 font-mono text-xs",children:g.map(e=>i.jsxs("li",{className:"flex gap-2",children:[i.jsx("span",{className:"shrink-0 text-gray-400",children:Zee(e.createdAt)}),i.jsx("span",{className:`shrink-0 ${hne[e.level]??"text-gray-700"}`,children:e.level}),e.stepKey&&i.jsx("span",{className:"shrink-0 text-blue-600",children:e.stepKey}),i.jsx("span",{className:"text-gray-800",children:e.item?`${e.message} (${e.item})`:e.message})]},e.id))}),i.jsx("div",{ref:h})]}),i.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Holding the latest 1000 lines; the server retains up to 500 recent events per run."})]})},fne=({runId:e,selection:t})=>{const{data:n,loading:r,error:a,refetch:s}=d(yte,{variables:{id:e},fetchPolicy:"network-only",pollInterval:"step"in t?3e3:0}),o=n?.opsAqueductRun,l="step"in t?o?.steps.find(e=>e.key===t.step):void 0,c="call"in t?o?.calls.find(e=>e.id===t.call):void 0;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",disabled:r,onClick:()=>s(),className:"justify-self-start rounded border px-3 py-1 text-sm disabled:opacity-50",children:"Refresh saved data"}),r&&i.jsx("p",{className:"text-sm text-gray-500",children:"Loading saved data…"}),a&&i.jsx("p",{role:"alert",className:"text-sm text-rose-600",children:a.message}),o&&i.jsxs("div",{className:"space-y-3",children:[l&&i.jsxs(i.Fragment,{children:[i.jsx(Xee,{status:l.status}),i.jsx("p",{className:"text-sm text-gray-600",children:`${l.attempts} attempts · ${l.published?"published":"unpublished"}`}),l.error&&i.jsx("p",{className:"text-sm text-rose-600",children:l.error}),i.jsx(mne,{runId:e,stepKey:l.key},`${e}:${l.key}`),i.jsx("h3",{className:"text-sm font-medium",children:"Saved checkpoint"}),i.jsx(ite,{value:l.output})]}),c&&i.jsxs(i.Fragment,{children:[i.jsx(Xee,{status:c.status}),c.error&&i.jsx("p",{className:"text-sm text-rose-600",children:c.error}),i.jsx("h3",{className:"text-sm font-medium",children:"Request"}),i.jsx(ite,{value:c.request}),i.jsx("h3",{className:"text-sm font-medium",children:"Response"}),i.jsx(ite,{value:c.response})]}),"definition"in t&&i.jsx(ite,{value:o.definition}),"step"in t&&!l&&i.jsx("p",{children:"No saved output exists for this step yet."}),"call"in t&&!c&&i.jsx("p",{children:"This call is no longer available."})]})]})},gne=({runId:e,selection:t,onClose:n})=>i.jsx(On,{open:null!==t,onOpenChange:e=>{e||n()},children:i.jsx(_n,{children:i.jsxs(Pn,{className:"max-h-[85vh] max-w-3xl overflow-auto bg-white",children:[i.jsx(Ln,{children:t&&"step"in t?`Step progress: ${t.step}`:"Saved run data"}),i.jsx(Fn,{children:t&&"step"in t?"Activity and saved checkpoints refresh automatically while this step is open.":"Saved data at the time of loading. Refresh to inspect newer results."}),t&&i.jsx(fne,{runId:e,selection:t},JSON.stringify([e,t]))]})})}),yne=({run:e,stages:t,onInspect:n})=>i.jsxs("tr",{className:"border-t border-gray-100",children:[i.jsxs("th",{scope:"row",className:"sticky left-0 z-10 min-w-56 bg-white p-3 text-left font-normal",children:[i.jsx(o,{to:Yw.aqueductRun(e.id),className:"font-medium text-blue-600 hover:underline",children:e.name}),i.jsx("div",{className:"my-1",children:i.jsx(Xee,{status:e.status})}),i.jsx("div",{className:"text-xs text-gray-500",children:Zee(e.createdAt)})]}),t.map(t=>{const r=e.stages.some(e=>e.key===t.key&&e.kind===t.kind),a=r?e.steps.find(e=>e.key===t.key):void 0;return i.jsx("td",{className:"min-w-40 p-3 text-center",children:a?i.jsxs("button",{type:"button",onClick:()=>n(e.id,a.key),"aria-label":`Inspect ${e.name}, ${t.key}`,className:"w-full rounded border border-gray-200 p-2 hover:border-blue-400 focus-visible:outline-blue-600",children:[i.jsx(Xee,{status:a.status}),i.jsx("span",{className:"mt-1 block text-xs text-gray-500",children:`${a.attempts} attempts`})]}):i.jsx("span",{className:"text-xs text-gray-400",children:r?"Not started":"Not in this run"})},`${t.key}:${t.kind}`)})]}),xne=()=>{const{key:e=""}=he(),[n,r]=t.useState(0),[a,s]=t.useState(null),{data:l,loading:c,error:u,refetch:p,networkStatus:h}=d(Tte,{variables:{key:e,offset:n},...ste}),m=l?.opsAqueductPipeline,f=Yte(),g=[...m?.steps??[],...m?.runs.flatMap(e=>e.stages)??[]],y=[...new Map(g.map(e=>[`${e.key}:${e.kind}`,e])).values()];return i.jsxs(ate,{back:Yw.aqueductPipelines,backLabel:"Aquas",title:m?m.queue.name:"Aqua",children:[c&&!m&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),i.jsx(ote,{networkStatus:h}),u&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:u.message}),i.jsx(Jte,{status:f}),m&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mt-1 font-mono text-xs text-gray-500",children:`${m.queue.key} · ${m.name}`}),i.jsxs(tte,{title:"Aqua",caveat:"A stopped aqua holds its queue's items and dispatches none of them. Starting it lets the dispatcher claim everything eligible, so a long backlog begins moving at once.",children:[i.jsx("div",{className:"mb-4",children:i.jsx(pne,{queueKey:m.queue.key,enabled:m.queue.enabled,paid:m.steps.some(e=>e.paid),waiting:m.eligible,onChanged:p})}),i.jsx(nte,{label:"Queue spending limit",value:Kee(m.budgetMicrousd),caveat:"The total provider spending limit configured for this queue, shared across its runs. A dash means no paid queue budget is configured."}),i.jsx(nte,{label:"Ready by score and time",value:m.eligible,caveat:"Only what the dispatcher would take next. A negative score and an item still waiting for its available time are both excluded, which is what separates an idle aqua with a backlog from an empty one."}),i.jsx(nte,{label:"Runs made",value:m.total}),i.jsx(nte,{label:"Routing rules",value:m.routing.length}),i.jsx(nte,{label:"Queue",value:i.jsx(o,{to:Yw.aqueductQueue(m.queue.key),state:{fromPipeline:{key:e,name:m.queue.name}},className:"text-blue-600 hover:underline",children:m.queue.key})})]}),i.jsx(tte,{title:"Steps",caveat:"The order the runtime takes them in. Click a step to read what it does, what it reads and what it leaves behind. A run made before a step was added or removed shows its own stages in the run history below, which this list does not rewrite.",children:i.jsx(dne,{steps:m.steps})}),i.jsx(tte,{title:"Assigned queues",caveat:"Queues in this aqua’s namespace. Output destinations are defined separately by routing rules.",children:0===m.assignedQueues.length?i.jsx(rte,{children:"No queues are assigned to this aqua."}):i.jsx("ul",{className:"flex flex-wrap gap-2",children:m.assignedQueues.map(t=>i.jsx("li",{children:i.jsx(o,{to:Yw.aqueductQueue(t.key),state:{fromPipeline:{key:e,name:m.queue.name}},className:"rounded border border-gray-200 px-2 py-1 text-xs text-blue-600 hover:underline",children:t.name})},t.key))})}),i.jsx(tte,{title:"Output destinations",children:0===m.routing.length?
2419i.jsx(rte,{children:"No output routing rules are declared."}):i.jsx("ul",{className:"space-y-2",children:m.routing.map(t=>{const n=t;return i.jsxs("li",{className:"text-sm text-gray-700",children:[i.jsx("span",{className:"font-medium",children:n.key}),` · ${n.kind} → `,i.jsx(o,{to:Yw.aqueductQueue(n.destination),state:{fromPipeline:{key:e,name:m.queue.name}},className:"text-blue-600 hover:underline",children:n.destination}),!n.enabled&&i.jsx("span",{className:"ml-2 text-amber-700",children:"Disabled"})]},n.key)})})}),i.jsxs(tte,{title:"Run history",children:[i.jsx("p",{className:"mb-3 text-sm text-gray-500",children:"Click a stage to inspect its saved output. Columns include stages from older run definitions."}),i.jsxs("div",{className:"max-h-[36rem] overflow-auto",tabIndex:0,role:"region","aria-label":"Run history by stage",children:[i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{className:"sticky top-0 z-20 bg-gray-50 text-left text-xs text-gray-600",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"p-3",children:"Run / company"}),y.map(e=>i.jsxs("th",{scope:"col",className:"p-3 text-center",children:[i.jsx("span",{className:"block font-medium",children:e.key}),i.jsx("span",{className:"font-normal",children:e.kind.replaceAll("-"," ")})]},`${e.key}:${e.kind}`))]})}),i.jsx("tbody",{children:m.runs.map(e=>i.jsx(yne,{run:e,stages:y,onInspect:(e,t)=>s({runId:e,step:t})},e.id))})]}),0===m.runs.length&&i.jsx(rte,{children:"This aqua has made no runs yet."})]}),i.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[i.jsx("button",{type:"button",disabled:0===m.offset,onClick:()=>r(Math.max(0,m.offset-25)),className:"rounded border border-gray-300 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Newer"}),i.jsx("span",{className:"text-xs text-gray-500",children:`${m.total?m.offset+1:0}–${m.offset+m.runs.length} of ${m.total}`}),i.jsx("button",{type:"button",disabled:m.offset+m.runs.length>=m.total,onClick:()=>r(m.offset+25),className:"rounded border border-gray-300 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Older"})]})]})]}),i.jsx(gne,{runId:a?.runId??"",selection:a?{step:a.step}:null,onClose:()=>s(null)})]})},bne=()=>{const[e,n]=t.useState(""),{data:r,loading:a,error:s,networkStatus:l}=d(gte,{...ste}),c=r?.opsAqueductRuns??[],u=e.trim().toLowerCase(),p=u?c.filter(e=>`${e.name} ${e.status}`.toLowerCase().includes(u)):c;return i.jsxs(ate,{back:Yw.aqueduct,backLabel:"Aqueduct",title:"Runs",blurb:"The hundred most recent runs, newest first. Open one for its steps, the provider calls it made, and the log it wrote while it worked.",children:[i.jsx("input",{type:"search",value:e,onChange:e=>n(e.target.value),placeholder:"Filter by name or status…","aria-label":"Filter runs",className:"mt-6 w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx(ote,{networkStatus:l}),a&&!r&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),s&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:s.message}),i.jsxs("div",{className:"mt-4 space-y-2",children:[p.map(e=>i.jsxs(o,{to:Yw.aqueductRun(e.id),className:"block rounded-lg border border-gray-200 bg-white px-4 py-3 hover:border-blue-300",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("span",{className:"truncate font-medium text-gray-900",children:e.name}),i.jsx(Xee,{status:e.status})]}),i.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",children:`${e.id} · started ${Zee(e.createdAt)} · updated ${Zee(e.updatedAt)}`})]},e.id)),!a&&!s&&0===p.length&&i.jsx(rte,{children:0===c.length?"No runs yet. A run appears here once an aqua drafts one or an operator saves one.":"No run in the list matches that."})]})]})},vne=({runId:e,callId:n,onAcknowledged:r})=>{const[a,s]=t.useState(""),[o,l]=t.useState(null),[c,u]=p(vte);return i.jsxs("form",{onSubmit:async t=>{t.preventDefault(),l(null);try{await c({variables:{runId:e,callId:n,note:a.trim()}}),s(""),r()}catch(i){l(i instanceof Error?i.message:"The note could not be recorded.")}},className:"mt-2",children:[i.jsx("label",{htmlFor:`ack-${n}`,className:"text-xs text-gray-600",children:"Acknowledge this call to release the run. At least 10 characters."}),i.jsxs("div",{className:"mt-1 flex gap-2",children:[i.jsx("input",{id:`ack-${n}`,type:"text",value:a,onChange:e=>s(e.target.value),placeholder:"What happened to this call?",className:"w-full rounded border border-gray-300 px-2 py-1 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:u.loading||a.trim().length<10,className:"shrink-0 rounded border border-gray-300 px-3 py-1 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:u.loading?"Recording…":"Acknowledge"})]}),o&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:o})]})},wne={dead_letter:"This ends the run and frees its queue slot for the next item. Its item moves to the dead-letter queue, where it can be redriven from the queue page. A redrive starts a new run from the first step, so it may pay again for work this run already paid for.",cancel:"This ends the run for good. Its item is not moved to the dead-letter queue and cannot be redriven."},jne=e=>e.replace("_","-"),Cne=["completed","cancelled"],Nne=()=>{const{runId:e=""}=he(),[n,r]=P(),[a,s]=t.useState(null),o=n.get("step"),l=o?{step:o}:a,[c,u]=t.useState(null),[h,m]=t.useState(null),f=t.useRef(!1),{data:g,loading:y,error:x,refetch:b,networkStatus:v}=d(fte,{variables:{id:e},...ste,skipPollAttempt:()=>f.current}
2419),[w,j]=p(bte),C=g?.opsAqueductRun,N=Yte();t.useEffect(()=>{f.current=Cne.includes(C?.status??"")},[C?.status]);const k=async t=>{u(null),m(null);try{await w({variables:{id:e,action:t}}),await b()}catch(n){u(n instanceof Error?n.message:`The run could not be asked to ${jne(t)}.`)}},S=C?.calls.reduce((e,t)=>e+(t.actualMicrousd??0),0)??0,E=C?.calls.filter(e=>null===e.actualMicrousd).reduce((e,t)=>e+t.reservedMicrousd,0)??0;return i.jsxs(ate,{back:Yw.aqueductRuns,backLabel:"Runs",title:C?C.name:"Run",children:[y&&!C&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),i.jsx(ote,{networkStatus:v,settled:Cne.includes(C?.status??"")}),x&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:x.message}),C&&!Cne.includes(C.status)&&i.jsx(Jte,{status:N}),C&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 font-mono text-xs text-gray-500",children:[i.jsx("span",{children:C.id}),i.jsx(Yj,{text:C.id,tooltipContent:"Copy run id"})]}),i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[i.jsx(Xee,{status:C.status}),C.availableActions.map(e=>i.jsx("button",{type:"button",disabled:j.loading,onClick:()=>wne[e]?m(e):k(e),className:"rounded-lg border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:jne(e)},e))]}),h&&C.availableActions.includes(h)&&i.jsxs("div",{className:"mt-3 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:[i.jsx("p",{children:wne[h]}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[i.jsx("button",{type:"button",disabled:j.loading,onClick:()=>k(h),className:"rounded-lg bg-amber-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-800 disabled:opacity-50",children:`Yes, ${jne(h)} it`}),i.jsx("button",{type:"button",onClick:()=>m(null),className:"rounded-lg border border-amber-300 px-3 py-1.5 text-sm font-medium text-amber-900 hover:bg-amber-100",children:"Keep the run"})]})]}),c&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:c}),C.error&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:C.error}),"failed"===C.status&&C.availableActions.includes("dead_letter")&&i.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"This run failed and is still holding its queue slot, because its queue waits for a retry. Resume it to rerun the failed step, or dead-letter it to free the slot."}),i.jsxs(tte,{title:"Run",children:[i.jsx(nte,{label:"Generation",value:C.generation,mono:!0}),i.jsx(nte,{label:"Budget",value:Kee(C.budgetMicrousd),caveat:"What this run may spend on provider calls in total. Reaching it blocks the run rather than failing it."}),i.jsx(nte,{label:"Spent",value:Kee(S),caveat:"What the run's calls actually recorded, which is known only once a call has succeeded."}),i.jsx(nte,{label:"Still held",value:Kee(E),caveat:"Reservations against calls that have not recorded a cost. A run blocked on one of these is waiting for an operator's acknowledgement."}),i.jsx(nte,{label:"Started",value:Zee(C.createdAt)}),i.jsx(nte,{label:"Updated",value:Zee(C.updatedAt)})]}),i.jsx(tte,{title:"Steps",caveat:"The steps the definition declared, in the order it declared them. A published step has committed its evidence; an unpublished one can still roll back.",children:0===C.steps.length?i.jsx(rte,{children:"This run declared no steps."}):i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{className:"text-xs uppercase text-gray-500",children:i.jsxs("tr",{children:[i.jsx("th",{className:"py-2 pr-4",children:"Step"}),i.jsx("th",{className:"py-2 pr-4",children:"Status"}),i.jsx("th",{className:"py-2 pr-4",children:"Attempts"}),i.jsx("th",{className:"py-2 pr-4",children:"Published"}),i.jsx("th",{className:"py-2",children:"Updated"})]})}),i.jsx("tbody",{children:C.steps.map(e=>i.jsxs("tr",{className:"border-t border-gray-100 align-top",children:[i.jsxs("td",{className:"py-2 pr-4 font-mono text-xs text-gray-900",children:[i.jsx("button",{type:"button",className:"text-blue-600 hover:underline",onClick:()=>r(t=>(t.set("step",e.key),t)),children:e.key}),e.error&&i.jsx("div",{className:"mt-1 font-sans text-xs text-rose-600",children:e.error})]}),i.jsx("td",{className:"py-2 pr-4",children:i.jsx(Xee,{status:e.status})}),i.jsx("td",{className:"py-2 pr-4 text-gray-700",children:e.attempts}),i.jsx("td",{className:"py-2 pr-4 text-gray-700",children:e.published?"yes":"no"}),i.jsx("td",{className:"py-2 text-xs text-gray-500",children:Zee(e.updatedAt)})]},e.id))})]})})}),i.jsx(tte,{title:"Provider calls",caveat:"Each paid call reserves against the budget before it runs and records what it actually cost afterwards. A call that never recorded one holds its reservation until an operator acknowledges it.",children:0===C.calls.length?i.jsx(rte,{children:"This run has made no paid calls."}):i.jsx("ul",{className:"space-y-3",children:C.calls.map(e=>i.jsxs("li",{className:"rounded border border-gray-200 p-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("span",{className:"font-mono text-xs text-gray-900",children:e.requestKey}),i.jsx(Xee,{status:e.status})]}),i.jsx("div",{className:"mt-1 text-xs text-gray-600",children:`reserved ${Kee(e.reservedMicrousd)} · cost ${Kee(e.actualMicrousd)} · ${Zee(e.createdAt)}`}),i.jsx("button",{type:"button",onClick:()=>s({call:e.id}),className:"mt-2 text-xs text-blue-600 hover:underline",children:"Inspect request and response"}),e.error&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:e.error}),e.acknowledgement&&i.jsx("p",{className:"mt-2 text-xs text-gray-700",children:`Acknowledged: ${e.acknowledgement}`}),null===e.actualMicrousd&&!e.acknowledgement&&i.jsx(vne,{runId:C.id,callId:e.id,onAcknowledged:b})]},e.id))})}),i.jsx(mne,{runId:C.id},C.id),i.jsx(tte,{title:"Definition",caveat:"The aqua this run froze when it was created. Editing the aqua afterwards does not change what a run already started from.",children:i.jsx("button",{type:"button",onClick:()=>s({definition:!0}),className:"text-sm text-blue-600 hover:underline",children:"Inspect saved definition"})})]}),i.jsx(gne,{runId:e,selection:l,onClose:()=>{s(null),r(e=>(e.delete("step"),e))}})]})},kne=["pending","dispatched","blocked","dead_lettered","completed"],Sne=()=>{const[e,n]=t.useState(""),[r,a]=t.useState(""),[s,l]=t.useState(null),{data:c,loading:u,error:h,refetch:m,networkStatus:f}=d(wte,{...ste}),[g,y]=p(Ite),x=c?.opsAqueductInputQueues??[],b=[...new Set(x.map(e=>e.namespace))].sort((e,t)=>
2419e.localeCompare(t));return i.jsxs(ate,{back:Yw.aqueduct,backLabel:"Aqueduct",title:"Queues",blurb:"The durable queues work waits in before it becomes a run. A queue is created disabled and unbound, so nothing is dispatched until a binding is saved for it.",children:[i.jsx(ote,{networkStatus:f}),u&&!c&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),h&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:h.message}),b.map(e=>i.jsxs("section",{className:"mt-6",children:[i.jsx("h2",{className:"font-mono text-xs uppercase tracking-wide text-gray-500",children:e}),i.jsx("div",{className:"mt-2 space-y-2",children:x.filter(t=>t.namespace===e).map(e=>i.jsxs(o,{to:Yw.aqueductQueue(e.key),className:"block rounded-lg border border-gray-200 bg-white px-4 py-3 hover:border-blue-300",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsxs("span",{className:"truncate font-medium text-gray-900",children:[e.name,!e.enabled&&i.jsx("span",{className:"ml-2 rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-600",children:"disabled"})]}),i.jsx("span",{className:"flex flex-wrap gap-2 text-xs text-gray-600",children:kne.map(t=>i.jsx("span",{children:`${"pending"===t?"waiting total":t} ${Yee(e.counts,t)}`},t))})]}),i.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",children:`${e.key} · ${e.ordering} · ${Xte(e)??"unbound"} · updated ${Zee(e.updatedAt)}`})]},e.key))})]},e)),!u&&!h&&0===x.length&&i.jsx(rte,{children:"No queues yet."}),i.jsxs("section",{className:"mt-8 rounded-lg border border-gray-200 bg-white p-5",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:"Create a queue"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Created disabled, unbound, and filed under the shared namespace, with the default scoring weights. Nothing is dispatched until a binding is saved for it."}),i.jsxs("form",{onSubmit:async t=>{t.preventDefault(),l(null);try{await g({variables:{key:e.trim(),name:r.trim()}}),n(""),a(""),await m()}catch(i){l(i instanceof Error?i.message:"The queue could not be created.")}},className:"mt-3 flex flex-wrap gap-2",children:[i.jsx("input",{type:"text",value:e,onChange:e=>n(e.target.value),placeholder:"Key, such as profile-review","aria-label":"Queue key",className:"min-w-48 flex-1 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("input",{type:"text",value:r,onChange:e=>
2419a(e.target.value),placeholder:"Name, as an operator reads it","aria-label":"Queue name",className:"min-w-48 flex-1 rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"submit",disabled:y.loading||!e.trim()||!r.trim(),className:"rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:y.loading?"Creating…":"Create"})]}),s&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:s})]})]})},Ene=[1,2,3,6,12,24,48,168],Ane=e=>1===e?"Every hour":24===e?"Every day":168===e?"Every week":`Every ${e} hours`,One=({queueKey:e,schedule:n,onChanged:r})=>{const a=t.useId(),[s,o]=t.useState(n.intervalHours),[l,c]=t.useState(null);t.useEffect(()=>o(n.intervalHours),[n.intervalHours]);const[u,{loading:d}]=p(_te),h=async t=>{c(null);try{await u({variables:{key:e,enabled:t.enabled,intervalHours:t.intervalHours}}),await r()}catch(a){o(n.intervalHours),c(a instanceof Error?a.message:"The scan schedule could not be saved.")}},m=Ene.includes(s)?Ene:[...Ene,s].sort((e,t)=>e-t);return i.jsxs("div",{className:"mb-4 border-b border-gray-100 pb-4",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsx("button",{type:"button",onClick:()=>h({enabled:!n.enabled,intervalHours:s}),disabled:d,className:"rounded px-3 py-1.5 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50 "+(n.enabled?"border border-gray-300 text-gray-700 hover:bg-gray-50":"bg-blue-600 text-white hover:bg-blue-700"),children:n.enabled?"Turn scanning off":"Turn scanning on"}),i.jsx("span",{id:a,className:"text-sm text-gray-600",children:"How often"}),i.jsx("select",{"aria-labelledby":a,value:s,disabled:d,onChange:e=>{const t=Number(e.target.value);return o(t),h({enabled:n.enabled,intervalHours:t})},className:"rounded border border-gray-300 py-1.5 pl-2 pr-7 text-sm text-gray-700 disabled:opacity-50",children:m.map(e=>i.jsx("option",{value:e,children:Ane(e)},e))}),i.jsx("p",{className:"text-sm text-gray-600",role:"status",children:n.enabled?`Scanning. The worker looks for new w
2419ork ${Ane(n.intervalHours).toLowerCase()}.`:"Not scanning. Nothing new reaches this queue until it is switched on."})]}),l&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:l})]})},_ne=({queueKey:e,schedule:n,onScanned:r})=>{const[a,s]=t.useState(null),o=null!==n&&!n.enabled,[l,c]=t.useState(null),[u,{loading:d}]=p(Pte);return i.jsxs(tte,{title:"Registry scan",caveat:"The worker scans on this queue's own interval. Scanning here starts one pass now, whether or not that interval has elapsed, so a settings change can be checked without waiting for it. Scanning has to be switched on, because a pass reads nothing while it is off. If a pass is already running, this joins it instead of starting another.",children:[n&&i.jsx(One,{queueKey:e,schedule:n,onChanged:r}),i.jsx("button",{type:"button",onClick:async()=>{c(null);try{const e=await u();s(e.data?.opsAqueductScanClinicalTrials??null),await r()}catch(e){s(null),c(e instanceof Error?e.message:"The scan could not be started.")}},disabled:d||o,className:"rounded border border-gray-300 px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:d?"Starting…":"Scan now"}),o&&i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Turn scanning on to scan now. A pass reads nothing while scanning is off."}),l&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:l}),a&&i.jsxs("div",{className:"mt-3",children:[i.jsx("p",{className:"text-sm text-gray-700",children:a.reason}),i.jsx(nte,{label:"Execution",value:a.workflowId??"Not shown yet",mono:!!a.workflowId,caveat:"The Temporal workflow running this pass. The pass also shows as a run of the clinical-trial-ingest aqua, while it goes and after it ends, and that run is where to see what it ingested, because a pass can take longer than this page waits."}),i.jsx(nte,{label:"Already running",value:a.alreadyRunning?"yes":"no",caveat:"Yes means a pass was under way and this click started nothing. No does not prove this click started the pass, because the schedule can start one of its own at the same moment."})]})]})},Pne="hold",Ine=[0,15,60,240,1440,10080],Mne=e=>null===e?"Hold until someone retries":0===e?"Dead-letter at once":e%10080==0?`After ${e/10080} week${10080===e?"":"s"}`:e%1440==0?`After ${e/1440} day${1440===e?"":"s"}`:e%60==0?`After ${e/60} hour${60===e?"":"s"}`:`After ${e} minute${1===e?"":"s"}`,Tne=e=>1===e?"once":`${e} times`,Rne=({queueKey:e,afterMinutes:n,onChanged:r})=>{const a=t.useId(),[s,o]=t.useState(n),[l,c]=t.useState(null);t.useEffect(()=>o(n),[n]);const[u,{loading:d}]=p(Ate),h=null===s||Ine.includes(s)?[...Ine,null]:[...[...Ine,s].sort((e,t)=>e-t),null];return i.jsxs("div",{className:"mt-3 border-t border-gray-100 pt-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsx("span",{id:a,className:"text-sm text-gray-600",children:"When a run fails"}),i.jsx("select",{"aria-labelledby":a,value:null===s?Pne:s,disabled:d,onChange:t=>(async t=>{c(null),o(t);try{await u({variables:{key:e,afterMinutes:t}}),await r()}catch(a){o(n),c(a instanceof Error?a.message:"The failed-run setting could not be saved.")}})(t.target.value===Pne?null:Number(t.target.value)),className:"rounded border border-gray-300 py-1.5 pl-2 pr-7 text-sm text-gray-700 disabled:opacity-50",children:h.map(e=>i.jsx("option",{value:e??Pne,children:Mne(e)},e??Pne))})]}),i.jsx("p",{className:"mt-2 text-sm text-gray-600",role:"status",children:(m=n,0===m?"A failed run ends straight away, its item moves to the dead-letter queue, and the next item takes its slot.":null===m?"A failed run keeps its slot until someone resumes it or dead-letters it, so one failure can stall the queue.":`A failed run keeps its slot while it waits to be resumed. If nobody resumes it, it is dead-lettered ${Mne(m).toLowerCase()}.`)}),l&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:l})]});var m},Lne=["eligible","excluded","dispatched","blocked","dead_lettered","completed","discarded","all"],Dne="rounded border border-gray-300 px-2 py-1 text-xs font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",Fne=({message:e,confirmLabel:t,cancelLabel:n,busy:r,onConfirm:a,onCancel:s})=>i.jsxs("div",{className:"mt-3 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:[i.jsx("p",{children:e}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[i.jsx("button",{type:"button",disabled:r,onClick:a,className:"rounded-lg bg-amber-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-800 disabled:opacity-50",children:t}),i.jsx("button",{type:"button",onClick:s,className:"rounded-lg border border-amber-300 px-3 py-1.5 text-sm font-medium text-amber-900 hover:bg-amber-100",children:n})]})]}),qne=()=>{const{key:e=""}=he(),n=f(),r=n.state?.fromPipeline,[a,s]=t.useState("eligible"),[l,c]=t.useState(null),[u,h]=t.useState(null),{data:m,loading:g,error:y,refetch:x,networkStatus:b}=d(jte,{variables:{key:e,state:a},...ste}),v=d(Nte,{variables:{key:e},...ste}),[w,j]=p(kte),[C,N]=p(Ete),[k,S]=p(Ste),E=j.loading||N.loading||S.loading,A=m?.opsAqueductInputQueue,O=v.data?.opsAqueductInputQueuePipeline,_=A?Xte(A.queue,O?.name):null,P=_?i.jsx(o,{to:Yw.aqueductPipeline(e),className:"text-blue-600 hover:underline",children:_}):"unbound",I="all"===a?"Nothing in this queue.":`Nothing is ${a}.`,M=async(e,t)=>{c(null),h(null);try{await e(),await x()}catch(n){c(n instanceof Error?n.message:t)}},T=t=>M(()=>w({variables:{key:e,id:t}}),"The item could not be retried."),R=A?.counts.find(e=>"dead_lettered"===e.state)?.count??0,L=1===R?"the 1 dead-lettered item":`all ${R} dead-lettered items`;return i.jsxs(ate,{back:r?Yw.aqueductPipeline(r.key):Yw.aqueductQueues,backLabel:r?.name??"Queues",title:A?A.queue.name:"Queue",children:[i.jsx(ote,{networkStatus:b}),g&&!m&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),y&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:y.message}),A&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mt-1 font-mono text-xs text-gray-500",children:`${A.queue.key} · ${A.queue.namespace} · ${A.queue.ordering}`}),i.jsxs(tte,{title:"Queue",children:[i.jsx(nte,{label:"Enabled",value:A.queue.enabled?"yes":"no",caveat:"A disabled queue holds its items and dispatches none of them. Saving a binding disables the queue, so a new binding never starts dispatching by itself. Start and stop it from this queue's aqua screen, which is where the switch lives. This is a separate question from whether the queue is scanned for new w
2419ork, which is set under Registry scan."}),i.jsx(nte,{label:"Aqua",value:P,caveat:"What a dispatched item is turned into. A saved binding is what runs the work when the queue has one, whatever aqua is installed alongside it. An unbound queue accepts work but cannot run any of it."}),i.jsx(nte,{label:"Waiting, not excluded",value:Math.max(0,(A.counts.find(e=>"pending"===e.state)?.count??0)-A.excluded),caveat:"Waiting items with a non-negative score. These can run once their available time arrives and the queue is enabled."}),i.jsx(nte,{label:"Excluded",value:A.excluded,caveat:"Waiting items a negative score keeps out of dispatch. This is what separates an idle queue with a backlog from an empty one."}),A.counts.filter(e=>"pending"!==e.state).map(e=>i.jsx(nte,{label:e.state,value:e.count},e.state)),i.jsx(nte,{label:"Created",value:Zee(A.queue.createdAt)}),i.jsx(nte,{label:"Updated",value:Zee(A.queue.updatedAt)}),i.jsx(Rne,{queueKey:A.queue.key,afterMinutes:A.queue.deadLetterAfterMinutes??null,onChanged:x})]}),"clinical-trial-ingest-v1"===A.queue.pipeline&&i.jsx(_ne,{queueKey:A.queue.key,schedule:A.queue.schedule,onScanned:x}),i.jsxs(tte,{title:"What this queue runs",caveat:"A bound queue answers with the aqua it saved. A queue whose aqua is compiled in answers with that aqua's name and no definition, because there is nothing saved to show.",children:[v.loading&&!v.data&&i.jsx(rte,{children:"Loading…"}),v.error&&i.jsx("p",{className:"text-sm text-rose-600",children:v.error.message}),O&&i.jsxs(i.Fragment,{children:[i.jsx(nte,{label:"Aqua",value:P}),i.jsx(nte,{label:"Routing rules",value:O.routing.length}),O.definition?i.jsx("div",{className:"mt-3",children:i.jsx(ite,{value:O.definition})}):i.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"This queue’s aqua is compiled in, so there is no saved definition to show."})]})]}),i.jsxs(tte,{title:"Items",children:[i.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Waiting items are split into eligible and excluded. Excluded items have a negative score and will not run unless their score changes. Dead-lettered items are ones whose run failed and was given up on. They stay out of the way until someone redrives them, which starts a new run from the first step, or discards them."}),i.jsx("div",{className:"flex flex-wrap gap-2",children:Lne.map(e=>i.jsx("button",{type:"button",onClick:()=>{s(e),h(null)},className:"rounded-full px-3 py-1 text-xs font-medium "+(a===e?"bg-blue-600 text-white":"border border-gray-300 text-gray-700 hover:bg-gray-50"),children:e},e))}),"dead_lettered"===a&&R>0&&i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[i.jsx("button",{type:"button",disabled:E,onClick:()=>h({action:"redrive_all"}),className:"rounded bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:`Redrive all ${R}`}),i.jsx("span",{className:"text-sm text-gray-600",children:"Do this once whatever made them fail is fixed. Each one becomes a new run."})]}),"dead_lettered"===a&&R>0&&"redrive_all"===u?.action&&i.jsx(Fne,{message:`This sends ${L} back to the queue, and each becomes a new run. A new run starts from the first step, so it may pay again for work its dead-lettered run already paid for.`,confirmLabel:`Yes, redrive all ${R}`,cancelLabel:"Keep them dead-lettered",busy:E,onConfirm:()=>M(()=>k({variables:{key:e}}),"The dead-lettered items could not be redriven."),onCancel:()=>h(null)}),l&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:l}),i.jsxs("div",{className:"mt-4 space-y-2",children:[A.items.map(t=>i.jsxs("div",{className:"rounded border border-gray-200 px-3 py-2",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx(o,{to:Yw.aqueductQueueItem(e,t.id),state:{fromPipeline:r},className:"truncate font-medium text-blue-600 hover:underline",children:t.subjectName}),i.jsx("span",{className:"flex items-center gap-2",children:i.jsx(Xee,{status:"pending"===t.state?t.eligibility:t.state})})]}),i.jsx("div",{className:"mt-1 truncate text-xs text-gray-600",children:`score ${t.score} · ${t.reason}`}),i.jsxs("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",children:[`#${t.sequence} · available ${Zee(t.availableAt)}`,t.run?` · run ${t.run.status}`:""]}),t.deadLetteredAt&&i.jsx("div",{className:"mt-1 text-xs text-gray-600",children:`Dead-lettered ${Tne(t.deadLetterCount)}, last ${Zee(t.deadLetteredAt)}`}),t.run?.error&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:t.run.error}),"blocked"===t.state&&i.jsx("button",{type:"button",disabled:E,onClick:()=>T(t.id),className:`mt-2 ${Dne}`,children:"Retry"}),"dead_lettered"===t.state&&i.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[i.jsx("button",{type:"button",disabled:E,onClick:()=>T(t.id),className:Dne,children:"Redrive"}),i.jsx("button",{type:"button",disabled:E,onClick:()=>h({action:"discard",itemId:t.id}),className:Dne,children:"Discard"})]}),"dead_lettered"===t.state&&"discard"===u?.action&&u.itemId===t.id&&i.jsx(Fne,{message:"This takes the item out of the dead-letter queue for good. A discarded item cannot be redriven, and queuing the same work again is ignored because the discarded item still holds its place.",confirmLabel:"Yes, discard it",cancelLabel:"Keep it",busy:E,onConfirm:()=>{return n=t.id,M(()=>C({variables:{key:e,id:n}}),"The item could not be discarded.");var n},onCancel:()=>h(null)})]},t.id)),0===A.items.length&&i.jsx(rte,{children:I})]})]})]})]})},Bne=({movement:e})=>i.jsxs("li",{className:"border-t border-gray-100 py-2 first:border-t-0 first:pt-0",children:[i.jsx("div",{className:"text-sm text-gray-900",children:`into ${e.destinationKey}, by ${e.initiator}`}),i.jsx("div",{className:"text-xs text-gray-600",children:e.reason}),i.jsx("div",{className:"font-mono text-xs text-gray-500",children:Zee(e.createdAt)})]}),Une=()=>{const{key:e="",itemId:t=""}=he(),n=f(),{data:r,loading:a,error:s}=d(Cte,{variables:{key:e,id:t},fetchPolicy:"network-only"}),l=r?.opsAqueductInputQueueItem,c=l?.item;return i.jsxs(ate,{back:Yw.aqueductQueue(e),backLabel:"Queue",backState:n.state,title:c?.subjectName??"Queue item",children:[a&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),s&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:s.message}),l&&c&&i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-xs text-gray-500",children:[i.jsx("span",{children:`${c.subjectType} ${c.subjectId}`}),i.jsx(Xee,{status:"pending"===c.state?c.eligibility:c.state})]}),i.jsxs(tte,{title:"Item",children:[i.jsx(nte,{label:"Sequence",value:c.sequence,mono:!0}),i.jsx(nte,{label:"Dedupe key",value:c.dedupeKey,mono:!0,caveat:"What makes this the same subject as an earlier one, so it is not queued twice."}),i.jsx(nte,{label:"Reason",value:c.reason}),i.jsx(nte,{label:"Score",value:c.score,caveat:"What orders a priority queue. A negative score excludes the item from dispatch without deleting it."}),i.jsx(nte,{label:"Available",value:Zee(c.availableAt),caveat:"When the item becomes eligible. A retry pushes this into the future."}),i.jsx(nte,{label:"Queued",value:Zee(c.createdAt)}),i.jsx(nte,{label:"Updated",value:Zee(c.updatedAt)}),c.run&&i.jsx(nte,{label:"Run",value:i.jsx(o,{to:Yw.aqueductRun(c.run.id),className:"text-blue-600 hover:underline",children:c.run.status})}),c.outcome&&i.jsx(nte,{label:"Outcome",value:c.outcome}),c.deadLetteredAt&&i.jsx(nte,{label:"Dead-lettered",value:`${Zee(c.deadLetteredAt)} (${Tne(c.deadLetterCount)})`,caveat:"When this item's run was last given up on. A redrive leaves this in place, so an item that keeps failing says so. Redrive or discard it from the queue page."})]}),i.jsx(tte,{title:"What this item produced",caveat:"Outcomes are recorded once under their own event key, so replaying a run does not record them again.",children:0===l.outcomes.length?i.jsx(rte,{children:"This item has produced nothing yet."}):i.jsx("ul",{className:"space-y-3",children:l.outcomes.map(e=>i.jsxs("li",{className:"rounded border border-gray-200 p-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("span",{className:"font-mono text-xs text-gray-900",children:e.kind}),i.jsx("span",{className:"text-xs text-gray-500",children:Zee(e.createdAt)})]}
2419),e.routingError&&i.jsx("p",{className:"mt-1 text-xs text-rose-600",children:e.routingError}),e.movements&&e.movements.length>0&&i.jsx("ul",{className:"mt-2",children:e.movements.map(e=>i.jsx(Bne,{movement:e},e.id))}),i.jsx("div",{className:"mt-2",children:i.jsx(ite,{value:e.data})})]},e.id))})}),i.jsx(tte,{title:"What put this item here",caveat:"The routing moves that created this item. An item queued directly, rather than routed in from another queue's outcome, has none.",children:0===l.arrivals.length?i.jsx(rte,{children:"Nothing routed this item in; it was queued directly."}):i.jsx("ul",{children:l.arrivals.map(e=>i.jsx(Bne,{movement:e},e.id))})}),i.jsx(tte,{title:"Score snapshot",caveat:"What produced this item's score, recorded when it was scored, so a later change in weights is explainable after the fact rather than only visible as a different order.",children:i.jsx(ite,{value:c.scoreSnapshot})}),i.jsx(tte,{title:"Payload",children:i.jsx(ite,{value:c.payload})})]})]})},zne={runs:"Aqua runs, queue coordination and their activities",bookkeeping:"Short database and control activities",sources:"Source fetching"},Hne=new Set(["running","polling","shutting_down"]),Vne=i.jsx(i.Fragment,{children:"Running: heartbeating and polling. Polling: seen polling, but the server reports no heartbeat. Shutting down: draining its current work. Stopped: finished shutting down. Lost: said it was running and then stopped heartbeating for over three minutes, as a crash, a killed container or a lost connection to Temporal does. Temporal decides how long a stopped or lost worker stays listed, which can be only a few minutes."}),$ne=e=>{const{status:t,activitySlotsUsed:n,activitySlotsAvailable:r}=e;return Hne.has(t)&&null!==n&&null!==r?`${n} / ${n+r}`:"—"},Wne=({worker:e})=>i.jsxs("li",{className:"rounded-lg border border-gray-200 bg-white px-4 py-3",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("span",{className:"font-mono text-sm text-gray-900",children:e.identity}),i.jsx(Xee,{status:e.status})]}),i.jsx("div",{className:"mt-1 text-xs text-gray-500",children:[e.hostName&&`host ${e.hostName}`,e.processId&&`pid ${e.processId}`,e.startedAt&&`started ${Gee(e.startedAt)}`,`last seen ${Gee(e.lastSeenAt)}`,e.sdkVersion&&`SDK ${e.sdkVersion}`].filter(Boolean).join(" · ")}),e.buildId&&i.jsx("div",{className:"mt-0.5 truncate font-mono text-xs text-gray-400",title:e.buildId,children:e.buildId}),i.jsxs("table",{className:"mt-3 w-full text-left text-sm",children:[i.jsx("thead",{className:"text-xs text-gray-500",children:i.jsxs("tr",{children:[i.jsx("th",{className:"py-1 pr-4 font-normal",children:"Task queue"}),i.jsx("th",{className:"py-1 pr-4 font-normal",children:"Status"}),i.jsx("th",{className:"py-1 pr-4 font-normal",children:"Activities running"}),i.jsx("th",{className:"py-1 pr-4 font-normal",children:"Last heartbeat"}),i.jsx("th",{className:"py-1 font-normal",children:"Last poll"})]})}),i.jsx("tbody",{children:e.taskQueues.map(e=>i.jsxs("tr",{className:"border-t border-gray-100",children:[i.jsx("td",{className:"py-1.5 pr-4 font-mono text-xs text-gray-700",children:e.name}),i.jsx("td",{className:"py-1.5 pr-4",children:i.jsx(Xee,{status:e.status})}),i.jsx("td",{className:"py-1.5 pr-4 text-gray-700",children:$ne(e)}),i.jsx("td",{className:"py-1.5 pr-4 text-gray-700",children:Gee(e.heartbeatAt)}),i.jsx("td",{className:"py-1.5 text-gray-700",children:Gee(e.lastPolledAt)})]},e.name))})]})]}),Qne=()=>{const{data:e,loading:t,error:n,networkStatus:r}=d(Fte,{...ste}),a=e?.opsAqueductWorkers,s=a?.workers.filter(e=>Hne.has(e.status))??[],o=(a?.workers.length??0)-s.length;return i.jsxs(ate,{back:Yw.aqueduct,backLabel:"Aqueduct",title:"Workers",blurb:"The Temporal server Aqueduct runs on and the worker processes serving its task queues.",children:[i.jsx(ote,{networkStatus:r}),t&&!e&&i.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading…"}),n&&i.jsx("p",{className:"mt-4 text-sm text-rose-600",children:n.message}),a&&i.jsxs(i.Fragment,{children:[i.jsxs(tte,{title:"Temporal server",children:[i.jsx(nte,{label:"Status",value:i.jsx(Xee,{status:a.server.reachable?"reachable":"unreachable"})}),i.jsx(nte,{label:"Address",value:a.server.address,mono:!0}),i.jsx(nte,{label:"Namespace",value:a.server.namespace,mono:!0}),i.jsx(nte,{label:"Version",value:a.server.version??"—"}),i.jsx(nte,{label:"Checked",value:Zee(a.checkedAt)}),a.server.error&&i.jsx("p",{className:"mt-2 text-sm text-rose-600",children:a.server.error})]}),a.server.reachable&&i.jsxs(i.Fragment,{children:[i.jsx(tte,{title:"Task queues",caveat:"Each worker process polls all three. A task queue with no live worker holds its work until one starts.",children:i.jsx("ul",{className:"space-y-2",children:a.taskQueues.map(e=>i.jsxs("li",{className:"flex flex-wrap items-baseline justify-between gap-2 border-t border-gray-100 pt-2 first:border-t-0 first:pt-0",children:[i.jsxs("span",{children:[i.jsx("span",{className:"font-mono text-xs text-gray-900",children:e.name}),i.jsx("span",{className:"ml-2 text-sm text-gray-500",children:zne[e.role]??e.role})]}),i.jsx("span",{className:"text-sm "+(e.liveWorkers?"text-gray-700":"font-medium text-rose-600"),children:e.liveWorkers?`${e.liveWorkers} live · polled ${Gee(e.lastPolledAt)}`:"No live worker"})]},e.name))})}),i.jsxs(tte,{title:"Worker processes",caveat:Vne,children:[i.jsxs("p",{className:"text-sm text-gray-700",children:[i.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:s.length})," live "+(1===s.length?"process":"processes"),o>0&&`, ${o} recently stopped or lost`]}),!a.heartbeats&&i.jsx("p",{className:"mt-2 text-sm text-amber-700",children:"This Temporal server does not report worker heartbeats, so w
2419orkers are known only from their recent polls, without start times or activity counts."}),0===a.workers.length?i.jsx("div",{className:"mt-3",children:i.jsx(rte,{children:"No worker has polled Aqueduct's task queues recently."})}):i.jsx("ul",{className:"mt-3 space-y-3",children:a.workers.map(e=>i.jsx(Wne,{worker:e},e.identity))})]})]})]})]})},Zne=u`
2420  query OpsQueuedCompanies {
2421    opsQueuedCompanies {
2422      id
2423      name
2424      cnName
2425      parentName
2426      queuedByName
2427      queuedByEmail
2428      queuedAt
2429    }
2430  }
2431`,Kne=()=>{const{data:e,loading:t,error:n}=d(Zne,{fetchPolicy:"network-only"}),r=e?.opsQueuedCompanies??[];return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl",children:[i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:"Missing Companies queue"}),i.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Companies an import named that aren’t in our database, kept to process later. Each name is listed once, whatever its case. Reflects whichever environment this app points at."}),t&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"Loading…"}),n&&i.jsx("p",{className:"mt-6 text-sm text-rose-600",children:n.message}),e&&0===r.length&&i.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"The queue is empty."}),r.length>0&&i.jsxs("table",{className:"mt-6 w-full rounded-lg border border-gray-200 bg-white text-sm",children:[i.jsx("caption",{className:"px-4 pt-3 text-left text-sm text-gray-600",children:`${r.length} ${1===r.length?"company":"companies"}`}),i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs uppercase tracking-wide text-gray-400",children:[i.jsx("th",{scope:"col",className:"px-4 py-2 text-left font-medium",children:"Name in the export"}),i.jsx("th",{scope:"col",className:"px-4 py-2 text-left font-medium",children:"Parent"}),i.jsx("th",{scope:"col",className:"px-4 py-2 text-left font-medium",children:"Queued by"}),i.jsx("th",{scope:"col",className:"px-4 py-2 text-left font-medium",children:"Queued"})]})}),i.jsx("tbody",{children:r.map(e=>i.jsxs("tr",{className:"border-t border-gray-100 align-top",children:[i.jsxs("td",{className:"px-4 py-2",children:[i.jsx("span",{className:"font-medium text-gray-900",children:e.name}),e.cnName&&i.jsx("span",{className:"block text-xs text-gray-500",children:e.cnName})]}),i.jsx("td",{className:"px-4 py-2 text-gray-700",children:e.parentName&&e.parentName!==e.name?e.parentName:"—"}),i.jsx("td",{className:"px-4 py-2 text-gray-700",children:e.queuedByName??e.queuedByEmail??"unknown"}),i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-gray-700",children:c2(e.queuedAt)})]},e.id))})]})]})})},Gne=({tabs:e,activeTab:t,onTabChange:n})=>{const r={upload:Vs,pen:Ns};return i.jsx("div",{className:"flex gap-6 border-b border-gray-200",children:e.map(e=>{const a=r[e.icon],s=t===e.id;return i.jsxs("button",{type:"button",onClick:()=>n(e.id),className:"flex items-center gap-1.5 pb-2 text-sm transition-colors border-b-2 -mb-px "+(s?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-500 hover:text-gray-700"),children:[i.jsx(a,{className:"w-3.5 h-3.5"}),e.label]},e.id)})})},Yne=({value:e,onChange:t,disabled:n=!1})=>i.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[i.jsxs("p",{className:"text-md text-gray-600",children:["Enter the roles or job titles of your target contacts",i.jsx("span",{className:"text-gray-400 ml-1",children:"(optional)"})]}),i.jsxs("ul",{className:"list-disc pl-4 text-xs text-gray-500",children:[i.jsx("li",{children:"Examples: C-Suite, Scientists, VPs"}),i.jsxs("li",{children:["Quote a phrase to match it exactly, e.g."," ",i.jsx("span",{className:"font-mono",children:'"head of business development"'})]}),i.jsx("li",{children:i.jsxs("span",{className:"flex items-center gap-1",children:["Matched contacts will be marked with a",i.jsx(Fs,{className:"w-3.5 h-3.5 text-yellow-500 fill-yellow-500"}),"icon"]})})]}
2431),i.jsx("input",{type:"text",value:e,onChange:e=>t(e.target.value),className:"w-full px-3 py-2 border border-gray-200 rounded-lg text-sm",disabled:n})]}),Jne=({onDrop:e,accept:t,dragText:n,multiple:r=!1})=>i.jsx(ot,{onDrop:e,accept:t,maxFiles:r?0:1,multiple:r,className:"border-2 border-dashed border-gray-200 rounded-lg p-4 hover:border-gray-300 transition-colors",renderZone:({isDragActive:e,open:t})=>i.jsxs("div",{className:"text-center",children:[i.jsx(Vs,{className:"w-6 h-6 mx-auto mb-2 "+(e?"text-blue-500":"text-gray-400")}),i.jsx("div",{className:"text-xs mb-2 "+(e?"text-blue-500":"text-gray-600"),children:n}),i.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),t()},className:"px-3 py-1.5 text-xs font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:r?"Upload Files":"Upload File"})]})}),Xne=({fileName:e,isValidating:t,onRemove:n})=>i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(is,{className:"w-4 h-4 text-gray-500"}),i.jsx("span",{className:"text-sm font-medium text-gray-700",children:e}),t&&i.jsx(gs,{className:"w-4 h-4 animate-spin text-gray-400"})]}),i.jsx("button",{type:"button",onClick:n,className:"p-1 hover:bg-gray-100 rounded text-gray-400 hover:text-gray-600",children:i.jsx(Sn,{className:"w-4 h-4"})})]}),ere=({isVisible:e,onToggle:t})=>i.jsxs("button",{type:"button",onClick:t,className:"mt-2 flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700",children:[i.jsx(Ts,{className:"w-3 h-3"}),e?"Hide column mapping":"Change column mapping"]}),tre=({error:e,successCount:t,successLabel:n,warnings:r})=>i.jsxs(i.Fragment,{children:[e&&i.jsx("div",{className:"mt-2 p-2 bg-red-50 rounded-lg text-red-600 text-xs",children:e}),null!==t&&!e&&i.jsxs("div",{className:"mt-2 p-2 bg-green-50 rounded-lg text-green-600 text-xs",children:["✓ Successfully loaded"," ",t.toLocaleString()," ",n]}),null!==t&&!e&&r.length>0&&i.jsx("div",{className:"mt-2 p-2 bg-amber-50 rounded-lg text-amber-700 text-xs flex flex-col gap-1",children:r.map(e=>i.jsx("div",{children:e},e))})]}),nre=({onDownload:e})=>i.jsxs("button",{type:"button",onClick:e,className:"flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium text-blue-700 bg-blue-50 hover:bg-blue-100 border border-blue-200 rounded-md transition-colors",children:[i.jsx(ts,{className:"w-3 h-3"}),"Template"]}),rre=({description:e,required:t,optional:n,notes:r,onDownload:a})=>i.jsxs("div",{className:"flex flex-col",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsx("p",{className:"text-sm text-gray-600",children:e}),i.jsx("div",{className:"flex-shrink-0",children:i.jsx(nre,{onDownload:a})})]}),i.jsxs("ul",{className:"text-sm text-gray-500 list-disc list-inside ml-4",children:[r?.map(e=>i.jsx("li",{children:e},e)),i.jsxs("li",{children:[i.jsx("span",{className:"font-medium",children:"Required:"})," ",t?.join(", ")]}),n&&n.length>0&&i.jsxs("li",{children:[i.jsx("span",{className:"font-medium",children:"Optional:"})," ",n?.join(", ")]})]})]}),are=({onClick:e,disabled:t})=>i.jsx("button",{type:"button",onClick:e,disabled:t,className:"px-3 py-1.5 text-xs font-medium text-white bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed rounded transition-colors",children:"Apply Mapping"}),ire=({id:e,label:t,value:n,headers:r,onChange:a,required:s=!1,className:o="flex-1"})=>i.jsxs("div",{className:o,children:[i.jsxs("label",{htmlFor:e,className:"block text-xs text-gray-500 mb-1",children:[t,s&&i.jsx("span",{className:"text-red-500",children:"*"}),!s&&i.jsx("span",{className:"text-gray-400 ml-1",children:"(optional)"})]}),i.jsxs("select",{id:e,value:n||"",onChange:e=>a(e.target.value||null),className:"w-full text-xs border border-gray-200 rounded px-2 py-1.5 bg-white",children:[i.jsx("option",{value:"",children:"Select..."}),r.map(e=>i.jsx("option",{value:e,children:e},e))]})]}),sre=({children:e,className:t=""})=>i.jsx("th",{className:`px-2 py-1.5 text-left font-medium text-gray-600 ${t}`,children:e}
2431),ore=({value:e,onChange:t,placeholder:n,ariaLabel:r,onPaste:a})=>i.jsx("td",{className:"px-2 py-1",children:i.jsx("input",{"aria-label":r,value:e,onChange:e=>t(e.target.value),onPaste:a,placeholder:n,className:"w-full text-xs border border-gray-200 rounded px-2 py-1"})}),lre=({nameMode:e,onChange:t})=>i.jsxs("label",{className:"flex items-center gap-1 text-xs text-gray-600",children:[i.jsx(Lv,{checked:"full"===e,onChange:e=>t(e?"full":"split")}),"Use full name"]}),cre={split:[{field:"firstName",label:"First name",placeholder:"Jane",width:"w-32"},{field:"lastName",label:"Last name",placeholder:"Doe",width:"w-32"}],full:[{field:"name",label:"Full name (first + last)",placeholder:"Jane Doe",width:"min-w-[160px]"}]},ure=({nameMode:e})=>i.jsx(i.Fragment,{children:cre[e].map(e=>i.jsx(sre,{className:e.width,children:e.label},e.field))}),dre=({nameMode:e,row:t,rowIndex:n,onChange:r,onPaste:a})=>i.jsx(i.Fragment,{children:cre[e].map(e=>i.jsx(ore,{value:t[e.field]??"",onChange:t=>r(e.field,t),onPaste:a?t=>a(e.field,t):void 0,placeholder:e.placeholder,ariaLabel:`${e.label} for row ${n+1}`},e.field))}),pre=e=>`${e.websiteUrl??"no domain"} · ${e.slug??"no slug"}`,hre=({suggestions:e,onPick:n,onCancel:r})=>{const[a,s]=t.useState(""),[o,l]=t.useState("");t.useEffect(()=>{const e=setTimeout(()=>l(a.trim()),200);return()=>clearTimeout(e)},[a]);const c=o.length>=2,{data:u,loading:p}=d(s2,{variables:{query:o},skip:!c}),h=c?u?.opsCompanyDataHistorySearch??[]:e;let m=c?null:"What the matcher found but would not pick";return c&&p?m="Searching…":c&&0===h.length&&(m="No companies match."),i.jsxs("div",{className:"relative max-w-md",children:[i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"search",value:a,onChange:e=>s(e.target.value),placeholder:"Search bio companies by name, domain, slug, or id…","aria-label":"Search bio companies",autoFocus:!0,className:"w-full rounded-lg border border-gray-300 px-3 py-1.5 text-sm focus:border-blue-400 focus:outline-none"}),i.jsx("button",{type:"button",onClick:r,className:"text-sm text-gray-500 hover:underline",children:"cancel"})]}),(c||e.length>0)&&i.jsxs("div",{className:"absolute z-10 mt-1 max-h-80 w-full overflow-y-auto rounded-lg border border-gray-200 bg-white shadow-sm",children:[m&&i.jsx("p",{className:"border-b border-gray-100 px-3 py-1.5 text-xs text-gray-400",children:m}),h.map(e=>i.jsxs("button",{type:"button",onClick:()=>n(e),className:"block w-full border-b border-gray-100 px-3 py-2 text-left last:border-b-0 hover:bg-gray-50",children:[i.jsx("span",{className:"text-sm text-gray-900",children:`${e.companyName}${e.isActive?"":" (inactive)"}`}),i.jsx("span",{className:"block text-xs text-gray-500",children:`${pre(e)} · ${e.id}`})]},e.id))]})]})},mre=({company:e,suggestions:n,disabled:r,onPick:a})=>{const[s,o]=t.useState(!1),l=e=>{o(!1),a(e)};if(s)return i.jsx(hre,{suggestions:n,onPick:l,onCancel:()=>o(!1)});const c=(e,t)=>i.jsx("button",{type:"button",onClick:t,disabled:r,className:"text-sm text-blue-600 hover:underline disabled:opacity-50",children:e});return i.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 text-sm",children:[i.jsx("span",{className:e?"text-gray-900":"text-gray-500",children:e?.companyName??"not linked"}),e&&i.jsx("span",{className:"text-xs text-gray-500",children:pre(e)}),c(e?"change":"pick",()=>o(!0)),e&&c("don’t link",()=>l(null))]})},fre=e=>`${e.npuid}|${e.matchedRow?.id??""}`,gre=(e,t)=>t||(e?e.sameDrug?"link":"new":null),yre=e=>[e.interventionType,e.treatmentModality,e.target&&`target ${e.target}`].filter(Boolean).join(" · "),xre=({drug:e})=>{const{summary:t}=e,n=[t.interventionType,t.treatmentModality??"modality not provided",t.target?`target ${t.target}`:"target not provided",t.aliases.length>0?`aliases: ${t.aliases.join(", ")}`:"no aliases"].join(" · ");return i.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[i.jsx("p",{children:n}),i.jsx("ul",{className:"list-disc pl-5",children:t.indications.map(e=>i.jsx("li",{children:`${e.indication} · ${e.clinicalStage} · ${e.therapeuticArea}`},e.indication))})]})},bre=({label:e,companies:t,sentence:n,facts:r})=>i.jsxs("div",{className:"rounded-lg bg-gray-50 p-3",children:[i.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:e}),i.jsx("p",{className:"mt-0.5 text-sm font-medium text-gray-900",children:t}),n&&i.jsx("p",{className:"mt-1 text-sm text-gray-700",children:n}),r&&i.jsx("p",{className:"mt-1 text-xs text-gray-500",children:r})]}),vre=({verdict:e,comparing:t})=>e?i.jsxs("p",{className:"text-sm text-gray-800",children:[i.jsx("span",{className:"font-medium",children:e.sameDrug?"AI: the same drug. Link it.":"AI: different drugs. Create it as a new drug."}),` ${e.reason}`]}):t?i.jsx("p",{className:"animate-pulse text-sm text-gray-500",children:"AI is comparing the two drugs…"}):i.jsx("p",{className:"text-sm text-gray-600",children:"The AI couldn’t assess this match. Compare the two sides and decide."}),wre=(e,t)=>
2431"link"===e?`link to our ${t}`:"new"===e?"create as a new drug":"skip it",jre=(e,t,n)=>{if("skip"===e)return"Skip";const r="link"===e?`Link to our ${t}`:"Create as a new drug";return n?`${r} instead`:r},Cre=({decision:e,byStaff:t,waiting:n,rowName:r})=>e?t?i.jsx("span",{className:"rounded-full bg-blue-50 px-2.5 py-1 text-sm font-medium text-blue-700",children:`Your call: ${wre(e,r)}`}):i.jsx("span",{className:"rounded-full bg-emerald-50 px-2.5 py-1 text-sm font-medium text-emerald-700",children:`Accepted: ${wre(e,r)}`}):n?null:i.jsx("span",{className:"rounded-full bg-amber-50 px-2.5 py-1 text-sm font-medium text-amber-700",children:"Not decided: it isn’t committed until you choose"}),Nre=({drug:e,verdict:n,comparing:r,override:a,disabled:s,onDecide:o})=>{const[l,c]=t.useState(!1),u=e.matchedRow;if(!u)return null;const d=gre(n,a);return i.jsxs("article",{"aria-label":e.name,className:"rounded-lg border border-gray-200 bg-white p-4",children:[i.jsxs("header",{className:"flex flex-wrap items-baseline gap-x-2",children:[i.jsx("h3",{className:"text-base font-semibold text-gray-900",children:e.name}),i.jsx("span",{className:"text-sm text-gray-500",children:`matched ${u.name} in our database`})]}),i.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[i.jsx(bre,{label:"In our database",companies:u.otherCompanies.map(e=>e.companyName).join(", "),sentence:n?.existingDrug??null,facts:yre(u)}),i.jsx(bre,{label:"In the file",companies:e.companies.map(e=>e.company?.companyName??e.name).join(", "),sentence:n?.fileDrug??null,facts:yre(e.summary)})]}),i.jsx("div",{className:"mt-3",children:i.jsx(vre,{verdict:n,comparing:r})}),i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[i.jsx(Cre,{decision:d,byStaff:void 0!==a,waiting:r,rowName:u.name}),["link","new","skip"].filter(e=>e!==d).map(e=>i.jsx("button",{type:"button",onClick:()=>o(e),disabled:s,className:"rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:jre(e,u.name,null!==d)},e)),a&&i.jsx("button",{type:"button",onClick:()=>o(void 0),disabled:s,className:"text-sm text-blue-600 hover:underline disabled:opacity-50",children:n?"Use the AI’s call":"Undo"}),i.jsx("button",{type:"button",onClick:()=>c(e=>!e),"aria-expanded":l,className:"ml-auto text-sm text-blue-600 hover:underline",children:l?"▾ Hide details":"▸ Details"})]}),l&&i.jsx("div",{className:"mt-3",children:i.jsx(xre,{drug:e})})]})},kre=e=>{const t=[...new Set(e.flatMap(e=>e.companies.map(({name:e})=>e)))],n=t.length>3?` and ${t.length-3} more`:"",r=1===e.length;return`${e.length} ${r?"drug is":"drugs are"} left out: none of the companies ${r?"it names":"they name"} is in our database (${t.slice(0,3).join(", ")}${n}). Companies ticked for the Missing Companies queue are added to it when you commit.`},Sre=({drugs:e,verdicts:t,overrides:n,comparing:r,disabled:a,onDecide:s})=>{const o=e.filter(e=>"NEEDS_REVIEW"===e.status),l=e.filter(e=>"BLOCKED"===e.status),c=l.filter(e=>e.companies.every(e=>!e.company)),u=l.length-c.length;return i.jsxs("section",{"aria-label":"AI decisions",className:"mt-6",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:`AI decisions (${o.length})`}),i.jsx("p",{className:"mt-1 max-w-4xl text-sm text-gray-600",children:"Each of these matched a drug in our database that only other companies are linked to, so it may be a different drug with the same name. The AI compares the two and its call is accepted: the drug is committed with the ready ones. Change a decision here if the AI got it wrong."}),u>0&&i.jsx("p",{className:"mt-3 rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-700",children:`${u} ${1===u?"drug is":"drugs are"} blocked. Browse all drugs to fix ${1===u?"it":"them"}.`}),c.length>0&&i.jsx("p",{className:"mt-3 rounded-lg border border-gray-200 bg-gray-50 p-3 text-sm text-gray-700",children:kre(c)}),i.jsxs("div",{className:"mt-3 space-y-3",children:[o.map(e=>i.jsx(Nre,{drug:e,verdict:t[fre(e)],comparing:r(e),override:n[fre(e)],disabled:a,onDecide:t=>s(e,t)},fre(e))),0===o.length&&i.jsx("p",{className:"rounded-lg border border-dashed border-gray-300 p-6 text-center text-sm text-gray-500",children:"No drug needed an AI decision."})]})]})},Ere=u`
2432  query OpsPipelineImport($source: JSON!, $decisions: OpsPipelineImportDecisionsInput!) {
2433    opsPipelineImport(source: $source, decisions: $decisions) {
2434      files { fileName drugCount exportedFor }
2435      notices
2436      companies {
2437        name cnName parentName drugCount matchReason pickedByStaff
2438        match { id companyName websiteUrl slug isActive }
2439        suggestions { id companyName websiteUrl slug isActive }
2440        company { id companyName websiteUrl slug isActive }
2441      }
2442      drugs {
2443        npuid name status reason createNew newRowName
2444        matchedRow { id name interventionType treatmentModality target otherCompanies { id companyName } }
2445        companies { name tags linked company { id companyName } }
2446        summary {
2447          interventionType treatmentModality target aliases
2448          indications { indication clinicalStage therapeuticArea }
2449        }
2450      }
2451      queueCompanies
2452    }
2453  }
2454`,Are=u`
2455  mutation OpsParsePipelineImport($files: [Upload!]!) {
2456    opsParsePipelineImport(files: $files)
2457  }
2458`,Ore=u`
2459  mutation OpsAssessPipelineImport($source: JSON!, $decisions: OpsPipelineImportDecisionsInput!, $npuids: [String!]!) {
2460    opsAssessPipelineImport(source: $source, decisions: $decisions, npuids: $npuids) {
2461      npuid matchedRowId sameDrug existingDrug fileDrug reason
2462    }
2463  }
2464`,_re=u`
2465  mutation OpsCommitPipelineImport($source: JSON!, $decisions: OpsPipelineImportDecisionsInput!, $npuids: [String!]!) {
2466    opsCommitPipelineImport(source: $source, decisions: $decisions, npuids: $npuids) { committed queuedCompanyCount }
2467  }
2468`,Pre={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"]},Ire=["Every drug you commit is written in one transaction. A drug with no matching row gets a new one with the file’s values. A matched row gets the file’s type, modality and target (where the file has them) and the file’s aliases added to its own; its description and target class are never touched.","Every ticked company gets a link to the row carrying the file’s indications at their Global Highest Phase, its territory where the file says, and the drug’s other companies as partners. On a link that already exists, indications and partners the file doesn’t list are removed; trial IDs on surviving indications are kept.","A drug that needs review is written to the row it matched when its decision is “link”, or to a row of its own when it is “create as new”.","Ticked companies with no bio company are added to the Missing Companies queue; names already queued are skipped.","Skipped drugs, unticked companies and drugs not in the file are never touched."],Mre={READY:{label:"Ready",counted:"ready",tone:"bg-emerald-50 text-emerald-700"},NEEDS_REVIEW:{label:"Needs review",counted:"need review",tone:"bg-amber-50 text-amber-700"},BLOCKED:{label:"Blocked",counted:"blocked",tone:"bg-rose-50 text-rose-700"},NOT_IMPORTABLE:{label:"Not importable",counted:"not importable",tone:"bg-gray-100 text-gray-500"},SKIPPED:{label:"Skipped",counted:"skipped",tone:"bg-gray-100 text-gray-600"},UNCHANGED:{label:"Unchanged",counted:"unchanged",tone:"bg-gray-100 text-gray-600"},COMMITTED:{label:"Committed",counted:"committed",tone:"bg-blue-50 text-blue-700"}},Tre=Object.keys(Mre),Rre="text-blue-600 hover:underline disabled:opacity-50",Lre="rounded-lg bg-blue-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",Dre="whitespace-nowrap rounded-full px-2 py-0.5 text-xs font-medium",Fre="mt-4 rounded-lg border border-gray-200 bg-white p-5",qre="mt-2 text-sm text-rose-600",Bre=(e,t,n)=>`${e} ${1===e?t:n}`,Ure=e=>`${e.name}:${e.size}:${e.lastModified}`,zre=e=>e.pickedByStaff?e.company?"picked by you":"your choice: don’t link":e.match?e.matchReason?`auto-matched — ${e.matchReason}`:"auto-matched":"no match, so not linked",Hre=(e,t)=>{if(t)return"planning…";const n=e.undecided>0?`${e.undecided} to decide · `:"",r=e.blocked>0?` · ${e.blocked} blocked`:"";return`${n}${e.ready} ready${r}`},Vre=({step:e,notLinked:t,reviewCounts:n,planning:r,onStep:a})=>{const s=[{step:"companies",label:"1. Companies",detail:0===t?"all linked":`${t} not linked`},{step:"drugs",label:"2. Review",detail:Hre(n,r)}];return i.jsx("nav",{"aria-label":"Import steps",className:"mt-4 flex flex-wrap gap-2",children:s.map(t=>{const n=t.step===e;return i.jsxs("button",{type:"button",onClick:()=>a(t.step),"aria-current":n?"step":void 0,className:"rounded-lg border px-4 py-2 text-left "+(n?"border-gray-900 bg-gray-900 text-white":"border-gray-200 bg-white text-gray-700 hover:bg-gray-50"),children:[i.jsx("span",{className:"text-sm font-medium",children:t.label}),i.jsx("span",{className:"ml-2 text-xs "+(n?"text-gray-300":"text-gray-500"),children:t.detail})]},t.step)})})},$re=({ready:e,decided:n,queueCount:r,busy:a,onCommitReady:s})=>{const[o,l]=t.useState(!1),c=e.map(e=>e.npuid).join("|");t.useEffect(()=>l(!1),[c]);const u=1===n?"follows the AI decision":"follow the AI decisions";return i.jsxs("div",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-4",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsxs("p",{className:"text-sm text-gray-700",children:[i.jsx("span",{className:"font-medium text-gray-900",children:`${e.length} ${1===e.length?"drug is":"drugs are"} ready.`}),n>0?` ${n} of them ${u} below; change any you disagree with.`:" Nothing about them needs a decision."]}),!o&&i.jsx("button",{type:"button",onClick:()=>l(!0),disabled:a||0===e.length,className:`ml-auto ${Lre}`,children:`Commit ${e.length} ready`})]}),o&&i.jsxs("div",{className:"mt-3 rounded-lg border border-blue-200 bg-blue-50 p-3",children:[i.jsxs("p",{className:"text-sm text-blue-900",children:[`Commit ${e.length} ready ${1===e.length?"drug":"drugs"}? Each writes its drug row and ticked company links.`,r>0&&` The ${Bre(r,"company","companies")} ticked for the Missing Companies queue ${1===r?"is":"are"} added to it too.`]}),i.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-blue-800",children:e.map(e=>e.name).join(", ")}),i.jsxs("div",{className:"mt-2 flex gap-2",children:[i.jsx("button",{type:"button",onClick:()=>{l(!1),s()},disabled:a,className:Lre,children:"Confirm commit"}),i.jsx("button",{type:"button",onClick:()=>l(!1),className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"})]})]})]})},Wre=({company:e,queued:t,disabled:n,onPick:r,onQueue:a})=>{const s=e.parentName&&e.parentName!==e.name,o=[e.cnName,s?`parent: ${e.parentName}
2468`:null].filter(Boolean).join(" · ");return i.jsxs("tr",{className:"border-t border-gray-100 align-top",children:[i.jsx("td",{className:"px-3 py-2 tabular-nums text-gray-900",children:e.drugCount}),i.jsxs("td",{className:"px-3 py-2",children:[i.jsx("span",{className:"font-medium text-gray-900",children:e.name}),o&&i.jsx("span",{className:"block text-xs text-gray-500",children:o})]}),i.jsxs("td",{className:"px-3 py-2",children:[i.jsx(mre,{company:e.company,suggestions:e.suggestions,disabled:n,onPick:e=>r(e?.id??null)}),i.jsxs("span",{className:"mt-0.5 flex flex-wrap gap-x-2 text-xs text-gray-400",children:[zre(e),e.pickedByStaff&&i.jsx("button",{type:"button",onClick:()=>r(void 0),disabled:n,className:Rre,children:"undo"})]})]}),i.jsx("td",{className:"px-3 py-2",children:!e.company&&i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-gray-700",children:[i.jsx("input",{type:"checkbox",checked:t,disabled:n,onChange:e=>a(e.target.checked),"aria-label":`Add ${e.name} to the Missing Companies queue`,className:"h-4 w-4 rounded border-gray-300"}),"queue"]})})]})},Qre=({drug:e,choice:n,disabled:r,onChange:a})=>{const[s,o]=t.useState(!1),l=Mre[e.status],c="SKIPPED"===e.status,u="COMMITTED"===e.status||"NOT_IMPORTABLE"===e.status,d=e.matchedRow?.otherCompanies??[];let p=e.newRowName?`→ new row ${e.newRowName}`:"—";e.matchedRow&&(p=`→ ${e.matchedRow.name}`);return i.jsxs(i.Fragment,{children:[i.jsxs("tr",{className:"border-t border-gray-100 align-top",children:[i.jsx("td",{className:"px-3 py-2",children:i.jsx("span",{title:e.reason??void 0,className:`${Dre} ${l.tone}`,children:l.label})}),i.jsxs("td",{className:"px-3 py-2",children:[i.jsx("span",{className:"font-medium text-gray-900",children:e.name}),i.jsx("span",{className:"block font-mono text-xs text-gray-400",children:e.npuid})]}),i.jsxs("td",{className:"px-3 py-2 text-gray-700",children:[p,d.length>0&&i.jsx("span",{className:"block text-xs text-gray-500",children:`linked by ${d.map(e=>e.companyName).join(", ")}`})]}),i.jsx("td",{className:"px-3 py-2",children:e.companies.map(e=>i.jsxs("span",{title:e.company?.companyName??"partner only",className:"mr-3 inline-flex items-center gap-1 text-xs text-gray-700",children:[i.jsx("input",{type:"checkbox","aria-label":e.name,checked:e.linked,disabled:r||u||c||!e.company,onChange:t=>{return r=e.name,i=t.target.checked,a({companies:[...(n.companies??[]).filter(e=>e.name!==r),{name:r,linked:i}]});var r,i}}),e.name]},e.name))}),i.jsxs("td",{className:"whitespace-nowrap px-3 py-2 text-right text-xs",children:[!u&&i.jsx("button",{type:"button",onClick:()=>a({skip:!c}),disabled:r,className:`mr-3 ${Rre}`,children:c?"undo skip":"skip"}),i.jsx("button",{type:"button",onClick:()=>o(!s),"aria-expanded":s,className:Rre,children:s?"▾ details":"▸ details"})]})]}),s&&i.jsx("tr",{children:i.jsxs("td",{colSpan:5,className:"px-3 pb-3",children:[e.reason&&i.jsx("p",{className:"mb-1 text-xs text-gray-800",children:e.reason}),i.jsx(xre,{drug:e})]})})]})},Zre=()=>{const[e,n]=t.useState([]),[r,a]=t.useState(null),[s,l]=t.useState("companies"),[c,u]=t.useState({}),[h,m]=t.useState({}),[f,g]=t.useState({}),[y,x]=t.useState(null),[b,v]=t.useState(null),[w,j]=t.useState(null),[C,N]=t.useState(!1),[k,S]=t.useState(null),E=t.useRef(new Set),A=t.useRef(0),{data:O,loading:_,error:P}=d(Ere,{variables:{source:r,decisions:c},skip:!r,fetchPolicy:"no-cache"});t.useEffect(()=>{O&&x(O.opsPipelineImport)},[O]);const I={onError:()=>{}},[M,T]=p(Are,I),[R,L]=p(Ore,I),[D,F]=p(_re,I),q=T.loading||L.loading||F.loading||_;t.useEffect(()=>{if(0===e.length)return;const t=e=>e.preventDefault();return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)},[e.length]),t.useEffect(()=>{if("drugs"!==s||!y||q)return;const e=y.drugs.filter(e=>"NEEDS_REVIEW"===e.status&&!h[fre(e)]&&!E.current.has(fre(e)));if(0===e.length)return;e.forEach(e=>E.current.add(fre(e)));const t=e.map(e=>e.npuid);R({variables:{source:r,decisions:c,npuids:t}}).then(e=>{const t=e.data?.opsAssessPipelineImport??[],n=Object.fromEntries(t.map(e=>[`${e.npuid}|${e.matchedRowId}`,e]));m(e=>({...e,...n}))})});const B=e=>{A.current+=1;const t=A.current;if(n(e),0===e.length)return a(null),x(null),l("companies"),u({}),m({}),g({}
2468),N(!1),S(null),F.reset(),void(E.current=new Set);M({variables:{files:e}}).then(e=>{t===A.current&&e.data&&a(e.data.opsParsePipelineImport)})},U=c.companies??[],z=c.drugs??[],H=y?.queueCompanies??[],V=y?.drugs??[],$=e=>z.find(t=>t.npuid===e)??{npuid:e},W=e=>"NEEDS_REVIEW"===e.status?gre(h[fre(e)],f[fre(e)]):null,Q=V.filter(e=>"READY"===e.status||"link"===W(e)||"new"===W(e)),Z={undecided:V.filter(e=>"NEEDS_REVIEW"===e.status&&!W(e)).length,ready:Q.length,blocked:V.filter(e=>"BLOCKED"===e.status).length},K=(y?.companies??[]).filter(e=>!e.company).length,G=H.filter(e=>y?.companies.some(t=>t.name===e&&!t.company)).length,Y=V.filter(e=>!w||e.status===w),J=e=>i.jsx("thead",{children:i.jsx("tr",{className:"text-xs uppercase tracking-wide text-gray-400",children:e.map(e=>i.jsx("th",{scope:"col",className:"px-3 pb-1 text-left font-medium",children:e},e))})});return i.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl",children:[i.jsx(o,{to:Yw.base,className:"text-sm text-blue-600 hover:underline",children:"← Ops portal"}),i.jsx("h1",{className:"mt-2 text-2xl font-semibold text-gray-900",children:"Pipeline import"}),i.jsx("p",{className:"mt-1 max-w-4xl text-sm text-gray-600",children:"Import drugs from NextBiopharm drug-search exports, one drug at a time, whichever companies the exports mix. Drop one export or several: they are imported as one. Match the companies they name, review what each drug writes, and commit. Nothing is saved until you commit; leaving the page drops uncommitted choices. Writes to whichever environment this app points at."}),i.jsxs("details",{className:"mt-3 text-sm",children:[i.jsx("summary",{className:"cursor-pointer text-blue-600 hover:underline",children:"What Commit does"}),i.jsx("ul",{className:"mt-2 list-disc space-y-1 rounded-lg border border-gray-200 bg-white p-4 pl-8 text-gray-700",children:Ire.map(e=>i.jsx("li",{children:e},e))})]}),i.jsxs("section",{className:Fre,children:[e.map(t=>{const n=y?.files.find(e=>e.fileName===t.name);return i.jsxs("div",{className:"mb-3",children:[i.jsx(Xne,{fileName:t.name,isValidating:T.loading,onRemove:()=>B(e.filter(e=>e!==t))}),n&&i.jsx("p",{className:"-mt-1 pl-6 text-xs text-gray-500",children:[Bre(n.drugCount,"drug","drugs"),n.exportedFor&&`exported for ${n.exportedFor}`].filter(Boolean).join(" · ")})]},Ure(t))}),y&&y.notices.length>0&&i.jsxs("details",{className:"mb-3 text-xs text-gray-500",children:[i.jsx("summary",{className:"cursor-pointer",children:`${y.notices.length} file notices`}),i.jsx("ul",{className:"mt-1 list-disc pl-5",children:y.notices.map(e=>i.jsx("li",{children:e},e))})]}),i.jsx(Jne,{onDrop:t=>{const n=t.find(e=>!/\.xlsx$/i.test(e.name)||e.size>10485760);v(n?`${n.name} isn’t an .xlsx export under 10 MB.`:null);const r=new Set(e.map(Ure)),a=t.filter(e=>!r.has(Ure(e)));!n&&a.length>0&&B([...e,...a])},accept:Pre,multiple:!0,dragText:e.length>0?"Drop more exports (.xlsx) to add them to this import":"Drop NextBiopharm drug-search exports (.xlsx), one or several"}),(T.loading||_&&!y)&&i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:T.loading?"Reading the exports and matching their companies…":"Planning the import…"}),P&&i.jsx("p",{className:qre,children:P.message}),b&&i.jsx("p",{className:qre,children:b}),T.error&&i.jsx("p",{className:qre,children:T.error.message})]}),y&&i.jsx(Vre,{step:s,notLinked:K,reviewCounts:Z,planning:_,onStep:l}),y&&"companies"===s&&i.jsxs("section",{"aria-label":"Companies",className:Fre,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[i.jsx("h2",{className:"text-base font-medium text-gray-900",children:`Companies in this import (${y.companies.length})`}),K>0&&i.jsx("span",{className:`${Dre} bg-gray-100 text-gray-700`,children:`${K} not linked`})]}),i.jsx("p",{className:"mt-1 max-w-4xl text-sm text-gray-600",children:"Every company name the exports use, the ones on the most drugs first, matched to its bio company where the matcher is confident. A company it can’t match isn’t linked unless you pick one. Change a match, pick one, or choose “don’t link”: the choice applies to every drug naming it, and a company that isn’t linked is listed on its drugs as a partner only. Companies with no bio company are added to the Missing Companies queue, to process later, when you commit; untick one to leave it out."}),i.jsxs("table",{className:"mt-3 w-full text-sm",children:[J(["Drugs","Name in the export","Bio company","Missing Companies queue"]),i.jsx("tbody",{children:y.companies.map(e=>i.jsx(Wre,{company:e,queued:H.includes(e.name),disabled:q,onPick:t=>u({...c,companies:[...U.filter(t=>t.name!==e.name),...void 0===t?[]:[{name:e.name,companyId:t}]]}),onQueue:t=>u({...c,queueCompanies:t?[...H,e.name]:H.filter(t=>t!==e.name)})},e.name))})]}),i.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 border-t border-gray-100 pt-4",children:[i.jsx("button",{type:"button",onClick:()=>l("drugs"),className:Lre,children:"Review drugs →"}),i.jsx("span",{className:"text-sm text-gray-500",children:"Drug counts leave out patent stubs and all-inactive drugs. You can come back and change a company at any time."})]})]}),y&&"drugs"===s&&i.jsxs("div",{className:_?"opacity-70":void 0,children:[i.jsx($re,{ready:Q,decided:Q.filter(e=>"NEEDS_REVIEW"===e.status).length,queueCount:G,busy:q,onCommitReady:async()=>{const e=V.filter(e=>"new"===W(e)).map(e=>e.npuid),t={...c,drugs:[...z.filter(t=>!e.includes(t.npuid)),...e.map(e=>({...$(e),createNew:!0}))]},n=Q.map(e=>e.npuid),a=await D({variables:{source:r,decisions:t,npuids:n}});if(a.data){const{committed:e,queuedCompanyCount:n}=a.data.opsCommitPipelineImport,r=e=>V.find(t=>t.npuid===e)?.name??e;S({committed:e.map(r),queued:n}),u({...t,committed:[...t.committed??[],...e]})}}}),(_||F.loading)&&i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:F.loading?"Committing…":"Rebuilding plans…"}),F.error&&i.jsx("p",{className:qre,children:F.error.message}),k&&i.jsxs("div",{role:"status",className:"mt-3 rounded-lg border border-emerald-200 bg-emerald-50 p-3 text-sm text-emerald-800",children:[i.jsx("p",{children:`Committed ${k.committed.join(", ")}.`}),k.queued>0&&i.jsxs("p",{children:[`Added ${Bre(k.queued,"company","companies")} to the `,i.jsx(o,{to:Yw.companyQueue,className:"underline",children:"Missing Companies queue"}),"."]})]}),i.jsx(Sre,{drugs:V,verdicts:h,overrides:f,comparing:e=>!h[fre(e)]&&(L.loading||!E.current.has(fre(e))),disabled:q,onDecide:(e,t)=>{const n={...f};t?n[fre(e)]=t:delete n[fre(e)],g(n)}}),i.jsxs("section",{"aria-label":"Drugs",className:"mt-8 pb-8",children:[i.jsx("button",{type:"button",onClick:()=>N(!C),"aria-expanded":C,className:"text-sm text-blue-600 hover:underline",children:`${C?"▾":"▸"} Browse all drugs (${V.length})`}),C&&i.jsxs("div",{className:Fre,children:[i.jsx("div",{className:"flex flex-wrap items-center gap-2",children:Tre.map(e=>i.jsx("button",{type:"button","aria-pressed":w===e,onClick:()=>j(w===e?null:e),className:"rounded-full border px-3 py-1 text-xs font-medium "+(w===e?"border-gray-900 bg-gray-900 text-white":"border-gray-200 bg-white text-gray-700 hover:bg-gray-50"),children:`${V.filter(t=>t.status===e).length} ${Mre[e].counted}`},e))}),i.jsxs("table",{className:"mt-3 w-full text-sm",children:[J(["Status","Drug","Row","Companies","Actions"]),i.jsx("tbody",{children:Y.map(e=>
2468i.jsx(Qre,{drug:e,choice:$(e.npuid),disabled:q,onChange:t=>((e,t)=>u({...c,drugs:[...z.filter(t=>t.npuid!==e),{...$(e),...t}]}))(e.npuid,t)},e.npuid))})]}),0===Y.length&&i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"No drugs match."})]})]})]})]})})},Kre=()=>{const{key:e}=he();return i.jsx(T,{replace:!0,to:e?Yw.aqueductPipeline(e):Yw.aqueductPipelines})},Gre=ge(()=>ye(()=>import("./IdentityExplorer-CUBr6Rd6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),Yre=i.jsxs(ie,{path:"ops",element:i.jsx(Gw,{}),children:[i.jsx(ie,{index:!0,element:i.jsx(Xw,{})}),i.jsx(ie,{path:"identities",element:i.jsx(t.Suspense,{fallback:i.jsx("p",{className:"p-8",children:"Loading identity explorer…"}),children:i.jsx(Gre,{})})}),i.jsx(ie,{path:"clinical-trial-updates",element:i.jsx(fj,{})}),i.jsx(ie,{path:"company-news",element:i.jsx(Aj,{})}),i.jsx(ie,{path:"admin-access",element:i.jsx(Mj,{})}),i.jsx(ie,{path:"send-rate-caps",element:i.jsx(Uj,{})}),i.jsx(ie,{path:"contact-requests",element:i.jsx(fN,{})}),i.jsx(ie,{path:"contact-requests/email-templates",element:i.jsx(jk,{})}),i.jsx(ie,{path:"company-override",element:i.jsx(Pk,{})}),i.jsx(ie,{path:"company-enrichment",element:i.jsx(qk,{})}),i.jsx(ie,{path:"campaign-failures",element:i.jsx(i2,{})}),i.jsx(ie,{path:"company-data-history",element:i.jsx(l2,{})}),i.jsx(ie,{path:"company-data-history/:companyId",element:i.jsx(y2,{})}),i.jsx(ie,{path:"evidence-frames",element:i.jsx(Lee,{})}),i.jsx(ie,{path:"evidence-frames/:fillId",element:i.jsx(Qee,{})}),i.jsx(ie,{path:"reve-sim-test-cases",element:i.jsx(m5,{})}),i.jsx(ie,{path:"reve-jobs",element:i.jsx(A3,{})}),i.jsx(ie,{path:"reve-job-simulator",element:i.jsx(K3,{})}),i.jsx(ie,{path:"reve-qa",element:i.jsx(p4,{})}),i.jsx(ie,{path:"reve-qa/:sessionId",element:i.jsx(_8,{})}),i.jsx(ie,{path:"reve-system-prompt-playground",element:i.jsx(aee,{})}),i.jsx(ie,{path:"aqueduct",element:i.jsx(one,{})}),i.jsx(ie,{path:"aqueduct/aquas",element:i.jsx(sne,{})}),i.jsx(ie,{path:"aqueduct/aquas/:key",element:i.jsx(xne,{})}),i.jsx(ie,{path:"aqueduct/pipelines",element:i.jsx(Kre,{})}),i.jsx(ie,{path:"aqueduct/pipelines/:key",element:i.jsx(Kre,{})}),i.jsx(ie,{path:"aqueduct/runs",element:i.jsx(bne,{})}),i.jsx(ie,{path:"aqueduct/runs/:runId",element:i.jsx(Nne,{})}),i.jsx(ie,{path:"aqueduct/queues",element:i.jsx(Sne,{})}),i.jsx(ie,{path:"aqueduct/queues/:key",element:i.jsx(qne,{})}),i.jsx(ie,{path:"aqueduct/queues/:key/items/:itemId",element:i.jsx(Une,{})}),i.jsx(ie,{path:"aqueduct/workers",element:i.jsx(Qne,{})}),i.jsx(ie,{path:"company-queue",element:i.jsx(Kne,{})}),i.jsx(ie,{path:"pipeline-import",element:i.jsx(Zre,{})})]}),Jre=ge(()=>ye(()=>import("./index-CrkAFHVd.js").then(e=>e.O),__vite__mapDeps([34,1,2,19,32,3,4,5,6,7,35,12,11,8,13,14,15,16,23,17,36,37,25,38,31,20,10,39,9,24]))),Xre=ge(()=>ye(()=>import("./index-CWrup8z4.js"),__vite__mapDeps([40,1,2,24,35,5,6,12,11,8,13,4,14,15,16,23,17,32,36,37,3,7,25,18,19,20,41,42,43,26,27,31,21,22,28,29,30,33]))),eae=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const e=Be(),t=Ue();return i.jsxs(ae,{children:[Yre,i.jsx(ie,{element:i.jsx(Kd,{}),children:i.jsx(ie,{element:i.jsx($w,{}),children:i.jsx(ie,{element:i.jsx(Qd,{}),children:i.jsxs(ie,{element:i.jsx(xe,{hasNavbar:!0}),children:[i.jsx(ie,{path:"*",element:i.jsxs(i.Fragment,{children:[t&&i.jsx(Jre,{}),e&&i.jsx(Xre,{})]})}),i.jsx(ie,{path:"notifications",element:i.jsx(Zw,{})}),i.jsx(ie,{path:"settings/*",element:i.jsx(Hw,{})}),i.jsx(ie,{path:"*",element:i.jsx(Zn,{})})]})})})})]})}},Symbol.toStringTag,{value:"Module"}));export{Zi as $,Er as A,NC as B,rre as C,Rv as D,Gne as E,Jne as F,Vi as G,$s as H,iC as I,ys as J,xs as K,gs as L,no as M,Vv as N,Li as O,js as P,Ws as Q,Yne as R,R6 as S,Us as T,tre as U,is as V,Xs as W,ms as X,Ks as Y,Zs as Z,Gs as _,Xne as a,Yu as a$,mr as a0,_s as a1,Ii as a2,Is as a3,a7 as a4,i7 as a5,G6 as a6,s7 as a7,hC as a8,pC as a9,ur as aA,Gv as aB,Wv as aC,jv as aD,yN as aE,BN as aF,gC as aG,ts as aH,Ns as aI,_i as aJ,$8 as aK,Yi as aL,ov as aM,uv as aN,Jm as aO,op as aP,ip as aQ,Cv as aR,Xm as aS,oC as aT,Vm as aU,pv as aV,sw as aW,sm as aX,iv as aY,us as aZ,Ud as a_,xC as aa,yC as ab,gr as ac,vC as ad,wC as ae,P8 as af,os as ag,X6 as ah,n7 as ai,e7 as aj,r7 as ak,t7 as al,dC as am,gv as an,jC as ao,Ki as ap,$v as aq,as as ar,Z6 as as,K6 as at,j7 as au,rw as av,iw as aw,yr as ax,Yv as ay,lr as az,ere as b,Ad as b$,Ju as b0,Xu as b1,ed as b2,ki as b3,Si as b4,Ei as b5,dv as b6,HC as b7,nw as b8,sC as b9,gw as bA,bC as bB,fr as bC,ls as bD,Pi as bE,Oi as bF,q
24686 as bG,nd as bH,B6 as bI,V6 as bJ,H6 as bK,LC as bL,TC as bM,Km as bN,Ew as bO,Ow as bP,jl as bQ,ml as bR,cl as bS,br as bT,pr as bU,ir as bV,xr as bW,kr as bX,or as bY,cm as bZ,mv as b_,Ms as ba,Bm as bb,Um as bc,Qm as bd,qm as be,Vd as bf,Fm as bg,Zm as bh,Wd as bi,Hd as bj,Gm as bk,Fd as bl,Ld as bm,Md as bn,zd as bo,$d as bp,Fs as bq,ro as br,aw as bs,OC as bt,_C as bu,PC as bv,Jv as bw,lw as bx,lv as by,Qv as bz,ire as c,_N as c$,_d as c0,yv as c1,Xi as c2,Pl as c3,Ml as c4,sr as c5,Yw as c6,rp as c7,xN as c8,bN as c9,V1 as cA,c0 as cB,aK as cC,$X as cD,iK as cE,gG as cF,lre as cG,ure as cH,dre as cI,qd as cJ,$i as cK,Ls as cL,ek as cM,XN as cN,tk as cO,ik as cP,MC as cQ,RC as cR,lk as cS,ck as cT,sk as cU,FN as cV,jN as cW,CN as cX,ap as cY,Wm as cZ,Bd as c_,vr as ca,KN as cb,MN as cc,VN as cd,HN as ce,Di as cf,WN as cg,$N as ch,Cs as ci,Es as cj,td as ck,Qi as cl,YN as cm,zN as cn,vN as co,wN as cp,fk as cq,mk as cr,Vs as cs,gN as ct,xk as cu,SN as cv,pk as cw,DN as cx,GN as cy,uT as cz,are as d,ON as d0,Id as d1,Pd as d2,Dd as d3,LN as d4,NN as d5,zm as d6,Hm as d7,PN as d8,IN as d9,Z8 as dA,Dv as dB,eae as dC,AN as da,kN as db,EN as dc,$m as dd,dk as de,yw as df,_v as dg,Yj as dh,wr as di,UN as dj,ka as dk,sre as dl,ore as dm,Hv as dn,Xv as dp,Lv as dq,g4 as dr,fv as ds,pm as dt,v4 as du,Mi as dv,N6 as dw,b2 as dx,v2 as dy,ns as dz,Bi as e,Ui as f,im as g,cr as h,Bs as i,bs as j,qi as k,ej as l,wl as m,vs as n,uC as o,$6 as p,Sa as q,J6 as r,Y6 as s,mC as t,dr as u,fC as v,cw as w,ks as x,rs as y,hr as z};
2469//# sourceMappingURL=index-BehjRJXN.js.map
2470
2471//# debugId=38ab9c59-736b-5faa-a9fe-c807f6e028e0

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.