import './async-D55cHugf.js';
import { g as attr_style, f as attr_class, i as stringify, a as attr, e as ensure_array_like } from './index-u8mz_F03.js';
import { e } from './Check-C7_ZsXgh.js';
import { h } from './Copy-B8YOhH7c.js';
import { w as w$1 } from './IconButton-BRnu7KaR.js';
import { p } from './Empty-DGRbZO0a.js';
import './2-EyCg4N-O.js';
import { y } from './IconButtonWrapper-CjFRPb3y.js';
import { e as escape_html } from './escaping-CBnpiEl5.js';

function J(c){c.push('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--mdi" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M5 3h2v2H5v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 0 0-2-2H0v-2h1a2 2 0 0 0 2-2V5a2 2 0 0 1 2-2m14 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3h2m-7 12a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m8 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1Z"></path></svg>');}function w(c,b){c.component(s=>{let{value:t,depth:n=0,is_root:g=false,is_last_item:f=true,key:y=null,open:_=false,theme_mode:m="system",show_indices:h=false,interactive:v=true}=b,o=_?false:n>=3,u=[];function i(l){return l!==null&&(typeof l=="object"||Array.isArray(l))}function d(l){return Array.isArray(l)?`Array(${l.length})`:typeof l=="object"&&l!==null?`Object(${Object.keys(l).length})`:String(l)}if(s.push(`<div${attr_class("json-node svelte-1olemhd",void 0,{root:g,"dark-mode":m==="dark"})}${attr_style(`--depth: ${stringify(n)};`)}><div${attr_class("line svelte-1olemhd",void 0,{collapsed:o})}><span class="line-number svelte-1olemhd"></span> <span class="content svelte-1olemhd">`),i(t)?(s.push("<!--[-->"),s.push(`<button${attr("data-pseudo-content",v?o?"▶":"▼":"")}${attr("aria-label",o?"Expand":"Collapse")} class="toggle svelte-1olemhd"${attr("disabled",!v,true)}></button>`)):s.push("<!--[!-->"),s.push("<!--]--> "),y!==null?(s.push("<!--[-->"),s.push(`<span class="key svelte-1olemhd">"${escape_html(y)}"</span><span class="punctuation colon svelte-1olemhd">:</span>`)):s.push("<!--[!-->"),s.push("<!--]--> "),i(t)?(s.push("<!--[-->"),s.push(`<span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"[":"{")}</span> `),o?(s.push("<!--[-->"),s.push(`<button class="preview svelte-1olemhd">${escape_html(d(t))}</button> <span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"]":"}")}</span>`)):s.push("<!--[!-->"),s.push("<!--]-->")):(s.push("<!--[!-->"),typeof t=="string"?(s.push("<!--[-->"),s.push(`<span class="value string svelte-1olemhd">"${escape_html(t)}"</span>`)):(s.push("<!--[!-->"),typeof t=="number"?(s.push("<!--[-->"),s.push(`<span class="value number svelte-1olemhd">${escape_html(t)}</span>`)):(s.push("<!--[!-->"),typeof t=="boolean"?(s.push("<!--[-->"),s.push(`<span class="value bool svelte-1olemhd">${escape_html(t.toString())}</span>`)):(s.push("<!--[!-->"),t===null?(s.push("<!--[-->"),s.push('<span class="value null svelte-1olemhd">null</span>')):(s.push("<!--[!-->"),s.push(`<span>${escape_html(t)}</span>`)),s.push("<!--]-->")),s.push("<!--]-->")),s.push("<!--]-->")),s.push("<!--]-->")),s.push("<!--]--> "),!f&&(!i(t)||o)?(s.push("<!--[-->"),s.push('<span class="punctuation svelte-1olemhd">,</span>')):s.push("<!--[!-->"),s.push("<!--]--></span></div> "),i(t)){s.push("<!--[-->"),s.push(`<div${attr_class("children svelte-1olemhd",void 0,{hidden:o})}><!--[-->`);const l=ensure_array_like(u);for(let e=0,p=l.length;e<p;e++){let[k,A]=l[e];w(s,{value:A,depth:n+1,is_last_item:e===u.length-1,key:Array.isArray(t)&&!h?null:k,open:_,theme_mode:m,show_indices:h,interactive:v});}s.push(`<!--]--> <div class="line svelte-1olemhd"><span class="line-number svelte-1olemhd"></span> <span class="content svelte-1olemhd"><span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"]":"}")}</span> `),f?s.push("<!--[!-->"):(s.push("<!--[-->"),s.push('<span class="punctuation svelte-1olemhd">,</span>')),s.push("<!--]--></span></div></div>");}else s.push("<!--[!-->");s.push("<!--]--></div>");});}function K(c,b){c.component(s=>{let{value:t={},open:n=false,theme_mode:g="system",show_indices:f=false,label_height:y$1,interactive:_=true,show_copy_button:m=true,buttons:h$1=null,on_custom_button_click:v=null}=b,o=`calc(100% - ${y$1}px)`,u=false,i;function d(){u=true,i&&clearTimeout(i),i=setTimeout(()=>{u=false;},1e3);}async function l(){"clipboard"in navigator&&(await navigator.clipboard.writeText(JSON.stringify(t,null,2)),d());}function e$1(p){return p&&Object.keys(p).length===0&&Object.getPrototypeOf(p)===Object.prototype&&JSON.stringify(p)===JSON.stringify({})}t&&t!=='""'&&!e$1(t)?(s.push("<!--[-->"),m||h$1&&h$1.some(p=>typeof p!="string")?(s.push("<!--[-->"),y(s,{buttons:h$1,on_custom_button_click:v,children:p=>{m?(p.push("<!--[-->"),w$1(p,{show_label:false,label:u?"Copied":"Copy",Icon:u?e:h,onclick:()=>l()})):p.push("<!--[!-->"),p.push("<!--]-->");}})):s.push("<!--[!-->"),s.push(`<!--]--> <div class="json-holder svelte-1lc38wd"${attr_style("",{"max-height":o})}>`),w(s,{value:t,depth:0,is_root:true,open:n,theme_mode:g,show_indices:f,interactive:_}),s.push("<!----></div>")):(s.push("<!--[!-->"),s.push('<div class="empty-wrapper svelte-1lc38wd">'),p(s,{children:p=>{J(p);},$$slots:{default:true}}),s.push("<!----></div>")),s.push("<!--]-->");});}

export { J, K };
//# sourceMappingURL=JSON-CQBEuuEX.js.map
