import{p as Y,e as ke,i as f,b as P,k as ze,u as Se,r as we,g as Ae}from"./i18n-Dnhn5Rxr.js";import{R as _e,a1 as le,G as w,w as e,a2 as Be,a6 as te,S as d,a as o,T as ve,a3 as Z,U as C,z as l,x as R,V as A,Y as h,X as x,t as U,a0 as I,W as i,Z as J,a8 as $e,ad as oe}from"./index-DWyDLubb.js";import{G as Ge}from"./utils.svelte-CCyS_0CY.js";import{B as Ve}from"./Block-J4oodUWp.js";import"./ScrollFade.svelte_svelte_type_style_lang-DPHOQHBm.js";import{S as Ee}from"./index-CglBvmLb.js";import"./StreamingBar.svelte_svelte_type_style_lang-Y9omZ2gK.js";import"./clone-BkeCM4Nl.js";import"./snippet-BWgYNF9D.js";import"./Clear-BF6j078A.js";import"./html-Ih_5QVTo.js";import"./index-B_pwUImq.js";var Ie=i('<span class="_jsonSep svelte-zxj9ye">,</span>'),Je=i("<span> </span><!>",1),Ke=i('<span class="_jsonSep svelte-zxj9ye">,</span>'),Oe=i('<span role="button" tabindex="0"> </span><!>',1),Te=i('<span class="_jsonKey svelte-zxj9ye"> </span><span class="_jsonSep svelte-zxj9ye">:</span>',1),qe=i('<span class="_jsonSep svelte-zxj9ye">,</span>'),Le=i("<span> </span><!>",1),Ne=i("<li><!> <!></li>"),Pe=i('<span class="_jsonSep svelte-zxj9ye">,</span>'),Re=i('<span role="button" tabindex="0"> </span> <ul class="_jsonList svelte-zxj9ye"></ul> <span role="button" tabindex="0"> </span><!>',1);function ie(D,g){_e(g,!1);let r=Y(g,"json",12),t=Y(g,"depth",12,1/0),B=Y(g,"_cur",12,0),b=Y(g,"_last",12,!0),c=Z([]),v=Z(!1),n=Z(["",""]),k=Z(!1);function $(a){return a===null?"null":typeof a}function G(a){return JSON.stringify(a)}function ue(a){switch($(a)){case"function":return"f () {...}";case"symbol":return a.toString();default:return G(a)}}function W(){R(k,!e(k))}function F(a){a instanceof KeyboardEvent&&["Enter"," "].includes(a.key)&&W()}le(()=>(w(r()),e(v)),()=>{R(c,$(r())==="object"?Object.keys(r()):[]),R(v,Array.isArray(r())),R(n,e(v)?["[","]"]:["{","}"])}),le(()=>(w(t()),w(B())),()=>{R(k,t()<B())}),Be();var ce={get json(){return r()},set json(a){r(a),C()},get depth(){return t()},set depth(a){t(a),C()},get _cur(){return B()},set _cur(a){B(a),C()},get _last(){return b()},set _last(a){b(a),C()}};ke();var se=te(),pe=d(se);{var fe=a=>{var K=Je(),V=d(K);let X;var H=A(V);h(V);var m=x(V);{var z=s=>{var S=Ie();o(s,S)};f(m,s=>{b()||s(z)})}U(()=>{X=P(V,1,"_jsonBkt empty svelte-zxj9ye",null,X,{isArray:e(v)}),I(H,`${e(n),l(()=>e(n)[0])??""}${e(n),l(()=>e(n)[1])??""}`)}),o(a,K)},de=a=>{var K=te(),V=d(K);{var X=m=>{var z=Oe(),s=d(z);let S;var M=A(s);h(s);var O=x(s);{var y=E=>{var Q=Ke();o(E,Q)};f(O,E=>{!b()&&e(k)&&E(y)})}U(()=>{S=P(s,1,"_jsonBkt svelte-zxj9ye",null,S,{isArray:e(v)}),I(M,`${e(n),l(()=>e(n)[0])??""}...${e(n),l(()=>e(n)[1])??""}`)}),J("click",s,W),J("keydown",s,F),o(m,z)},H=m=>{var z=Re(),s=d(z);let S;var M=A(s,!0);h(s);var O=x(s,2);ze(O,5,()=>e(c),Se,(T,_,re)=>{var ee=Ne(),ne=A(ee);{var ye=u=>{var j=Te(),p=d(j),q=A(p,!0);h(p),$e(),U(L=>I(q,L),[()=>(e(_),l(()=>G(e(_))))]),o(u,j)};f(ne,u=>{e(v)||u(ye)})}var je=x(ne,2);{var he=u=>{var j=te(),p=d(j);{let q=oe(()=>B()+1),L=oe(()=>(e(c),l(()=>re===e(c).length-1)));ie(p,{get json(){return w(r()),e(_),l(()=>r()[e(_)])},get depth(){return t()},get _cur(){return e(q)},get _last(){return e(L)}})}o(u,j)},xe=u=>{var j=Le(),p=d(j),q=A(p,!0);h(p);var L=x(p);{var be=N=>{var ae=qe();o(N,ae)};f(L,N=>{e(c),l(()=>re<e(c).length-1)&&N(be)})}U((N,ae)=>{P(p,1,`_jsonVal ${N??""}`,"svelte-zxj9ye"),I(q,ae)},[()=>(w(r()),e(_),l(()=>$(r()[e(_)]))),()=>(w(r()),e(_),l(()=>ue(r()[e(_)])))]),o(u,j)};f(je,u=>{w(r()),e(_),l(()=>$(r()[e(_)])==="object")?u(he):u(xe,!1)})}h(ee),o(T,ee)}),h(O);var y=x(O,2);let E;var Q=A(y,!0);h(y);var ge=x(y);{var me=T=>{var _=Pe();o(T,_)};f(ge,T=>{b()||T(me)})}U(()=>{S=P(s,1,"_jsonBkt svelte-zxj9ye",null,S,{isArray:e(v)}),I(M,(e(n),l(()=>e(n)[0]))),E=P(y,1,"_jsonBkt svelte-zxj9ye",null,E,{isArray:e(v)}),I(Q,(e(n),l(()=>e(n)[1])))}),J("click",s,W),J("keydown",s,F),J("click",y,W),J("keydown",y,F),o(m,z)};f(V,m=>{e(k)?m(X):m(H,!1)},!0)}o(a,K)};f(pe,a=>{e(c),l(()=>!e(c).length)?a(fe):a(de,!1)})}return o(D,se),ve(ce)}var Ue=i("<!> <!>",1);function ta(D,g){_e(g,!0);const r=we(g,["$$slots","$$events","$$legacy"]),t=new Ge(r);Ve(D,{get visible(){return t.shared.visible},get elem_id(){return t.shared.elem_id},get elem_classes(){return t.shared.elem_classes},container:!0,get scale(){return t.shared.scale},get min_width(){return t.shared.min_width},children:(b,c)=>{var v=Ue(),n=d(v);{var k=G=>{Ee(G,Ae({get autoscroll(){return t.shared.autoscroll},get i18n(){return t.i18n}},()=>t.shared.loading_status,{on_clear_status:()=>t.dispatch("clear_status",t.shared.loading_status)}))};f(n,G=>{t.shared.loading_status&&G(k)})}var $=x(n,2);ie($,{get json(){return t.props.value}}),o(b,v)},$$slots:{default:!0}}),ve()}export{ta as default};
