diff --git "a/web/blueprint/build/_app/immutable/nodes/4.be1d3840.js" "b/web/blueprint/build/_app/immutable/nodes/4.be1d3840.js" deleted file mode 100644--- "a/web/blueprint/build/_app/immutable/nodes/4.be1d3840.js" +++ /dev/null @@ -1,32 +0,0 @@ -import{S as ve,i as ke,s as pe,E as Z,k as T,l as I,m as S,h,I as Be,H as N,b as E,K as fe,X as ft,a7 as ir,O as Me,$ as x,P as Ue,D as ce,F as ge,q as J,a as Q,r as X,c as G,J as w,Q as we,e as ae,v as ne,d as k,f as ie,g as b,G as Oe,L as qe,M as je,N as Ye,y as q,z as W,A as j,W as Ht,B as Y,a8 as rr,w as Ke,x as Qe,T as Jt,a2 as re,a3 as se,n as z,a4 as Se,u as _e,C as bt,a9 as Sl,aa as Ar,ab as Dr,ac as Br,ad as Ft,R as Ve,j as fl,o as sr,Y as St,ae as Pr,af as jt,_ as ar,t as Rr,Z as Hr,p as Le,ag as Je,ah as Bt,a0 as Xe,a5 as et,ai as Et,aj as gt,ak as or,U as ul,V as cl,al as Fr,a1 as Pt,am as Lr}from"../chunks/index.d6a3d821.js";import{u as Or}from"../chunks/urlHashStore.b081783b.js";import{T as Vt,g as qr,h as tt,i as $e,t as vt,b as kt,j as ut,a as jr,c as Yr,k as Ur,l as Wr,m as dl,n as Kr,I as El,o as il,q as Zr,S as Nt,p as Qr,r as Gr,s as fr,C as Jr,u as Xr,v as xr,w as $r,x as es,y as ts}from"../chunks/ConceptView.aac099b5.js";import{b as wt,g as Yt,s as Ne,e as rt,p as Ge,f as hl,h as Ut,L as xe,i as ur,V as ot,j as Pe,S as Mt,k as ls,l as cr,v as ns,m as dr,n as is,o as rs,r as ss,t as zt,u as hr,w as mr,x as ml,y as as,I as _r,U as os,z as fs,A as Rt,B as Wt,C as rl,D as us,E as cs,P as gr,F as ds,G as hs}from"../chunks/utils.c5a61a40.js";import{w as it,d as zl}from"../chunks/index.5884c3e8.js";import{M as br}from"../chunks/Modal.a017af0f.js";import{d as yl,W as ms,e as _s,B as st}from"../chunks/taskMonitoringStore.aadb9e65.js";import{C as Vl}from"../chunks/Checkmark.ba979c87.js";import{C as gs}from"../chunks/JSONSchemaForm.3de641de.js";import{C as bs,S as pr,a as vr}from"../chunks/Toggle.4859458e.js";import{L as ps,a as vs,b as ks,c as ws,C as Ss}from"../chunks/ComboBox.3bf937e3.js";import{I as Ml}from"../chunks/TrashCan.dd2b985e.js";function Cl(n,e,l){const t=n.slice();return t[7]=e[l],t}function Tl(n,e){let l,t,i,o;return{key:n,first:null,c(){l=T("div"),t=T("span"),i=J(" "),o=Q(),this.h()},l(r){l=I(r,"DIV",{});var s=S(l);t=I(s,"SPAN",{});var a=S(t);i=X(a," "),a.forEach(h),o=G(s),s.forEach(h),this.h()},h(){N(t,"bx--link",!0),N(l,"bx--breadcrumb-item",!0),this.first=l},m(r,s){E(r,l,s),w(l,t),w(t,i),w(l,o)},p(r,s){},d(r){r&&h(l)}}}function Es(n){let e,l=[],t=new Map,i,o,r=Array.from({length:n[1]},Il);const s=u=>u[7];for(let u=0;ue;function zs(n,e,l){const t=["noTrailingSlash","count"];let i=ce(e,t),{noTrailingSlash:o=!1}=e,{count:r=3}=e;function s(c){we.call(this,n,c)}function a(c){we.call(this,n,c)}function f(c){we.call(this,n,c)}function u(c){we.call(this,n,c)}return n.$$set=c=>{e=Z(Z({},e),ge(c)),l(2,i=ce(e,t)),"noTrailingSlash"in c&&l(0,o=c.noTrailingSlash),"count"in c&&l(1,r=c.count)},[o,r,i,s,a,f,u]}class ys extends ve{constructor(e){super(),ke(this,e,zs,Es,pe,{noTrailingSlash:0,count:1})}}const Vs=ys;function Ms(n){let e,l,t,i,o;const r=n[4].default,s=Oe(r,n,n[3],null);let a=[{"aria-label":"Breadcrumb"},n[2]],f={};for(let u=0;u{r[u]=null}),ie(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t))},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){r[e].d(a),a&&h(t)}}}function Is(n,e,l){const t=["noTrailingSlash","skeleton"];let i=ce(e,t),{$$slots:o={},$$scope:r}=e,{noTrailingSlash:s=!1}=e,{skeleton:a=!1}=e;function f(v){we.call(this,n,v)}function u(v){we.call(this,n,v)}function c(v){we.call(this,n,v)}function d(v){we.call(this,n,v)}function _(v){we.call(this,n,v)}function m(v){we.call(this,n,v)}function g(v){we.call(this,n,v)}function p(v){we.call(this,n,v)}return n.$$set=v=>{e=Z(Z({},e),ge(v)),l(2,i=ce(e,t)),"noTrailingSlash"in v&&l(0,s=v.noTrailingSlash),"skeleton"in v&&l(1,a=v.skeleton),"$$scope"in v&&l(3,r=v.$$scope)},[s,a,i,r,o,f,u,c,d,_,m,g,p]}class Ns extends ve{constructor(e){super(),ke(this,e,Is,Ts,pe,{noTrailingSlash:0,skeleton:1})}}const As=Ns,Ds=n=>({}),Nl=n=>({}),Bs=n=>({}),Al=n=>({});function Ps(n){let e,l,t,i,o,r;const s=n[10].default,a=Oe(s,n,n[9],null);let f=!n[3]&&(n[8].icon||n[4])&&Dl(n),u=[{rel:t=n[7].target==="_blank"?"noopener noreferrer":void 0},{href:n[2]},n[7]],c={};for(let d=0;d{f=null}),ie()),Be(e,c=Me(u,[(!i||_&128&&t!==(t=d[7].target==="_blank"?"noopener noreferrer":void 0))&&{rel:t},(!i||_&4)&&{href:d[2]},_&128&&d[7]])),N(e,"bx--link",!0),N(e,"bx--link--disabled",d[5]),N(e,"bx--link--inline",d[3]),N(e,"bx--link--visited",d[6]),N(e,"bx--link--sm",d[1]==="sm"),N(e,"bx--link--lg",d[1]==="lg")},i(d){i||(b(a,d),b(f),i=!0)},o(d){k(a,d),k(f),i=!1},d(d){d&&h(e),a&&a.d(d),f&&f.d(),n[20](null),o=!1,Ue(r)}}}function Rs(n){let e,l,t,i,o;const r=n[10].default,s=Oe(r,n,n[9],null);let a=!n[3]&&(n[8].icon||n[4])&&Bl(n),f=[n[7]],u={};for(let c=0;c{a=null}),ie()),Be(e,u=Me(f,[d&128&&c[7]])),N(e,"bx--link",!0),N(e,"bx--link--disabled",c[5]),N(e,"bx--link--inline",c[3]),N(e,"bx--link--visited",c[6])},i(c){t||(b(s,c),b(a),t=!0)},o(c){k(s,c),k(a),t=!1},d(c){c&&h(e),s&&s.d(c),a&&a.d(),n[19](null),i=!1,Ue(o)}}}function Dl(n){let e,l;const t=n[10].icon,i=Oe(t,n,n[9],Nl),o=i||Hs(n);return{c(){e=T("div"),o&&o.c(),this.h()},l(r){e=I(r,"DIV",{});var s=S(e);o&&o.l(s),s.forEach(h),this.h()},h(){N(e,"bx--link__icon",!0)},m(r,s){E(r,e,s),o&&o.m(e,null),l=!0},p(r,s){i?i.p&&(!l||s&512)&&qe(i,t,r,r[9],l?Ye(t,r[9],s,Ds):je(r[9]),Nl):o&&o.p&&(!l||s&16)&&o.p(r,l?s:-1)},i(r){l||(b(o,r),l=!0)},o(r){k(o,r),l=!1},d(r){r&&h(e),o&&o.d(r)}}}function Hs(n){let e,l,t;var i=n[4];function o(r){return{}}return i&&(e=Qe(i,o())),{c(){e&&q(e.$$.fragment),l=ae()},l(r){e&&W(e.$$.fragment,r),l=ae()},m(r,s){e&&j(e,r,s),E(r,l,s),t=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){ne();const a=e;k(a.$$.fragment,1,0,()=>{Y(a,1)}),ie()}i?(e=Qe(i,o()),q(e.$$.fragment),b(e.$$.fragment,1),j(e,l.parentNode,l)):e=null}},i(r){t||(e&&b(e.$$.fragment,r),t=!0)},o(r){e&&k(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function Bl(n){let e,l;const t=n[10].icon,i=Oe(t,n,n[9],Al),o=i||Fs(n);return{c(){e=T("div"),o&&o.c(),this.h()},l(r){e=I(r,"DIV",{});var s=S(e);o&&o.l(s),s.forEach(h),this.h()},h(){N(e,"bx--link__icon",!0)},m(r,s){E(r,e,s),o&&o.m(e,null),l=!0},p(r,s){i?i.p&&(!l||s&512)&&qe(i,t,r,r[9],l?Ye(t,r[9],s,Bs):je(r[9]),Al):o&&o.p&&(!l||s&16)&&o.p(r,l?s:-1)},i(r){l||(b(o,r),l=!0)},o(r){k(o,r),l=!1},d(r){r&&h(e),o&&o.d(r)}}}function Fs(n){let e,l,t;var i=n[4];function o(r){return{}}return i&&(e=Qe(i,o())),{c(){e&&q(e.$$.fragment),l=ae()},l(r){e&&W(e.$$.fragment,r),l=ae()},m(r,s){e&&j(e,r,s),E(r,l,s),t=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){ne();const a=e;k(a.$$.fragment,1,0,()=>{Y(a,1)}),ie()}i?(e=Qe(i,o()),q(e.$$.fragment),b(e.$$.fragment,1),j(e,l.parentNode,l)):e=null}},i(r){t||(e&&b(e.$$.fragment,r),t=!0)},o(r){e&&k(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function Ls(n){let e,l,t,i;const o=[Rs,Ps],r=[];function s(a,f){return a[5]?0:1}return e=s(n),l=r[e]=o[e](n),{c(){l.c(),t=ae()},l(a){l.l(a),t=ae()},m(a,f){r[e].m(a,f),E(a,t,f),i=!0},p(a,[f]){let u=e;e=s(a),e===u?r[e].p(a,f):(ne(),k(r[u],1,1,()=>{r[u]=null}),ie(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t))},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){r[e].d(a),a&&h(t)}}}function Os(n,e,l){const t=["size","href","inline","icon","disabled","visited","ref"];let i=ce(e,t),{$$slots:o={},$$scope:r}=e;const s=rr(o);let{size:a=void 0}=e,{href:f=void 0}=e,{inline:u=!1}=e,{icon:c=void 0}=e,{disabled:d=!1}=e,{visited:_=!1}=e,{ref:m=null}=e;function g(A){we.call(this,n,A)}function p(A){we.call(this,n,A)}function v(A){we.call(this,n,A)}function y(A){we.call(this,n,A)}function M(A){we.call(this,n,A)}function C(A){we.call(this,n,A)}function D(A){we.call(this,n,A)}function O(A){we.call(this,n,A)}function B(A){Ke[A?"unshift":"push"](()=>{m=A,l(0,m)})}function F(A){Ke[A?"unshift":"push"](()=>{m=A,l(0,m)})}return n.$$set=A=>{e=Z(Z({},e),ge(A)),l(7,i=ce(e,t)),"size"in A&&l(1,a=A.size),"href"in A&&l(2,f=A.href),"inline"in A&&l(3,u=A.inline),"icon"in A&&l(4,c=A.icon),"disabled"in A&&l(5,d=A.disabled),"visited"in A&&l(6,_=A.visited),"ref"in A&&l(0,m=A.ref),"$$scope"in A&&l(9,r=A.$$scope)},[m,a,f,u,c,d,_,i,s,r,o,g,p,v,y,M,C,D,O,B,F]}class qs extends ve{constructor(e){super(),ke(this,e,Os,Ls,pe,{size:1,href:2,inline:3,icon:4,disabled:5,visited:6,ref:0})}}const js=qs,Ys=n=>({props:n&4}),Pl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}}),Us=n=>({props:n&4}),Rl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}});function Ws(n){let e;const l=n[3].default,t=Oe(l,n,n[8],Pl);return{c(){t&&t.c()},l(i){t&&t.l(i)},m(i,o){t&&t.m(i,o),e=!0},p(i,o){t&&t.p&&(!e||o&260)&&qe(t,l,i,i[8],e?Ye(l,i[8],o,Ys):je(i[8]),Pl)},i(i){e||(b(t,i),e=!0)},o(i){k(t,i),e=!1},d(i){t&&t.d(i)}}}function Ks(n){let e,l;return e=new js({props:{href:n[0],"aria-current":n[2]["aria-current"],$$slots:{default:[Zs]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i&1&&(o.href=t[0]),i&4&&(o["aria-current"]=t[2]["aria-current"]),i&260&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Zs(n){let e;const l=n[3].default,t=Oe(l,n,n[8],Rl);return{c(){t&&t.c()},l(i){t&&t.l(i)},m(i,o){t&&t.m(i,o),e=!0},p(i,o){t&&t.p&&(!e||o&260)&&qe(t,l,i,i[8],e?Ye(l,i[8],o,Us):je(i[8]),Rl)},i(i){e||(b(t,i),e=!0)},o(i){k(t,i),e=!1},d(i){t&&t.d(i)}}}function Qs(n){let e,l,t,i,o,r;const s=[Ks,Ws],a=[];function f(d,_){return d[0]?0:1}l=f(n),t=a[l]=s[l](n);let u=[n[2]],c={};for(let d=0;d{a[m]=null}),ie(),t=a[l],t?t.p(d,_):(t=a[l]=s[l](d),t.c()),b(t,1),t.m(e,null)),Be(e,c=Me(u,[_&4&&d[2]])),N(e,"bx--breadcrumb-item",!0),N(e,"bx--breadcrumb-item--current",d[1]&&d[2]["aria-current"]!=="page")},i(d){i||(b(t),i=!0)},o(d){k(t),i=!1},d(d){d&&h(e),a[l].d(),o=!1,Ue(r)}}}function Gs(n,e,l){const t=["href","isCurrentPage"];let i=ce(e,t),{$$slots:o={},$$scope:r}=e,{href:s=void 0}=e,{isCurrentPage:a=!1}=e;Jt("BreadcrumbItem",{});function f(_){we.call(this,n,_)}function u(_){we.call(this,n,_)}function c(_){we.call(this,n,_)}function d(_){we.call(this,n,_)}return n.$$set=_=>{e=Z(Z({},e),ge(_)),l(2,i=ce(e,t)),"href"in _&&l(0,s=_.href),"isCurrentPage"in _&&l(1,a=_.isCurrentPage),"$$scope"in _&&l(8,r=_.$$scope)},[s,a,i,o,f,u,c,d,r]}class Js extends ve{constructor(e){super(),ke(this,e,Gs,Qs,pe,{href:0,isCurrentPage:1})}}const tl=Js;function Hl(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Xs(n){let e,l,t=n[1]&&Hl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class $s extends ve{constructor(e){super(),ke(this,e,xs,Xs,pe,{size:0,title:1})}}const ea=$s;function ta(n){let e,l,t,i,o,r,s=[n[1]],a={};for(let f=0;f{e=Z(Z({},e),ge(u)),l(1,i=ce(e,t)),"size"in u&&l(0,o=u.size)},[o,i,r,s,a,f]}class na extends ve{constructor(e){super(),ke(this,e,la,ta,pe,{size:0})}}const ia=na,ra=n=>({}),Fl=n=>({});function sa(n){let e,l,t,i,o,r,s,a,f,u,c,d,_,m,g,p;var v=n[14];function y(P){return{props:{class:"bx--search-magnifier-icon"}}}v&&(t=Qe(v,y()));const M=n[20].labelText,C=Oe(M,n,n[19],Fl),D=C||oa(n);let O=[{type:"text"},{role:"searchbox"},{autofocus:f=n[11]===!0?!0:void 0},{autocomplete:n[10]},{disabled:n[7]},{id:n[15]},{placeholder:n[9]},n[18]],B={};for(let P=0;P{Y(L,1)}),ie()}v?(t=Qe(v,y()),q(t.$$.fragment),b(t.$$.fragment,1),j(t,l,null)):t=null}C?C.p&&(!m||R[0]&524288)&&qe(C,M,P,P[19],m?Ye(M,P[19],R,ra):je(P[19]),Fl):D&&D.p&&(!m||R[0]&8192)&&D.p(P,m?R:[-1,-1]),(!m||R[0]&32768&&r!==(r=P[15]+"-search"))&&z(o,"id",r),(!m||R[0]&32768)&&z(o,"for",P[15]),Be(a,B=Me(O,[{type:"text"},{role:"searchbox"},(!m||R[0]&2048&&f!==(f=P[11]===!0?!0:void 0))&&{autofocus:f},(!m||R[0]&1024)&&{autocomplete:P[10]},(!m||R[0]&128)&&{disabled:P[7]},(!m||R[0]&32768)&&{id:P[15]},(!m||R[0]&512)&&{placeholder:P[9]},R[0]&262144&&P[18]])),R[0]&4&&a.value!==P[2]&&Sl(a,P[2]),N(a,"bx--search-input",!0);const K={};if(R[0]&8&&(K.size=P[3]==="xl"?20:16),F!==(F=yl)){if(d){ne();const L=d;k(L.$$.fragment,1,0,()=>{Y(L,1)}),ie()}F?(d=Qe(F,A(P)),q(d.$$.fragment),b(d.$$.fragment,1),j(d,c,null)):d=null}else F&&d.$set(K);(!m||R[0]&4096)&&z(c,"aria-label",P[12]),(!m||R[0]&128)&&(c.disabled=P[7]),(!m||R[0]&4)&&N(c,"bx--search-close--hidden",P[2]===""),(!m||R[0]&32768&&_!==(_=P[15]+"-search"))&&z(e,"aria-labelledby",_),(!m||R[0]&16)&&z(e,"class",P[4]),(!m||R[0]&16)&&N(e,"bx--search",!0),(!m||R[0]&80)&&N(e,"bx--search--light",P[6]),(!m||R[0]&144)&&N(e,"bx--search--disabled",P[7]),(!m||R[0]&24)&&N(e,"bx--search--sm",P[3]==="sm"),(!m||R[0]&24)&&N(e,"bx--search--lg",P[3]==="lg"),(!m||R[0]&24)&&N(e,"bx--search--xl",P[3]==="xl"),(!m||R[0]&272)&&N(e,"bx--search--expandable",P[8]),(!m||R[0]&17)&&N(e,"bx--search--expanded",P[0])},i(P){m||(t&&b(t.$$.fragment,P),b(D,P),d&&b(d.$$.fragment,P),m=!0)},o(P){t&&k(t.$$.fragment,P),k(D,P),d&&k(d.$$.fragment,P),m=!1},d(P){P&&h(e),t&&Y(t),n[33](null),D&&D.d(P),n[35](null),d&&Y(d),g=!1,Ue(p)}}}function aa(n){let e,l;const t=[{size:n[3]},n[18]];let i={};for(let o=0;o{r[u]=null}),ie(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t))},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){r[e].d(a),a&&h(t)}}}function ua(n,e,l){const t=["value","size","searchClass","skeleton","light","disabled","expandable","expanded","placeholder","autocomplete","autofocus","closeButtonLabelText","labelText","icon","id","ref"];let i=ce(e,t),{$$slots:o={},$$scope:r}=e,{value:s=""}=e,{size:a="xl"}=e,{searchClass:f=""}=e,{skeleton:u=!1}=e,{light:c=!1}=e,{disabled:d=!1}=e,{expandable:_=!1}=e,{expanded:m=!1}=e,{placeholder:g="Search..."}=e,{autocomplete:p="off"}=e,{autofocus:v=!1}=e,{closeButtonLabelText:y="Clear search input"}=e,{labelText:M=""}=e,{icon:C=ea}=e,{id:D="ccs-"+Math.random().toString(36)}=e,{ref:O=null}=e;const B=bt();let F=null;function A(U){we.call(this,n,U)}function P(U){we.call(this,n,U)}function R(U){we.call(this,n,U)}function K(U){we.call(this,n,U)}function L(U){we.call(this,n,U)}function he(U){we.call(this,n,U)}function le(U){we.call(this,n,U)}function te(U){we.call(this,n,U)}function $(U){we.call(this,n,U)}function ue(U){we.call(this,n,U)}function Ee(U){we.call(this,n,U)}function me(U){we.call(this,n,U)}function de(U){Ke[U?"unshift":"push"](()=>{F=U,l(16,F)})}const Ae=()=>{_&&l(0,m=!0)};function Ce(U){Ke[U?"unshift":"push"](()=>{O=U,l(1,O)})}function oe(){s=this.value,l(2,s)}const ze=()=>{_&&l(0,m=!0)},H=()=>{m&&s.trim().length===0&&l(0,m=!1)},V=({key:U})=>{U==="Escape"&&(l(2,s=""),B("clear"))},ee=()=>{l(2,s=""),O.focus(),B("clear")};return n.$$set=U=>{e=Z(Z({},e),ge(U)),l(18,i=ce(e,t)),"value"in U&&l(2,s=U.value),"size"in U&&l(3,a=U.size),"searchClass"in U&&l(4,f=U.searchClass),"skeleton"in U&&l(5,u=U.skeleton),"light"in U&&l(6,c=U.light),"disabled"in U&&l(7,d=U.disabled),"expandable"in U&&l(8,_=U.expandable),"expanded"in U&&l(0,m=U.expanded),"placeholder"in U&&l(9,g=U.placeholder),"autocomplete"in U&&l(10,p=U.autocomplete),"autofocus"in U&&l(11,v=U.autofocus),"closeButtonLabelText"in U&&l(12,y=U.closeButtonLabelText),"labelText"in U&&l(13,M=U.labelText),"icon"in U&&l(14,C=U.icon),"id"in U&&l(15,D=U.id),"ref"in U&&l(1,O=U.ref),"$$scope"in U&&l(19,r=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&3&&m&&O&&O.focus(),n.$$.dirty[0]&1&&B(m?"expand":"collapse")},[m,O,s,a,f,u,c,d,_,g,p,v,y,M,C,D,F,B,i,r,o,A,P,R,K,L,he,le,te,$,ue,Ee,me,de,Ae,Ce,oe,ze,H,V,ee]}class ca extends ve{constructor(e){super(),ke(this,e,ua,fa,pe,{value:2,size:3,searchClass:4,skeleton:5,light:6,disabled:7,expandable:8,expanded:0,placeholder:9,autocomplete:10,autofocus:11,closeButtonLabelText:12,labelText:13,icon:14,id:15,ref:1},null,[-1,-1])}}const da=ca;function Ll(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function ha(n){let e,l,t,i,o=n[1]&&Ll(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class _a extends ve{constructor(e){super(),ke(this,e,ma,ha,pe,{size:0,title:1})}}const ga=_a;function Ol(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function ba(n){let e,l,t,i,o=n[1]&&Ol(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class va extends ve{constructor(e){super(),ke(this,e,pa,ba,pe,{size:0,title:1})}}const ka=va,wa=n=>({}),ql=n=>({});function Sa(n){let e,l,t;var i=n[1];function o(r){return{props:{"aria-label":r[10],title:r[10],class:"bx--overflow-menu__icon "+r[9]}}}return i&&(e=Qe(i,o(n))),{c(){e&&q(e.$$.fragment),l=ae()},l(r){e&&W(e.$$.fragment,r),l=ae()},m(r,s){e&&j(e,r,s),E(r,l,s),t=!0},p(r,s){const a={};if(s[0]&1024&&(a["aria-label"]=r[10]),s[0]&1024&&(a.title=r[10]),s[0]&512&&(a.class="bx--overflow-menu__icon "+r[9]),s[0]&2&&i!==(i=r[1])){if(e){ne();const f=e;k(f.$$.fragment,1,0,()=>{Y(f,1)}),ie()}i?(e=Qe(i,o(r)),q(e.$$.fragment),b(e.$$.fragment,1),j(e,l.parentNode,l)):e=null}else i&&e.$set(a)},i(r){t||(e&&b(e.$$.fragment,r),t=!0)},o(r){e&&k(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function jl(n){let e,l;const t=n[24].default,i=Oe(t,n,n[23],null);return{c(){e=T("ul"),i&&i.c(),this.h()},l(o){e=I(o,"UL",{role:!0,tabindex:!0,"aria-label":!0,"data-floating-menu-direction":!0,class:!0});var r=S(e);i&&i.l(r),r.forEach(h),this.h()},h(){z(e,"role","menu"),z(e,"tabindex","-1"),z(e,"aria-label",n[13]),z(e,"data-floating-menu-direction",n[5]),z(e,"class",n[8]),N(e,"bx--overflow-menu-options",!0),N(e,"bx--overflow-menu--flip",n[7]),N(e,"bx--overflow-menu-options--open",n[0]),N(e,"bx--overflow-menu-options--light",n[6]),N(e,"bx--overflow-menu-options--sm",n[4]==="sm"),N(e,"bx--overflow-menu-options--xl",n[4]==="xl"),N(e,"bx--breadcrumb-menu-options",!!n[14])},m(o,r){E(o,e,r),i&&i.m(e,null),n[31](e),l=!0},p(o,r){i&&i.p&&(!l||r[0]&8388608)&&qe(i,t,o,o[23],l?Ye(t,o[23],r,null):je(o[23]),null),(!l||r[0]&8192)&&z(e,"aria-label",o[13]),(!l||r[0]&32)&&z(e,"data-floating-menu-direction",o[5]),(!l||r[0]&256)&&z(e,"class",o[8]),(!l||r[0]&256)&&N(e,"bx--overflow-menu-options",!0),(!l||r[0]&384)&&N(e,"bx--overflow-menu--flip",o[7]),(!l||r[0]&257)&&N(e,"bx--overflow-menu-options--open",o[0]),(!l||r[0]&320)&&N(e,"bx--overflow-menu-options--light",o[6]),(!l||r[0]&272)&&N(e,"bx--overflow-menu-options--sm",o[4]==="sm"),(!l||r[0]&272)&&N(e,"bx--overflow-menu-options--xl",o[4]==="xl"),(!l||r[0]&16640)&&N(e,"bx--breadcrumb-menu-options",!!o[14])},i(o){l||(b(i,o),l=!0)},o(o){k(i,o),l=!1},d(o){o&&h(e),i&&i.d(o),n[31](null)}}}function Ea(n){let e,l,t,i,o,r,s,a;const f=n[24].menu,u=Oe(f,n,n[23],ql),c=u||Sa(n);let d=n[0]&&jl(n),_=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":n[0]},{"aria-label":n[13]},{id:n[11]},n[19]],m={};for(let g=0;g<_.length;g+=1)m=Z(m,_[g]);return{c(){e=new Ar(!1),l=ae(),t=Q(),i=T("button"),c&&c.c(),o=Q(),d&&d.c(),this.h()},l(g){const p=Dr("svelte-7ztmff",document.head);e=Br(p,!1),l=ae(),p.forEach(h),t=G(g),i=I(g,"BUTTON",{type:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0,id:!0});var v=S(i);c&&c.l(v),o=G(v),d&&d.l(v),v.forEach(h),this.h()},h(){e.a=l,Be(i,m),N(i,"bx--overflow-menu",!0),N(i,"bx--overflow-menu--open",n[0]),N(i,"bx--overflow-menu--light",n[6]),N(i,"bx--overflow-menu--sm",n[4]==="sm"),N(i,"bx--overflow-menu--xl",n[4]==="xl")},m(g,p){e.m(n[12],document.head),w(document.head,l),E(g,t,p),E(g,i,p),c&&c.m(i,null),w(i,o),d&&d.m(i,null),i.autofocus&&i.focus(),n[32](i),r=!0,s||(a=[fe(window,"click",n[30]),fe(i,"click",n[25]),fe(i,"click",n[33]),fe(i,"mouseover",n[26]),fe(i,"mouseenter",n[27]),fe(i,"mouseleave",n[28]),fe(i,"keydown",n[29]),fe(i,"keydown",n[34]),fe(i,"focusout",n[35])],s=!0)},p(g,p){(!r||p[0]&4096)&&e.p(g[12]),u?u.p&&(!r||p[0]&8388608)&&qe(u,f,g,g[23],r?Ye(f,g[23],p,wa):je(g[23]),ql):c&&c.p&&(!r||p[0]&1538)&&c.p(g,r?p:[-1,-1]),g[0]?d?(d.p(g,p),p[0]&1&&b(d,1)):(d=jl(g),d.c(),b(d,1),d.m(i,null)):d&&(ne(),k(d,1,1,()=>{d=null}),ie()),Be(i,m=Me(_,[{type:"button"},{"aria-haspopup":""},(!r||p[0]&1)&&{"aria-expanded":g[0]},(!r||p[0]&8192)&&{"aria-label":g[13]},(!r||p[0]&2048)&&{id:g[11]},p[0]&524288&&g[19]])),N(i,"bx--overflow-menu",!0),N(i,"bx--overflow-menu--open",g[0]),N(i,"bx--overflow-menu--light",g[6]),N(i,"bx--overflow-menu--sm",g[4]==="sm"),N(i,"bx--overflow-menu--xl",g[4]==="xl")},i(g){r||(b(c,g),b(d),r=!0)},o(g){k(c,g),k(d),r=!1},d(g){h(l),g&&e.d(),g&&h(t),g&&h(i),c&&c.d(g),d&&d.d(),n[32](null),s=!1,Ue(a)}}}function za(n,e,l){let t,i;const o=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let r=ce(e,o),s,a,f,{$$slots:u={},$$scope:c}=e,{size:d=void 0}=e,{direction:_="bottom"}=e,{open:m=!1}=e,{light:g=!1}=e,{flipped:p=!1}=e,{menuOptionsClass:v=void 0}=e,{icon:y=ga}=e,{iconClass:M=void 0}=e,{iconDescription:C="Open and close list of options"}=e,{id:D="ccs-"+Math.random().toString(36)}=e,{buttonRef:O=null}=e,{menuRef:B=null}=e;const F=Ft("BreadcrumbItem"),A=bt(),P=it([]);Ve(n,P,V=>l(22,a=V));const R=it(void 0);Ve(n,R,V=>l(37,f=V));const K=it(void 0),L=it(-1);Ve(n,L,V=>l(21,s=V));let he,le=!0;Jt("OverflowMenu",{focusedId:K,add:({id:V,text:ee,primaryFocus:U,disabled:De})=>{P.update(He=>(U&&L.set(He.length),[...He,{id:V,text:ee,primaryFocus:U,disabled:De,index:He.length}]))},update:V=>{R.set(V)},change:V=>{let ee=s+V;ee<0?ee=a.length-1:ee>=a.length&&(ee=0);let U=a[ee].disabled;for(;U;)ee=ee+V,ee<0?ee=a.length-1:ee>=a.length&&(ee=0),U=a[ee].disabled;L.set(ee)}}),fl(()=>{if(f){const{index:V,text:ee}=a.filter(U=>U.id===f)[0];A("close",{index:V,text:ee}),l(0,m=!1)}if(m){const{width:V,height:ee}=O.getBoundingClientRect();l(20,he=V),!le&&s<0&&B.focus(),p&&(l(3,B.style.left="auto",B),l(3,B.style.right=0,B)),_==="top"?(l(3,B.style.top="auto",B),l(3,B.style.bottom=ee+"px",B)):_==="bottom"&&l(3,B.style.top=ee+"px",B),F&&(l(3,B.style.top=ee+10+"px",B),l(3,B.style.left="-11px",B))}m||(P.set([]),R.set(void 0),L.set(0)),le=!1});function te(V){we.call(this,n,V)}function $(V){we.call(this,n,V)}function ue(V){we.call(this,n,V)}function Ee(V){we.call(this,n,V)}function me(V){we.call(this,n,V)}const de=({target:V})=>{O&&O.contains(V)||B&&!B.contains(V)&&l(0,m=!1)};function Ae(V){Ke[V?"unshift":"push"](()=>{B=V,l(3,B)})}function Ce(V){Ke[V?"unshift":"push"](()=>{O=V,l(2,O)})}const oe=({target:V})=>{B&&B.contains(V)||(l(0,m=!m),m||A("close"))},ze=V=>{m&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(V.key)?V.preventDefault():V.key==="Escape"&&(V.stopPropagation(),A("close"),l(0,m=!1),O.focus()))},H=V=>{m&&(O.contains(V.relatedTarget)||(A("close"),l(0,m=!1)))};return n.$$set=V=>{l(39,e=Z(Z({},e),ge(V))),l(19,r=ce(e,o)),"size"in V&&l(4,d=V.size),"direction"in V&&l(5,_=V.direction),"open"in V&&l(0,m=V.open),"light"in V&&l(6,g=V.light),"flipped"in V&&l(7,p=V.flipped),"menuOptionsClass"in V&&l(8,v=V.menuOptionsClass),"icon"in V&&l(1,y=V.icon),"iconClass"in V&&l(9,M=V.iconClass),"iconDescription"in V&&l(10,C=V.iconDescription),"id"in V&&l(11,D=V.id),"buttonRef"in V&&l(2,O=V.buttonRef),"menuRef"in V&&l(3,B=V.menuRef),"$$scope"in V&&l(23,c=V.$$scope)},n.$$.update=()=>{l(13,t=e["aria-label"]||"menu"),n.$$.dirty[0]&6291456&&a[s]&&K.set(a[s].id),n.$$.dirty[0]&1050624&&l(12,i=``)},F&&l(1,y=ka),e=ge(e),[m,y,O,B,d,_,g,p,v,M,C,D,i,t,F,A,P,R,L,r,he,s,a,c,u,te,$,ue,Ee,me,de,Ae,Ce,oe,ze,H]}class ya extends ve{constructor(e){super(),ke(this,e,za,Ea,pe,{size:4,direction:5,open:0,light:6,flipped:7,menuOptionsClass:8,icon:1,iconClass:9,iconDescription:10,id:11,buttonRef:2,menuRef:3},null,[-1,-1])}}const Va=ya;function Ma(n){let e,l,t,i;const o=n[16].default,r=Oe(o,n,n[15],null),s=r||Ta(n);let a=[n[7]],f={};for(let u=0;u{r[d]=null}),ie(),t=r[l],t?t.p(u,c):(t=r[l]=o[l](u),t.c()),b(t,1),t.m(e,null)),Be(e,f=Me(a,[{role:"none"},(!i||c&64)&&{id:u[6]},c&2048&&u[11]])),N(e,"bx--overflow-menu-options__option",!0),N(e,"bx--overflow-menu--divider",u[4]),N(e,"bx--overflow-menu-options__option--danger",u[5]),N(e,"bx--overflow-menu-options__option--disabled",u[3])},i(u){i||(b(t),i=!0)},o(u){k(t),i=!1},d(u){u&&h(e),r[l].d()}}}function Aa(n,e,l){let t;const i=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let o=ce(e,i),r,{$$slots:s={},$$scope:a}=e;const f=rr(s);let{text:u="Provide text"}=e,{href:c=""}=e,{primaryFocus:d=!1}=e,{disabled:_=!1}=e,{hasDivider:m=!1}=e,{danger:g=!1}=e,{requireTitle:p=!0}=e,{id:v="ccs-"+Math.random().toString(36)}=e,{ref:y=null}=e;const{focusedId:M,add:C,update:D,change:O}=Ft("OverflowMenu");Ve(n,M,$=>l(14,r=$)),C({id:v,text:u,primaryFocus:d,disabled:_}),fl(()=>{y&&d&&y.focus()});function B($){we.call(this,n,$)}function F($){we.call(this,n,$)}function A($){we.call(this,n,$)}function P($){we.call(this,n,$)}function R($){Ke[$?"unshift":"push"](()=>{y=$,l(0,y)})}const K=()=>{D(v)},L=({key:$})=>{$==="ArrowDown"?O(1):$==="ArrowUp"&&O(-1)};function he($){Ke[$?"unshift":"push"](()=>{y=$,l(0,y)})}const le=()=>{D(v)},te=({key:$})=>{$==="ArrowDown"?O(1):$==="ArrowUp"&&O(-1)};return n.$$set=$=>{e=Z(Z({},e),ge($)),l(11,o=ce(e,i)),"text"in $&&l(1,u=$.text),"href"in $&&l(2,c=$.href),"primaryFocus"in $&&l(12,d=$.primaryFocus),"disabled"in $&&l(3,_=$.disabled),"hasDivider"in $&&l(4,m=$.hasDivider),"danger"in $&&l(5,g=$.danger),"requireTitle"in $&&l(13,p=$.requireTitle),"id"in $&&l(6,v=$.id),"ref"in $&&l(0,y=$.ref),"$$scope"in $&&l(15,a=$.$$scope)},n.$$.update=()=>{n.$$.dirty&16448&&l(12,d=r===v),n.$$.dirty&8206&&l(7,t={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:c?void 0:_,href:c||void 0,title:p?f.default?void 0:u:void 0})},[y,u,c,_,m,g,v,t,M,D,O,o,d,p,r,a,s,B,F,A,P,R,K,L,he,le,te]}class Da extends ve{constructor(e){super(),ke(this,e,Aa,Na,pe,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const Ct=Da;function Yl(n,e,l){const t=n.slice();return t[39]=e[l],t[41]=l,t}const Ba=n=>({item:n[0]&8,index:n[0]&8}),Ul=n=>({item:n[39],index:n[41]});function Wl(n){let e,l;return{c(){e=T("label"),l=J(n[10]),this.h()},l(t){e=I(t,"LABEL",{for:!0});var i=S(e);l=X(i,n[10]),i.forEach(h),this.h()},h(){z(e,"for",n[19]),N(e,"bx--label",!0),N(e,"bx--label--disabled",n[9]),N(e,"bx--visually-hidden",n[17])},m(t,i){E(t,e,i),w(e,l)},p(t,i){i[0]&1024&&_e(l,t[10]),i[0]&524288&&z(e,"for",t[19]),i[0]&512&&N(e,"bx--label--disabled",t[9]),i[0]&131072&&N(e,"bx--visually-hidden",t[17])},d(t){t&&h(e)}}}function Kl(n){let e,l;return e=new ms({props:{class:"bx--list-box__invalid-icon"}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Zl(n){let e,l;return e=new _s({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Pa(n){let e;return{c(){e=J(n[16])},l(l){e=X(l,n[16])},m(l,t){E(l,e,t)},p(l,t){t[0]&65536&&_e(e,l[16])},d(l){l&&h(e)}}}function Ra(n){let e=n[4](n[22])+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i[0]&4194320&&e!==(e=t[4](t[22])+"")&&_e(l,e)},d(t){t&&h(l)}}}function Ql(n){let e,l;return e=new ks({props:{"aria-labelledby":n[19],id:n[19],$$slots:{default:[La]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[0]&524288&&(o["aria-labelledby"]=t[19]),i[0]&524288&&(o.id=t[19]),i[0]&2097181|i[1]&64&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Ha(n){let e=n[4](n[39])+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i[0]&24&&e!==(e=t[4](t[39])+"")&&_e(l,e)},d(t){t&&h(l)}}}function Fa(n){let e,l;const t=n[29].default,i=Oe(t,n,n[37],Ul),o=i||Ha(n);return{c(){o&&o.c(),e=Q()},l(r){o&&o.l(r),e=G(r)},m(r,s){o&&o.m(r,s),E(r,e,s),l=!0},p(r,s){i?i.p&&(!l||s[0]&8|s[1]&64)&&qe(i,t,r,r[37],l?Ye(t,r[37],s,Ba):je(r[37]),Ul):o&&o.p&&(!l||s[0]&24)&&o.p(r,l?s:[-1,-1])},i(r){l||(b(o,r),l=!0)},o(r){k(o,r),l=!1},d(r){o&&o.d(r),r&&h(e)}}}function Gl(n,e){let l,t,i;function o(...s){return e[34](e[39],...s)}function r(){return e[35](e[39],e[41])}return t=new ws({props:{id:e[39].id,active:e[0]===e[39].id,highlighted:e[21]===e[41],disabled:e[39].disabled,$$slots:{default:[Fa]},$$scope:{ctx:e}}}),t.$on("click",o),t.$on("mouseenter",r),{key:n,first:null,c(){l=ae(),q(t.$$.fragment),this.h()},l(s){l=ae(),W(t.$$.fragment,s),this.h()},h(){this.first=l},m(s,a){E(s,l,a),j(t,s,a),i=!0},p(s,a){e=s;const f={};a[0]&8&&(f.id=e[39].id),a[0]&9&&(f.active=e[0]===e[39].id),a[0]&2097160&&(f.highlighted=e[21]===e[41]),a[0]&8&&(f.disabled=e[39].disabled),a[0]&24|a[1]&64&&(f.$$scope={dirty:a,ctx:e}),t.$set(f)},i(s){i||(b(t.$$.fragment,s),i=!0)},o(s){k(t.$$.fragment,s),i=!1},d(s){s&&h(l),Y(t,s)}}}function La(n){let e=[],l=new Map,t,i,o=n[3];const r=s=>s[39].id;for(let s=0;s{d=null}),ie()),!y[11]&&y[13]?_?M[0]&10240&&b(_,1):(_=Zl(),_.c(),b(_,1),_.m(l.parentNode,l)):_&&(ne(),k(_,1,1,()=>{_=null}),ie()),g===(g=m(y))&&p?p.p(y,M):(p.d(1),p=g(y),p&&(p.c(),p.m(i,null)));const C={};M[0]&262144&&(C.translateWithId=y[18]),M[0]&2&&(C.open=y[1]),r.$set(C),(!f||M[0]&2)&&z(t,"aria-expanded",y[1]),(!f||M[0]&512)&&(t.disabled=y[9]),(!f||M[0]&262144)&&z(t,"translatewithid",y[18]),(!f||M[0]&524288)&&z(t,"id",y[19]),y[1]?v?(v.p(y,M),M[0]&2&&b(v,1)):(v=Ql(y),v.c(),b(v,1),v.m(a.parentNode,a)):v&&(ne(),k(v,1,1,()=>{v=null}),ie())},i(y){f||(b(d),b(_),b(r.$$.fragment,y),b(v),f=!0)},o(y){k(d),k(_),k(r.$$.fragment,y),k(v),f=!1},d(y){d&&d.d(y),y&&h(e),_&&_.d(y),y&&h(l),y&&h(t),p.d(),Y(r),n[31](null),y&&h(s),v&&v.d(y),y&&h(a),u=!1,Ue(c)}}}function Jl(n){let e,l;return{c(){e=T("div"),l=J(n[15]),this.h()},l(t){e=I(t,"DIV",{});var i=S(e);l=X(i,n[15]),i.forEach(h),this.h()},h(){N(e,"bx--form__helper-text",!0),N(e,"bx--form__helper-text--disabled",n[9])},m(t,i){E(t,e,i),w(e,l)},p(t,i){i[0]&32768&&_e(l,t[15]),i[0]&512&&N(e,"bx--form__helper-text--disabled",t[9])},d(t){t&&h(e)}}}function qa(n){let e,l,t,i,o,r,s,a=n[10]&&Wl(n);t=new ps({props:{role:void 0,type:n[5],size:n[7],name:n[20],"aria-label":n[28]["aria-label"],class:`bx--dropdown - `+(n[6]==="top"&&"bx--list-box--up")+` - `+(n[11]&&"bx--dropdown--invalid")+` - `+(!n[11]&&n[13]&&"bx--dropdown--warning")+` - `+(n[1]&&"bx--dropdown--open")+` - `+(n[7]==="sm"&&"bx--dropdown--sm")+` - `+(n[7]==="xl"&&"bx--dropdown--xl")+` - `+(n[23]&&"bx--dropdown--inline")+` - `+(n[9]&&"bx--dropdown--disabled")+` - `+(n[8]&&"bx--dropdown--light"),disabled:n[9],open:n[1],invalid:n[11],invalidText:n[12],light:n[8],warn:n[13],warnText:n[14],$$slots:{default:[Oa]},$$scope:{ctx:n}}}),t.$on("click",n[36]);let f=!n[23]&&!n[11]&&!n[13]&&n[15]&&Jl(n),u=[n[27]],c={};for(let d=0;dH.text||H.id}=e,{selectedId:c}=e,{type:d="default"}=e,{direction:_="bottom"}=e,{size:m=void 0}=e,{open:g=!1}=e,{light:p=!1}=e,{disabled:v=!1}=e,{titleText:y=""}=e,{invalid:M=!1}=e,{invalidText:C=""}=e,{warn:D=!1}=e,{warnText:O=""}=e,{helperText:B=""}=e,{label:F=void 0}=e,{hideLabel:A=!1}=e,{translateWithId:P=void 0}=e,{id:R="ccs-"+Math.random().toString(36)}=e,{name:K=void 0}=e,{ref:L=null}=e;const he=bt();let le=-1;function te(H){let V=le+H;if(f.length===0)return;V<0?V=f.length-1:V>=f.length&&(V=0);let ee=f[V].disabled;for(;ee;)V=V+H,V<0?V=f.length-1:V>=f.length&&(V=0),ee=f[V].disabled;l(21,le=V)}const $=()=>{he("select",{selectedId:c,selectedItem:f.find(H=>H.id===c)})},ue=({target:H})=>{g&&L&&!L.contains(H)&&l(1,g=!1)};sr(()=>(parent&&parent.addEventListener("click",ue),()=>{parent&&parent.removeEventListener("click",ue)}));const Ee=H=>{H.stopPropagation(),!v&&l(1,g=!g)};function me(H){Ke[H?"unshift":"push"](()=>{L=H,l(2,L)})}const de=H=>{const{key:V}=H;["Enter","ArrowDown","ArrowUp"].includes(V)&&H.preventDefault(),V==="Enter"?(l(1,g=!g),le>-1&&f[le].id!==c&&(l(0,c=f[le].id),$(),l(1,g=!1))):V==="Tab"?(l(1,g=!1),L.blur()):V==="ArrowDown"?(g||l(1,g=!0),te(1)):V==="ArrowUp"?(g||l(1,g=!0),te(-1)):V==="Escape"&&l(1,g=!1)},Ae=H=>{const{key:V}=H;if([" "].includes(V))H.preventDefault();else return;l(1,g=!g),le>-1&&f[le].id!==c&&(l(0,c=f[le].id),$(),l(1,g=!1))},Ce=(H,V)=>{if(H.disabled){V.stopPropagation();return}l(0,c=H.id),$(),L.focus()},oe=(H,V)=>{H.disabled||l(21,le=V)},ze=({target:H})=>{v||l(1,g=L.contains(H)?!g:!1)};return n.$$set=H=>{l(28,e=Z(Z({},e),ge(H))),l(27,r=ce(e,o)),"items"in H&&l(3,f=H.items),"itemToString"in H&&l(4,u=H.itemToString),"selectedId"in H&&l(0,c=H.selectedId),"type"in H&&l(5,d=H.type),"direction"in H&&l(6,_=H.direction),"size"in H&&l(7,m=H.size),"open"in H&&l(1,g=H.open),"light"in H&&l(8,p=H.light),"disabled"in H&&l(9,v=H.disabled),"titleText"in H&&l(10,y=H.titleText),"invalid"in H&&l(11,M=H.invalid),"invalidText"in H&&l(12,C=H.invalidText),"warn"in H&&l(13,D=H.warn),"warnText"in H&&l(14,O=H.warnText),"helperText"in H&&l(15,B=H.helperText),"label"in H&&l(16,F=H.label),"hideLabel"in H&&l(17,A=H.hideLabel),"translateWithId"in H&&l(18,P=H.translateWithId),"id"in H&&l(19,R=H.id),"name"in H&&l(20,K=H.name),"ref"in H&&l(2,L=H.ref),"$$scope"in H&&l(37,a=H.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&l(23,t=d==="inline"),n.$$.dirty[0]&9&&l(22,i=f.find(H=>H.id===c)),n.$$.dirty[0]&2&&(g||l(21,le=-1))},e=ge(e),[c,g,L,f,u,d,_,m,p,v,y,M,C,D,O,B,F,A,P,R,K,le,i,t,te,$,ue,r,e,s,Ee,me,de,Ae,Ce,oe,ze,a]}class Ya extends ve{constructor(e){super(),ke(this,e,ja,qa,pe,{items:3,itemToString:4,selectedId:0,type:5,direction:6,size:7,open:1,light:8,disabled:9,titleText:10,invalid:11,invalidText:12,warn:13,warnText:14,helperText:15,label:16,hideLabel:17,translateWithId:18,id:19,name:20,ref:2},null,[-1,-1])}}const Ua=Ya;function Wa(n){const e=n-1;return e*e*e+1}function Xl(n,{delay:e=0,duration:l=400,easing:t=Pr}={}){const i=+getComputedStyle(n).opacity;return{delay:e,duration:l,easing:t,css:o=>`opacity: ${o*i}`}}function yt(n,{delay:e=0,duration:l=400,easing:t=Wa,axis:i="y"}={}){const o=getComputedStyle(n),r=+o.opacity,s=i==="y"?"height":"width",a=parseFloat(o[s]),f=i==="y"?["top","bottom"]:["left","right"],u=f.map(v=>`${v[0].toUpperCase()}${v.slice(1)}`),c=parseFloat(o[`padding${u[0]}`]),d=parseFloat(o[`padding${u[1]}`]),_=parseFloat(o[`margin${u[0]}`]),m=parseFloat(o[`margin${u[1]}`]),g=parseFloat(o[`border${u[0]}Width`]),p=parseFloat(o[`border${u[1]}Width`]);return{delay:e,duration:l,easing:t,css:v=>`overflow: hidden;opacity: ${Math.min(v*20,1)*r};${s}: ${v*a}px;padding-${f[0]}: ${v*c}px;padding-${f[1]}: ${v*d}px;margin-${f[0]}: ${v*_}px;margin-${f[1]}: ${v*m}px;border-${f[0]}-width: ${v*g}px;border-${f[1]}-width: ${v*p}px;`}}const Ka=n=>({}),xl=n=>({});function $l(n){let e=n[3].label+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i[0]&8&&e!==(e=t[3].label+"")&&_e(l,e)},d(t){t&&h(l)}}}function Za(n){let e,l,t,i,o,r,s,a,f,u,c,d,_=n[3]&&$l(n);o=new bs({props:{"aria-hidden":"true",title:n[1]}});const m=n[20].default,g=Oe(m,n,n[19],null);let p=[{role:"navigation"},n[10]],v={};for(let C=0;Cl(18,f=me));const C=zl(M,me=>me.reduce((de,Ae)=>({...de,[Ae.id]:Ae}),{}));Ve(n,C,me=>l(28,u=me));const D=it(g),O=it(void 0);Ve(n,O,me=>l(16,s=me));const B=it([]);Ve(n,B,me=>l(17,a=me));const F=zl(B,me=>me.reduce((de,Ae)=>({...de,[Ae.id]:Ae}),{})),A=it(void 0);let P=null;Jt("Tabs",{tabs:M,contentById:F,selectedTab:O,selectedContent:A,useAutoWidth:D,add:me=>{M.update(de=>[...de,{...me,index:de.length}])},addContent:me=>{B.update(de=>[...de,{...me,index:de.length}])},update:me=>{l(14,K=u[me].index)},change:async me=>{let de=K+me;de<0?de=f.length-1:de>=f.length&&(de=0);let Ae=f[de].disabled;for(;Ae;)de=de+me,de<0?de=f.length-1:de>=f.length&&(de=0),Ae=f[de].disabled;l(14,K=de),await Rr();const Ce=P==null?void 0:P.querySelectorAll("[role='tab']")[K];Ce==null||Ce.focus()}}),fl(()=>{l(12,_=K),L>-1&&L!==K&&y("change",K),L=K});let R=!0,K=_,L=-1;function he(me){we.call(this,n,me)}function le(me){we.call(this,n,me)}const te=()=>{l(5,R=!R)},$=()=>{l(5,R=!R)},ue=()=>{l(5,R=!R)};function Ee(me){Ke[me?"unshift":"push"](()=>{P=me,l(4,P)})}return n.$$set=me=>{l(11,e=Z(Z({},e),ge(me))),l(10,r=ce(e,o)),"selected"in me&&l(12,_=me.selected),"type"in me&&l(0,m=me.type),"autoWidth"in me&&l(13,g=me.autoWidth),"iconDescription"in me&&l(1,p=me.iconDescription),"triggerHref"in me&&l(2,v=me.triggerHref),"$$scope"in me&&l(19,d=me.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&4096&&l(14,K=_),n.$$.dirty[0]&278528&&l(3,t=f[K]||void 0),n.$$.dirty[0]&147456&&l(15,i=a[K]||void 0),n.$$.dirty[0]&32776&&(t&&O.set(t.id),i&&A.set(i.id)),n.$$.dirty[0]&65536&&s&&l(5,R=!0),n.$$.dirty[0]&8192&&D.set(g)},e=ge(e),[m,p,v,t,P,R,M,C,O,B,r,e,_,g,K,i,s,a,f,d,c,he,le,te,$,ue,Ee]}class Ga extends ve{constructor(e){super(),ke(this,e,Qa,Za,pe,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const kr=Ga;function Ja(n){let e;return{c(){e=J(n[1])},l(l){e=X(l,n[1])},m(l,t){E(l,e,t)},p(l,t){t&2&&_e(e,l[1])},d(l){l&&h(e)}}}function Xa(n){let e,l,t,i,o,r,s;const a=n[15].default,f=Oe(a,n,n[14],null),u=f||Ja(n);let c=[{tabindex:"-1"},{role:"presentation"},n[12]],d={};for(let _=0;_l(13,r=K)),Ve(n,v,K=>l(7,s=K)),y({id:m,label:u,disabled:d});function D(K){we.call(this,n,K)}function O(K){we.call(this,n,K)}function B(K){we.call(this,n,K)}function F(K){we.call(this,n,K)}function A(K){Ke[K?"unshift":"push"](()=>{g=K,l(0,g)})}const P=()=>{d||M(m)},R=({key:K})=>{d||(K==="ArrowRight"?C(1):K==="ArrowLeft"?C(-1):(K===" "||K==="Enter")&&M(m))};return n.$$set=K=>{e=Z(Z({},e),ge(K)),l(12,o=ce(e,i)),"label"in K&&l(1,u=K.label),"href"in K&&l(2,c=K.href),"disabled"in K&&l(3,d=K.disabled),"tabindex"in K&&l(4,_=K.tabindex),"id"in K&&l(5,m=K.id),"ref"in K&&l(0,g=K.ref),"$$scope"in K&&l(14,f=K.$$scope)},n.$$.update=()=>{n.$$.dirty&8224&&l(6,t=r===m)},[g,u,c,d,_,m,t,s,p,v,M,C,o,r,f,a,D,O,B,F,A,P,R]}class $a extends ve{constructor(e){super(),ke(this,e,xa,Xa,pe,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const At=$a;function eo(n){let e,l,t,i;const o=n[12].default,r=Oe(o,n,n[11],null);let s=[{role:"tabpanel"},{"aria-labelledby":n[1]},{"aria-hidden":l=!n[2]},{hidden:t=n[2]?void 0:""},{id:n[0]},n[6]],a={};for(let f=0;fl(10,u=y)),Ve(n,p,y=>l(8,a=y)),Ve(n,v,y=>l(9,f=y)),g({id:_}),n.$$set=y=>{e=Z(Z({},e),ge(y)),l(6,s=ce(e,r)),"id"in y&&l(0,_=y.id),"$$scope"in y&&l(11,d=y.$$scope)},n.$$.update=()=>{n.$$.dirty&1025&&l(2,t=u===_),n.$$.dirty&513&&l(7,i=f[_].index),n.$$.dirty&384&&l(1,o=a[i].id)},[_,o,t,m,p,v,s,i,a,f,u,d,c]}class lo extends ve{constructor(e){super(),ke(this,e,to,eo,pe,{id:0})}}const Dt=lo;function en(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function no(n){let e,l,t=n[1]&&en(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class ro extends ve{constructor(e){super(),ke(this,e,io,no,pe,{size:0,title:1})}}function tn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function so(n){let e,l,t=n[1]&&tn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class oo extends ve{constructor(e){super(),ke(this,e,ao,so,pe,{size:0,title:1})}}function ln(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function fo(n){let e,l,t=n[1]&&ln(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class co extends ve{constructor(e){super(),ke(this,e,uo,fo,pe,{size:0,title:1})}}function nn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function ho(n){let e,l,t=n[1]&&nn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class sl extends ve{constructor(e){super(),ke(this,e,mo,ho,pe,{size:0,title:1})}}function rn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function _o(n){let e,l,t,i=n[1]&&rn(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}let bo=class extends ve{constructor(e){super(),ke(this,e,go,_o,pe,{size:0,title:1})}};function sn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function po(n){let e,l,t=n[1]&&sn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class ko extends ve{constructor(e){super(),ke(this,e,vo,po,pe,{size:0,title:1})}}function an(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function wo(n){let e,l,t,i,o=n[1]&&an(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class ll extends ve{constructor(e){super(),ke(this,e,So,wo,pe,{size:0,title:1})}}function on(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Eo(n){let e,l,t,i=n[1]&&on(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class _t extends ve{constructor(e){super(),ke(this,e,zo,Eo,pe,{size:0,title:1})}}function fn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function yo(n){let e,l,t=n[1]&&fn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Mo extends ve{constructor(e){super(),ke(this,e,Vo,yo,pe,{size:0,title:1})}}function un(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Co(n){let e,l,t,i=n[1]&&un(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Io extends ve{constructor(e){super(),ke(this,e,To,Co,pe,{size:0,title:1})}}function cn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function No(n){let e,l,t=n[1]&&cn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Do extends ve{constructor(e){super(),ke(this,e,Ao,No,pe,{size:0,title:1})}}function dn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Bo(n){let e,l,t=n[1]&&dn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Ro extends ve{constructor(e){super(),ke(this,e,Po,Bo,pe,{size:0,title:1})}}function hn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Ho(n){let e,l,t,i=n[1]&&hn(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Kt extends ve{constructor(e){super(),ke(this,e,Fo,Ho,pe,{size:0,title:1})}}function mn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Lo(n){let e,l,t=n[1]&&mn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class qo extends ve{constructor(e){super(),ke(this,e,Oo,Lo,pe,{size:0,title:1})}}function _n(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function jo(n){let e,l,t=n[1]&&_n(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Uo extends ve{constructor(e){super(),ke(this,e,Yo,jo,pe,{size:0,title:1})}}function gn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Wo(n){let e,l,t=n[1]&&gn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Zt extends ve{constructor(e){super(),ke(this,e,Ko,Wo,pe,{size:0,title:1})}}function bn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Zo(n){let e,l,t=n[1]&&bn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class Qt extends ve{constructor(e){super(),ke(this,e,Qo,Zo,pe,{size:0,title:1})}}function pn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Go(n){let e,l,t=n[1]&&pn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class vn extends ve{constructor(e){super(),ke(this,e,Jo,Go,pe,{size:0,title:1})}}function kn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function Xo(n){let e,l,t=n[1]&&kn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class wn extends ve{constructor(e){super(),ke(this,e,xo,Xo,pe,{size:0,title:1})}}function Sn(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function $o(n){let e,l,t,i=n[1]&&Sn(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class qt extends ve{constructor(e){super(),ke(this,e,ef,$o,pe,{size:0,title:1})}}function En(n){let e,l;return{c(){e=re("title"),l=J(n[1])},l(t){e=se(t,"title",{});var i=S(e);l=X(i,n[1]),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&2&&_e(l,t[1])},d(t){t&&h(e)}}}function tf(n){let e,l,t,i=n[1]&&En(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{l(5,e=Z(Z({},e),ge(f))),l(3,r=ce(e,o)),"size"in f&&l(0,s=f.size),"title"in f&&l(1,a=f.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,t]}class nf extends ve{constructor(e){super(),ke(this,e,lf,tf,pe,{size:0,title:1})}}const rf=32,wr="itemScrollContainer";function sf(n,e,l,t){if(e==null)return[];let i=[];return t==null?i=wt(l||e):i=Yt(t,l||e),i.filter(o=>Er(n,o.path))}function af(n,e){return e.some(l=>Ge(l.path,n.path))}function of(n,e){const l=xe.field(n);return l==null?!1:af(l,e)}function Sr(n,e){const l={};let t;if(n.fields!=null){for(const[o,r]of Object.entries(n.fields))if(e.some(s=>Ge(s.path,r.path))){const s=Sr(r,e);s!=null&&(l[o]=s)}}else n.repeated_field!=null&&(e.some(o=>{var r;return Ge(o.path,(r=n.repeated_field)==null?void 0:r.path)})?t=n.repeated_field:t=void 0);return t==null&&Object.keys(l).length===0?{...n,fields:void 0,repeated_field:void 0}:n.path.length===0||e.some(o=>Ge(o.path,n.path))?{...n,fields:l,repeated_field:t}:null}function ff(n,e){var t,i;const l=[];for(const o of hl(n)){const r=e==null?void 0:e.find(a=>Ge(a.path,o.path)),s=(i=(t=r==null?void 0:r.stats)==null?void 0:t.data)==null?void 0:i.avg_text_length;s!=null&&s>rf&&l.push(o)}return l}function Er(n,e){if(n==null)return!1;if(typeof e!="string"&&(e=Ne(e)),n[e]!=null)return n[e];const l=rt(e);return l.length>1?Er(n,Ne(l.slice(0,l.length-1))):!0}function zr(n,e){return n.searchPath!=null&&n.selectedColumns[n.searchPath]!=!1?rt(n.searchPath):uf(e)}function yr(n,e,l,t){if(l==null)return null;if(n.searchEmbedding!=null)return n.searchEmbedding;const i=_l(e,l);return(i!=null?[...t||[]].sort((r,s)=>{const a=i.includes(r),f=i.includes(s);return a&&f?0:a?-1:f?1:0}):[])[0]}function _l(n,e){var i;if(n.schema==null||e==null)return[];const l=new Set,t=wt(Ut(n.schema,e)).filter(o=>o.signal!=null&&wt(o).some(r=>r.dtype==="embedding"));for(const o of t)((i=o.signal)==null?void 0:i.signal_name)!=null&&l.add(o.signal.signal_name);return Array.from(l)}function Xt(n,e){return e==null||n==null?!1:(n.udfs||[]).some(l=>ur(l.path,e))}function gl(n,e){return e==null?n.queryOptions.searches||[]:(n.queryOptions.searches||[]).filter(l=>Ge(l.path,e))}function uf(n){if(n.stats==null||n.stats.length===0)return null;const e=(n.visibleFields||[]).filter(l=>l.dtype==="string").map(l=>Ne(l.path));for(const l of n.stats){const t=Ne(l.path);if(e.indexOf(t)>=0)return l.path}return null}function cf(n){var e,l;return(((l=(e=n.selectRowsSchema)==null?void 0:e.data)==null?void 0:l.sorts)||[])[0]||null}function zn(n){var o;const e=` -`,l=n.text.split(e),t=[];let i=((o=n.span)==null?void 0:o.start)||0;for(let r=0;r[a,0]));for(const a of l)e[a].sort((f,u)=>{var _,m;const c=((_=f[ot])==null?void 0:_.start)||0,d=((m=u[ot])==null?void 0:m.start)||0;return c-d});let o=0;const r=[];let s=Object.fromEntries(Object.entries(i).map(([a,f])=>[a,[e[a][f],e[a][f+1]]]));for(;oo&&(a=_.start),_.endo&&(a=_.end))}const f=Object.fromEntries(Object.entries(s).map(([c,d])=>[c,d.filter(_=>_!=null&&_[ot]!=null&&_[ot].starto)]));for(const c of Object.keys(f))f[c].length===0&&delete f[c];const u=Object.values(f).flat().map(c=>xe.path(c)).map(c=>Ne(c));r.push(...zn({text:n.slice(o,a),span:{start:o,end:a},originalSpans:f,paths:u}));for(const c of Object.keys(i)){const d=i[c],_=(s[c][0]||{})[ot];if(!(_==null||d==null)&&_.end<=a){if(d>e[c].length){delete i[c];continue}i[c]++}}o=a,s=Object.fromEntries(Object.entries(i).map(([c,d])=>[c,[e[c][d],e[c][d+1]]]))}return o{if(!r)return;const M=y.target;p(M,s,i)<=t?(!u&&r&&(f("loadMore"),l(8,d=M.scrollHeight),l(9,_=M.scrollTop)),l(7,u=!0)):l(7,u=!1)},p=(y,M,C)=>{const D=y.documentElement?y.documentElement:y;return M?C?D.scrollLeft:D.scrollTop:C?D.scrollWidth-D.clientWidth-D.scrollLeft:D.scrollHeight-D.clientHeight-D.scrollTop};sr(()=>{a?l(10,m=document):o?l(10,m=o):l(10,m=c.parentNode)}),Hr(()=>{m&&(m.removeEventListener("scroll",g),m.removeEventListener("resize",g))});function v(y){Ke[y?"unshift":"push"](()=>{c=y,l(2,c)})}return n.$$set=y=>{"threshold"in y&&l(3,t=y.threshold),"horizontal"in y&&l(4,i=y.horizontal),"elementScroll"in y&&l(0,o=y.elementScroll),"hasMore"in y&&l(5,r=y.hasMore),"reverse"in y&&l(6,s=y.reverse),"window"in y&&l(1,a=y.window)},n.$$.update=()=>{n.$$.dirty&1088&&m&&(s&&l(10,m.scrollTop=m.scrollHeight,m),m.addEventListener("scroll",g),m.addEventListener("resize",g)),n.$$.dirty&1984&&u&&s&&l(10,m.scrollTop=m.scrollHeight-d+_,m)},[o,a,c,t,i,r,s,u,d,_,m,v]}class _f extends ve{constructor(e){super(),ke(this,e,mf,hf,pe,{threshold:3,horizontal:4,elementScroll:0,hasMore:5,reverse:6,window:1})}}function gf(n){let e,l,t,i,o,r,s,a;t=new qr({});const f=n[3].default,u=Oe(f,n,n[6],null);return{c(){e=T("div"),l=T("button"),q(t.$$.fragment),i=Q(),o=T("span"),u&&u.c(),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);l=I(d,"BUTTON",{class:!0});var _=S(l);W(t.$$.fragment,_),_.forEach(h),i=G(d),o=I(d,"SPAN",{class:!0});var m=S(o);u&&u.l(m),m.forEach(h),d.forEach(h),this.h()},h(){z(l,"class","opacity-50 hover:opacity-100"),z(o,"class","truncate"),z(e,"class","removable-tag flex items-center gap-x-1")},m(c,d){E(c,e,d),w(e,l),j(t,l,null),w(e,i),w(e,o),u&&u.m(o,null),r=!0,s||(a=fe(l,"click",ar(n[4])),s=!0)},p(c,d){u&&u.p&&(!r||d&64)&&qe(u,f,c,c[6],r?Ye(f,c[6],d,null):je(c[6]),null)},i(c){r||(b(t.$$.fragment,c),b(u,c),r=!0)},o(c){k(t.$$.fragment,c),k(u,c),r=!1},d(c){c&&h(e),Y(t),u&&u.d(c),s=!1,a()}}}function bf(n){let e,l;const t=[{type:n[0]},n[2]];let i={$$slots:{default:[gf]},$$scope:{ctx:n}};for(let o=0;os("remove");function u(c){we.call(this,n,c)}return n.$$set=c=>{e=Z(Z({},e),ge(c)),l(2,i=ce(e,t)),"type"in c&&l(0,a=c.type),"$$scope"in c&&l(6,r=c.$$scope)},[a,s,i,o,f,u,r]}class xt extends ve{constructor(e){super(),ke(this,e,pf,bf,pe,{type:0})}}function vf(n){let e=(n[2]?"":n[5])+"",l,t,i=n[0][n[1].op]+"",o,r,s;return{c(){l=J(e),t=Q(),o=J(i),r=Q(),s=J(n[4])},l(a){l=X(a,e),t=G(a),o=X(a,i),r=G(a),s=X(a,n[4])},m(a,f){E(a,l,f),E(a,t,f),E(a,o,f),E(a,r,f),E(a,s,f)},p(a,f){f&36&&e!==(e=(a[2]?"":a[5])+"")&&_e(l,e),f&2&&i!==(i=a[0][a[1].op]+"")&&_e(o,i),f&16&&_e(s,a[4])},d(a){a&&h(l),a&&h(t),a&&h(o),a&&h(r),a&&h(s)}}}function kf(n){let e,l,t,i,o,r;return l=new xt({props:{interactive:!0,type:"magenta",$$slots:{default:[vf]},$$scope:{ctx:n}}}),l.$on("click",n[9]),l.$on("remove",n[10]),{c(){e=T("div"),q(l.$$.fragment),this.h()},l(s){e=I(s,"DIV",{class:!0});var a=S(e);W(l.$$.fragment,a),a.forEach(h),this.h()},h(){z(e,"class","filter-pill items-center")},m(s,a){E(s,e,a),j(l,e,null),i=!0,o||(r=Je(t=tt.call(null,e,{text:n[6]})),o=!0)},p(s,[a]){const f={};a&2102&&(f.$$scope={dirty:a,ctx:s}),l.$set(f),t&&Bt(t.update)&&a&64&&t.update.call(null,{text:s[6]})},i(s){i||(b(l.$$.fragment,s),i=!0)},o(s){k(l.$$.fragment,s),i=!1},d(s){s&&h(e),Y(l),o=!1,r()}}}function wf(n,e,l){let t,i,o,r,s;const a={equals:"=",not_equal:"≠",less:"<",less_equal:"≤",greater:">",greater_equal:"≥",in:"in",exists:"exists"};let{filter:f}=e,{hidePath:u=!1}=e;const c=$e();Ve(n,c,m=>l(7,s=m));const d=()=>vt({command:kt.EditFilter,namespace:s.namespace,datasetName:s.datasetName,path:i}),_=()=>c.removeFilter(f);return n.$$set=m=>{"filter"in m&&l(1,f=m.filter),"hidePath"in m&&l(2,u=m.hidePath)},n.$$.update=()=>{n.$$.dirty&2&&l(4,t=Pe(f.value||"false")),n.$$.dirty&2&&l(3,i=rt(f.path)),n.$$.dirty&18&&l(6,o=`${Ne(f.path)} ${a[f.op]} ${t}`),n.$$.dirty&8&&l(5,r=i.at(-1))},[a,f,u,i,t,r,o,s,c,d,_]}class bl extends ve{constructor(e){super(),ke(this,e,wf,kf,pe,{FILTER_SHORTHANDS:0,filter:1,hidePath:2})}get FILTER_SHORTHANDS(){return this.$$.ctx[0]}}function Sf(n){let e=(n[1]?"":n[0])+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i&3&&e!==(e=(t[1]?"":t[0])+"")&&_e(l,e)},d(t){t&&h(l)}}}function Ef(n){let e,l,t,i,o;const r=[n[2],{type:"purple"},{icon:sl}];let s={$$slots:{default:[Sf]},$$scope:{ctx:n}};for(let a=0;a{e=Z(Z({},e),ge(s)),l(2,i=ce(e,t)),"embedding"in s&&l(0,o=s.embedding),"hideEmbeddingName"in s&&l(1,r=s.hideEmbeddingName)},[o,r,i]}class $t extends ve{constructor(e){super(),ke(this,e,zf,Ef,pe,{embedding:0,hideEmbeddingName:1})}}function yf(n){let e=Ne(n[0].path)+"",l,t,i=n[0].query.type+"",o;return{c(){l=J(e),t=J(": "),o=J(i)},l(r){l=X(r,e),t=X(r,": "),o=X(r,i)},m(r,s){E(r,l,s),E(r,t,s),E(r,o,s)},p(r,s){s&1&&e!==(e=Ne(r[0].path)+"")&&_e(l,e),s&1&&i!==(i=r[0].query.type+"")&&_e(o,i)},d(r){r&&h(l),r&&h(t),r&&h(o)}}}function Vn(n){let e,l,t;return l=new $t({props:{embedding:n[0].query.embedding}}),{c(){e=T("div"),q(l.$$.fragment),this.h()},l(i){e=I(i,"DIV",{class:!0});var o=S(e);W(l.$$.fragment,o),o.forEach(h),this.h()},h(){z(e,"class","ml-2")},m(i,o){E(i,e,o),j(l,e,null),t=!0},p(i,o){const r={};o&1&&(r.embedding=i[0].query.embedding),l.$set(r)},i(i){t||(b(l.$$.fragment,i),t=!0)},o(i){k(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function Mn(n){let e,l;return{c(){e=T("div"),l=J(n[2]),this.h()},l(t){e=I(t,"DIV",{class:!0});var i=S(e);l=X(i,n[2]),i.forEach(h),this.h()},h(){z(e,"class","mt-2 whitespace-pre-wrap text-left")},m(t,i){E(t,e,i),w(e,l)},p(t,i){i&4&&_e(l,t[2])},d(t){t&&h(e)}}}function Vf(n){let e,l,t,i,o,r,s;t=new Vt({props:{type:n[1],$$slots:{default:[yf]},$$scope:{ctx:n}}});let a=(n[0].query.type==="semantic"||n[0].query.type==="concept")&&Vn(n),f=n[2]&&Mn(n);return{c(){e=T("div"),l=T("div"),q(t.$$.fragment),i=Q(),a&&a.c(),o=Q(),f&&f.c(),r=ae(),this.h()},l(u){e=I(u,"DIV",{class:!0});var c=S(e);l=I(c,"DIV",{class:!0});var d=S(l);W(t.$$.fragment,d),d.forEach(h),i=G(c),a&&a.l(c),c.forEach(h),o=G(u),f&&f.l(u),r=ae(),this.h()},h(){z(l,"class","whitespace-nowrap"),z(e,"class","flex items-center justify-items-center")},m(u,c){E(u,e,c),w(e,l),j(t,l,null),w(e,i),a&&a.m(e,null),E(u,o,c),f&&f.m(u,c),E(u,r,c),s=!0},p(u,[c]){const d={};c&2&&(d.type=u[1]),c&9&&(d.$$scope={dirty:c,ctx:u}),t.$set(d),u[0].query.type==="semantic"||u[0].query.type==="concept"?a?(a.p(u,c),c&1&&b(a,1)):(a=Vn(u),a.c(),b(a,1),a.m(e,null)):a&&(ne(),k(a,1,1,()=>{a=null}),ie()),u[2]?f?f.p(u,c):(f=Mn(u),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null)},i(u){s||(b(t.$$.fragment,u),b(a),s=!0)},o(u){k(t.$$.fragment,u),k(a),s=!1},d(u){u&&h(e),Y(t),a&&a.d(),u&&h(o),f&&f.d(u),u&&h(r)}}}function Mf(n,e,l){let t,{search:i}=e,{tagType:o="outline"}=e;return n.$$set=r=>{"search"in r&&l(0,i=r.search),"tagType"in r&&l(1,o=r.tagType)},n.$$.update=()=>{n.$$.dirty&1&&l(2,t=i.query.type==="concept"?"":i.query.search)},[i,o,t]}class Cn extends ve{constructor(e){super(),ke(this,e,Mf,Vf,pe,{search:0,tagType:1})}}function Cf(n){let e;return{c(){e=J(n[2])},l(l){e=X(l,n[2])},m(l,t){E(l,e,t)},p(l,t){t&4&&_e(e,l[2])},d(l){l&&h(e)}}}function Tf(n){let e,l,t,i,o,r;return l=new xt({props:{title:"query",interactive:!0,type:n[1],$$slots:{default:[Cf]},$$scope:{ctx:n}}}),l.$on("remove",n[7]),{c(){e=T("button"),q(l.$$.fragment),this.h()},l(s){e=I(s,"BUTTON",{class:!0});var a=S(e);W(l.$$.fragment,a),a.forEach(h),this.h()},h(){z(e,"class","search-pill items-center text-left")},m(s,a){E(s,e,a),j(l,e,null),i=!0,o||(r=[Je(t=tt.call(null,e,{component:Cn,props:{search:n[0],tagType:n[1]}})),fe(e,"click",n[6])],o=!0)},p(s,[a]){const f={};a&2&&(f.type=s[1]),a&516&&(f.$$scope={dirty:a,ctx:s}),l.$set(f),t&&Bt(t.update)&&a&3&&t.update.call(null,{component:Cn,props:{search:s[0],tagType:s[1]}})},i(s){i||(b(l.$$.fragment,s),i=!0)},o(s){k(l.$$.fragment,s),i=!1},d(s){s&&h(e),Y(l),o=!1,Ue(r)}}}function If(n,e,l){let t,i,o,{search:r}=e;const s={keyword:"outline",semantic:"teal",concept:"green"},a=$e(),f=ut();Ve(n,f,d=>l(3,o=d));function u(d){we.call(this,n,d)}const c=()=>{var d;return a.removeSearch(r,((d=o.selectRowsSchema)==null?void 0:d.data)||null)};return n.$$set=d=>{"search"in d&&l(0,r=d.search)},n.$$.update=()=>{n.$$.dirty&1&&l(2,t=r.query.type==="concept"?`${r.query.concept_namespace}/${r.query.concept_name}`:r.query.search),n.$$.dirty&1&&l(1,i=r.query.type!=null?s[r.query.type]:"outline")},[r,i,t,o,a,f,u,c]}class Vr extends ve{constructor(e){super(),ke(this,e,If,Tf,pe,{search:0})}}function Tn(n,e,l){const t=n.slice();return t[15]=e[l],t}function In(n,e,l){const t=n.slice();return t[18]=e[l],t}function Nn(n,e,l){const t=n.slice();return t[21]=e[l],t}function An(n){let e,l,t=n[9][n[18]]+"",i,o,r,s,a,f=n[3][n[18]],u=[];for(let d=0;dk(u[d],1,1,()=>{u[d]=null});return{c(){e=T("div"),l=T("div"),i=J(t),o=Q(),r=T("div");for(let d=0;d{t=null}),ie())},i(i){l||(b(t),l=!0)},o(i){k(t),l=!1},d(i){t&&t.d(i),i&&h(e)}}}function Pn(n){let e,l,t,i,o,r,s=n[4],a=[];for(let u=0;uk(a[u],1,1,()=>{a[u]=null});return{c(){e=T("div"),l=T("div"),t=J("Filters"),i=Q(),o=T("div");for(let u=0;u{r[u]=null}),ie()),~e?(l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t)):l=null)},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){~e&&r[e].d(a),a&&h(t)}}}function Pf(n){let e,l,t,i,o,r,s,a,f=n[8],u=[];for(let g=0;gk(u[g],1,1,()=>{u[g]=null});let d=n[4]!=null&&n[4].length>0&&Pn(n),_=n[0]&&n[1]&&Hn(n),m=n[2]&&Fn(n);return{c(){e=T("div"),l=T("div");for(let g=0;g0?d?(d.p(g,p),p&16&&b(d,1)):(d=Pn(g),d.c(),b(d,1),d.m(l,null)):d&&(ne(),k(d,1,1,()=>{d=null}),ie()),g[0]&&g[1]?_?_.p(g,p):(_=Hn(g),_.c(),_.m(o,null)):_&&(_.d(1),_=null),g[2]?m?(m.p(g,p),p&4&&b(m,1)):(m=Fn(g),m.c(),b(m,1),m.m(s.parentNode,s)):m&&(ne(),k(m,1,1,()=>{m=null}),ie())},i(g){if(!a){for(let p=0;p(a(),a=et(t,C=>l(6,s=C)),t);n.$$.on_destroy.push(()=>a());let{totalNumRows:u}=e,{manifest:c}=e,d=$e();Ve(n,d,C=>l(12,r=C));let _=null;const m=["keyword","semantic","concept"],g={keyword:"Keyword",semantic:"Semantic",concept:"Concepts"};let p={};function v(C){if(C.query.type==="concept"){const D=C.query;l(2,_={namespace:D.concept_namespace,name:D.concept_name})}}const y=C=>v(C),M=()=>l(2,_=null);return n.$$set=C=>{"totalNumRows"in C&&l(0,u=C.totalNumRows),"manifest"in C&&l(1,c=C.manifest)},n.$$.update=()=>{if(n.$$.dirty&4&&f(l(5,t=_?jr(_.namespace,_.name):void 0)),n.$$.dirty&4096&&l(11,i=gl(r)),n.$$.dirty&4096&&l(4,o=r.queryOptions.filters),n.$$.dirty&2056){l(3,p={});for(const C of i)C.query.type&&(C.query.type in p||l(3,p[C.query.type]=[],p),p[C.query.type].push(C))}},[u,c,_,p,o,t,s,d,m,g,v,i,r,y,M]}class Hf extends ve{constructor(e){super(),ke(this,e,Rf,Pf,pe,{totalNumRows:0,manifest:1})}}function Ff(n,e){const l=t=>n&&!n.contains(t.target)&&!t.defaultPrevented&&e();return document.addEventListener("click",l,!0),{destroy(){document.removeEventListener("click",l,!0)}}}function Ln(n,e,l){const t=n.slice();return t[18]=e[l],t}function On(n){let e,l,t=n[0].conceptNamespace+"",i,o,r=n[0].conceptName+"",s,a,f,u,c,d,_,m,g,p;return u=new Ur({}),_=new Wr({}),{c(){e=T("div"),l=T("span"),i=J(t),o=J(" / "),s=J(r),a=Q(),f=T("button"),q(u.$$.fragment),c=Q(),d=T("button"),q(_.$$.fragment),this.h()},l(v){e=I(v,"DIV",{class:!0});var y=S(e);l=I(y,"SPAN",{class:!0});var M=S(l);i=X(M,t),o=X(M," / "),s=X(M,r),M.forEach(h),a=G(y),f=I(y,"BUTTON",{class:!0});var C=S(f);W(u.$$.fragment,C),C.forEach(h),c=G(y),d=I(y,"BUTTON",{class:!0});var D=S(d);W(_.$$.fragment,D),D.forEach(h),y.forEach(h),this.h()},h(){z(l,"class","pr-4"),z(f,"class","px-2"),z(d,"class","px-2"),z(e,"class","flex flex-row px-4 pt-2")},m(v,y){E(v,e,y),w(e,l),w(l,i),w(l,o),w(l,s),w(e,a),w(e,f),j(u,f,null),w(e,c),w(e,d),j(_,d,null),m=!0,g||(p=[fe(f,"click",n[13]),fe(d,"click",n[14])],g=!0)},p(v,y){(!m||y&1)&&t!==(t=v[0].conceptNamespace+"")&&_e(i,t),(!m||y&1)&&r!==(r=v[0].conceptName+"")&&_e(s,r)},i(v){m||(b(u.$$.fragment,v),b(_.$$.fragment,v),m=!0)},o(v){k(u.$$.fragment,v),k(_.$$.fragment,v),m=!1},d(v){v&&h(e),Y(u),Y(_),g=!1,Ue(p)}}}function Lf(n){let e,l,t,i;return l=new $t({props:{class:"hover:cursor-pointer",embedding:n[18]}}),{c(){e=J("Find similar "),q(l.$$.fragment),t=Q()},l(o){e=X(o,"Find similar "),W(l.$$.fragment,o),t=G(o)},m(o,r){E(o,e,r),j(l,o,r),E(o,t,r),i=!0},p(o,r){const s={};r&16&&(s.embedding=o[18]),l.$set(s)},i(o){i||(b(l.$$.fragment,o),i=!0)},o(o){k(l.$$.fragment,o),i=!1},d(o){o&&h(e),Y(l,o),o&&h(t)}}}function qn(n,e){let l,t,i;function o(){return e[15](e[18])}return t=new st({props:{kind:"ghost",class:"w-full",size:"small",$$slots:{default:[Lf]},$$scope:{ctx:e}}}),t.$on("click",o),{key:n,first:null,c(){l=ae(),q(t.$$.fragment),this.h()},l(r){l=ae(),W(t.$$.fragment,r),this.h()},h(){this.first=l},m(r,s){E(r,l,s),j(t,r,s),i=!0},p(r,s){e=r;const a={};s&2097168&&(a.$$scope={dirty:s,ctx:e}),t.$set(a)},i(r){i||(b(t.$$.fragment,r),i=!0)},o(r){k(t.$$.fragment,r),i=!1},d(r){r&&h(l),Y(t,r)}}}function Of(n){let e,l,t,i=[],o=new Map,r,s,a,f,u,c=n[0].conceptName!=null&&n[0].conceptNamespace!=null&&On(n),d=n[4];const _=m=>m[18];for(let m=0;m{c=null}),ie()),g&144&&(d=m[4],ne(),i=ft(i,g,_,1,m,d,o,t,St,qn,null,Ln),ie()),(!a||g&2&&r!==(r=m[1]!=null?`left: ${m[1].x}px; top: ${m[1].y}px`:""))&&z(e,"style",r),(!a||g&16)&&N(e,"hidden",m[4].length===0)},i(m){if(!a){b(c);for(let g=0;g{a&&(s||(s=gt(e,Xl,{duration:60},!0)),s.run(1))}),a=!0}},o(m){k(c);for(let g=0;g(s(),s=et(g,A=>l(11,r=A)),g),f,u=x,c=()=>(u(),u=et(m,A=>l(12,f=A)),m);n.$$.on_destroy.push(()=>s()),n.$$.on_destroy.push(()=>u());let{details:d}=e,{clickPosition:_}=e,{datasetViewStore:m}=e;c();let{datasetStore:g}=e;a();let{embeddings:p}=e,{addConceptLabel:v}=e;const y=bt();function M(A){if(!d.conceptName||!d.conceptNamespace)throw Error("Label could not be added, no active concept.");v(d.conceptNamespace,d.conceptName,d.text,A),y("click")}const C=A=>{t==null||i==null||(m.addSearch({path:[Ne(t)],query:{type:"semantic",search:d.text,embedding:A}}),y("click"))},D=()=>M(!0),O=()=>M(!1),B=A=>C(A),F=()=>y("close");return n.$$set=A=>{"details"in A&&l(0,d=A.details),"clickPosition"in A&&l(1,_=A.clickPosition),"datasetViewStore"in A&&c(l(2,m=A.datasetViewStore)),"datasetStore"in A&&a(l(3,g=A.datasetStore)),"embeddings"in A&&l(8,p=A.embeddings),"addConceptLabel"in A&&l(9,v=A.addConceptLabel)},n.$$.update=()=>{n.$$.dirty&6144&&l(10,t=zr(f,r)),n.$$.dirty&7424&&(i=yr(f,r,t,p.map(A=>A.name))),n.$$.dirty&3072&&l(4,o=_l(r,t))},[d,_,m,g,o,y,M,C,p,v,t,r,f,D,O,B,F]}class jf extends ve{constructor(e){super(),ke(this,e,qf,Of,pe,{details:0,clickPosition:1,datasetViewStore:2,datasetStore:3,embeddings:8,addConceptLabel:9})}}function Yf(n,e){let l,t=e;n.addEventListener("click",r=>i(r));function i(r){l=new jf({props:{details:t.details(),clickPosition:{x:r.clientX,y:r.clientY},datasetViewStore:t.datasetViewStore,datasetStore:t.datasetStore,embeddings:t.embeddings,addConceptLabel:t.addConceptLabel},target:document.body}),l.$on("close",o),l.$on("click",o)}function o(){l==null||l.$destroy(),l=void 0}return{update(r){t=r,l==null||l.$set({details:t.details()})},destroy(){o()}}}const nl=.5,jn=.3,Uf=.8,Yn="#3366cc";function al(n){return`rgba(180,215,255,${n})`}function ol(n){let e=0;if(n>nl){const l=(n-nl)/(1-nl);e=jn+l*(Uf-jn)}return al(e)}function Un(n,e,l){const t=n.slice();return t[7]=e[l],t}function Wn(n,e){let l,t,i=e[7].name+"",o,r,s,a,f=(typeof e[7].value=="number"?e[7].value.toFixed(3):e[7].value)+"",u,c;return{key:n,first:null,c(){l=T("div"),t=T("div"),o=J(i),r=Q(),s=T("div"),a=T("span"),u=J(f),c=Q(),this.h()},l(d){l=I(d,"DIV",{class:!0});var _=S(l);t=I(_,"DIV",{class:!0});var m=S(t);o=X(m,i),m.forEach(h),r=G(_),s=I(_,"DIV",{class:!0});var g=S(s);a=I(g,"SPAN",{class:!0});var p=S(a);u=X(p,f),p.forEach(h),g.forEach(h),c=G(_),_.forEach(h),this.h()},h(){z(t,"class","named-value-name table-cell max-w-xs truncate pr-2 svelte-1689hje"),z(a,"class","px-1"),N(a,"font-bold",e[7].isKeywordSearch||e[7].isNonNumericMetadata),Le(a,"background-color",(e[7].isConcept||e[7].isSemanticSearch)&&typeof e[7].value=="number"?ol(e[7].value):""),z(s,"class","table-cell rounded text-right"),z(l,"class","table-row"),this.first=l},m(d,_){E(d,l,_),w(l,t),w(t,o),w(l,r),w(l,s),w(s,a),w(a,u),w(l,c)},p(d,_){e=d,_&1&&i!==(i=e[7].name+"")&&_e(o,i),_&1&&f!==(f=(typeof e[7].value=="number"?e[7].value.toFixed(3):e[7].value)+"")&&_e(u,f),_&1&&N(a,"font-bold",e[7].isKeywordSearch||e[7].isNonNumericMetadata),_&1&&Le(a,"background-color",(e[7].isConcept||e[7].isSemanticSearch)&&typeof e[7].value=="number"?ol(e[7].value):"")},d(d){d&&h(l)}}}function Wf(n){let e,l,t=[],i=new Map,o,r=`${n[4]}px`,s=`${Math.min(n[1],n[3]-n[2]-20)}px`,a=n[0];const f=u=>u[7];for(let u=0;un[6].call(e)),N(e,"hidden",n[0].length===0),Le(e,"top",r),Le(e,"left",s)},m(u,c){E(u,e,c),w(e,l);for(let d=0;d{"namedValues"in u&&l(0,t=u.namedValues),"x"in u&&l(1,i=u.x),"y"in u&&l(5,o=u.y)},[t,i,s,r,a,o,f]}class Zf extends ve{constructor(e){super(),ke(this,e,Kf,Wf,pe,{namedValues:0,x:1,y:5})}}function Qf(n,e){let l,t=e;const i=()=>r();o();function o(){if(!t.isHovered||(t.namedValues=e.namedValues.filter(c=>t.spansHovered.some(d=>ur(rt(c.spanPath),rt(d)))),t.namedValues.length===0))return;t.itemScrollContainer!=null&&t.itemScrollContainer.addEventListener("scroll",i);const s=n.getBoundingClientRect(),a=window.getComputedStyle(n),f=parseInt(a.getPropertyValue("line-height")),u=s.height>f?s.x+n.offsetLeft||n.clientLeft:s.x;l=new Zf({props:{namedValues:t.namedValues,x:u,y:s.top},target:document.body})}function r(){l==null||l.$destroy(),l=void 0,t.itemScrollContainer!=null&&t.itemScrollContainer.removeEventListener("scroll",i)}return{update(s){t=s,s.isHovered?o():r(),l==null||l.$set({namedValues:t.namedValues})},destroy(){r()}}}function Kn(n,e,l){const t=n.slice();t[37]=e[l];const i=t[37].renderSpan;return t[38]=i,t}function Gf(n){let e,l,t,i,o,r=n[37].hasNewline&&Zn();return{c(){e=T("span"),l=J("..."),r&&r.c(),t=ae(),this.h()},l(s){e=I(s,"SPAN",{class:!0});var a=S(e);l=X(a,"..."),a.forEach(h),r&&r.l(s),t=ae(),this.h()},h(){z(e,"class","highlight-span text-sm leading-5 svelte-i4bfci")},m(s,a){E(s,e,a),w(e,l),r&&r.m(s,a),E(s,t,a),i||(o=Je(tt.call(null,e,{text:`Some text was hidden to improve readability. -Click "Show all" to show the entire document.`})),i=!0)},p(s,a){s[37].hasNewline?r||(r=Zn(),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(s){s&&h(e),r&&r.d(s),s&&h(t),i=!1,o()}}}function Jf(n){let e,l=n[38].snippetText+"",t,i,o,r,s;function a(){return n[30](n[38])}function f(){return n[31](n[38])}function u(){return n[32](n[38])}return{c(){e=T("span"),t=J(l),this.h()},l(c){e=I(c,"SPAN",{class:!0});var d=S(e);t=X(d,l),d.forEach(h),this.h()},h(){z(e,"class","hover:cursor-poiner highlight-span text-sm leading-5 svelte-i4bfci"),N(e,"hover:cursor-pointer",n[0].length>0),N(e,"font-bold",n[38].isBlackBolded),N(e,"font-medium",n[38].isHighlightBolded&&!n[38].isBlackBolded),Le(e,"color",n[38].isHighlightBolded&&!n[38].isBlackBolded?Yn:""),Le(e,"background-color",n[38].isHovered?al(Jn):n[38].backgroundColor)},m(c,d){E(c,e,d),w(e,t),r||(s=[Je(i=Qf.call(null,e,{namedValues:n[38].hoverInfo,isHovered:n[38].isFirstHover,spansHovered:Array.from(n[1]),itemScrollContainer:n[5]})),Je(o=Yf.call(null,e,{details:a,datasetViewStore:n[7],datasetStore:n[8],embeddings:n[6].data||[],addConceptLabel:n[14]})),fe(e,"mouseenter",f),fe(e,"mouseleave",u)],r=!0)},p(c,d){n=c,d[0]&8&&l!==(l=n[38].snippetText+"")&&_e(t,l),i&&Bt(i.update)&&d[0]&42&&i.update.call(null,{namedValues:n[38].hoverInfo,isHovered:n[38].isFirstHover,spansHovered:Array.from(n[1]),itemScrollContainer:n[5]}),o&&Bt(o.update)&&d[0]&72&&o.update.call(null,{details:a,datasetViewStore:n[7],datasetStore:n[8],embeddings:n[6].data||[],addConceptLabel:n[14]}),d[0]&1&&N(e,"hover:cursor-pointer",n[0].length>0),d[0]&8&&N(e,"font-bold",n[38].isBlackBolded),d[0]&8&&N(e,"font-medium",n[38].isHighlightBolded&&!n[38].isBlackBolded),d[0]&8&&Le(e,"color",n[38].isHighlightBolded&&!n[38].isBlackBolded?Yn:""),d[0]&8&&Le(e,"background-color",n[38].isHovered?al(Jn):n[38].backgroundColor)},d(c){c&&h(e),r=!1,Ue(s)}}}function Zn(n){let e,l;return{c(){e=T("span"),l=T("br")},l(t){e=I(t,"SPAN",{});var i=S(e);l=I(i,"BR",{}),i.forEach(h)},m(t,i){E(t,e,i),w(e,l)},d(t){t&&h(e)}}}function Qn(n){let e;function l(o,r){if(o[37].isShown)return Jf;if(o[37].isEllipsis)return Gf}let t=l(n),i=t&&t(n);return{c(){i&&i.c(),e=ae()},l(o){i&&i.l(o),e=ae()},m(o,r){i&&i.m(o,r),E(o,e,r)},p(o,r){t===(t=l(o))&&i?i.p(o,r):(i&&i.d(1),i=t&&t(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){i&&i.d(o),o&&h(e)}}}function Gn(n){let e,l,t,i,o;const r=[xf,Xf],s=[];function a(f,u){return f[2]?1:0}return t=a(n),i=s[t]=r[t](n),{c(){e=T("div"),l=T("div"),i.c(),this.h()},l(f){e=I(f,"DIV",{class:!0});var u=S(e);l=I(u,"DIV",{class:!0});var c=S(l);i.l(c),c.forEach(h),u.forEach(h),this.h()},h(){z(l,"class","w-30 mt-2 rounded border border-neutral-300 text-center"),z(e,"class","flex flex-row justify-center")},m(f,u){E(f,e,u),w(e,l),s[t].m(l,null),o=!0},p(f,u){let c=t;t=a(f),t===c?s[t].p(f,u):(ne(),k(s[c],1,1,()=>{s[c]=null}),ie(),i=s[t],i?i.p(f,u):(i=s[t]=r[t](f),i.c()),b(i,1),i.m(l,null))},i(f){o||(b(i),o=!0)},o(f){k(i),o=!1},d(f){f&&h(e),s[t].d()}}}function Xf(n){let e,l;return e=new st({props:{size:"small",class:"w-full",kind:"ghost",icon:co,$$slots:{default:[$f]},$$scope:{ctx:n}}}),e.$on("click",n[34]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[1]&1024&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function xf(n){let e,l;return e=new st({props:{size:"small",class:"w-full",kind:"ghost",icon:oo,$$slots:{default:[eu]},$$scope:{ctx:n}}}),e.$on("click",n[33]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[1]&1024&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function $f(n){let e;return{c(){e=J("Hide excess")},l(l){e=X(l,"Hide excess")},m(l,t){E(l,e,t)},d(l){l&&h(e)}}}function eu(n){let e;return{c(){e=J("Show all")},l(l){e=X(l,"Show all")},m(l,t){E(l,e,t)},d(l){l&&h(e)}}}function tu(n){let e,l,t,i=n[3],o=[];for(let s=0;s{r=null}),ie())},i(s){t||(b(r),t=!0)},o(s){k(r),t=!1},d(s){s&&h(e),Xe(o,s),r&&r.d()}}}const Jn=.9,lu=500;function nu(n,e,l){let t,i,o,r,s,a,f,u,c,d,{text:_}=e,{row:m}=e,{field:g}=e,{visibleKeywordSpanFields:p}=e,{visibleSpanFields:v}=e,{visibleLabelSpanFields:y}=e;const M=$e(),C=ut();Ve(n,C,oe=>l(29,u=oe));const D=dl();Ve(n,D,oe=>l(6,d=oe));let O,B=new Set;const F=oe=>{oe.paths.forEach(ze=>B.add(ze)),l(1,B)},A=oe=>{oe.paths.forEach(ze=>B.delete(ze)),l(1,B)};let P,R={};const K=oe=>{const V={conceptName:null,conceptNamespace:null,text:P.filter(ee=>ee.paths.some(U=>((oe==null?void 0:oe.paths)||[]).some(De=>Ge(De,U)))).map(ee=>ee.text).join("")};for(const ee of Object.keys(oe.originalSpans))for(const U of O[ee]||[]){V.conceptName=U.signal.concept_name,V.conceptNamespace=U.signal.namespace;break}return V},L=Kr();Ve(n,L,oe=>l(36,f=oe));const he=(oe,ze,H,V)=>{if(!ze||!oe)throw Error("Label could not be added, no active concept.");f.mutate([oe,ze,{insert:[{text:H,label:V}]}])};let le=!1,te,$=!1,ue=Ft(wr);Ve(n,ue,oe=>l(5,c=oe));const Ee=oe=>K(oe),me=oe=>F(oe),de=oe=>A(oe),Ae=()=>l(2,le=!0),Ce=()=>l(2,le=!1);return n.$$set=oe=>{"text"in oe&&l(16,_=oe.text),"row"in oe&&l(17,m=oe.row),"field"in oe&&l(18,g=oe.field),"visibleKeywordSpanFields"in oe&&l(19,p=oe.visibleKeywordSpanFields),"visibleSpanFields"in oe&&l(0,v=oe.visibleSpanFields),"visibleLabelSpanFields"in oe&&l(20,y=oe.visibleLabelSpanFields)},n.$$.update=()=>{var oe,ze,H,V,ee,U,De,He;if(n.$$.dirty[0]&536870912&&l(25,t=u.selectRowsSchema),n.$$.dirty[0]&524288&&l(26,i=p.map(be=>Ne(be.path))),n.$$.dirty[0]&1048576&&l(24,o=y.map(be=>Ne(be.path))),n.$$.dirty[0]&536870913&&l(27,r=Object.fromEntries(v.map(be=>[Ne(be.path),hl(be).filter(Te=>Te.dtype!="string_span").filter(Te=>{var Ie;return(Ie=u.visibleFields)==null?void 0:Ie.some(Ze=>Ge(Ze.path,Te.path))})]))),n.$$.dirty[0]&134217728&&(O=Object.fromEntries(Object.entries(r).map(([be,Te])=>[be,Te.filter(Ie=>ls(Ie.signal))]).filter(([be,Te])=>Te.length>0))),n.$$.dirty[0]&131073&&l(28,s=Object.fromEntries(v.map(be=>[Ne(be.path),cr(m,be.path)]))),n.$$.dirty[0]&268500992&&l(23,a=df(_,s)),n.$$.dirty[0]&262406146){l(21,P=[]);const be=new Set;for(const Te of a){let Ie=!1;const Ze=[];for(const Fe of Te.paths)be.has(Fe)||(Ze.push(Fe),be.add(Fe));const lt=[];let ye=!1,We=-1/0;for(const[Fe,Tt]of Object.entries(Te.originalSpans)){const Lt=r[Fe],Tr=rt(Fe);if(Lt.length!==0)for(const kl of Tt)for(const at of Lt){const Ir=at.path.slice(Tr.length),el=ns(kl,Ir);if(el==null)continue;const pt=xe.value(el);if(pt==null)continue;if(at.dtype==="float32"){const nt=xe.value(el);nt!=null&&(We=Math.max(We,nt))}const Nr=Ne(xe.path(kl)),Ot=!Ze.includes(Nr);if(((oe=at.signal)==null?void 0:oe.signal_name)==="concept_score"){if(!Ot){const nt=at.signal;lt.push({name:`${nt.namespace}/${nt.concept_name}`,value:pt,spanPath:Fe,isConcept:!0})}pt>.5&&(Ie=!0)}else if(((ze=at.signal)==null?void 0:ze.signal_name)==="semantic_similarity"){if(!Ot){const nt=at.signal;lt.push({name:`similarity: ${nt.query}`,value:pt,spanPath:Fe,isSemanticSearch:!0})}pt>.5&&(Ie=!0)}else{let nt=!1;for(const It of o)if(dr(at.path,It)&&((H=t==null?void 0:t.data)==null?void 0:H.schema)!=null){const mt=Ut(t.data.schema,rt(It).slice(0,-1));if(((V=mt==null?void 0:mt.signal)==null?void 0:V.signal_name)==="concept_labels"){if(!Ot){const wl=mt==null?void 0:mt.signal;lt.push({name:`${wl.namespace}/${wl.concept_name} label`,value:pt,spanPath:Fe})}nt=!0,Ie=!0}}if(!nt){const It=!is(at.dtype);if(!Ot){const mt=Ne(at.path.slice(g.path.length));lt.push({name:mt,value:pt,spanPath:Fe,isNonNumericMetadata:It})}ye=ye||It,Ie=!0}}}}let ct=!1;if(((ee=t==null?void 0:t.data)==null?void 0:ee.schema)!=null){for(const Fe of i)if(Te.originalSpans[Fe]!=null){ct=!0;const Tt=Ut(t.data.schema,rt(Fe).slice(0,-1)),Lt=Tt==null?void 0:Tt.signal;lt.push({name:"keyword",value:Lt.query,spanPath:Fe,isKeywordSearch:!0}),Ie=!0}}const dt=o.some(Fe=>Te.originalSpans[Fe]!=null),Re=Te.paths.some(Fe=>B.has(Fe)),ht=Re&&Ze.length>0&&Array.from(B).some(Fe=>Ze.includes(Fe));P.push({backgroundColor:ol(We),isBlackBolded:ct||ye,isHighlightBolded:dt,isShownSnippet:Ie,snippetScore:We,hoverInfo:lt,paths:Te.paths,text:Te.text,snippetText:Te.text,originalSpans:Te.originalSpans,isHovered:Re,isFirstHover:ht})}}if(n.$$.dirty[0]&12582912){l(22,R={});for(const be of a)for(const Te of be.paths)l(22,R[Te]=R[Te]||[],R),R[Te].push(be)}if(n.$$.dirty[0]&2097164)if(l(3,te=[]),le)l(3,te=P.map(be=>({renderSpan:be,isShown:!0})));else{let be=0;for(const Ie of P)Ie.isShownSnippet&&(be+=Ie.text.length);const Te=P.filter(Ie=>!Ie.isShownSnippet).sort((Ie,Ze)=>Ze.snippetScore-Ie.snippetScore);for(const Ie of Te)if(Ie.isShownSnippet=!0,Te.push(Ie),be+=Ie.text.length,be>lu)break;for(const[Ie,Ze]of P.entries())if(Ze.isShownSnippet)te.push({renderSpan:Ze,isShown:!0});else{const lt=((U=P[Ie+1])==null?void 0:U.isShownSnippet)===!0,ye=((De=P[Ie-1])==null?void 0:De.isShownSnippet)===!0,We=((He=te[te.length-1])==null?void 0:He.isShown)===!0;te.push({renderSpan:Ze,isShown:!1,isEllipsis:(lt||ye)&&We,hasNewline:Ze.text.includes(` -`)}),l(4,$=!0)}}},[v,B,le,te,$,c,d,M,C,D,F,A,K,L,he,ue,_,m,g,p,y,P,R,a,o,t,i,r,s,u,Ee,me,de,Ae,Ce]}class iu extends ve{constructor(e){super(),ke(this,e,nu,tu,pe,{text:16,row:17,field:18,visibleKeywordSpanFields:19,visibleSpanFields:0,visibleLabelSpanFields:20},null,[-1,-1])}}function Xn(n,e,l){const t=n.slice();t[8]=e[l],t[11]=l;const i=t[3].length>1?`[${t[11]}]`:"";return t[9]=i,t}function xn(n){let e,l,t,i=n[0].join(".")+n[9]+"",o,r,s,a,f,u;return a=new iu({props:{text:Pe(n[8]),field:n[2],row:n[1],visibleKeywordSpanFields:n[6],visibleSpanFields:n[5],visibleLabelSpanFields:n[4]}}),{c(){e=T("div"),l=T("div"),t=T("div"),o=J(i),r=Q(),s=T("div"),q(a.$$.fragment),f=Q(),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);l=I(d,"DIV",{class:!0});var _=S(l);t=I(_,"DIV",{class:!0});var m=S(t);o=X(m,i),m.forEach(h),r=G(_),s=I(_,"DIV",{class:!0});var g=S(s);W(a.$$.fragment,g),g.forEach(h),_.forEach(h),f=G(d),d.forEach(h),this.h()},h(){z(t,"class","sticky top-0 z-10 w-full self-start border-t border-neutral-200 bg-neutral-100 px-2 py-2 pb-2 font-mono font-medium text-neutral-500"),z(s,"class","font-normal"),z(l,"class","flex w-full flex-col"),z(e,"class","flex flex-row")},m(c,d){E(c,e,d),w(e,l),w(l,t),w(t,o),w(l,r),w(l,s),j(a,s,null),w(e,f),u=!0},p(c,d){(!u||d&9)&&i!==(i=c[0].join(".")+c[9]+"")&&_e(o,i);const _={};d&8&&(_.text=Pe(c[8])),d&4&&(_.field=c[2]),d&2&&(_.row=c[1]),d&64&&(_.visibleKeywordSpanFields=c[6]),d&32&&(_.visibleSpanFields=c[5]),d&16&&(_.visibleLabelSpanFields=c[4]),a.$set(_)},i(c){u||(b(a.$$.fragment,c),u=!0)},o(c){k(a.$$.fragment,c),u=!1},d(c){c&&h(e),Y(a)}}}function ru(n){let e,l,t=n[3],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{"path"in c&&l(0,a=c.path),"row"in c&&l(1,f=c.row),"field"in c&&l(2,u=c.field)},n.$$.update=()=>{n.$$.dirty&4&&l(7,t=wt(u)),n.$$.dirty&128&&l(6,i=t.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="substring_search"}).flatMap(c=>Yt("string_span",c))),n.$$.dirty&128&&l(5,o=t.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)!=="substring_search"}).filter(c=>c.dtype==="string_span")),n.$$.dirty&128&&l(4,r=t.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="concept_labels"}).flatMap(c=>Yt("string_span",c))),n.$$.dirty&3&&l(3,s=cr(f,a).map(c=>xe.value(c)).filter(rs))},[a,f,u,s,r,o,i,t]}class au extends ve{constructor(e){super(),ke(this,e,su,ru,pe,{path:0,row:1,field:2})}}function ou(n){let e,l,t,i,o;const r=[n[3],{type:n[0]?"green":"blue"},{icon:n[2]}];let s={};for(let a=0;a{e=Z(Z({},e),ge(a)),l(3,i=ce(e,t)),"isPreview"in a&&l(0,o=a.isPreview)},[o,r,s,i]}class pl extends ve{constructor(e){super(),ke(this,e,fu,ou,pe,{isPreview:0})}}function $n(n,e,l){const t=n.slice();return t[0]=e[l],t}function ei(n){let e,l,t=[],i=new Map,o,r=n[1];const s=a=>Ne(a[0].path);for(let a=0;a{D[A]=null}),ie()),~u?(c=D[u],c?c.p(e,F):(c=D[u]=C[u](e),c.c()),b(c,1),c.m(f,null)):c=null),(!M||F&2)&&g!==(g=e[0].formattedValue+"")&&_e(p,g),(!M||F&2&&v!==(v=`${e[0].value}`))&&z(m,"title",v),(!M||F&2)&&N(m,"italic",e[0].formattedValue===null)},i(B){M||(b(c),M=!0)},o(B){k(c),M=!1},d(B){B&&h(l),~u&&D[u].d()}}}function du(n){let e,l,t=n[1].length>0&&ei(n);return{c(){t&&t.c(),e=ae()},l(i){t&&t.l(i),e=ae()},m(i,o){t&&t.m(i,o),E(i,e,o),l=!0},p(i,[o]){i[1].length>0?t?(t.p(i,o),o&2&&b(t,1)):(t=ei(i),t.c(),b(t,1),t.m(e.parentNode,e)):t&&(ne(),k(t,1,1,()=>{t=null}),ie())},i(i){l||(b(t),l=!0)},o(i){k(t),l=!1},d(i){t&&t.d(i),i&&h(e)}}}function hu(n,e,l){let t,i,o,{row:r}=e,{visibleFields:s}=e;const a=ut();Ve(n,a,c=>l(5,i=c));const f=dl();Ve(n,f,c=>l(6,o=c));function u(c){const d=ss(c).filter(m=>of(m,s)),_=d.filter(m=>{var g;return((g=xe.field(m))==null?void 0:g.dtype)==="string_span"}).map(m=>xe.path(m));return d.filter(m=>!_.some(g=>dr(xe.path(m),g))).map(m=>{var D,O;const g=xe.field(m),p=xe.path(m);let v=xe.value(m);if(g.dtype==="string_span")return null;const y=((D=o.data)==null?void 0:D.some(B=>{var F;return B.name===((F=g.signal)==null?void 0:F.signal_name)}))||!1,M=zt(g);let C;return y||M&&g.dtype==null||g.dtype==="embedding"||g.repeated_field!=null?C="":v==null?C=null:C=Pe(v),{indentLevel:p.length-1,fieldName:p[p.length-1],field:g,path:p,isSignal:M,isPreviewSignal:Xt(((O=i.selectRowsSchema)==null?void 0:O.data)||null,p),isEmbeddingSignal:y,value:v,formattedValue:C}}).filter(m=>m!=null)}return n.$$set=c=>{"row"in c&&l(0,r=c.row),"visibleFields"in c&&l(4,s=c.visibleFields)},n.$$.update=()=>{n.$$.dirty&1&&l(1,t=u(r))},[r,t,a,f,s]}class mu extends ve{constructor(e){super(),ke(this,e,hu,du,pe,{row:0,visibleFields:4})}}function li(n,e,l){const t=n.slice();return t[5]=e[l],t[7]=l,t}function ni(n){let e,l=[],t=new Map,i,o,r=n[1];const s=a=>Ne(a[5].path);for(let a=0;an[4].call(e))},m(a,f){E(a,e,f);for(let u=0;u0&&ni(n);return s=new mu({props:{row:n[0],visibleFields:n[2]}}),{c(){e=T("div"),l=T("div"),u&&u.c(),t=Q(),i=T("div"),o=T("div"),r=T("div"),q(s.$$.fragment),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);l=I(d,"DIV",{class:!0});var _=S(l);u&&u.l(_),t=G(_),i=I(_,"DIV",{class:!0});var m=S(i);o=I(m,"DIV",{class:!0});var g=S(o);r=I(g,"DIV",{style:!0,class:!0});var p=S(r);W(s.$$.fragment,p),p.forEach(h),g.forEach(h),m.forEach(h),_.forEach(h),d.forEach(h),this.h()},h(){z(r,"style",a=`max-height: ${Math.max(ri,n[3])}px`),z(r,"class","overflow-y-auto"),z(o,"class","sticky top-0 self-start"),z(i,"class","flex h-full w-1/3 bg-neutral-100"),z(l,"class","flex h-full w-full flex-row"),z(e,"class","mx-4 mb-10 rounded border-x border-b border-neutral-200 shadow-md")},m(c,d){E(c,e,d),w(e,l),u&&u.m(l,null),w(l,t),w(l,i),w(i,o),w(o,r),j(s,r,null),f=!0},p(c,[d]){c[1].length>0?u?(u.p(c,d),d&2&&b(u,1)):(u=ni(c),u.c(),b(u,1),u.m(l,t)):u&&(ne(),k(u,1,1,()=>{u=null}),ie());const _={};d&1&&(_.row=c[0]),d&4&&(_.visibleFields=c[2]),s.$set(_),(!f||d&8&&a!==(a=`max-height: ${Math.max(ri,c[3])}px`))&&z(r,"style",a)},i(c){f||(b(u),b(s.$$.fragment,c),f=!0)},o(c){k(u),k(s.$$.fragment,c),f=!1},d(c){c&&h(e),u&&u.d(),Y(s)}}}const ri=320;function gu(n,e,l){let{row:t}=e,{mediaFields:i}=e,{visibleFields:o}=e,r=0;function s(){r=this.clientHeight,l(3,r)}return n.$$set=a=>{"row"in a&&l(0,t=a.row),"mediaFields"in a&&l(1,i=a.mediaFields),"visibleFields"in a&&l(2,o=a.visibleFields)},[t,i,o,r,s]}class bu extends ve{constructor(e){super(),ke(this,e,gu,_u,pe,{row:0,mediaFields:1,visibleFields:2})}}function si(n,e,l){const t=n.slice();return t[50]=e[l],t}function ai(n,e,l){const t=n.slice();return t[53]=e[l],t}function pu(n){let e=Nt[0]+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p:x,d(t){t&&h(l)}}}function vu(n){let e=Nt[1]+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p:x,d(t){t&&h(l)}}}function ku(n){let e,l,t,i;return e=new At({props:{$$slots:{default:[pu]},$$scope:{ctx:n}}}),t=new At({props:{$$slots:{default:[vu]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),l=Q(),q(t.$$.fragment)},l(o){W(e.$$.fragment,o),l=G(o),W(t.$$.fragment,o)},m(o,r){j(e,o,r),E(o,l,r),j(t,o,r),i=!0},p(o,r){const s={};r[1]&67108864&&(s.$$scope={dirty:r,ctx:o}),e.$set(s);const a={};r[1]&67108864&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(b(e.$$.fragment,o),b(t.$$.fragment,o),i=!0)},o(o){k(e.$$.fragment,o),k(t.$$.fragment,o),i=!1},d(o){Y(e,o),o&&h(l),Y(t,o)}}}function wu(n){let e,l=n[56].text+"",t;return{c(){e=T("div"),t=J(l)},l(i){e=I(i,"DIV",{});var o=S(e);t=X(o,l),o.forEach(h)},m(i,o){E(i,e,o),w(e,t)},p(i,o){o[1]&33554432&&l!==(l=i[56].text+"")&&_e(t,l)},i:x,o:x,d(i){i&&h(e)}}}function Su(n){let e,l,t,i,o,r=n[0]!=""?":":"",s,a,f,u;return l=new Vt({props:{$$slots:{default:[Eu]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(l.$$.fragment),t=Q(),i=T("div"),o=J("New concept"),s=J(r),a=Q(),f=J(n[0]),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);W(l.$$.fragment,d),t=G(d),i=I(d,"DIV",{class:!0});var _=S(i);o=X(_,"New concept"),s=X(_,r),a=G(_),f=X(_,n[0]),_.forEach(h),d.forEach(h),this.h()},h(){z(i,"class","ml-2"),z(e,"class","new-concept flex flex-row items-center justify-items-center")},m(c,d){E(c,e,d),j(l,e,null),w(e,t),w(e,i),w(i,o),w(i,s),w(i,a),w(i,f),u=!0},p(c,d){const _={};d[1]&67108864&&(_.$$scope={dirty:d,ctx:c}),l.$set(_),(!u||d[0]&1)&&r!==(r=c[0]!=""?":":"")&&_e(s,r),(!u||d[0]&1)&&_e(f,c[0])},i(c){u||(b(l.$$.fragment,c),u=!0)},o(c){k(l.$$.fragment,c),u=!1},d(c){c&&h(e),Y(l)}}}function Eu(n){let e,l;return e=new ro({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function zu(n){let e,l,t,i;const o=[Su,wu],r=[];function s(a,f){return a[56].id==="new-concept"?0:1}return e=s(n),l=r[e]=o[e](n),{c(){l.c(),t=ae()},l(a){l.l(a),t=ae()},m(a,f){r[e].m(a,f),E(a,t,f),i=!0},p(a,f){let u=e;e=s(a),e===u?r[e].p(a,f):(ne(),k(r[u],1,1,()=>{r[u]=null}),ie(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t))},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){r[e].d(a),a&&h(t)}}}function yu(n){let e,l,t,i,o;function r(a){n[41](a)}let s={size:"xl",items:n[11],disabled:!n[7],shouldFilterItem:Nu,placeholder:"Search by concept",$$slots:{default:[zu,({item:a})=>({56:a}),({item:a})=>[0,a?33554432:0]]},$$scope:{ctx:n}};return n[0]!==void 0&&(s.value=n[0]),t=new Ss({props:s}),n[40](t),Ke.push(()=>ul(t,"value",r)),t.$on("select",n[26]),{c(){e=T("div"),l=T("div"),q(t.$$.fragment),this.h()},l(a){e=I(a,"DIV",{class:!0});var f=S(e);l=I(f,"DIV",{class:!0});var u=S(l);W(t.$$.fragment,u),u.forEach(h),f.forEach(h),this.h()},h(){z(l,"class","flex-grow"),z(e,"class","flex w-full flex-row items-start justify-items-start")},m(a,f){E(a,e,f),w(e,l),j(t,l,null),o=!0},p(a,f){const u={};f[0]&2048&&(u.items=a[11]),f[0]&128&&(u.disabled=!a[7]),f[0]&1|f[1]&100663296&&(u.$$scope={dirty:f,ctx:a}),!i&&f[0]&1&&(i=!0,u.value=a[0],cl(()=>i=!1)),t.$set(u)},i(a){o||(b(t.$$.fragment,a),o=!0)},o(a){k(t.$$.fragment,a),o=!1},d(a){a&&h(e),n[40](null),Y(t)}}}function Vu(n){let e,l,t;function i(r){n[42](r)}let o={placeholder:"Search by keywords",disabled:!n[15]};return n[10]!==void 0&&(o.value=n[10]),e=new da({props:o}),Ke.push(()=>ul(e,"value",i)),e.$on("keydown",n[43]),{c(){q(e.$$.fragment)},l(r){W(e.$$.fragment,r)},m(r,s){j(e,r,s),t=!0},p(r,s){const a={};s[0]&32768&&(a.disabled=!r[15]),!l&&s[0]&1024&&(l=!0,a.value=r[10],cl(()=>l=!1)),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){k(e.$$.fragment,r),t=!1},d(r){Y(e,r)}}}function Mu(n){let e,l,t,i,o;return l=new Dt({props:{class:"w-full",$$slots:{default:[yu]},$$scope:{ctx:n}}}),i=new Dt({props:{class:"w-full",$$slots:{default:[Vu]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(l.$$.fragment),t=Q(),q(i.$$.fragment),this.h()},l(r){e=I(r,"DIV",{class:!0});var s=S(e);W(l.$$.fragment,s),t=G(s),W(i.$$.fragment,s),s.forEach(h),this.h()},h(){z(e,"class","flex flex-row")},m(r,s){E(r,e,s),j(l,e,null),w(e,t),j(i,e,null),o=!0},p(r,s){const a={};s[0]&6273|s[1]&67108864&&(a.$$scope={dirty:s,ctx:r}),l.$set(a);const f={};s[0]&33792|s[1]&67108864&&(f.$$scope={dirty:s,ctx:r}),i.$set(f)},i(r){o||(b(l.$$.fragment,r),b(i.$$.fragment,r),o=!0)},o(r){k(l.$$.fragment,r),k(i.$$.fragment,r),o=!1},d(r){r&&h(e),Y(l),Y(i)}}}function oi(n){let e,l;return e=new vr({props:{value:Ne(n[53]),text:Ne(n[53])}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[0]&131072&&(o.value=Ne(t[53])),i[0]&131072&&(o.text=Ne(t[53])),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Cu(n){let e,l,t=n[17],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{A=null}),ie());const ue={};he[0]&32&&(ue.selectedId=L[5]),he[0]&8192&&(ue.items=L[13]),M.$set(ue);const Ee={};he[0]&2&&(Ee.icon=((me=L[1])==null?void 0:me.order)==null?vn:((de=L[1])==null?void 0:de.order)==="ASC"?Zt:Qt),he[0]&2&&(Ee.disabled=L[1]==null),he[0]&2&&(Ee.iconDescription=((Ae=L[1])==null?void 0:Ae.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."),O.$set(Ee)},i(L){B||(b(t.$$.fragment,L),b(s.$$.fragment,L),b(F),b(m.$$.fragment,L),b(A),b(M.$$.fragment,L),b(O.$$.fragment,L),B=!0)},o(L){k(t.$$.fragment,L),k(s.$$.fragment,L),k(F),k(m.$$.fragment,L),k(A),k(M.$$.fragment,L),k(O.$$.fragment,L),B=!1},d(L){L&&h(e),Y(t),Y(s),F.d(L),Y(m),A&&A.d(),Y(M),Y(O)}}}const Nu=(n,e)=>n.text.toLowerCase().includes(e.toLowerCase())||n.id==="new-concept";function Au(n,e,l){let t,i,o,r,s,a,f,u,c,d,_,m,g,p,v,y,M,C,D,O,B,F,A=$e();Ve(n,A,ye=>l(37,O=ye));let P=ut();Ve(n,P,ye=>l(36,D=ye));let R;const K=hr();Ve(n,K,ye=>l(47,C=ye));const L=dl();Ve(n,L,ye=>l(9,F=ye));const he=(ye,We)=>`${Ne(ye||"")}_${We}`;let le={};const te=Zr();Ve(n,te,ye=>l(38,B=ye));let $=[],ue,Ee="",me={};const de=()=>{if(s!=null&&o==="Keyword"){if(R=="")return;A.addSearch({path:[Ne(s)],query:{type:"keyword",search:R}}),l(10,R="")}},Ae=ye=>{l(2,u=ye.target.value),A.setSearchEmbedding(ye.target.value)},Ce=()=>{u!=null&&(l(32,le[he(s,u)]=!0,le),C.mutate([t,i,{leaf_path:rt(s||[]),signal:{signal_name:u}}]))};let oe;const ze=(ye,We)=>{s==null||u==null||(A.addSearch({path:[Ne(s)],query:{type:"concept",concept_namespace:ye,concept_name:We,embedding:u}}),oe.clear())},H=ye=>{if(!(s==null||u==null)){if(ye.detail.selectedId==="new-concept"){Ee===ue.id&&l(0,Ee="");const We=Ee.split("/",2);let ct="",dt="";We.length===2?[ct,dt]=We:[dt]=We,vt({command:kt.CreateConcept,namespace:ct,conceptName:dt,onCreate:Re=>ze(Re.detail.namespace,Re.detail.name)}),oe.clear();return}ze(ye.detail.selectedId.namespace,ye.detail.selectedId.name)}},V=ye=>{A.setSearchPath(ye.target.value)},ee=ye=>{A.setSearchTab(Nt[ye.detail])},U=ye=>{if(ye.detail.selectedId==null){A.setSortBy(null);return}A.setSortBy(rt(ye.detail.selectedId))},De=()=>{A.clearSorts()},He=()=>{p!=null&&A.setSortBy(p.path),A.setSortOrder((p==null?void 0:p.order)==="ASC"?"DESC":"ASC")},be=()=>{d?de():Ce()};function Te(ye){Ke[ye?"unshift":"push"](()=>{oe=ye,l(12,oe)})}function Ie(ye){Ee=ye,l(0,Ee)}function Ze(ye){R=ye,l(10,R)}const lt=ye=>ye.key=="Enter"?de():null;return n.$$.update=()=>{var ye,We,ct,dt;if(n.$$.dirty[1]&64&&(t=O.namespace),n.$$.dirty[1]&64&&(i=O.datasetName),n.$$.dirty[1]&64&&l(4,o=O.searchTab),n.$$.dirty[0]&16&&l(8,r=Object.values(Nt).findIndex(Re=>Re===o)),n.$$.dirty[1]&96&&l(3,s=zr(O,D)),n.$$.dirty[0]&8|n.$$.dirty[1]&64&&l(34,a=gl(O,s)),n.$$.dirty[1]&32&&l(17,f=(D.visibleFields||[]).filter(Re=>Re.dtype==="string").map(Re=>Ne(Re.path))),n.$$.dirty[0]&520|n.$$.dirty[1]&96&&l(2,u=yr(O,D,s,(F.data||[]).map(Re=>Re.name))),n.$$.dirty[0]&8|n.$$.dirty[1]&32&&l(35,c=_l(D,s)),n.$$.dirty[0]&4|n.$$.dirty[1]&16&&l(7,d=c!=null&&!!c.includes(u||"")),n.$$.dirty[0]&140|n.$$.dirty[1]&2&&l(16,_=!d&&le[he(s,u)]),n.$$.dirty[0]&264&&l(15,m=Nt[r]==="Keyword"&&s!=null),n.$$.dirty[0]&144&&l(14,g=o==="Concepts"&&d),n.$$.dirty[0]&1&&l(33,ue={id:"new-concept",text:Ee}),n.$$.dirty[1]&140&&l(11,$=B!=null&&B.data?[ue,...B.data.map(Re=>({id:{namespace:Re.namespace,name:Re.name},text:`${Re.namespace}/${Re.name}`,disabled:a.some(ht=>ht.query.type==="concept"&&ht.query.concept_namespace===Re.namespace&&ht.query.concept_name===Re.name)}))]:[]),n.$$.dirty[1]&32&&l(1,p=cf(D)),n.$$.dirty[1]&32)for(const Re of((We=(ye=D.selectRowsSchema)==null?void 0:ye.data)==null?void 0:We.search_results)||[])me[Ne(Re.result_path)]=Re;n.$$.dirty[0]&2&&l(5,v=p!=null&&p.path?Ne(p.path):null),n.$$.dirty[1]&64&&l(6,y=O.queryOptions.sort_by),n.$$.dirty[0]&96|n.$$.dirty[1]&32&&l(13,M=((dt=(ct=D.selectRowsSchema)==null?void 0:ct.data)==null?void 0:dt.schema)!=null?[{id:null,text:"None",disabled:y==null&&v!=null},...hl(D.selectRowsSchema.data.schema).map(Re=>{const ht=Ne(Re.path);return{id:ht,text:ht}})]:[])},[Ee,p,u,s,o,v,y,d,r,F,R,$,oe,M,g,m,_,f,A,P,K,L,te,de,Ae,Ce,H,V,ee,U,De,He,le,ue,a,c,D,O,B,be,Te,Ie,Ze,lt]}class Du extends ve{constructor(e){super(),ke(this,e,Au,Iu,pe,{},null,[-1,-1])}}function di(n,e,l){const t=n.slice();return t[21]=e[l],t}function Bu(n){let e,l;return{c(){e=T("div"),l=J("No results."),this.h()},l(t){e=I(t,"DIV",{class:!0});var i=S(e);l=X(i,"No results."),i.forEach(h),this.h()},h(){z(e,"class","mx-4 mt-8 w-full text-gray-600")},m(t,i){E(t,e,i),w(e,l)},p:x,i:x,o:x,d(t){t&&h(e)}}}function Pu(n){let e,l;return{c(){e=T("div"),l=J("Select fields to display"),this.h()},l(t){e=I(t,"DIV",{class:!0});var i=S(e);l=X(i,"Select fields to display"),i.forEach(h),this.h()},h(){z(e,"class","mt-12 w-full text-center text-gray-600")},m(t,i){E(t,e,i),w(e,l)},p:x,i:x,o:x,d(t){t&&h(e)}}}function Ru(n){let e,l;return e=new Mt({props:{paragraph:!0,lines:3}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Hu(n){var t,i;let e,l;return e=new _r({props:{lowContrast:!0,title:"Could not fetch schema:",subtitle:((t=n[2].error.body)==null?void 0:t.detail)||((i=n[2])==null?void 0:i.error.message)}}),{c(){q(e.$$.fragment)},l(o){W(e.$$.fragment,o)},m(o,r){j(e,o,r),l=!0},p(o,r){var a,f;const s={};r&4&&(s.subtitle=((a=o[2].error.body)==null?void 0:a.detail)||((f=o[2])==null?void 0:f.error.message)),e.$set(s)},i(o){l||(b(e.$$.fragment,o),l=!0)},o(o){k(e.$$.fragment,o),l=!1},d(o){Y(e,o)}}}function Fu(n){var t;let e,l;return e=new _r({props:{lowContrast:!0,title:"Could not fetch rows:",subtitle:((t=n[3].error.body)==null?void 0:t.detail)||n[3].error.message}}),{c(){q(e.$$.fragment)},l(i){W(e.$$.fragment,i)},m(i,o){j(e,i,o),l=!0},p(i,o){var s;const r={};o&8&&(r.subtitle=((s=i[3].error.body)==null?void 0:s.detail)||i[3].error.message),e.$set(r)},i(i){l||(b(e.$$.fragment,i),l=!0)},o(i){k(e.$$.fragment,i),l=!1},d(i){Y(e,i)}}}function hi(n){let e,l=[],t=new Map,i,o,r=n[6];const s=f=>xe.value(f[21][os]);for(let f=0;f0&&_i(n);return{c(){e=T("div");for(let f=0;f0?a?(a.p(f,u),u&64&&b(a,1)):(a=_i(f),a.c(),b(a,1),a.m(e,null)):a&&(ne(),k(a,1,1,()=>{a=null}),ie())},i(f){if(!o){for(let u=0;u0&&n[4].isSuccess&&n[5]!=null&&hi(n);return{c(){q(e.$$.fragment),l=Q(),q(t.$$.fragment),i=Q(),r&&r.c(),s=Q(),_&&_.c(),a=ae()},l(m){W(e.$$.fragment,m),l=G(m),W(t.$$.fragment,m),i=G(m),r&&r.l(m),s=G(m),_&&_.l(m),a=ae()},m(m,g){j(e,m,g),E(m,l,g),j(t,m,g),E(m,i,g),~o&&c[o].m(m,g),E(m,s,g),_&&_.m(m,g),E(m,a,g),f=!0},p(m,[g]){const p={};g&128&&(p.totalNumRows=m[7]),g&1024&&(p.manifest=m[10].data),t.$set(p);let v=o;o=d(m),o===v?~o&&c[o].p(m,g):(r&&(ne(),k(c[v],1,1,()=>{c[v]=null}),ie()),~o?(r=c[o],r?r.p(m,g):(r=c[o]=u[o](m),r.c()),b(r,1),r.m(s.parentNode,s)):r=null),m[6]&&m[1].length>0&&m[4].isSuccess&&m[5]!=null?_?(_.p(m,g),g&114&&b(_,1)):(_=hi(m),_.c(),b(_,1),_.m(a.parentNode,a)):_&&(ne(),k(_,1,1,()=>{_=null}),ie())},i(m){f||(b(e.$$.fragment,m),b(t.$$.fragment,m),b(r),b(_),f=!0)},o(m){k(e.$$.fragment,m),k(t.$$.fragment,m),k(r),k(_),f=!1},d(m){Y(e,m),m&&h(l),Y(t,m),m&&h(i),~o&&c[o].d(m),m&&h(s),_&&_.d(m),m&&h(a)}}}function Ou(n,e,l){let t,i,o,r,s,a,f,u,c,d,_,m=x,g=()=>(m(),m=et(r,K=>l(3,_=K)),r),p,v,y=x,M=()=>(y(),y=et(t,K=>l(4,v=K)),t),C;n.$$.on_destroy.push(()=>m()),n.$$.on_destroy.push(()=>y());let D=$e();Ve(n,D,K=>l(17,p=K));let O=ut();Ve(n,O,K=>l(16,d=K));const B=mr(p.namespace,p.datasetName);Ve(n,B,K=>l(10,C=K));let F=null;const A=it(F),P=()=>_==null?void 0:_.fetchNextPage();function R(K){Ke[K?"unshift":"push"](()=>{F=K,l(0,F)})}return n.$$.update=()=>{var K,L,he,le;n.$$.dirty&131072&&M(l(9,t=ml(p.namespace,p.datasetName))),n.$$.dirty&131088&&l(15,i=v.isSuccess?Qr(p):void 0),n.$$.dirty&65536&&l(2,o=d.selectRowsSchema),n.$$.dirty&163844&&g(l(8,r=as(p.namespace,p.datasetName,i||{},o!=null&&o.isSuccess?o.data.schema:void 0))),n.$$.dirty&8&&l(7,s=(K=_.data)==null?void 0:K.pages[0].total_num_rows),n.$$.dirty&8&&l(6,a=(L=_.data)==null?void 0:L.pages.flatMap(te=>te.rows)),n.$$.dirty&65536&&l(1,f=(d.visibleFields||[]).sort((te,$)=>Ne(te.path)>Ne($.path)?1:-1)),n.$$.dirty&6&&l(14,u=((he=o==null?void 0:o.data)==null?void 0:he.schema)!=null?Sr((le=o==null?void 0:o.data)==null?void 0:le.schema,f):null),n.$$.dirty&81920&&l(5,c=u!=null?ff(u,d.stats||[]):[]),n.$$.dirty&1&&A.set(F)},Jt(wr,A),[F,f,o,_,v,c,a,s,r,t,C,D,O,B,u,i,d,p,P,R]}class qu extends ve{constructor(e){super(),ke(this,e,Ou,Lu,pe,{})}}function ju(n){let e,l;return e=new st({props:{$$slots:{default:[Uu]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i&512&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Yu(n){let e,l;return{c(){e=T("span"),l=J("Invalid query"),this.h()},l(t){e=I(t,"SPAN",{class:!0});var i=S(e);l=X(i,"Invalid query"),i.forEach(h),this.h()},h(){z(e,"class","text-red-500")},m(t,i){E(t,e,i),w(e,l)},p:x,i:x,o:x,d(t){t&&h(e)}}}function Uu(n){let e;return{c(){e=J("Apply")},l(l){e=X(l,"Apply")},m(l,t){E(l,e,t)},d(l){l&&h(e)}}}function Wu(n){let e,l,t,i,o,r,s,a,f,u,c;const d=[Yu,ju],_=[];function m(g,p){return g[0]?g[3]?1:-1:0}return~(r=m(n))&&(s=_[r]=d[r](n)),{c(){e=T("pre"),l=J(""),t=J(n[2]),i=J(` -`),o=Q(),s&&s.c(),a=ae(),this.h()},l(g){e=I(g,"PRE",{class:!0,contenteditable:!0});var p=S(e);l=X(p,""),t=X(p,n[2]),i=X(p,` -`),p.forEach(h),o=G(g),s&&s.l(g),a=ae(),this.h()},h(){z(e,"class","whitespace-pre bg-gray-50 p-4 font-mono"),z(e,"contenteditable",""),n[1]===void 0&&Et(()=>n[8].call(e)),N(e,"outline-red-500",!n[0])},m(g,p){E(g,e,p),w(e,l),w(e,t),w(e,i),n[1]!==void 0&&(e.innerText=n[1]),E(g,o,p),~r&&_[r].m(g,p),E(g,a,p),f=!0,u||(c=fe(e,"input",n[8]),u=!0)},p(g,[p]){(!f||p&4)&&Fr(t,g[2]),p&2&&g[1]!==e.innerText&&(e.innerText=g[1]),(!f||p&1)&&N(e,"outline-red-500",!g[0]);let v=r;r=m(g),r===v?~r&&_[r].p(g,p):(s&&(ne(),k(_[v],1,1,()=>{_[v]=null}),ie()),~r?(s=_[r],s?s.p(g,p):(s=_[r]=d[r](g),s.c()),b(s,1),s.m(a.parentNode,a)):s=null)},i(g){f||(b(s),f=!0)},o(g){k(s),f=!1},d(g){g&&h(e),g&&h(o),~r&&_[r].d(g),g&&h(a),u=!1,c()}}}function Ku(n,e,l){let t,i,o,r,s;const a=$e();Ve(n,a,d=>l(7,s=d));let f=!0;function u(){Pt(a,s.queryOptions=JSON.parse(o),s)}function c(){o=this.innerText,l(1,o),l(2,i),l(6,t),l(7,s)}return n.$$.update=()=>{if(n.$$.dirty&128&&l(6,t=s.queryOptions),n.$$.dirty&64&&l(2,i=t?JSON.stringify(t,null,2):""),n.$$.dirty&4&&l(1,o=i),n.$$.dirty&2)try{JSON.parse(o),l(0,f=!0)}catch{l(0,f=!1)}n.$$.dirty&67&&l(3,r=f&&!Gr(JSON.parse(o),t))},[f,o,i,r,a,u,t,s,c]}class Zu extends ve{constructor(e){super(),ke(this,e,Ku,Wu,pe,{})}}function gi(n){let e,l;return e=new Va({props:{light:!0,flipped:!0,$$slots:{default:[Qu]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i&67108927&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function bi(n){let e,l;return e=new Ct({props:{text:"Sort by"}}),e.$on("click",n[16]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function pi(n){let e,l;return e=new Ct({props:{text:"Filter"}}),e.$on("click",n[17]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function vi(n){let e,l;return e=new Ct({props:{text:"Compute embedding"}}),e.$on("click",n[18]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function ki(n){let e,l;return e=new Ct({props:{text:"Preview signal"}}),e.$on("click",n[19]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function wi(n){let e,l;return e=new Ct({props:{text:"Compute signal"}}),e.$on("click",n[20]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Si(n){let e,l;return e=new Ct({props:{text:"Delete signal"}}),e.$on("click",n[21]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Qu(n){let e=Wt(n[0]),l,t=rl(n[0]),i,o,r,s,a,f,u=e&&bi(n),c=t&&pi(n),d=!n[2]&&vi(n),_=!n[2]&&ki(n),m=!n[2]&&wi(n),g=n[1]&&Si(n);return{c(){u&&u.c(),l=Q(),c&&c.c(),i=Q(),d&&d.c(),o=Q(),_&&_.c(),r=Q(),m&&m.c(),s=Q(),g&&g.c(),a=ae()},l(p){u&&u.l(p),l=G(p),c&&c.l(p),i=G(p),d&&d.l(p),o=G(p),_&&_.l(p),r=G(p),m&&m.l(p),s=G(p),g&&g.l(p),a=ae()},m(p,v){u&&u.m(p,v),E(p,l,v),c&&c.m(p,v),E(p,i,v),d&&d.m(p,v),E(p,o,v),_&&_.m(p,v),E(p,r,v),m&&m.m(p,v),E(p,s,v),g&&g.m(p,v),E(p,a,v),f=!0},p(p,v){v&1&&(e=Wt(p[0])),e?u?(u.p(p,v),v&1&&b(u,1)):(u=bi(p),u.c(),b(u,1),u.m(l.parentNode,l)):u&&(ne(),k(u,1,1,()=>{u=null}),ie()),v&1&&(t=rl(p[0])),t?c?(c.p(p,v),v&1&&b(c,1)):(c=pi(p),c.c(),b(c,1),c.m(i.parentNode,i)):c&&(ne(),k(c,1,1,()=>{c=null}),ie()),p[2]?d&&(ne(),k(d,1,1,()=>{d=null}),ie()):d?(d.p(p,v),v&4&&b(d,1)):(d=vi(p),d.c(),b(d,1),d.m(o.parentNode,o)),p[2]?_&&(ne(),k(_,1,1,()=>{_=null}),ie()):_?(_.p(p,v),v&4&&b(_,1)):(_=ki(p),_.c(),b(_,1),_.m(r.parentNode,r)),p[2]?m&&(ne(),k(m,1,1,()=>{m=null}),ie()):m?(m.p(p,v),v&4&&b(m,1)):(m=wi(p),m.c(),b(m,1),m.m(s.parentNode,s)),p[1]?g?(g.p(p,v),v&2&&b(g,1)):(g=Si(p),g.c(),b(g,1),g.m(a.parentNode,a)):g&&(ne(),k(g,1,1,()=>{g=null}),ie())},i(p){f||(b(u),b(c),b(d),b(_),b(m),b(g),f=!0)},o(p){k(u),k(c),k(d),k(_),k(m),k(g),f=!1},d(p){u&&u.d(p),p&&h(l),c&&c.d(p),p&&h(i),d&&d.d(p),p&&h(o),_&&_.d(p),p&&h(r),m&&m.d(p),p&&h(s),g&&g.d(p),p&&h(a)}}}function Gu(n){let e,l,t,i=Ne(n[0].path)+"",o,r,s,a,f;return{c(){e=T("p"),l=J("Confirm deleting "),t=T("code"),o=J(i),r=J(" ?"),s=Q(),a=T("p"),f=J("This is a permanent action and cannot be undone."),this.h()},l(u){e=I(u,"P",{class:!0});var c=S(e);l=X(c,"Confirm deleting "),t=I(c,"CODE",{});var d=S(t);o=X(d,i),d.forEach(h),r=X(c," ?"),c.forEach(h),s=G(u),a=I(u,"P",{class:!0});var _=S(a);f=X(_,"This is a permanent action and cannot be undone."),_.forEach(h),this.h()},h(){z(e,"class","!text-lg"),z(a,"class","mt-2")},m(u,c){E(u,e,c),w(e,l),w(e,t),w(t,o),w(e,r),E(u,s,c),E(u,a,c),w(a,f)},p(u,c){c&1&&i!==(i=Ne(u[0].path)+"")&&_e(o,i)},d(u){u&&h(e),u&&h(s),u&&h(a)}}}function Ju(n){let e,l,t,i,o=n[6]&&gi(n);function r(a){n[22](a)}let s={danger:!0,modalHeading:"Delete signal",primaryButtonText:"Delete",primaryButtonIcon:n[7].isLoading?Ml:void 0,secondaryButtonText:"Cancel",$$slots:{default:[Gu]},$$scope:{ctx:n}};return n[3]!==void 0&&(s.open=n[3]),l=new br({props:s}),Ke.push(()=>ul(l,"open",r)),l.$on("click:button--secondary",n[23]),l.$on("open",n[24]),l.$on("close",n[25]),l.$on("submit",n[11]),{c(){o&&o.c(),e=Q(),q(l.$$.fragment)},l(a){o&&o.l(a),e=G(a),W(l.$$.fragment,a)},m(a,f){o&&o.m(a,f),E(a,e,f),j(l,a,f),i=!0},p(a,[f]){a[6]?o?(o.p(a,f),f&64&&b(o,1)):(o=gi(a),o.c(),b(o,1),o.m(e.parentNode,e)):o&&(ne(),k(o,1,1,()=>{o=null}),ie());const u={};f&128&&(u.primaryButtonIcon=a[7].isLoading?Ml:void 0),f&67108865&&(u.$$scope={dirty:f,ctx:a}),!t&&f&8&&(t=!0,u.open=a[3],cl(()=>t=!1)),l.$set(u)},i(a){i||(b(o),b(l.$$.fragment,a),i=!0)},o(a){k(o),k(l.$$.fragment,a),i=!1},d(a){o&&o.d(a),a&&h(e),Y(l,a)}}}function Xu(n,e,l){let t,i,o,r,s,a,f,u,c,{field:d}=e,{schema:_}=e,m=!1;const g=$e();Ve(n,g,L=>l(15,c=L));const p=ut();Ve(n,p,L=>l(14,u=L));const v=fs();Ve(n,v,L=>l(7,f=L));function y(){f.mutate([t,i,{signal_path:d.path}],{onSuccess:()=>{l(3,m=!1),g.deleteSignal(d.path)}})}const M=()=>g.addSortBy(d.path),C=()=>vt({command:kt.EditFilter,namespace:t,datasetName:i,path:d.path}),D=()=>vt({command:kt.ComputeEmbedding,namespace:t,datasetName:i,path:d==null?void 0:d.path}),O=()=>vt({command:kt.PreviewConcept,namespace:t,datasetName:i,path:d==null?void 0:d.path}),B=()=>vt({command:kt.ComputeSignal,namespace:t,datasetName:i,path:d==null?void 0:d.path}),F=()=>l(3,m=!0);function A(L){m=L,l(3,m)}const P=()=>l(3,m=!1);function R(L){we.call(this,n,L)}function K(L){we.call(this,n,L)}return n.$$set=L=>{"field"in L&&l(0,d=L.field),"schema"in L&&l(12,_=L.schema)},n.$$.update=()=>{var L;n.$$.dirty&32768&&l(5,t=c.namespace),n.$$.dirty&32768&&l(4,i=c.datasetName),n.$$.dirty&4097&&l(2,o=Rt(d,_)),n.$$.dirty&1&&l(1,r=zt(d)),n.$$.dirty&16385&&l(13,s=Xt(((L=u.selectRowsSchema)==null?void 0:L.data)||null,d.path)),n.$$.dirty&8199&&l(6,a=(Wt(d)||rl(d)||!o||r)&&!s)},[d,r,o,m,i,t,a,f,g,p,v,y,_,s,u,c,M,C,D,O,B,F,A,P,R,K]}class Mr extends ve{constructor(e){super(),ke(this,e,Xu,Ju,pe,{field:0,schema:12})}}function Ei(n,e,l){const t=n.slice();t[7]=e[l][0],t[8]=e[l][1];const i=t[2](t[7]);t[9]=i;const o=`${t[8]/t[1]*100}%`;t[10]=o;const r=Pe(t[8]);return t[11]=r,t}function zi(n){let e,l,t=n[9]+"",i,o,r,s,a,f=n[11]+"",u,c,d,_,m;function g(){return n[6](n[7])}return{c(){e=T("button"),l=T("div"),i=J(t),r=Q(),s=T("div"),a=T("div"),u=J(f),d=Q(),this.h()},l(p){e=I(p,"BUTTON",{class:!0});var v=S(e);l=I(v,"DIV",{title:!0,class:!0});var y=S(l);i=X(y,t),y.forEach(h),r=G(v),s=I(v,"DIV",{class:!0});var M=S(s);a=I(M,"DIV",{title:!0,class:!0});var C=S(a);u=X(C,f),C.forEach(h),M.forEach(h),d=G(v),v.forEach(h),this.h()},h(){z(l,"title",o=n[9]),z(l,"class","w-48 flex-none truncate px-2"),z(a,"title",c=n[11]),z(a,"class","histogram-bar my-px bg-indigo-200 pl-2 text-xs leading-5"),Le(a,"width",n[10]),z(s,"class","w-36 border-l border-gray-300 pl-2"),z(e,"class","flex items-center text-left text-xs text-black hover:bg-gray-200")},m(p,v){E(p,e,v),w(e,l),w(l,i),w(e,r),w(e,s),w(s,a),w(a,u),w(e,d),_||(m=fe(e,"click",g),_=!0)},p(p,v){n=p,v&1&&t!==(t=n[9]+"")&&_e(i,t),v&1&&o!==(o=n[9])&&z(l,"title",o),v&1&&f!==(f=n[11]+"")&&_e(u,f),v&1&&c!==(c=n[11])&&z(a,"title",c),v&3&&Le(a,"width",n[10])},d(p){p&&h(e),_=!1,m()}}}function xu(n){let e,l=n[0],t=[];for(let i=0;ia("row-click",{value:u});return n.$$set=u=>{"field"in u&&l(4,i=u.field),"counts"in u&&l(0,o=u.counts),"bins"in u&&l(5,r=u.bins)},n.$$.update=()=>{n.$$.dirty&1&&l(1,t=Math.max(...o.map(([u,c])=>c)))},[o,t,s,a,i,r,f]}class ec extends ve{constructor(e){super(),ke(this,e,$u,xu,pe,{field:4,counts:0,bins:5})}}function tc(n){let e,l,t,i,o,r,s,a,f,u,c,d=Pe(n[4].total_count)+"",_,m,g,p,v,y,M,C,D,O,B,F,A=Pe(n[4].approx_count_distinct)+"",P,R,K,L,he,le;r=new Kt({props:{class:"inline"}}),y=new Kt({props:{class:"inline"}});let te=n[4].avg_text_length&&yi(n),$=n[4].min_val&&n[4].max_val&&Vi(n);return{c(){e=T("table"),l=T("tbody"),t=T("tr"),i=T("td"),o=T("span"),q(r.$$.fragment),s=Q(),a=T("span"),f=J("Total count"),u=Q(),c=T("td"),_=J(d),m=Q(),g=T("tr"),p=T("td"),v=T("span"),q(y.$$.fragment),M=Q(),C=T("span"),D=J("Unique values"),O=Q(),B=T("td"),F=J("~"),P=J(A),R=Q(),te&&te.c(),K=Q(),$&&$.c(),this.h()},l(ue){e=I(ue,"TABLE",{class:!0});var Ee=S(e);l=I(Ee,"TBODY",{});var me=S(l);t=I(me,"TR",{});var de=S(t);i=I(de,"TD",{class:!0});var Ae=S(i);o=I(Ae,"SPAN",{});var Ce=S(o);W(r.$$.fragment,Ce),Ce.forEach(h),s=G(Ae),a=I(Ae,"SPAN",{});var oe=S(a);f=X(oe,"Total count"),oe.forEach(h),Ae.forEach(h),u=G(de),c=I(de,"TD",{class:!0});var ze=S(c);_=X(ze,d),ze.forEach(h),de.forEach(h),m=G(me),g=I(me,"TR",{});var H=S(g);p=I(H,"TD",{class:!0});var V=S(p);v=I(V,"SPAN",{});var ee=S(v);W(y.$$.fragment,ee),ee.forEach(h),M=G(V),C=I(V,"SPAN",{});var U=S(C);D=X(U,"Unique values"),U.forEach(h),V.forEach(h),O=G(H),B=I(H,"TD",{class:!0});var De=S(B);F=X(De,"~"),P=X(De,A),De.forEach(h),H.forEach(h),R=G(me),te&&te.l(me),K=G(me),$&&$.l(me),me.forEach(h),Ee.forEach(h),this.h()},h(){z(i,"class","svelte-1tctrjz"),z(c,"class","svelte-1tctrjz"),z(p,"class","svelte-1tctrjz"),z(B,"class","svelte-1tctrjz"),z(e,"class","stats-table w-full svelte-1tctrjz")},m(ue,Ee){E(ue,e,Ee),w(e,l),w(l,t),w(t,i),w(i,o),j(r,o,null),w(i,s),w(i,a),w(a,f),w(t,u),w(t,c),w(c,_),w(l,m),w(l,g),w(g,p),w(p,v),j(y,v,null),w(p,M),w(p,C),w(C,D),w(g,O),w(g,B),w(B,F),w(B,P),w(l,R),te&&te.m(l,null),w(l,K),$&&$.m(l,null),L=!0,he||(le=[Je(tt.call(null,o,{text:"Total number of rows where the value is defined."})),Je(tt.call(null,v,{text:"An approximation of the total number of unique values."}))],he=!0)},p(ue,Ee){(!L||Ee&16)&&d!==(d=Pe(ue[4].total_count)+"")&&_e(_,d),(!L||Ee&16)&&A!==(A=Pe(ue[4].approx_count_distinct)+"")&&_e(P,A),ue[4].avg_text_length?te?(te.p(ue,Ee),Ee&16&&b(te,1)):(te=yi(ue),te.c(),b(te,1),te.m(l,K)):te&&(ne(),k(te,1,1,()=>{te=null}),ie()),ue[4].min_val&&ue[4].max_val?$?($.p(ue,Ee),Ee&16&&b($,1)):($=Vi(ue),$.c(),b($,1),$.m(l,null)):$&&(ne(),k($,1,1,()=>{$=null}),ie())},i(ue){L||(b(r.$$.fragment,ue),b(y.$$.fragment,ue),b(te),b($),L=!0)},o(ue){k(r.$$.fragment,ue),k(y.$$.fragment,ue),k(te),k($),L=!1},d(ue){ue&&h(e),Y(r),Y(y),te&&te.d(),$&&$.d(),he=!1,Ue(le)}}}function lc(n){let e,l;return e=new Mt({props:{paragraph:!0,width:"50%"}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function nc(n){let e,l,t=n[2].error.message+"",i;return{c(){e=T("p"),l=J("Error: "),i=J(t)},l(o){e=I(o,"P",{});var r=S(e);l=X(r,"Error: "),i=X(r,t),r.forEach(h)},m(o,r){E(o,e,r),w(e,l),w(e,i)},p(o,r){r&4&&t!==(t=o[2].error.message+"")&&_e(i,t)},i:x,o:x,d(o){o&&h(e)}}}function yi(n){let e,l,t,i,o,r,s,a,f,u=Pe(n[4].avg_text_length)+"",c,d,_,m;return i=new Kt({props:{class:"inline"}}),{c(){e=T("tr"),l=T("td"),t=T("span"),q(i.$$.fragment),o=Q(),r=T("span"),s=J("Average text length"),a=Q(),f=T("td"),c=J(u),this.h()},l(g){e=I(g,"TR",{});var p=S(e);l=I(p,"TD",{class:!0});var v=S(l);t=I(v,"SPAN",{});var y=S(t);W(i.$$.fragment,y),y.forEach(h),o=G(v),r=I(v,"SPAN",{});var M=S(r);s=X(M,"Average text length"),M.forEach(h),v.forEach(h),a=G(p),f=I(p,"TD",{class:!0});var C=S(f);c=X(C,u),C.forEach(h),p.forEach(h),this.h()},h(){z(l,"class","svelte-1tctrjz"),z(f,"class","svelte-1tctrjz")},m(g,p){E(g,e,p),w(e,l),w(l,t),j(i,t,null),w(l,o),w(l,r),w(r,s),w(e,a),w(e,f),w(f,c),d=!0,_||(m=Je(tt.call(null,t,{text:"The average length of the text in characters."})),_=!0)},p(g,p){(!d||p&16)&&u!==(u=Pe(g[4].avg_text_length)+"")&&_e(c,u)},i(g){d||(b(i.$$.fragment,g),d=!0)},o(g){k(i.$$.fragment,g),d=!1},d(g){g&&h(e),Y(i),_=!1,m()}}}function Vi(n){let e,l,t,i,o,r,s,a,f,u=Pe(n[4].min_val)+"",c,d,_=Pe(n[4].max_val)+"",m,g,p,v;return i=new Kt({props:{class:"inline"}}),{c(){e=T("tr"),l=T("td"),t=T("span"),q(i.$$.fragment),o=Q(),r=T("span"),s=J("Range"),a=Q(),f=T("td"),c=J(u),d=J(" .. "),m=J(_),this.h()},l(y){e=I(y,"TR",{});var M=S(e);l=I(M,"TD",{class:!0});var C=S(l);t=I(C,"SPAN",{});var D=S(t);W(i.$$.fragment,D),D.forEach(h),o=G(C),r=I(C,"SPAN",{});var O=S(r);s=X(O,"Range"),O.forEach(h),C.forEach(h),a=G(M),f=I(M,"TD",{class:!0});var B=S(f);c=X(B,u),d=X(B," .. "),m=X(B,_),B.forEach(h),M.forEach(h),this.h()},h(){z(l,"class","svelte-1tctrjz"),z(f,"class","svelte-1tctrjz")},m(y,M){E(y,e,M),w(e,l),w(l,t),j(i,t,null),w(l,o),w(l,r),w(r,s),w(e,a),w(e,f),w(f,c),w(f,d),w(f,m),g=!0,p||(v=Je(tt.call(null,t,{text:"The minimum and maximum value across the dataset"})),p=!0)},p(y,M){(!g||M&16)&&u!==(u=Pe(y[4].min_val)+"")&&_e(c,u),(!g||M&16)&&_!==(_=Pe(y[4].max_val)+"")&&_e(m,_)},i(y){g||(b(i.$$.fragment,y),g=!0)},o(y){k(i.$$.fragment,y),g=!1},d(y){y&&h(e),Y(i),p=!1,v()}}}function ic(n){let e,l,t;return l=new ec({props:{counts:n[5],bins:n[3],field:n[0]}}),l.$on("row-click",n[11]),{c(){e=T("div"),q(l.$$.fragment),this.h()},l(i){e=I(i,"DIV",{class:!0});var o=S(e);W(l.$$.fragment,o),o.forEach(h),this.h()},h(){z(e,"class","mt-4")},m(i,o){E(i,e,o),j(l,e,null),t=!0},p(i,o){const r={};o&32&&(r.counts=i[5]),o&8&&(r.bins=i[3]),o&1&&(r.field=i[0]),l.$set(r)},i(i){t||(b(l.$$.fragment,i),t=!0)},o(i){k(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function rc(n){let e,l;return e=new Mt({props:{paragraph:!0,width:"50%"}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p:x,i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function sc(n){let e,l,t=n[1].error.message+"",i;return{c(){e=T("p"),l=J("Error: "),i=J(t)},l(o){e=I(o,"P",{});var r=S(e);l=X(r,"Error: "),i=X(r,t),r.forEach(h)},m(o,r){E(o,e,r),w(e,l),w(e,i)},p(o,r){r&2&&t!==(t=o[1].error.message+"")&&_e(i,t)},i:x,o:x,d(o){o&&h(e)}}}function ac(n){let e,l,t,i,o,r,s;const a=[nc,lc,tc],f=[];function u(m,g){return m[2].error?0:m[4]==null?1:2}l=u(n),t=f[l]=a[l](n);const c=[sc,rc,ic],d=[];function _(m,g){return m[1].error?0:m[5]==null?1:m[5].length>0?2:-1}return~(o=_(n))&&(r=d[o]=c[o](n)),{c(){e=T("div"),t.c(),i=Q(),r&&r.c(),this.h()},l(m){e=I(m,"DIV",{class:!0});var g=S(e);t.l(g),i=G(g),r&&r.l(g),g.forEach(h),this.h()},h(){z(e,"class","p-4")},m(m,g){E(m,e,g),f[l].m(e,null),w(e,i),~o&&d[o].m(e,null),s=!0},p(m,[g]){let p=l;l=u(m),l===p?f[l].p(m,g):(ne(),k(f[p],1,1,()=>{f[p]=null}),ie(),t=f[l],t?t.p(m,g):(t=f[l]=a[l](m),t.c()),b(t,1),t.m(e,i));let v=o;o=_(m),o===v?~o&&d[o].p(m,g):(r&&(ne(),k(d[v],1,1,()=>{d[v]=null}),ie()),~o?(r=d[o],r?r.p(m,g):(r=d[o]=c[o](m),r.c()),b(r,1),r.m(e,null)):r=null)},i(m){s||(b(t),b(r),s=!0)},o(m){k(t),k(r),s=!1},d(m){m&&h(e),f[l].d(),~o&&d[o].d()}}}function oc(n,e,l){let t,i,o,r,s,a=x,f=()=>(a(),a=et(i,M=>l(1,s=M)),i),u,c=x,d=()=>(c(),c=et(t,M=>l(2,u=M)),t),_;n.$$.on_destroy.push(()=>a()),n.$$.on_destroy.push(()=>c());let{field:m}=e;const g=$e();Ve(n,g,M=>l(10,_=M));let p=null;function v(M){if(M==null)return;if(p!=null){const[D,O]=p[M.toString()];if(D!=null){const B={path:m.path,op:"greater_equal",value:D};g.addFilter(B)}if(O!=null){const B={path:m.path,op:"less",value:O};g.addFilter(B)}return}const C={path:m.path,op:"equals",value:M};g.addFilter(C)}const y=M=>v(M.detail.value);return n.$$set=M=>{"field"in M&&l(0,m=M.field)},n.$$.update=()=>{var M;if(n.$$.dirty&1025&&d(l(7,t=us(_.namespace,_.datasetName,{leaf_path:m.path}))),n.$$.dirty&1025&&f(l(6,i=cs(_.namespace,_.datasetName,{leaf_path:m.path,filters:_.queryOptions.filters}))),n.$$.dirty&2&&l(5,o=s.data!=null?s.data.counts:null),n.$$.dirty&4&&l(4,r=u.data!=null?u.data:null),n.$$.dirty&2)if(((M=s.data)==null?void 0:M.bins)!=null){l(3,p={});for(const[C,D,O]of Object.values(s.data.bins))l(3,p[C]=[D,O],p)}else l(3,p=null)},[m,s,u,p,r,o,i,t,g,v,_,y]}class fc extends ve{constructor(e){super(),ke(this,e,oc,ac,pe,{field:0})}}const{Boolean:Gt}=Lr;function Mi(n,e,l){const t=n.slice();return t[39]=e[l],t}function Ci(n,e,l){const t=n.slice();return t[42]=e[l],t}function Ti(n,e,l){const t=n.slice();return t[45]=e[l],t}function Ii(n,e,l){const t=n.slice();return t[48]=e[l],t}function uc(n){let e,l="{}",t;return{c(){e=T("span"),t=J(l),this.h()},l(i){e=I(i,"SPAN",{class:!0});var o=S(e);t=X(o,l),o.forEach(h),this.h()},h(){z(e,"class","font-mono")},m(i,o){E(i,e,o),w(e,t)},p:x,i:x,o:x,d(i){i&&h(e)}}}function cc(n){let e,l,t,i;var o=n[23][n[1].repeated_field.dtype];function r(s){return{props:{title:s[1].dtype}}}return o&&(l=Qe(o,r(n))),{c(){e=T("div"),l&&q(l.$$.fragment),t=J("[]"),this.h()},l(s){e=I(s,"DIV",{class:!0});var a=S(e);l&&W(l.$$.fragment,a),t=X(a,"[]"),a.forEach(h),this.h()},h(){z(e,"class","flex")},m(s,a){E(s,e,a),l&&j(l,e,null),w(e,t),i=!0},p(s,a){const f={};if(a[0]&2&&(f.title=s[1].dtype),a[0]&2&&o!==(o=s[23][s[1].repeated_field.dtype])){if(l){ne();const u=l;k(u.$$.fragment,1,0,()=>{Y(u,1)}),ie()}o?(l=Qe(o,r(s)),q(l.$$.fragment),b(l.$$.fragment,1),j(l,e,t)):l=null}else o&&l.$set(f)},i(s){i||(l&&b(l.$$.fragment,s),i=!0)},o(s){l&&k(l.$$.fragment,s),i=!1},d(s){s&&h(e),l&&Y(l)}}}function dc(n){let e,l,t;var i=n[23][n[1].dtype];function o(r){return{props:{title:r[1].dtype}}}return i&&(e=Qe(i,o(n))),{c(){e&&q(e.$$.fragment),l=ae()},l(r){e&&W(e.$$.fragment,r),l=ae()},m(r,s){e&&j(e,r,s),E(r,l,s),t=!0},p(r,s){const a={};if(s[0]&2&&(a.title=r[1].dtype),s[0]&2&&i!==(i=r[23][r[1].dtype])){if(e){ne();const f=e;k(f.$$.fragment,1,0,()=>{Y(f,1)}),ie()}i?(e=Qe(i,o(r)),q(e.$$.fragment),b(e.$$.fragment,1),j(e,l.parentNode,l)):e=null}else i&&e.$set(a)},i(r){t||(e&&b(e.$$.fragment,r),t=!0)},o(r){e&&k(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function Ni(n){let e,l;return e=new xt({props:{interactive:!0,type:"green",$$slots:{default:[_c]},$$scope:{ctx:n}}}),e.$on("click",n[33]),e.$on("remove",n[34]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[0]&16384|i[1]&1048576&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function hc(n){let e,l;return e=new Qt({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function mc(n){let e,l;return e=new Zt({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function _c(n){let e,l,t,i,o,r,s,a;const f=[mc,hc],u=[];function c(d,_){return d[14]=="ASC"?0:1}return r=c(n),s=u[r]=f[r](n),{c(){e=T("div"),l=T("div"),t=J("Sorted"),i=Q(),o=T("span"),s.c(),this.h()},l(d){e=I(d,"DIV",{class:!0});var _=S(e);l=I(_,"DIV",{class:!0});var m=S(l);t=X(m,"Sorted"),m.forEach(h),i=G(_),o=I(_,"SPAN",{});var g=S(o);s.l(g),g.forEach(h),_.forEach(h),this.h()},h(){z(l,"class","mr-1"),z(e,"class","flex flex-row")},m(d,_){E(d,e,_),w(e,l),w(l,t),w(e,i),w(e,o),u[r].m(o,null),a=!0},p(d,_){let m=r;r=c(d),r!==m&&(ne(),k(u[m],1,1,()=>{u[m]=null}),ie(),s=u[r],s||(s=u[r]=f[r](d),s.c()),b(s,1),s.m(o,null))},i(d){a||(b(s),a=!0)},o(d){k(s),a=!1},d(d){d&&h(e),u[r].d()}}}function Ai(n){let e,l,t=n[7],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i&&(t||(t=gt(e,yt,{},!0)),t.run(1))}),i=!0)},o(o){k(l.$$.fragment,o),o&&(t||(t=gt(e,yt,{},!1)),t.run(0)),i=!1},d(o){o&&h(e),Y(l),o&&t&&t.end()}}}function Li(n){let e,l,t=n[18],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rk(ue[V],1,1,()=>{ue[V]=null});let me=n[16],de=[];for(let V=0;Vk(de[V],1,1,()=>{de[V]=null});let Ce=n[4]&&n[21]&&Ri(n),oe=n[10]&&Hi(n);C=new Mr({props:{field:n[1],schema:n[0]}});let ze=n[20]&&Fi(n),H=n[18].length&&Li(n);return{c(){e=T("div"),l=T("div"),t=T("div"),q(i.$$.fragment),o=Q(),r=T("div"),a.c(),u=Q(),c=T("button"),d=J(n[19]),_=Q(),le&&le.c(),m=Q(),te&&te.c(),g=Q();for(let V=0;V{L[De]=null}),ie(),a=L[s],a?a.p(V,ee):(a=L[s]=K[s](V),a.c()),b(a,1),a.m(r,null)),f&&Bt(f.update)&&ee[0]&2048&&f.update.call(null,{text:V[11]}),(!A||ee[0]&32)&&N(r,"bg-blue-200",V[5]),(!A||ee[0]&524288)&&_e(d,V[19]),(!A||ee[0]&1024)&&N(c,"cursor-default",!V[10]),V[15]?le?(le.p(V,ee),ee[0]&32768&&b(le,1)):(le=Ni(V),le.c(),b(le,1),le.m(l,m)):le&&(ne(),k(le,1,1,()=>{le=null}),ie()),V[13]?te?(te.p(V,ee),ee[0]&8192&&b(te,1)):(te=Ai(V),te.c(),b(te,1),te.m(l,g)):te&&(ne(),k(te,1,1,()=>{te=null}),ie()),ee[0]&4096){$=V[12];let be;for(be=0;be<$.length;be+=1){const Te=Ti(V,$,be);ue[be]?(ue[be].p(Te,ee),b(ue[be],1)):(ue[be]=Bi(Te),ue[be].c(),b(ue[be],1),ue[be].m(l,p))}for(ne(),be=$.length;be{Ce=null}),ie()),V[10]?oe?(oe.p(V,ee),ee[0]&1024&&b(oe,1)):(oe=Hi(V),oe.c(),b(oe,1),oe.m(l,M)):oe&&(ne(),k(oe,1,1,()=>{oe=null}),ie());const He={};ee[0]&2&&(He.field=V[1]),ee[0]&1&&(He.schema=V[0]),C.$set(He),(!A||ee[0]&32)&&N(l,"bg-blue-50",V[5]),(!A||ee[0]&16)&&N(l,"bg-emerald-100",V[4]),(!A||ee[0]&32)&&N(l,"hover:bg-blue-100",V[5]),V[20]?ze?(ze.p(V,ee),ee[0]&1048576&&b(ze,1)):(ze=Fi(V),ze.c(),b(ze,1),ze.m(e,O)):ze&&(ne(),k(ze,1,1,()=>{ze=null}),ie()),V[18].length?H?(H.p(V,ee),ee[0]&262144&&b(H,1)):(H=Li(V),H.c(),b(H,1),H.m(B,null)):H&&(ne(),k(H,1,1,()=>{H=null}),ie()),(!A||ee[0]&32)&&N(e,"border-b",!V[5])},i(V){if(!A){b(i.$$.fragment,V),b(a),b(le),b(te);for(let ee=0;ee<$.length;ee+=1)b(ue[ee]);for(let ee=0;ee{A&&(F||(F=gt(B,yt,{},!0)),F.run(1))}),A=!0}},o(V){k(i.$$.fragment,V),k(a),k(le),k(te),ue=ue.filter(Gt);for(let ee=0;eel(22,A=H));const te=$e();Ve(n,te,H=>l(9,B=H));const $=ut();Ve(n,$,H=>l(30,F=H));function ue(H){return H!=null&&H.repeated_field?ue(H.repeated_field):H!=null&&H.fields?[...Object.values(H.fields).filter(V=>V.path.at(-1)!==ot)].flatMap(V=>{const ee=ue(V);return ee.some(U=>zt(U))?ee:[V]}).filter(V=>{var ee,U,De,He;return!(V.dtype==="embedding"||V.signal!=null&&wt(V).some(be=>be.dtype==="embedding")||((ee=V.signal)==null?void 0:ee.signal_name)==="sentences"||((U=V.signal)==null?void 0:U.signal_name)==="substring_search"||((De=V.signal)==null?void 0:De.signal_name)==="semantic_similarity"||((He=V.signal)==null?void 0:He.signal_name)==="concept_labels")}):[]}const Ee=()=>{c?te.removeSelectedColumn(r):te.addSelectedColumn(r)},me=()=>{O&&(s?te.removeExpandedColumn(r):te.addExpandedColumn(r))},de=()=>m==="ASC"?Pt(te,B.queryOptions.sort_order="DESC",B):Pt(te,B.queryOptions.sort_order="ASC",B),Ae=()=>te.removeSortBy(r),Ce=()=>R.signal&&v&&K&&A.mutate([B.namespace,B.datasetName,{leaf_path:K.path,signal:R.signal}]),oe=()=>{var H;return R.signal&&v&&vt({command:kt.EditPreviewConcept,namespace:B.namespace,datasetName:B.datasetName,path:K==null?void 0:K.path,signalName:(H=R.signal)==null?void 0:H.signal_name,value:R.signal})},ze=()=>{s?te.removeExpandedColumn(r):te.addExpandedColumn(r)};return n.$$set=H=>{"schema"in H&&l(0,P=H.schema),"field"in H&&l(1,R=H.field),"sourceField"in H&&l(2,K=H.sourceField),"indent"in H&&l(3,L=H.indent)},n.$$.update=()=>{var H,V,ee,U;n.$$.dirty[0]&3&&l(5,t=Rt(R,P)),n.$$.dirty[0]&2&&l(21,i=zt(R)),n.$$.dirty[0]&32&&l(8,o=!t),n.$$.dirty[0]&2&&l(6,r=R.path),n.$$.dirty[0]&576&&l(20,s=B.expandedColumns[Ne(r)]||!1),n.$$.dirty[0]&64&&l(29,a=r.at(-1)===gr),n.$$.dirty[0]&536870976&&l(19,f=a?r.at(-2):r.at(-1)),n.$$.dirty[0]&2&&l(18,u=ue(R)),n.$$.dirty[0]&1073741888&&l(17,c=(H=F.visibleFields)==null?void 0:H.some(De=>Ge(De.path,r))),n.$$.dirty[0]&258&&l(16,d=o?wt(R).filter(De=>De.signal!=null&&wt(De).some(He=>He.dtype==="embedding")):[]),n.$$.dirty[0]&576&&l(15,_=(V=B.queryOptions.sort_by)==null?void 0:V.some(De=>Ge(De,r))),n.$$.dirty[0]&512&&l(14,m=B.queryOptions.sort_order),n.$$.dirty[0]&576&&l(7,g=((ee=B.queryOptions.filters)==null?void 0:ee.filter(De=>Ge(De.path,r)))||[]),n.$$.dirty[0]&128&&l(13,p=g.length>0),n.$$.dirty[0]&1073741888&&l(4,v=Xt(((U=F.selectRowsSchema)==null?void 0:U.data)||null,r)),n.$$.dirty[0]&576&&l(12,y=gl(B,r)),n.$$.dirty[0]&32&&l(27,M=t?". This field was generated by a signal":""),n.$$.dirty[0]&2&&l(28,C=R.dtype??(R.repeated_field&&R.repeated_field.dtype?`${R.repeated_field.dtype}[]`:"object")),n.$$.dirty[0]&402653184&&l(11,D=`Data type: ${C}${M}`),n.$$.dirty[0]&18&&l(10,O=Wt(R)&&!v)},[P,R,K,L,v,t,r,g,o,B,O,D,y,p,m,_,d,c,u,f,s,i,A,he,le,te,$,M,C,a,F,Ee,me,de,Ae,Ce,oe,ze]}class Cr extends ve{constructor(e){super(),ke(this,e,bc,gc,pe,{schema:0,field:1,sourceField:2,indent:3},null,[-1,-1])}}function qi(n,e,l){const t=n.slice();return t[28]=e[l],t}function ji(n,e,l){const t=n.slice();return t[31]=e[l],t}function pc(n){var A;let e,l,t,i,o,r,s,a,f,u,c,d,_,m,g,p,v,y;t=new fr({props:{labelText:"Show",hideLabel:!0,checked:n[14],disabled:n[10]}}),t.$on("change",n[23]);let M=n[15]&&Yi(n),C=n[13]&&Ui(n),D=n[11]&&Wi(n),O=n[17]&&Zi(n),B=((A=n[1])==null?void 0:A.dtype)&&Qi(n);g=new Mr({props:{field:n[1],schema:n[0]}});let F=n[8]&&Gi(n);return{c(){e=T("div"),l=T("div"),q(t.$$.fragment),i=Q(),o=T("div"),M&&M.c(),r=Q(),s=T("div"),a=J(n[16]),f=Q(),C&&C.c(),u=Q(),D&&D.c(),c=Q(),O&&O.c(),d=Q(),B&&B.c(),_=Q(),m=T("div"),q(g.$$.fragment),p=Q(),F&&F.c(),v=ae(),this.h()},l(P){e=I(P,"DIV",{class:!0});var R=S(e);l=I(R,"DIV",{class:!0});var K=S(l);W(t.$$.fragment,K),K.forEach(h),i=G(R),o=I(R,"DIV",{class:!0});var L=S(o);M&&M.l(L),L.forEach(h),r=G(R),s=I(R,"DIV",{class:!0,title:!0});var he=S(s);a=X(he,n[16]),he.forEach(h),f=G(R),C&&C.l(R),u=G(R),D&&D.l(R),c=G(R),O&&O.l(R),d=G(R),B&&B.l(R),_=G(R),m=I(R,"DIV",{});var le=S(m);W(g.$$.fragment,le),le.forEach(h),R.forEach(h),p=G(P),F&&F.l(P),v=ae(),this.h()},h(){z(l,"class","w-6"),z(o,"class","w-6"),Le(o,"margin-left",n[2]*24+"px"),z(s,"class","grow truncate whitespace-nowrap pr-2 text-gray-900"),z(s,"title",n[16]),z(e,"class","flex w-full flex-row items-center border-b border-gray-200 px-4 py-2 hover:bg-gray-100"),N(e,"bg-blue-50",n[18]),N(e,"hover:bg-blue-100",n[18])},m(P,R){E(P,e,R),w(e,l),j(t,l,null),w(e,i),w(e,o),M&&M.m(o,null),w(e,r),w(e,s),w(s,a),w(e,f),C&&C.m(e,null),w(e,u),D&&D.m(e,null),w(e,c),O&&O.m(e,null),w(e,d),B&&B.m(e,null),w(e,_),w(e,m),j(g,m,null),E(P,p,R),F&&F.m(P,R),E(P,v,R),y=!0},p(P,R){var he;const K={};R[0]&16384&&(K.checked=P[14]),R[0]&1024&&(K.disabled=P[10]),t.$set(K),P[15]?M?(M.p(P,R),R[0]&32768&&b(M,1)):(M=Yi(P),M.c(),b(M,1),M.m(o,null)):M&&(ne(),k(M,1,1,()=>{M=null}),ie()),R[0]&4&&Le(o,"margin-left",P[2]*24+"px"),(!y||R[0]&65536)&&_e(a,P[16]),(!y||R[0]&65536)&&z(s,"title",P[16]),P[13]?C?(C.p(P,R),R[0]&8192&&b(C,1)):(C=Ui(P),C.c(),b(C,1),C.m(e,u)):C&&(ne(),k(C,1,1,()=>{C=null}),ie()),P[11]?D?(D.p(P,R),R[0]&2048&&b(D,1)):(D=Wi(P),D.c(),b(D,1),D.m(e,c)):D&&(ne(),k(D,1,1,()=>{D=null}),ie()),P[17]?O?(O.p(P,R),R[0]&131072&&b(O,1)):(O=Zi(P),O.c(),b(O,1),O.m(e,d)):O&&(ne(),k(O,1,1,()=>{O=null}),ie()),(he=P[1])!=null&&he.dtype?B?B.p(P,R):(B=Qi(P),B.c(),B.m(e,_)):B&&(B.d(1),B=null);const L={};R[0]&2&&(L.field=P[1]),R[0]&1&&(L.schema=P[0]),g.$set(L),(!y||R[0]&262144)&&N(e,"bg-blue-50",P[18]),(!y||R[0]&262144)&&N(e,"hover:bg-blue-100",P[18]),P[8]?F?(F.p(P,R),R[0]&256&&b(F,1)):(F=Gi(P),F.c(),b(F,1),F.m(v.parentNode,v)):F&&(ne(),k(F,1,1,()=>{F=null}),ie())},i(P){y||(b(t.$$.fragment,P),b(M),b(C),b(D),b(O),b(g.$$.fragment,P),b(F),y=!0)},o(P){k(t.$$.fragment,P),k(M),k(C),k(D),k(O),k(g.$$.fragment,P),k(F),y=!1},d(P){P&&h(e),Y(t),M&&M.d(),C&&C.d(),D&&D.d(),O&&O.d(),B&&B.d(),Y(g),P&&h(p),F&&F.d(P),P&&h(v)}}}function vc(n){let e,l;return e=new vl({props:{field:n[1].repeated_field,indent:n[2],schema:n[0]}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[0]&2&&(o.field=t[1].repeated_field),i[0]&4&&(o.indent=t[2]),i[0]&1&&(o.schema=t[0]),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Yi(n){let e,l,t,i,o;return l=new ko({props:{class:"w-3"}}),{c(){e=T("button"),q(l.$$.fragment),this.h()},l(r){e=I(r,"BUTTON",{class:!0});var s=S(e);W(l.$$.fragment,s),s.forEach(h),this.h()},h(){z(e,"class","p-2 transition hover:opacity-60"),N(e,"rotate-180",!n[8])},m(r,s){E(r,e,s),j(l,e,null),t=!0,i||(o=fe(e,"click",n[24]),i=!0)},p(r,s){(!t||s[0]&256)&&N(e,"rotate-180",!r[8])},i(r){t||(b(l.$$.fragment,r),t=!0)},o(r){k(l.$$.fragment,r),t=!1},d(r){r&&h(e),Y(l),i=!1,o()}}}function Ui(n){let e,l;return e=new xt({props:{interactive:!0,type:"green",$$slots:{default:[Sc]},$$scope:{ctx:n}}}),e.$on("click",n[25]),e.$on("remove",n[26]),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i[0]&4096|i[1]&8&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function kc(n){let e,l;return e=new Qt({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function wc(n){let e,l;return e=new Zt({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Sc(n){let e,l,t,i,o;const r=[wc,kc],s=[];function a(f,u){return f[12]=="ASC"?0:1}return l=a(n),t=s[l]=r[l](n),{c(){e=J(`Sorted - `),t.c(),i=ae()},l(f){e=X(f,`Sorted - `),t.l(f),i=ae()},m(f,u){E(f,e,u),s[l].m(f,u),E(f,i,u),o=!0},p(f,u){let c=l;l=a(f),l!==c&&(ne(),k(s[c],1,1,()=>{s[c]=null}),ie(),t=s[l],t||(t=s[l]=r[l](f),t.c()),b(t,1),t.m(i.parentNode,i))},i(f){o||(b(t),o=!0)},o(f){k(t),o=!1},d(f){f&&h(e),s[l].d(f),f&&h(i)}}}function Wi(n){let e,l,t=n[4],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i=null}),ie())},i(o){t||(b(i),o&&Et(()=>{t&&(l||(l=gt(e,yt,{},!0)),l.run(1))}),t=!0)},o(o){k(i),o&&(l||(l=gt(e,yt,{},!1)),l.run(0)),t=!1},d(o){o&&h(e),i&&i.d(),o&&l&&l.end()}}}function Ji(n){let e,l,t=n[5],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{r[u]=null}),ie(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t))},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){r[e].d(a),a&&h(t)}}}function zc(n,e,l){let t,i,o,r,s,a,f,u,c,d,_,m,g,p,v,y,M,{schema:C}=e,{field:D}=e,{indent:O=0}=e;const B=$e();Ve(n,B,le=>l(7,M=le));const F=ut();Ve(n,F,le=>l(22,y=le));let A=!0;function P(le){return le!=null&&le.fields?Object.values(le.fields).filter(te=>te.path.at(-1)!==ot):[]}const R=()=>{c?B.removeSelectedColumn(t):B.addSelectedColumn(t)},K=()=>l(8,A=!A),L=()=>_==="ASC"?Pt(B,M.queryOptions.sort_order="DESC",M):Pt(B,M.queryOptions.sort_order="ASC",M),he=()=>B.removeSortBy(t);return n.$$set=le=>{"schema"in le&&l(0,C=le.schema),"field"in le&&l(1,D=le.field),"indent"in le&&l(2,O=le.indent)},n.$$.update=()=>{var le,te,$,ue;n.$$.dirty[0]&2&&l(3,t=D.path),n.$$.dirty[0]&3&&l(21,i=Ut(C,D.path.slice(0,-1))),n.$$.dirty[0]&3&&l(18,o=Rt(D,C)),n.$$.dirty[0]&2&&l(6,s=D.path.at(-1)===gr),n.$$.dirty[0]&2097218&&l(17,r=s&&i?zt(i):zt(D)),n.$$.dirty[0]&66&&l(16,a=s?D.path.at(-2):D.path.at(-1)),n.$$.dirty[0]&2&&l(5,f=P(D)),n.$$.dirty[0]&32&&l(15,u=f.length>0),n.$$.dirty[0]&4194312&&l(14,c=(le=y.visibleFields)==null?void 0:le.some(Ee=>Ge(Ee.path,t))),n.$$.dirty[0]&136&&l(13,d=(te=M.queryOptions.sort_by)==null?void 0:te.some(Ee=>Ge(Ee,t))),n.$$.dirty[0]&128&&l(12,_=M.queryOptions.sort_order),n.$$.dirty[0]&136&&l(4,m=(($=M.queryOptions.filters)==null?void 0:$.filter(Ee=>Ge(Ee.path,t)))||[]),n.$$.dirty[0]&16&&l(11,g=m.length>0),n.$$.dirty[0]&2&&l(10,p=!D.dtype||D.dtype==="embedding"),n.$$.dirty[0]&4194312&&l(9,v=Xt(((ue=y.selectRowsSchema)==null?void 0:ue.data)||null,t))},[C,D,O,t,m,f,s,M,A,v,p,g,_,d,c,u,a,r,o,B,F,i,y,R,K,L,he]}class vl extends ve{constructor(e){super(),ke(this,e,zc,Ec,pe,{schema:0,field:1,indent:2},null,[-1,-1])}}function xi(n,e,l){const t=n.slice();return t[10]=e[l],t}function $i(n,e,l){const t=n.slice();return t[10]=e[l],t}function yc(n){let e;return{c(){e=J("datasets")},l(l){e=X(l,"datasets")},m(l,t){E(l,e,t)},d(l){l&&h(e)}}}function Vc(n){let e=n[1].namespace+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i&2&&e!==(e=t[1].namespace+"")&&_e(l,e)},d(t){t&&h(l)}}}function Mc(n){let e=n[1].datasetName+"",l;return{c(){l=J(e)},l(t){l=X(t,e)},m(t,i){E(t,l,i)},p(t,i){i&2&&e!==(e=t[1].datasetName+"")&&_e(l,e)},d(t){t&&h(l)}}}function Cc(n){let e,l,t,i,o,r;return e=new tl({props:{href:"/",$$slots:{default:[yc]},$$scope:{ctx:n}}}),t=new tl({props:{href:"/",$$slots:{default:[Vc]},$$scope:{ctx:n}}}),o=new tl({props:{$$slots:{default:[Mc]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),l=Q(),q(t.$$.fragment),i=Q(),q(o.$$.fragment)},l(s){W(e.$$.fragment,s),l=G(s),W(t.$$.fragment,s),i=G(s),W(o.$$.fragment,s)},m(s,a){j(e,s,a),E(s,l,a),j(t,s,a),E(s,i,a),j(o,s,a),r=!0},p(s,a){const f={};a&32768&&(f.$$scope={dirty:a,ctx:s}),e.$set(f);const u={};a&32770&&(u.$$scope={dirty:a,ctx:s}),t.$set(u);const c={};a&32770&&(c.$$scope={dirty:a,ctx:s}),o.$set(c)},i(s){r||(b(e.$$.fragment,s),b(t.$$.fragment,s),b(o.$$.fragment,s),r=!0)},o(s){k(e.$$.fragment,s),k(t.$$.fragment,s),k(o.$$.fragment,s),r=!1},d(s){Y(e,s),s&&h(l),Y(t,s),s&&h(i),Y(o,s)}}}function er(n){let e,l=Pe(n[3].data.dataset_manifest.num_items)+"",t,i;return{c(){e=J("("),t=J(l),i=J(" rows)")},l(o){e=X(o,"("),t=X(o,l),i=X(o," rows)")},m(o,r){E(o,e,r),E(o,t,r),E(o,i,r)},p(o,r){r&8&&l!==(l=Pe(o[3].data.dataset_manifest.num_items)+"")&&_e(t,l)},d(o){o&&h(e),o&&h(t),o&&h(i)}}}function Tc(n){let e,l,t,i,o,r;return e=new At({props:{label:"Schema",class:"w-1/3"}}),t=new At({props:{label:"Tree View",class:"w-1/3"}}),o=new At({props:{label:"Raw Query",class:"w-1/3"}}),{c(){q(e.$$.fragment),l=Q(),q(t.$$.fragment),i=Q(),q(o.$$.fragment)},l(s){W(e.$$.fragment,s),l=G(s),W(t.$$.fragment,s),i=G(s),W(o.$$.fragment,s)},m(s,a){j(e,s,a),E(s,l,a),j(t,s,a),E(s,i,a),j(o,s,a),r=!0},p:x,i(s){r||(b(e.$$.fragment,s),b(t.$$.fragment,s),b(o.$$.fragment,s),r=!0)},o(s){k(e.$$.fragment,s),k(t.$$.fragment,s),k(o.$$.fragment,s),r=!1},d(s){Y(e,s),s&&h(l),Y(t,s),s&&h(i),Y(o,s)}}}function Ic(n){let e=[],l=new Map,t,i,o=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),ie()),~e?(l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t)):l=null)},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){~e&&r[e].d(a),a&&h(t)}}}function Dc(n){let e=[],l=new Map,t,i,o=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),ie()),~e?(l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),b(l,1),l.m(t.parentNode,t)):l=null)},i(a){i||(b(l),i=!0)},o(a){k(l),i=!1},d(a){~e&&r[e].d(a),a&&h(t)}}}function Rc(n){let e,l;return e=new Zu({}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Hc(n){let e,l,t,i,o,r,s;return l=new Dt({props:{$$slots:{default:[Ac]},$$scope:{ctx:n}}}),i=new Dt({props:{$$slots:{default:[Pc]},$$scope:{ctx:n}}}),r=new Dt({props:{$$slots:{default:[Rc]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(l.$$.fragment),t=Q(),q(i.$$.fragment),o=Q(),q(r.$$.fragment),this.h()},l(a){e=I(a,"DIV",{class:!0,slot:!0});var f=S(e);W(l.$$.fragment,f),t=G(f),W(i.$$.fragment,f),o=G(f),W(r.$$.fragment,f),f.forEach(h),this.h()},h(){z(e,"class","h-full overflow-y-auto"),z(e,"slot","content")},m(a,f){E(a,e,f),j(l,e,null),w(e,t),j(i,e,null),w(e,o),j(r,e,null),s=!0},p(a,f){const u={};f&32769&&(u.$$scope={dirty:f,ctx:a}),l.$set(u);const c={};f&32769&&(c.$$scope={dirty:f,ctx:a}),i.$set(c);const d={};f&32768&&(d.$$scope={dirty:f,ctx:a}),r.$set(d)},i(a){s||(b(l.$$.fragment,a),b(i.$$.fragment,a),b(r.$$.fragment,a),s=!0)},o(a){k(l.$$.fragment,a),k(i.$$.fragment,a),k(r.$$.fragment,a),s=!1},d(a){a&&h(e),Y(l),Y(i),Y(r)}}}function Fc(n){let e,l,t,i,o,r,s,a,f,u,c,d,_;i=new As({props:{noTrailingSlash:!0,skeleton:n[2].isLoading,$$slots:{default:[Cc]},$$scope:{ctx:n}}});let m=n[3].isSuccess&&er(n);return a=new st({props:{size:"field",kind:"ghost",icon:Uo,iconDescription:"Reset View"}}),a.$on("click",n[4].reset),u=new st({props:{size:"field",kind:"ghost",icon:Do,iconDescription:"Download selection"}}),u.$on("click",n[8]),d=new kr({props:{class:"overflow-hidden border-b border-gray-200",$$slots:{content:[Hc],default:[Tc]},$$scope:{ctx:n}}}),{c(){e=T("div"),l=T("div"),t=T("div"),q(i.$$.fragment),o=Q(),m&&m.c(),r=Q(),s=T("div"),q(a.$$.fragment),f=Q(),q(u.$$.fragment),c=Q(),q(d.$$.fragment),this.h()},l(g){e=I(g,"DIV",{class:!0});var p=S(e);l=I(p,"DIV",{class:!0});var v=S(l);t=I(v,"DIV",{class:!0});var y=S(t);W(i.$$.fragment,y),o=G(y),m&&m.l(y),y.forEach(h),r=G(v),s=I(v,"DIV",{class:!0});var M=S(s);W(a.$$.fragment,M),f=G(M),W(u.$$.fragment,M),M.forEach(h),v.forEach(h),c=G(p),W(d.$$.fragment,p),p.forEach(h),this.h()},h(){z(t,"class","flex items-center"),z(s,"class","flex"),z(l,"class","mb-2 flex w-full items-center justify-between gap-x-2 px-4"),z(e,"class","flex h-full flex-col pt-4")},m(g,p){E(g,e,p),w(e,l),w(l,t),j(i,t,null),w(t,o),m&&m.m(t,null),w(l,r),w(l,s),j(a,s,null),w(s,f),j(u,s,null),w(e,c),j(d,e,null),_=!0},p(g,[p]){const v={};p&4&&(v.skeleton=g[2].isLoading),p&32770&&(v.$$scope={dirty:p,ctx:g}),i.$set(v),g[3].isSuccess?m?m.p(g,p):(m=er(g),m.c(),m.m(t,null)):m&&(m.d(1),m=null);const y={};p&32769&&(y.$$scope={dirty:p,ctx:g}),d.$set(y)},i(g){_||(b(i.$$.fragment,g),b(a.$$.fragment,g),b(u.$$.fragment,g),b(d.$$.fragment,g),_=!0)},o(g){k(i.$$.fragment,g),k(a.$$.fragment,g),k(u.$$.fragment,g),k(d.$$.fragment,g),_=!1},d(g){g&&h(e),Y(i),m&&m.d(),Y(a),Y(u),Y(d)}}}function Lc(n,e,l){let t,i,o,r,s;const a=$e();Ve(n,a,_=>l(1,o=_));const f=ut();Ve(n,f,_=>l(9,i=_));const u=ml(o.namespace,o.datasetName);Ve(n,u,_=>l(2,r=_));const c=mr(o.namespace,o.datasetName);Ve(n,c,_=>l(3,s=_));async function d(){var y;const _=o.namespace,m=o.datasetName,g=o.queryOptions;g.columns=(y=i.visibleFields)==null?void 0:y.map(M=>M.path);const p=`/api/v1/datasets/${_}/${m}/select_rows_download?url_safe_options=${encodeURIComponent(JSON.stringify(g))}`,v=document.createElement("a");v.download=`${_}_${m}.json`,v.href=p,document.body.appendChild(v),v.click(),v.remove()}return n.$$.update=()=>{n.$$.dirty&512&&l(0,t=i.selectRowsSchema)},[t,o,r,s,a,f,u,c,d,i]}class Oc extends ve{constructor(e){super(),ke(this,e,Lc,Fc,pe,{})}}function qc(n){let e,l,t,i,o,r,s,a,f;return t=new Oc({}),r=new qu({}),a=new Jr({}),{c(){e=T("div"),l=T("div"),q(t.$$.fragment),i=Q(),o=T("div"),q(r.$$.fragment),s=Q(),q(a.$$.fragment),this.h()},l(u){e=I(u,"DIV",{class:!0});var c=S(e);l=I(c,"DIV",{class:!0});var d=S(l);W(t.$$.fragment,d),d.forEach(h),i=G(c),o=I(c,"DIV",{class:!0});var _=S(o);W(r.$$.fragment,_),_.forEach(h),c.forEach(h),s=G(u),W(a.$$.fragment,u),this.h()},h(){z(l,"class","h-full w-1/3 border-r border-gray-200"),z(o,"class","h-full w-2/3"),z(e,"class","flex h-full w-full")},m(u,c){E(u,e,c),w(e,l),j(t,l,null),w(e,i),w(e,o),j(r,o,null),E(u,s,c),j(a,u,c),f=!0},p:x,i(u){f||(b(t.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),f=!0)},o(u){k(t.$$.fragment,u),k(r.$$.fragment,u),k(a.$$.fragment,u),f=!1},d(u){u&&h(e),Y(t),Y(r),u&&h(s),Y(a,u)}}}function jc(n,e,l){let t,i,o,r,s,a,f=x,u=()=>(f(),f=et(s,F=>l(8,a=F)),s),c,d=x,_=()=>(d(),d=et(t,F=>l(9,c=F)),t),m,g=x,p=()=>(g(),g=et(i,F=>l(10,m=F)),i),v,y=x,M=()=>(y(),y=et(r,F=>l(11,v=F)),r);n.$$.on_destroy.push(()=>f()),n.$$.on_destroy.push(()=>d()),n.$$.on_destroy.push(()=>g()),n.$$.on_destroy.push(()=>y());let{namespace:C}=e,{datasetName:D}=e;const O=Xr(C,D);xr(O);let B=null;return n.$$set=F=>{"namespace"in F&&l(4,C=F.namespace),"datasetName"in F&&l(5,D=F.datasetName)},n.$$.update=()=>{var F;if(n.$$.dirty&48&&_(l(0,t=$r(C,D))),n.$$.dirty&1&&es(t),n.$$.dirty&512&&p(l(3,i=ml(c.namespace,c.datasetName))),n.$$.dirty&1024&&l(7,o=Yt("string",m.data)),n.$$.dirty&640&&M(l(2,r=ds(o.map(A=>[c.namespace,c.datasetName,{leaf_path:A.path}])))),n.$$.dirty&512&&u(l(1,s=hs(c.namespace,c.datasetName,ts(c)))),n.$$.dirty&3200&&m.data!=null&&v.length>0&&!v.some(A=>A==null||A.isLoading)&&l(6,B=v.map((A,P)=>({path:o[P].path,stats:A})).sort((A,P)=>{var R,K;return A==null||P==null?0:(((R=P.stats.data)==null?void 0:R.avg_text_length)||0)-(((K=A.stats.data)==null?void 0:K.avg_text_length)||0)})),n.$$.dirty&1024&&m.data!=null&&O.setSchema(m.data),n.$$.dirty&256&&a!=null&&O.setSelectRowsSchema(a),n.$$.dirty&64&&B!=null&&O.setStats(B),n.$$.dirty&768){const A=sf(c.selectedColumns,((F=a==null?void 0:a.data)==null?void 0:F.schema)||null);O.setVisibleFields(A)}},[t,s,r,i,C,D,B,o,a,c,m,v]}class Yc extends ve{constructor(e){super(),ke(this,e,jc,qc,pe,{namespace:4,datasetName:5})}}function nr(n){let e,l;return e=new Yc({props:{namespace:n[0],datasetName:n[1]}}),{c(){q(e.$$.fragment)},l(t){W(e.$$.fragment,t)},m(t,i){j(e,t,i),l=!0},p(t,i){const o={};i&1&&(o.namespace=t[0]),i&2&&(o.datasetName=t[1]),e.$set(o)},i(t){l||(b(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Uc(n){let e,l,t=n[0]&&n[1]&&nr(n);return{c(){t&&t.c(),e=ae()},l(i){t&&t.l(i),e=ae()},m(i,o){t&&t.m(i,o),E(i,e,o),l=!0},p(i,[o]){i[0]&&i[1]?t?(t.p(i,o),o&3&&b(t,1)):(t=nr(i),t.c(),b(t,1),t.m(e.parentNode,e)):t&&(ne(),k(t,1,1,()=>{t=null}),ie())},i(i){l||(b(t),l=!0)},o(i){k(t),l=!1},d(i){t&&t.d(i),i&&h(e)}}}function Wc(n,e,l){let t;Ve(n,Or,r=>l(2,t=r));let i,o;return n.$$.update=()=>{n.$$.dirty&4&&t.onHashChange("/(?.+)/(?.+)",r=>{l(0,i=r.namespace),l(1,o=r.datasetName)})},[i,o,t]}class rd extends ve{constructor(e){super(),ke(this,e,Wc,Uc,pe,{})}}export{rd as component};