import{p as x,c as p,a as i,f as A}from"./props-b4vEeO_8.js";import{C as l,I as W,F as D,k as R,N as B,J as Q}from"./runtime-C3rQLW--.js";import{i as v,s as X}from"./svelte-component-C8Ginrj8.js";import{s as k}from"./snippet-C5kbqVpq.js";import{B as M}from"./Block-D3Ui8rd-.js";import{P as V}from"./PaddingReset-_TGvg1_B.js";import{M as L}from"./Markdown-DUxFwijc.js";var Y=A('
');function N(S,t){let b=x(t,"hidden",3,!1);var _=p(),P=l(_);{var y=s=>{var c=Y(),g=W(c);k(g,()=>t.children),i(s,c)},a=s=>{var c=p(),g=l(c);k(g,()=>t.children),i(s,c)};v(P,s=>{b()?s(y):s(a,!1)})}i(S,_)}N.__docgen={data:[{name:"hidden",visibility:"public",description:"Whether to wrap the graphic with an aria hidden tag.",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"false"},{name:"children",visibility:"public",description:"Content to put inside `AriaHidden`",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1}],name:"AriaHidden.svelte"};function C(S,t){var b=p(),_=l(b);{var P=a=>{M(a,{get width(){return t.width},class:"notes fmy-0",children:(s,c)=>{var g=p(),F=l(g);k(F,()=>t.children),i(s,g)},$$slots:{default:!0}})},y=a=>{var s=p(),c=l(s);k(c,()=>t.children),i(a,s)};v(_,a=>{t.width?a(P):a(y,!1)})}i(S,b)}C.__docgen={data:[{name:"width",visibility:"public",description:"Width of the component within the text well.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"narrower",text:'"narrower"'},{kind:"const",type:"string",value:"narrow",text:'"narrow"'},{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'},{kind:"const",type:"string",value:"fluid",text:'"fluid"'}],text:'"narrower" | "narrow" | "normal" | "wide" | "wider" | "widest" | "fluid"'},static:!1,readonly:!1},{name:"children",visibility:"public",description:"Content to put inside `TextBlock`",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1}],name:"TextBlock.svelte"};var Z=A("
",1),$=A(''),tt=A(""),et=A(" ",1),it=A('');function nt(S,t){let b=x(t,"id",3,""),_=x(t,"class",3,""),P=x(t,"snap",3,!1),y=x(t,"width",3,"normal"),a=x(t,"textWidth",3,"normal"),s=x(t,"ariaLabel",3,"chart");var c=it(),g=W(c);M(g,{get id(){return b()},get snap(){return P()},get role(){return t.role},get width(){return y()},get ariaLabel(){return s()},get class(){return`graphic fmy-6 ${_()??""}`},children:(F,rt)=>{var T=et(),q=l(T);{var O=e=>{{let r=B(()=>y()==="fluid");V(e,{get containerIsFluid(){return R(r)},children:(u,f)=>{C(u,{get width(){return a()},children:(n,d)=>{var o=Z(),h=l(o),I=W(h),G=D(h,2);{var w=m=>{L(m,{get source(){return t.description}})};v(G,m=>{t.description&&m(w)})}Q(()=>X(I,t.title)),i(n,o)}})},$$slots:{default:!0}})}},U=e=>{var r=p(),u=l(r);{var f=n=>{{let d=B(()=>y()==="fluid");V(n,{get containerIsFluid(){return R(d)},children:(o,h)=>{C(o,{get width(){return a()},children:(I,G)=>{var w=p(),m=l(w);k(m,()=>t.title),i(I,w)}})},$$slots:{default:!0}})}};v(u,n=>{t.title&&n(f)},!0)}i(e,r)};v(q,e=>{typeof t.title=="string"?e(O):e(U,!1)})}var z=D(q,2);{let e=B(()=>!!t.ariaDescription);N(z,{get hidden(){return R(e)},children:(r,u)=>{var f=p(),n=l(f);k(n,()=>t.children),i(r,f)},$$slots:{default:!0}})}var H=D(z,2);{var J=e=>{var r=$(),u=W(r);{var f=d=>{L(d,{get source(){return t.ariaDescription}})},n=d=>{var o=p(),h=l(o);k(h,()=>t.ariaDescription),i(d,o)};v(u,d=>{typeof t.ariaDescription=="string"?d(f):d(n,!1)})}i(e,r)};v(H,e=>{t.ariaDescription&&e(J)})}var j=D(H,2);{var E=e=>{{let r=B(()=>y()==="fluid");V(e,{get containerIsFluid(){return R(r)},children:(u,f)=>{C(u,{get width(){return a()},children:(n,d)=>{var o=tt(),h=W(o);L(h,{get source(){return t.notes}}),i(n,o)}})},$$slots:{default:!0}})}},K=e=>{var r=p(),u=l(r);{var f=n=>{{let d=B(()=>y()==="fluid");V(n,{get containerIsFluid(){return R(d)},children:(o,h)=>{C(o,{get width(){return a()},children:(I,G)=>{var w=p(),m=l(w);k(m,()=>t.notes),i(I,w)}})},$$slots:{default:!0}})}};v(u,n=>{t.notes&&n(f)},!0)}i(e,r)};v(j,e=>{typeof t.notes=="string"?e(E):e(K,!1)})}i(F,T)},$$slots:{default:!0}}),i(S,c)}nt.__docgen={data:[{name:"children",visibility:"public",description:"Content to place inside `GraphicBlock`",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1},{name:"id",visibility:"public",description:"Add an id to the block tag to target it with custom CSS.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'""'},{name:"class",visibility:"public",description:"Add classes to the block tag to target it with custom CSS.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"snap",visibility:"public",description:"Snap block to column widths, rather than fluidly resizing them.",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"false"},{name:"role",visibility:"public",description:"ARIA [role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles) for the block",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"notes",visibility:"public",description:"Notes to the graphic, passed in as a markdown string OR as a custom snippet.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"type",type:"string",text:"string"},{kind:"function",text:"Snippet<[]>"}],text:"string | Snippet<[]>"},static:!1,readonly:!1},{name:"width",visibility:"public",description:"Width of the component within the text well.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"narrower",text:'"narrower"'},{kind:"const",type:"string",value:"narrow",text:'"narrow"'},{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'},{kind:"const",type:"string",value:"fluid",text:'"fluid"'}],text:'"narrower" | "narrow" | "normal" | "wide" | "wider" | "widest" | "fluid"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"textWidth",visibility:"public",description:'Set a different width for the text within the text well, for example, "normal" to keep the title, description and notes inline with the rest of the text well. Can\'t ever be wider than `width`.',keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"narrower",text:'"narrower"'},{kind:"const",type:"string",value:"narrow",text:'"narrow"'},{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'},{kind:"const",type:"string",value:"fluid",text:'"fluid"'}],text:'"narrower" | "narrow" | "normal" | "wide" | "wider" | "widest" | "fluid"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"title",visibility:"public",description:"Title of the graphic as a string or a custom snippet.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"type",type:"string",text:"string"},{kind:"function",text:"Snippet<[]>"}],text:"string | Snippet<[]>"},static:!1,readonly:!1},{name:"description",visibility:"public",description:"Description of the graphic, passed in as a markdown string.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"ariaLabel",visibility:"public",description:"ARIA [label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for the block",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"chart"'},{name:"ariaDescription",visibility:"public",description:"ARIA description, passed in as a markdown string OR as a custom snippet.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"type",type:"string",text:"string"},{kind:"function",text:"Snippet<[]>"}],text:"string | Snippet<[]>"},static:!1,readonly:!1}],name:"GraphicBlock.svelte"};export{nt as G};