@datawheel/bespoke 0.7.15-rc.17 → 0.7.15-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/report.js +1 -1
- package/package.json +1 -1
package/dist/report.js
CHANGED
|
@@ -59,7 +59,7 @@ var Zf=Object.defineProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var Aa=(e,t)=>{f
|
|
|
59
59
|
In pulvinar sapien ut tincidunt volutpat. Donec auctor tellus eu augue feugiat,
|
|
60
60
|
a viverra sapien pulvinar.`,style:r,append:t?jsx(Be,{content:t,style:{display:"inline-block",verticalAlign:"bottom"}}):jsx(Fragment,{}),isPreview:!0})}var sd=v(()=>{c();qt();we();});function yi({subtitle:e,title:t,value:r,tooltip:o,settings:n,_iconType:a,_iconVariant:s,_icon:i,_iconRadius:l,_iconSize:u,_iconPadding:p}){let d=t||"<span class='cr-block-placeholder'>Title</span>",m=r||"<span class='cr-block-placeholder'>Big Stat</span>",b=e||"<span class='cr-block-placeholder'>Subtitle</span>",f=n&&n.align||"left";return jsx("div",{className:"bespoke-Stat-root",children:jsxs(Group,{className:"bespoke-StatGroup-wrapper",position:at(f),children:[a!=="none"&&a&&jsx(Re,{blockType:"stat",iconType:a,iconVariant:s,iconRadius:l,iconSize:u,icon:i,iconPadding:p}),jsxs("div",{className:"bespoke-Stat-wrapper",children:[jsx(se,{component:"div",size:"md",html:d,style:n,isPreview:!0}),jsx(se,{component:"div",size:"xl",html:m,style:n,isPreview:!0}),jsx(se,{component:"div",size:"sm",html:b,style:n,isPreview:!0})]},"stat"),o&&jsx(Be,{content:o})]})})}var ld=v(()=>{c();qt();Lr();we();ze();});function bi({subtitle:e,tooltip:t,settings:r}){let o=Ve(e)||"<span class='cr-block-placeholder'>Small subtitle.</span>",n=r&&r.align?r.align:"left";return jsxs(Group,{spacing:"sm",position:at(n),children:[jsx(se,{size:"sm",html:o,isPreview:!0}),t&&jsx(Be,{content:t,style:{display:"inline-flex"}})]})}var ud=v(()=>{c();qt();wr();we();ze();});function vi({title:e,tooltip:t,_iconType:r,_iconVariant:o,_icon:n,settings:a,_iconRadius:s,_iconSize:i,_iconPadding:l}){let u=Ve(e)||"Title",p=a&&a.order?parseInt(a.order,10):1,d=p<=6?p:1,m=!!(a&&a.search&&a.search!=="off"),b=a&&a.search?a.search:"",f=a&&a.align?a.align:"left";return jsxs(Group,{spacing:"sm",position:at(f),children:[r!=="none"&&r&&jsx(Re,{blockType:"title",iconType:r,iconVariant:o,iconRadius:s,iconSize:i,icon:n,iconPadding:l}),jsx(se,{component:"h",order:d,style:a,html:u,isPreview:!0}),m&&jsx(Tooltip,{label:`Click will open '${b}' report search`,children:jsx(ActionIcon,{variant:"light",children:jsx(IconSearch,{size:20})})}),t&&jsx(Be,{content:t})]})}var pd=v(()=>{c();qt();wr();Lr();we();ze();});function xi(e){let{id:t,type:r,defaultValue:o,options:n,name:a,settings:s,hideLabel:i,component:l,resetSectionVars:u,section:p}=e,d=useDispatch(),m=useContext($t),b=Q(x=>x.status.query),{sectionVariables:f,resetSectionVariables:y}=Ae(p),h=kT(t),w=useMemo(()=>b[h]||o,[b[h],r,o]),I=useMemo(()=>CT(b[h],o),[b[h],r,o]),[k,A]=useState(n?.map(x=>({value:x.id,label:x.label,imageUrl:x.imageUrl}))||[]),[N,z]=useState((n||[]).map(x=>x.id).join("-"));useEffect(()=>{let x=n.map(O=>`${O.label}|${O.id}`).join("-");if(N===x)return;z(x);let L=n.map(O=>({value:O.id,label:O.label}));A(L);let D=r===ke.SINGLE?w:I;yr(r,D,n)||d(fs(m,h));},[JSON.stringify(n),t]);let E=()=>{u==="true"&&f&&y();},F=x=>{d(Pr(m,h,x)),E();},C=x=>{d(Pr(m,h,x.join())),E();},R=i==="true"?jsx(Fragment,{}):jsx(se,{component:"div",html:a,size:"sm",style:s,isPreview:!0});return k.length===0?jsx(Text,{c:"dimmed",size:"xs",children:"No options defined yet. Selector hidden in report."}):k.length===1?jsxs(Text,{c:"dimmed",size:"xs",children:["Only one option defined. Selector hidden in report. ",JSON.stringify(k)]}):{[ke.SINGLE]:l===yn.SEGMENTED_CONTROL?jsxs("div",{children:[R,jsx(SegmentedControl,{data:k,value:k.map(x=>x.value).includes(w)?w:"",onChange:F,fullWidth:!0})]}):jsx(Select,{label:R,data:k,value:w,onChange:F,itemComponent:PT,styles:{label:{display:i==="true"?"none":"block"}}}),[ke.MULTI]:jsx(MultiSelect,{label:R,data:k,value:I,onChange:C,styles:{label:{display:i==="true"?"none":"block"}}})}[r]}var kT,CT,PT,fd=v(()=>{c();Vo();vn();ye();he();Ut();we();Se();kT=e=>`selector${e}id`,CT=(e,t)=>e&&typeof e=="string"?e.split(","):t,PT=forwardRef(function({imageUrl:t,label:r,...o},n){return jsx("div",{ref:n,...o,children:jsxs(Group,{noWrap:!0,children:[t&&jsx(Box,{component:"img",w:25,h:25,src:t}),jsx("div",{children:jsx(Text,{size:"sm",children:r})})]})})});});var gd=v(()=>{});function Ci({dimmed:e=!1,label:t,root:r=!0,value:o,parentIsArray:n=!1,level:a=0}){let s=useMantineTheme();if(a===ki)return null;let i=jsx(Text,{lineClamp:1,size:"xs",variant:"dimmed",p:5,children:"[Max depth hitted for preview]"}),l=Ei(o),u=o,p=JSON.stringify(o),d=!!(p&&p.length>50),m=!!(p&&p.length>1e3),b=10,f={control:{padding:"5px 0px 5px 5px"},label:{padding:"5px 0px"},content:{paddingTop:0,paddingBottom:0,paddingRight:0}};if(l==="object")return jsx(Accordion,{className:"cr-variable-accordion",variant:"contained",styles:f,children:jsxs(Accordion.Item,{value:"label",children:[jsx(Accordion.Control,{children:jsx(Text,{lineClamp:1,size:"xs",weight:700,color:e?"dimmed":s.primaryColor,children:r?`{{${t}}}`:n?`[${t}]`:t})}),jsx(Accordion.Panel,{children:a+1<ki?Object.keys(o).sort((y,h)=>{let w=Ei(o[y]),I=Ei(o[h]);return w!==I?hd.indexOf(w)-hd.indexOf(I):y.localeCompare(h)}).map(y=>jsx(Ci,{root:!1,label:y,value:o[y],level:a+1},y)):i})]})});if(l==="array"){let y=o.length>b,h=y?o.slice(0,b):o,w=y?o.length-b:0;return jsx(Accordion,{className:"cr-variable-accordion",variant:"contained",styles:f,children:jsxs(Accordion.Item,{value:"label",children:[jsx(Accordion.Control,{children:jsx(Text,{lineClamp:1,size:"xs",weight:700,p:0,color:e?"dimmed":s.primaryColor,children:r?`{{${t}}}`:n?`[${t}]`:t})}),jsxs(Accordion.Panel,{children:[a+1<ki?h.map((I,k)=>jsx(Ci,{root:!1,label:k,value:I,level:a+1,parentIsArray:!0},k)):i,y&&jsxs(Text,{lineClamp:1,size:"xs",variant:"dimmed",p:5,children:["[+ ",w," other elements]"]})]})]})})}return l==="string"?u=m?`"${u.substring(0,1e3)} ... "`:`"${u}"`:l==="error"?u=`Error: ${u.message}`:l==="undefined"?u=l:u.toString&&(u=u.toString()),jsxs(Group,{noWrap:!0,spacing:0,children:[jsx(Text,{color:e?"dimmed":s.primaryColor,lineClamp:1,size:"xs",pl:5,style:{overflow:"visible",wordBreak:"keep-all",whiteSpace:"nowrap"},weight:700,children:r?`{{${t}}}`:n?`[${t}]`:t}),jsx(Prism,{className:"cr-variable",language:"jsx",noCopy:!0,scrollAreaComponent:"div",styles:{root:{flex:"1 1 100%",textAlign:"right",overflow:"hidden"},code:{padding:"5px 0 5px 5px"},scrollArea:{marginLeft:"5px"},line:{paddingRight:"5px"}},children:u}),d&&jsxs(HoverCard,{width:400,shadow:"md",withinPortal:!0,children:[jsx(HoverCard.Target,{children:jsx(ActionIcon,{children:jsx(IconCodePlus,{})})}),jsx(HoverCard.Dropdown,{children:jsx(Text,{size:"sm",children:JSON.stringify(o).substring(0,5e3)})})]})]})}var Ei,hd,ki,yd,bd=v(()=>{c();gd();Ei=e=>{let t=typeof e;if(t==="object"){if(e===null)return "undefined";Array.isArray(e)?t="array":["Error","EvalError","ReferenceError","SyntaxError"].includes(e.constructor.name)&&(t="error");}return t},hd=["object","array","string","number"],ki=5;yd=Ci;});var vd,Sd=v(()=>{c();vd=e=>t=>t.replace(new RegExp(`^${e}`),"").startsWith("_");});function NT({reserved:e=[],id:t,variables:r={},showInternal:o=!1}){let a=ft(t==="attributes"?null:t).data,s=a?a.type:"block",i=a?.type&&a?.id?`${a.type}${a.id}`:"",l=Object.keys(r).filter(o?()=>!0:u=>!vd(i)(u));return jsx(Stack,{spacing:0,children:l.length?l.map(u=>jsx(yd,{dimmed:e.includes(u),label:u,value:r[u]},u)):jsx(Text,{color:"dimmed",size:"xs",children:jsx("i",{children:`empty ${s}`})})})}var Td,xd=v(()=>{c();bd();he();Sd();Td=NT;});function qT({outputVariables:e,status:t,hasAPI:r=!1,debug:o,type:n}){let[a,s]=useState(!1),i=r&&!Object.keys(e).length&&!t.error,l=Object.keys(e).some(p=>p.startsWith("_"));return o?i?jsxs(Stack,{align:"center",children:[jsx(Loader,{}),jsxs(Text,{size:"sm",children:["Loading ",n]})]}):jsxs(Fragment,{children:[jsx(Divider,{label:"Output Variables",labelPosition:"center"}),l&&jsx(Switch,{label:"Show internal variables",mb:"xs",size:"xs",checked:a,onChange:p=>s(p.currentTarget.checked)}),jsx(Td,{variables:e,showInternal:a})]}):jsx(Center,{children:jsx(Badge,{color:"gray",variant:"outline",children:n.toUpperCase()},"type")})}var Ai,Rd=v(()=>{c();xd();Ai=qT;});function wi(e){let{alt:t,src:r,desc:o,title:n,settings:a,...s}=e,i=Ve(t),l=Ve(r),u=Ve(o),p=jsx("img",{src:l,alt:i,style:s}),d=a&&a.align?String(a.align):"left";return (u&&u.length||n&&n.length)&&(p=jsxs(Stack,{className:"bespoke-Image-wrapper",align:wt(d),spacing:"sm",children:[n&&jsx(se,{component:"p",html:n,style:a,isPreview:!0}),p,o&&jsx(se,{component:"p",size:"sm",html:o,style:a,isPreview:!0})]})),l&&i?p:jsx(Center,{mih:100,bg:"white",children:jsx(Badge,{color:"gray",variant:"outline",children:"IMAGE"},"type")})}var Ed=v(()=>{c();wr();we();ze();});function Oi({headings:e,settings:t}){let{min:r="1",max:o="6",icons:n="yes"}=t||{},a=mo(parseInt(r,10),parseInt(o,10),e),s=n==="yes",i=lo(t&&t.align?String(t.align):"left"),l=u=>!u||!u?.length?null:jsx(Fragment,{children:u.map(p=>jsxs(Fragment$1,{children:[jsx(Menu.Item,{children:jsx(Anchor,{href:`#bespoke-title-${p.id}`,children:jsxs(Group,{spacing:"sm",children:[s&&jsx(Re,{...p.iconProps,iconSize:"sm"}),jsx(Text,{dangerouslySetInnerHTML:{__html:p.label}})]})})},p.id),jsx(Box,{pl:"xs",children:l(p.children)})]},p.id))});return jsx(Box,{pos:"relative",children:jsxs(List,{sx:u=>({display:"flex",gap:u.spacing.md,justifyContent:i,listStyleType:"none"}),children:[a?.map(u=>jsx(List.Item,{children:jsxs(Menu,{trigger:"hover",openDelay:100,closeDelay:400,children:[jsx(Menu.Target,{children:jsx(Anchor,{href:`#bespoke-title-${u.id}`,children:jsxs(Group,{spacing:"sm",noWrap:!0,children:[s&&jsx(Re,{blockType:"nav",...u.iconProps,iconSize:"sm",iconPadding:"2"}),jsx(Text,{dangerouslySetInnerHTML:{__html:u.label}})]})})}),u?.children?.length?jsx(Menu.Dropdown,{children:l(u.children)}):null]})},u.id)),!a||a.length===0&&jsx(List.Item,{children:jsx(Text,{color:"dimmed",children:"- Include some titles as inputs to see the Nav component -"})})]})})}var Ad=v(()=>{c();Js();Lr();ze();});function Bi(e){let{related_reports:t,settings:r}=e;if(!t?.length)return jsx(Text,{children:"There are no available members related to your current selection and report."});let o=lo(r&&r.align?String(r.align):"left");return jsx(List,{sx:()=>({display:"flex",justifyContent:o,"& li":{marginRight:"1rem"}}),children:t.map(n=>jsx(List.Item,{children:n.entities.map(a=>a.name).join(" & ")},n.link))})}var Id=v(()=>{c();ze();});function Ni({id:e,label:t,settings:r,showIcon:o,fullWidth:n,showWhenDisabled:a}){let s=ft(e).data,{sectionVariables:i,resetSectionVariables:l}=Ae(s?.section_id),u=!!Object.keys(i).length,p=wt(r&&r.align?r.align:"left");return jsxs(Stack,{align:p,children:[!u&&!a&&jsx(Text,{size:"xs",ta:r?.align||"left",children:"Reset button will not be shown on its disabled state"}),jsx(Button,{onClick:()=>l(),disabled:!u,fullWidth:n,children:jsxs(Group,{align:"center",children:[t,o&&jsx(IconRefresh,{})]})})]})}var Od=v(()=>{c();Se();Se();ze();});function Fi({settings:e,label:t,showIcon:r,position:o="center"}){let n=e&&e.search?e.search:"";return jsxs(Group,{position:o,children:[jsx(Tooltip,{label:`Click will open '${n}' report search`,children:jsx(Button,{children:jsxs(Group,{align:"center",children:[t||"Comparison Button",r&&jsx(IconPlus,{})]})})}),jsx(ActionIcon,{variant:"light",children:jsx(IconSearch,{size:20})})]})}var Md=v(()=>{c();});function Vi({columns:e=[],id:t,data:r=[],tableProps:o={}}){let[n,a]=useState({}),{initialState:s}=o,i=s?.pagination?.pageIndex,l=s?.pagination?.pageSize,u=`table-${[t,i,l].filter(f=>f).join("-")}`,p=useMemo(()=>e.map(f=>f.accessorKey),[e]),d=useMemo(()=>r.filter(f=>typeof f=="object"&&f!==null&&!Array.isArray(f)&&Object.keys(f).some(y=>p.includes(y))),[p,r]),m=useMemo(()=>e.map(f=>({...f,Cell:({renderedCellValue:y})=>jsx(se,{html:`${y}`,isPreview:!0}),filterFn:"contains"})),[e]),b=Ic();return useEffect(()=>{(async()=>{try{let y=b||"en",h=`${y.toUpperCase()}`,w=await import(`mantine-react-table/locales/${y}.js`);a(w[`MRT_Localization_${h}`]);}catch(y){console.error("Error loading translations:",y);}})();},[b]),createElement(MantineReactTable,{...o,autoResetPageIndex:!1,columns:m,data:d,enableColumnFilterModes:!0,enableFilterMatchHighlighting:!1,globalFilterFn:"contains",key:u,layoutMode:"grid",localization:n,state:{...o.state,isFullScreen:!1}})}var Nd=v(()=>{c();we();Se();});function zi({label:e,url:t,settings:r}){let{align:o}=r;return jsx(Group,{position:o,grow:o==="justify",children:jsx(Button,{component:"a",target:"_blank",href:t||"",children:e||"Button"})})}var Dd=v(()=>{c();});function Ui(e){let t=useDispatch(),r=useContext($t),o=Q(V=>V.status.query),n=Ox(e.id),a=useMantineTheme(),{allLabel:s,colorKey:i,data:l,defaultValue:u,defaultValueType:p,iconKey:d,levels:m,limit:b,placeholder:f,searchIndexKey:y,searchIndexSeparator:h,resetSectionVars:w,section:I}=e,[k,A]=useState(!1),[N,z]=useState(!0),[E,F]=useState(""),[C,R]=useState(!1),[x,L]=useState([""].slice(1)),{sectionVariables:D,resetSectionVariables:O}=Ae(I),P=useMemo(()=>_x(o[`${n}-value`],u),[o,u,n]),j=useMemo(()=>o[`${n}-type`]||p,[o,p,n]),K=useCallback(()=>{w==="true"&&D&&O();},[w,D,O]),q=useCallback(V=>{K(),t(Pr(r,`${n}-value`,V.join()));},[t,r,n,K]),ee=useCallback(V=>{K(),t(Pr(r,`${n}-type`,V));},[t,r,n,K]),oe=useRef(null),ce=useRef(!1),U=useRef(!!b&&b<P.length),X=x.length,H=m[X],$=x.filter(Boolean);x.length>0&&$.length===0&&$.push(`${s} ${H?.label}`),useEffect(()=>{let V=()=>{z(!0);};return window.addEventListener("touchmove",V),()=>{window.removeEventListener("touchmove",V);}},[]);let M=useMemo(()=>wx(l,m,i,d,y,h),[i,l,d,m,y,h]),_=useMemo(()=>{let V=Ix(E),ue=Array.from(Lx(M,V)).reverse();return C?ue:x.reduce((B,ne)=>B.filter(re=>!ne||re.searchindex.indexOf(ne)>-1),ue.filter(B=>B.type===H?.value))},[H,M,E,C,x]),te=useRef(null),G=Gn({count:k?_.length:0,estimateSize:()=>30,getScrollElement:useCallback(()=>te.current,[]),overscan:10,rangeExtractor:useCallback(V=>Yo(V),[])}),[J,Y]=useState(-1),ie=Math.min(J,_.length-1),le=useCallback(V=>{let ue=x.concat(V);C&&R(!1),L(ue);},[C,x]),ct=useCallback(()=>{let V=x.slice(0,X-1);C&&R(!1),L(V);},[C,x,X]),fe=useCallback(V=>{F(V.currentTarget.value),!U.current&&l.length>0&&A(!0);},[l,F,U,A]),ut=useCallback(()=>{F(""),q([]),oe.current?.focus(),b&&(U.current=!1);},[F,q,oe,b,U]),Dt=useCallback(V=>{let ue=P.filter(B=>B!==V);q(ue),b&&ue.length<b&&(U.current=!1);},[P,q,b,U]),He=useCallback(V=>{j||ee(V.type),j!==V.type?(ee(V.type),q([V.value])):P.includes(V.value)?Dt(V.value):b?(P.length<b&&q([...P,V.value]),P.length===b&&q([...P.slice(1),V.value])):q([...P,V.value]),F("");},[j,ee,q,P,Dt,b]),Eo=useCallback(()=>{P.length>0&&E.length===0&&(q(P.slice(0,-1)),A(!0),b&&(U.current=!1)),E.length>0&&F(E.slice(0,-1));},[P,E,q,F,A,b,U]),ko=useCallback(()=>{z(V=>V&&(ce.current=V,!V)),Y(V=>V+1>=_.length?V:V+1);},[Y,_]),mr=useCallback(()=>{let V=_[ie];V&&He(V);},[_,ie,He]),Co=useCallback(()=>{A(!1);},[A]),va=useCallback(()=>{ct(),Y(0);},[Y,ct]),Sa=useCallback(()=>{let V=_[ie];!C&&V&&V.type!==m[m.length-1]?.value&&(le(V.name),Y(0));},[_,ie,C,m,Y,le]),Ta=useCallback(()=>{z(V=>V&&(ce.current=V,!V)),Y(V=>V-1<0?0:V-1);},[Y]),xa=({label:V,onRemove:ue,...B})=>jsxs("div",{style:{alignItems:"center",backgroundColor:a.colorScheme==="dark"?a.colors.dark[7]:a.colors.gray[1],borderRadius:a.radius.sm,cursor:"default",color:a.colorScheme==="dark"?a.colors.dark[0]:a.colors.gray[7],display:"flex",fontSize:rem(12),fontWeight:500,height:rem(22),margin:`calc(${a.spacing.xs} / 2 - ${rem(2)}) calc(${a.spacing.xs} / 2)`,maxWidth:`calc(100% - ${rem(10)})`,paddingLeft:`calc(${a.spacing.sm} / 1.5)`,paddingRight:0,userSelect:"none"},...B,children:[jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:V}),jsx(CloseButton,{"aria-hidden":!0,iconSize:"70%",onMouseDown:ue,radius:2,size:"sm",sx:{color:a.colorScheme==="dark"?a.colors.dark[0]:a.colors.gray[7],marginLeft:`calc(${a.spacing.sm} / 6)`},tabIndex:-1})]}),Ra=useMemo(()=>P.map(V=>M.find(ue=>ue.value===V)).filter(V=>!!V).map((V,ue)=>createElement(xa,{...V,index:ue,key:V.value,onRemove:B=>{B.preventDefault(),B.stopPropagation(),Dt(V.value);}})),[P]),Ea=forwardRef(function({color:ue,icon:B,label:ne,value:re,...qe},be){return jsx("div",{ref:be,style:{cursor:"pointer",width:"100%"},...qe,children:jsxs(Group,{align:"center",noWrap:!0,spacing:"xs",w:"100%",children:[B&&jsx(Box,{bg:ue??"transparent",component:"img",w:20,h:20,src:B}),jsx(Text,{lineClamp:1,size:"sm",children:ne||re})]})})}),{settings:ka}=e,Ca=e.hideLabel==="true"||!e.label?jsx(Fragment,{}):jsx(se,{component:"div",html:e.label,size:"sm",style:ka,isPreview:!0});return jsx(Input.Wrapper,{label:Ca,children:jsxs(Popover,{closeOnClickOutside:!0,keepMounted:!0,opened:k,onChange:A,onClose:()=>{Y(0),F("");},onOpen:()=>{G.scrollToIndex(0);},shadow:"sm",width:"target",withinPortal:!0,children:[jsx(Popover.Target,{children:jsxs(Box,{"aria-haspopup":"listbox",component:"div",onMouseLeave:()=>Y(0),sx:{position:"relative","& .defaultValue":{backgroundColor:a.colorScheme==="dark"?a.colors.dark[5]:a.colors.gray[3],color:a.colorScheme==="dark"?a.colors.dark[1]:a.colors.gray[7]}},tabIndex:-1,children:[jsx("input",{type:"hidden",value:P.join(",")}),jsx(Input,{component:"div",multiline:!0,onMouseDown:V=>{V.preventDefault(),!U.current&&l.length>0&&A(!k),oe.current?.focus();},rightSection:P.length>0?jsx(CloseButton,{onClick:ut,onMouseDown:V=>V.preventDefault(),variant:"transparent"}):jsx(IconSelector,{color:a.colors.gray[6],size:18,stroke:1.5}),style:{overflow:"hidden"},w:"100%",children:jsxs(Box,{component:"div","data-clearable":!0,sx:{alignItems:"center",boxSizing:"border-box",display:"flex",flexWrap:"wrap",marginLeft:`calc(-${a.spacing.xs} / 2)`,minHeight:`calc(${rem(36)} - ${rem(2)})`,"&[data-clearable]":{marginRight:rem(36)},"&::placeholder":{color:a.colorScheme==="dark"?a.colors.dark[3]:a.colors.gray[5],opacity:1}},children:[Ra,jsx("input",{autoComplete:"off","data-mantine-stop-propagation":k,onChange:fe,onKeyDown:getHotkeyHandler([["ArrowDown",ko],["ArrowLeft",va],["ArrowRight",Sa],["ArrowUp",Ta],["Backspace",Eo],["Enter",mr],["Escape",Co]]),placeholder:P.length===0?f:void 0,ref:oe,readOnly:U.current,style:{appearance:"none",backgroundColor:"transparent",border:0,color:"inherit",flex:1,fontSize:a.fontSizes.sm,marginLeft:`calc(${a.spacing.xs} / 2)`,maxHeight:rem(22),minWidth:rem(60),outline:0,padding:0},type:"search",value:E})]})})]})}),jsx(Popover.Dropdown,{onMouseDown:V=>V.preventDefault(),p:0,children:jsx("div",{style:{display:"flex",maxHeight:rem(300)},children:jsx(Box,{component:"div","data-combobox-popover":!0,onMouseDown:V=>V.preventDefault(),role:"listbox",sx:{width:"100%"},tabIndex:-1,children:jsxs(Stack,{h:"100%",py:"xs",spacing:"xs",w:"100%",children:[m.length>1&&jsxs(Stack,{spacing:"xs",children:[jsxs(Group,{onClick:V=>{V.stopPropagation();},px:"xs",position:"center",spacing:"xs",children:[jsx(Button,{onClick:()=>{Y(0),R(!0),L([]),_.length>0&&G.scrollToIndex(0);},size:"xs",variant:C?"filled":"outline",children:s}),m.map((V,ue)=>jsx(Button,{onClick:()=>{C&&R(!1);let B=[""].slice(1),ne=ue;for(;ne--;)B[ne]=x[ne]||"";Y(0),L(B),_.length>0&&G.scrollToIndex(0);},size:"xs",variant:!C&&x.length===m.findIndex(B=>B.value===V?.value)?"filled":"outline",children:V?.label},V?.value))]}),jsx(Divider,{})]}),X>0&&jsxs(Group,{align:"center",noWrap:!0,px:"xs",children:[jsx(ActionIcon,{onClick:ct,size:"sm",children:jsx(IconChevronLeft,{})}),jsx("div",{children:$.map(V=>jsx(Text,{lineClamp:1,size:"xs",children:V},`${V}`))})]}),jsx(ScrollArea,{mah:250,onWheel:()=>z(!0),px:"xs",style:{overflow:"auto",width:"100%"},viewportRef:te,viewportProps:{tabIndex:-1},w:"100%",children:jsx("div",{style:{height:`${G.getTotalSize()}px`,position:"relative",width:"100%"},children:G.getVirtualItems().map(V=>{let ue=_[V.index],B=ie===V.index,ne=P.includes(ue.value);return _.length>0&&B&&!N&&G.scrollToIndex(ie),jsxs(Group,{"aria-selected":B,align:"center","data-hovered":B||void 0,"data-index":V.index,"data-selected":ne,id:ue.vale,noWrap:!0,onMouseEnter:re=>{re.preventDefault(),re.stopPropagation(),N&&(Y(V.index),z(!1));},onMouseMove:re=>{re.preventDefault(),re.stopPropagation(),z(!0);},onMouseDown:re=>{re.preventDefault(),He(ue);},position:"apart",ref:G.measureElement,role:"option",spacing:"xs",sx:re=>({borderRadius:re.radius.xs,padding:"15px 5px 15px",paddingLeft:C&&10*m.findIndex(qe=>qe?.value===ue.type)||5,position:"absolute",top:0,left:0,height:`${V.size}px`,transform:`translateY(${V.start}px)`,width:"100%","&[data-hovered]":{backgroundColor:re.colorScheme==="dark"?re.colors.dark[4]:re.colors.gray[1]},"&:hover":{backgroundColor:re.colorScheme==="dark"?re.colors.dark[4]:re.colors.gray[1]}}),tabIndex:-1,children:[jsx(Ea,{index:V.index,...ue}),!C&&ue.type!==m[m.length-1]?.value&&jsx(ActionIcon,{onMouseDown:re=>{re.preventDefault(),re.stopPropagation(),le(ue.name);},size:"sm",tabIndex:-1,children:jsx(IconChevronRight,{})})]},ue.value)})})})]})})})})]})})}var wx,Ix,Lx,Ox,_x,qd=v(()=>{c();Us();we();Ut();he();Se();Vo();wx=(e=[],t=[],r="",o="",n="",a="|")=>{let s=t.map(y=>y.value).slice(),i=`${s.pop()}`,l=y=>y[r],u=y=>y[o],p=y=>{if(y[n])return typeof y[n]=="string"?y[n].split(a):y[n]},d=new Set,m=[],b=[],f=nest().rollup(y=>{let h=y[0],w=C=>C&&C.value&&!d.has(C.value),I=s.map(C=>h[`${C} ID`]),k=s.map(C=>h[C]),A=s.map((C,R)=>{if(b[R]!==k[R]){b[R]=k[R];let x=l[R]||l[l.length-1]||l,L=u[R]||u[u.length-1]||u,D=p[R]||p[p.length-1]||p;return {color:x(h,C)||void 0,icon:L(h,C)||void 0,value:`${I[R]}`,label:k[R],name:k[R],type:C,searchindex:k.slice(0,R+1).concat(D(h,C)).join("|")}}return {}}).filter(w);A.forEach(C=>d.add(C.value));let N=l[l.length-1]||l,z=u[u.length-1]||u,E=p[p.length-1]||p,F=y.map(C=>({color:N(C,i)||void 0,icon:z(C,i)||void 0,value:`${C[`${i} ID`]}`,label:C[i],name:C[i],type:i,searchindex:k.concat(C[i]).concat(E(C,i)).join("|")}));m.push(...A.concat(F));});return s.forEach(y=>{f.key(h=>`${h[`${y} ID`]}|${h[y]}`);}),f.entries(e),m},Ix=e=>{if(!e)return /./i;let t=e.normalize("NFD").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"[^|]+");return RegExp(t,"i")},Lx=(e,t)=>{let r=e.length,o,n=i=>o&&o.searchindex.includes(i.searchindex),s={next:()=>{for(let i=r-1;i>-1;i--){let l=e[i];if(t.test(`${l.value} ${l.label} ${l.searchindex}`)||n(l))return o=l,r=i,{done:!1,value:l}}return {done:!0,value:void 0}},[Symbol.iterator]:()=>s};return s},Ox=e=>`multihierarchySelector${e}`,_x=(e,t)=>e&&typeof e=="string"?e.split(","):t;});var Wd={};Aa(Wd,{default:()=>Hx});function Gx({block:e,active:t,locale:r,variables:o,debug:n,configOverride:a={}}){let s=$x(),i=Oe(e),l=Pt(r),u={variables:o},p=useRouter(),{sectionVariables:d,setSectionVariables:m,resetSectionVariables:b}=Ae(e.section_id),f=useMemo(()=>{if(!t)return {error:"Activate to View"};if(!i?.logic)return {error:"Add a Configuration"};let C=ot({logic:i.logic},l,u).logic,R={router:p,section:{variables:d,setVariables:m,resetVariables:b}};return ir(C,l,o,r,e.id,{},R)},[i?.logic,t,o,d]);useMemo(()=>{if(!t||!i?.logic)return {};let{logic:C}=i,{vars:R}=rt("variables",o,C,l,void 0,u);return R},[e,t]);let {type:h}=f.config||{},w=h&&Gi[h]?h:"Treemap";h||(f.config={error:'Visualization missing "type"'}),Gi[h]||(f.config={error:`"${h}" is not a valid Visualization Type`});let I=Gi[w],k=f.error||f.config?.error||!1;if(k)return jsx(Center,{style:{height:"100%"},children:jsx(Badge,{color:"gray",variant:"outline",children:k},"type")});let{_data:A,...N}=f.config,z={locale:r,variables:o,...N,...a};console.log(s.print,"print aca viz"),s.print&&(z.detectVisible=!1);!s.print&&h!=="Graphic"&&h!=="HTML";return jsx("div",{style:{display:"flex",flex:"1 1 100%"},children:jsx(Fr,{fallback:jsx("p",{children:"Error in d3plus viz config."}),children:jsx(I,{style:{flex:1},dataFormat:C=>{f.data&&Array.isArray(f.data)&&f.data.length>1&&f.data.some(D=>typeof D=="string")?C:[C];let L;try{L=f.dataFormat(C);}catch(D){console.log("Error in dataFormat: ",D),L=[];}return L},linksFormat:f.linksFormat,nodesFormat:f.nodesFormat,topojsonFormat:f.topojsonFormat,config:{...z}},"viz-key")})})}var $x,Ux,Gi,Hx,Kd=v(()=>{c();hr();Wr();mi();Jo();br();Se();di();$x=()=>({}),Ux={},Gi={HTML:en,...QS,...Ux};Hx=memo(Gx,(e,t)=>e.block.contentByLocale.logic.content===t.block.contentByLocale.logic.content&&e.active===t.active&&e.locale===t.locale&&JSON.stringify(e.variables)===JSON.stringify(t.variables)&&JSON.stringify(e.configOverride)===JSON.stringify(t.configOverride));});var jx,Fe,Yd=v(()=>{c();ye();sd();ld();ud();pd();fd();Rd();Ed();Ad();Id();Od();Md();Nd();Dd();qd();jx=eT(()=>Promise.resolve().then(()=>(Kd(),Wd)),{ssr:!1}),Fe={[g.PARAGRAPH]:hi,[g.STAT]:yi,[g.SUBTITLE]:bi,[g.TITLE]:vi,[g.SELECTOR]:xi,[g.VIZ]:jx,[g.GENERATOR]:Ai,[g.SECTION_FLAG]:Ai,[g.IMAGE]:wi,[g.NAV]:Oi,[g.RELATED]:Bi,[g.RESET_BUTTON]:Ni,[g.COMPARISON_BUTTON]:Fi,[g.TABLE]:Vi,[g.BUTTON]:zi,[g.MULTIHIERARCHY_SELECTOR]:Ui};});var Xd=v(()=>{c();ye();({[g.TITLE]:IconHeading,[g.GENERATOR]:IconApi,[g.SECTION_FLAG]:IconFlag,[g.STAT]:IconPercentage,[g.VIZ]:IconChartBar,[g.PARAGRAPH]:IconAlignLeft,[g.SELECTOR]:IconSelector,[g.IMAGE]:IconPhoto,[g.TABLE]:IconTable,[g.MULTIHIERARCHY_SELECTOR]:IconListTree});});var Qd=v(()=>{c();ye();({[g.TITLE]:"Title",[g.GENERATOR]:"Data",[g.STAT]:"Stat",[g.VIZ]:"Visualization",[g.PARAGRAPH]:"Paragraph",[g.SELECTOR]:"Selector",[g.SUBTITLE]:"Subtitle",[g.RESET_BUTTON]:"Reset Button",[g.COMPARISON_BUTTON]:"Comparison Button",[g.RELATED]:"Related Reports",[g.NAV]:"Navigation",[g.IMAGE]:"Image",[g.TABLE]:"Table",[g.BUTTON]:"Button",[g.FALLBACK]:"Fallback",[g.SECTION_FLAG]:"Section Flag",[g.MULTIHIERARCHY_SELECTOR]:"Multihierarchy Selector"});});var oR,Hi,Zd=v(()=>{c();ye();ad();Yd();Xd();Qd();oR={[g.GENERATOR]:{type:g.GENERATOR,renderer:Fe[g.GENERATOR],renderPreviewOnEdit:!1},[g.SECTION_FLAG]:{type:g.SECTION_FLAG,renderer:Fe[g.SECTION_FLAG],renderPreviewOnEdit:!1},[g.IMAGE]:{type:g.IMAGE,renderer:Fe[g.IMAGE],renderPreviewOnEdit:!1},[g.PARAGRAPH]:{type:g.PARAGRAPH,renderer:Fe[g.PARAGRAPH],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.RELATED]:{type:g.RELATED,renderer:Fe[g.RELATED],renderPreviewOnEdit:!1,evalWhenNonActive:!1},[g.SELECTOR]:{type:g.SELECTOR,renderer:Fe[g.SELECTOR],adapter:rn[g.SELECTOR],nonActiveAdapter:()=>rn[g.SELECTOR]({name:"Selector Preview"}),renderPreviewOnEdit:!1},[g.STAT]:{type:g.STAT,renderer:Fe[g.STAT],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.SUBTITLE]:{type:g.SUBTITLE,renderer:Fe[g.SUBTITLE],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.TITLE]:{type:g.TITLE,renderer:Fe[g.TITLE],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.VIZ]:{type:g.VIZ,renderer:Fe[g.VIZ],renderPreviewOnEdit:!1},[g.NAV]:{type:g.NAV,renderer:Fe[g.NAV],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.RESET_BUTTON]:{type:g.RESET_BUTTON,renderer:Fe[g.RESET_BUTTON],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.COMPARISON_BUTTON]:{type:g.COMPARISON_BUTTON,renderer:Fe[g.COMPARISON_BUTTON],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.TABLE]:{type:g.TABLE,renderer:Fe[g.TABLE],renderPreviewOnEdit:!1,evalWhenNonActive:!1},[g.BUTTON]:{type:g.BUTTON,renderer:Fe[g.BUTTON],renderPreviewOnEdit:!0,evalWhenNonActive:!0},[g.MULTIHIERARCHY_SELECTOR]:{type:g.MULTIHIERARCHY_SELECTOR,renderer:Fe[g.MULTIHIERARCHY_SELECTOR],adapter:rn[g.MULTIHIERARCHY_SELECTOR],nonActiveAdapter:()=>rn[g.MULTIHIERARCHY_SELECTOR]({label:"Multihierarchy Selector Preview"}),renderPreviewOnEdit:!1}},Hi=oR;});function ia({blockId:e,active:t=!0,asComparison:r=!1}){let{query:o,locale:n=dt}=useRouter(),a=Ye(),s=ft(e).data,i=oo(e,r&&a.active?a?.variables.variables:void 0,r&&a.active?a?.variables.attributes:void 0),l=Oe(s,n),u=Pt(n),p={variables:i,query:o,locale:n},d=Q(w=>w.variables.variables[s.id]||{}),m=Q(w=>w.variables.status[s.id]||{}),[b,f]=useState(()=>{if(![g.GENERATOR,g.VIZ,g.NAV].includes(s.type)){if(s?.type===g.SELECTOR){let k=Oe(s,n),{config:A}=Kr(s.id,k?.logic,u,p);return {...A,id:s.id,section:s.section_id}}if(s?.type===g.MULTIHIERARCHY_SELECTOR){let k=Oe(s,n),{config:A}=Yr(s.id,k.logic,u,p);return {...A,id:s.id,section:s.section_id}}let w=Vt(l?.logic,u,p),{vars:I}=rt("variables",i,w,u,void 0,p);return I}return null});useEffect(()=>{(async()=>{if(!s||s.type===g.GENERATOR)return;if(s.type===g.VIZ){f({block:s,locale:n,variables:i,active:t});return}if(!t&&!Hi[s.type].evalWhenNonActive){let{nonActiveAdapter:A}=Hi[s.type],N=A&&typeof A=="function"?A():{};f(N);return}if(s.type===g.GENERATOR){f({outputVariables:d});return}if(g.SELECTOR===s.type){let A=Oe(s,n),{config:N}=Kr(s.id,A.logic,u,p);f({...N,id:s.id,section:s.section_id});return}if(g.MULTIHIERARCHY_SELECTOR===s.type){let A=Oe(s,n),{config:N}=Yr(s.id,A.logic,u,p);f({...N,id:s.id,section:s.section_id});return}if(s.type===g.NAV){let A=Oe(s,n).simple;f({id:s.id,headings:s.inputs,type:A?.type,section:s.section_id,settings:s.settings});return}if(s.type===g.RELATED){let{related_reports:A}=d;f({related_reports:A});return}if(s.type===g.RESET_BUTTON){f({id:s.id,...l.simple});return}if(s.type===g.COMPARISON_BUTTON){f({id:s.id,...l.simple});return}if(s.type===g.FALLBACK){f({id:s.id,type:s.original_type,roles:s.settings.access});return}let I=Vt(l?.logic,u,p),{vars:k}=rt("variables",i,I,u,void 0,p);if(s.type===g.TABLE){f({sectionId:s.section_id,...k});return}f(k);})();},[l,i]);let y=m.allowed||s?.type===g.NAV;if(!s||!b||!y)return null;let h=Zp[s.type];return jsx("div",{id:`bespoke-${s.type}-${s.id}`,className:`cms-block-wrapper bespoke-block-area cms-block-${e}`,children:jsx(h,{...b,settings:s.settings,asComparison:r})})}var em=v(()=>{c();ye();Jp();Zd();br();Se();bn();Wr();kn();Da();za();Wt();});var tm,iR,rm,la,ca=v(()=>{c();tm={margin:{label:"Content Margin",defaultValue:"md",options:[{label:"None",value:"0px"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]},columnGutter:{label:"Column Gutter",defaultValue:"md",options:[{label:"None",value:"0px"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]},width:{label:"Width",defaultValue:"full",options:[{label:"Full Width",value:"full"},{label:"Center",value:"center"}]},position:{label:"Position",defaultValue:"normal",options:[{label:"Normal",value:"normal"},{label:"Sticky",value:"sticky"}]},style:{label:"Style",defaultValue:"none",options:[{label:"None",value:"none"},{label:"Card",value:"card"}]}},iR=Object.keys(tm).reduce((e,t)=>(e[t]=tm[t].defaultValue,e),{}),rm={memberImageBg:!1,optionsMenu:!1,optionData:!0,optionImage:!0,optionShare:!0,showAnchor:!1,...iR},la=e=>({data:typeof e.optionData=="boolean"?e.optionData:!0,image:typeof e.optionImage=="boolean"?e.optionImage:!0,share:typeof e.optionShare=="boolean"?e.optionShare:!0});});function om({previews:e}){let t=e.map((r,o)=>({key:r?`bg-${r.content_id}`:`bg-${o}`,src:r?`/api/cms/member/image?member=${r.content_id}&size=splash`:""}));return jsxs(Fragment,{children:[jsx(Group,{className:"cms-section-bg",grow:!0,spacing:0,style:{position:"absolute",width:"100%",height:"100%"},children:t.map(r=>jsx("div",{className:"cms-section-member-bg",style:{backgroundImage:`url(${r.src})`,backgroundSize:"cover",backgroundPosition:"center center",height:"100%",width:"100%"}},r.key))}),jsx("div",{className:"cms-section-gradient-bg",style:{background:"white",position:"absolute",width:"100%",height:"100%",opacity:.33}})]})}var nm=v(()=>{c();});function am({data:e}){let o=(e&&Array.isArray(e)&&e[0]?Object.keys(e[0]):[]).filter(n=>!n.startsWith("_")).map(n=>({accessorKey:n,header:n,enableSorting:!0,mantineTableBodyCellProps:{sx:{textWrap:"wrap"}}}));return jsx(MantineReactTable,{columns:o,data:e,enableBottomToolbar:!1,enableColumnActions:!1,enablePagination:!1,enableSorting:!0,enableTopToolbar:!1,initialState:{density:"xs"},layoutMode:"grid",mantineTableContainerProps:{sx:{minHeight:100,maxHeight:350}}})}var sm=v(()=>{c();});function xo(e){let t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"," ":""},r=`(?:${Object.keys(t).join("|")})`,o=RegExp(r),n=RegExp(r,"g"),a=String(e).replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim();return o.test(a)?a.replace(n,s=>t[s]):a}var ji=v(()=>{c();});function Wi(e){return typeof e=="string"?String(e).replace(/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});/ig," "):e}var im=v(()=>{c();});function fR(e){return e?mR(Wi(xo(e)),{replacement:"-",remove:/[*+~.()'"!:@]/g,lower:!0,strict:!0,trim:!0}):""}var Xt,ln=v(()=>{c();ji();im();Xt=fR;});function dm(e){let{section:t}=e,r=Ot(),o=useRouter(),n=Q(M=>M.status.isCMS),a=Q(M=>M.status.currentLocale),s=o.locale,i=n?a:s,l=50,u=Pt(i),p=Ie("options"),d={...Zi,...p.data_tab},[m,b]=useState([]),[f,y]=useState([]),[h,w]=useState(),[I,k]=useState(),[A,N]=useState(!1),[z,E]=useState({}),[F,C]=useState(!0),[R,x]=useState(!0),{sectionVariables:L,setSectionVariables:D,resetSectionVariables:O}=Ae(t.id),P=t.blocks||[],j=Q(M=>M),K=useMemo(()=>P.reduce((M,_)=>{let te=j.records.entities.block[_],G=j.variables.variables[_],J=j.variables.status[_];return (g.GENERATOR===te.type&&G._downloadEnabled===!0&&J.allowed||g.VIZ===te.type&&J.allowed)&&(M[_]={entity:te,variables:j.variables.variables[_],status:j.variables.status[_],inputVariablesFlat:te.inputs.reduce((Y,ie)=>({...Y,...j.variables.variables[ie]}),j.variables.attributes)}),M},{}),[P]),q=M=>{y(_=>_.includes(M)?_:[..._,M]);},ee=M=>{b(_=>(_.find(G=>G.ix===M.ix)?_:[..._,M]).sort((G,J)=>G.ix>J.ix?1:-1));};function oe(M){!h&&M[0]&&ce(M[0]);}function ce(M){w(M),k("0");}useEffect(()=>{let M=async(_,te,G)=>{let J=dataLoad.bind({});return new Promise((Y,ie)=>{J(te,null,null,(le,ct)=>{if(le)ie(le);else {let fe=G instanceof Function?G(ct):ct;_.data.unshift(fe),ee(_),Y(ct);}});})};if(m.length===0&&f.length===0){let _=0;for(let te of Object.values(K)){let G=te.entity;if([g.GENERATOR,g.SECTION_FLAG].includes(G.type)){let J=te.variables._downloadData||te.variables._downloadUrl||te.status.api;if(J){let Y=[];typeof J=="string"?Y=J.split(Sn):Y=[J];let ie=te.variables._downloadTitle||`${d.data_source} ${_+1}`,le=te.variables._downloadFileName||ie;ee({ix:_,id:G.id,title:xo(ie),fileName:le,data:Array.isArray(Y)?Y:[Y],loading:!1,type:g.GENERATOR}),q(_),_++;}}else if(G.type===g.VIZ){let J=Oe(G),Y=te.inputVariablesFlat,ie={variables:Y},le=ot({logic:J.logic},u,ie).logic,ct={router:o,section:{variables:L,setVariables:D,resetVariables:O}},fe=ir(le,u,Y,i,G.id,{},ct),ut=fe.config._downloadTitle||fe.config.title||`${d.viz_source} ${_+1}`,Dt=fe.config._downloadFileName||ut;if(fe.config._downloadEnabled!==!1)try{let He=fe.config._downloadUrl||fe.config.data,Eo=typeof He=="string"?[He]:He,ko=fe.dataFormat instanceof Function?fe.dataFormat:!1,mr=fe.config._downloadDataFormat instanceof Function?fe.config._downloadDataFormat:!1;M({ix:_,id:G.id,title:xo(ut),fileName:Dt,data:Eo,loading:!1,type:g.VIZ},He,mr||ko),q(_),_++;}catch(He){console.error("DataLoad catch",He);}}}x(!1);}},[K]),useEffect(()=>{m.length===f.length&&oe(m);},[m]),useEffect(()=>{if(h&&I){let M=parseInt(I,10);if(h.data[M]&&(!z[h.ix]||!z[h.ix][I])){C(!0);let _=h.data[I];typeof _=="string"?Ha(_,r,i).then(te=>{let G=MR(te);E({...z,[h.ix]:{...z[h.ix],[M]:G}});}).catch(te=>{console.error(te);}).finally(()=>{C(!1);}):(E({...z,[h.ix]:{...z[h.ix],[M]:_}}),C(!1));}}},[I,h]);let U=(M,_)=>{let te=M===_?"":`-${M}`.toLowerCase();if(h){let G=h.data.length>1&&I?`-${parseInt(I,10)+1}`:"";return `${Xt(h.fileName)}${te}${G}.${_.toLowerCase()}`}return `${te}.${_}`},X=async M=>{if(h){N(!0);let _=new TR,te=U(M,M);try{switch(M){case pa.json.extension:_.file(te,JSON.stringify(H));break;case pa.csv.extension:_.file(te,csvFormat(H));break;case pa.xlsx.extension:let{utils:G,write:J}=await import('xlsx'),Y=G.book_new();G.book_append_sheet(Y,G.json_to_sheet(H),te.substring(0,30));let ie=J(Y,{bookType:"xlsx",bookSST:!0,type:"binary"});_.file(te,ie,{binary:!0});break;default:break}_.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}}).then(G=>{N(!1),saveAs(G,U(M,"zip"));});}catch(G){console.error(d.error_generating,G),N(!1);}}},H=useMemo(()=>h&&z[h.ix]&&z[h.ix][I]?z[h.ix][I]:[],[z,h,I]),$=useMemo(()=>m&&m.length>0&&m.length===f.length&&m.map((M,_)=>jsx(Button,{leftIcon:jsx(IconDatabase,{size:16}),onClick:()=>ce(M),variant:h?.ix===_?"filled":"default",loading:M.loading,disabled:M.loading,children:M.title},`source-${M.id}-${_}`)),[m,h,f]);return jsxs(Stack,{className:"cms-section-options-data",children:[jsx(Space,{h:"xs"}),jsx(LoadingOverlay,{visible:R,overlayBlur:2}),m.length===0&&!R&&jsxs(Alert,{icon:jsx(IconAlertCircle,{size:"1rem"}),title:"Oops!",children:[d.no_data_src," awa"]}),m.length>1&&m.length===f.length&&!R&&jsx(Input.Wrapper,{label:`${d.choose_data_src}:`,children:jsx(Group,{spacing:"xs",children:$})}),h&&I&&jsx(Stack,{spacing:"xs",children:jsx(Input.Wrapper,{label:`${d.preview}
|
|
61
61
|
${H.length>l?d.rows_preview.replace("{nrows}",l):""}:`,children:jsxs(Group,{spacing:"xs",children:[jsx(Select,{disabled:!(h.data.length>1),style:{flex:"1"},value:I,onChange:M=>k(M),data:h.data.map((M,_)=>({value:`${_}`,group:typeof M=="string"?d.raw_group:d.formatted_group,label:typeof M=="string"?M:d.formatted_src.replace("{src}",h.title)})),icon:typeof h.data[I]=="string"?jsx(IconLink,{}):jsx(IconSparkles,{})}),jsx(CopyButton,{value:typeof h.data[I]=="string"?h.data[I]:"",timeout:2e3,children:({copied:M,copy:_})=>jsx(Tooltip,{label:M?d.copied:d.copy,withArrow:!0,position:"top",children:jsx(ActionIcon,{variant:M?"filled":"subtle",onClick:_,disabled:typeof h.data[I]!="string",children:M?jsx(IconClipboardCheck,{size:16}):jsx(IconClipboardCopy,{size:16})})})})]})})}),h&&!F&&H.length===0&&jsx(Alert,{icon:jsx(IconAlertCircle,{size:"1rem"}),title:"Oops!",children:d.error_preview}),h&&I&&!F&&H.length===0&&jsx("a",{href:h.data[I],target:"_blank",rel:"noreferrer",children:jsx(Button,{leftIcon:jsx(IconExternalLink,{size:16}),fullWidth:!0,children:d.open_in_window.replace("{src}",h.title)})}),jsxs(Stack,{pos:"relative",mih:"430px",children:[jsx(LoadingOverlay,{visible:F&&m.length>0,overlayBlur:2}),h&&!F&&H.length>0&&jsxs(Fragment,{children:[jsx(Box,{h:"350px",children:jsx(am,{data:H.slice(0,l)})}),jsx(Input.Wrapper,{label:`${d.download}:`,children:jsx(Button.Group,{children:Object.values(pa).map(M=>jsx(Button,{leftIcon:jsx(M.icon,{size:24}),onClick:()=>X(M.extension),loading:A,fullWidth:!0,children:M.extension},`format-${M.extension}`))})})]})]})]})}var pa,Zi,MR,Ji=v(()=>{c();he();sm();ye();Jo();ln();ji();br();Se();hr();Sr();po();$a();gt();pa={csv:{extension:"CSV",icon:IconFileTypeCsv},json:{extension:"JSON",icon:IconFileTypeJs},xlsx:{extension:"XLSX",icon:IconFileTypeXls}},Zi={data_source:"Data Source",no_data_src:"No data sources defined",viz_source:"Visualization Source",error_generating:"Error generating file.",choose_data_src:"Choose data source",original_src:"Original {src}",loading:"Loading...",error_preview:`Sorry. We could not generate the data preview as a table.
|
|
62
|
-
Try to open the source and check the data directly.`,open_in_window:"Open {src} response in a new window",formatted_src:"Formatted {src}",formatted_group:"Formatted Data",raw_group:"Raw Data",rows_preview:"(First {nrows} rows as preview)",choose_format:"Choose format",processing_file:"Processing file...",download:"Download data as",preview:"Preview",copy:"Click to copy",copied:"Copied!"},MR=e=>{let t=[];return e&&e.data&&(e.data&&Array.isArray(e.data)?t=e.data:e.data&&e.data.data&&Array.isArray(e.data.data)?t=e.data.data:e.data&&e.data.data&&e.data.data.results&&Array.isArray(e.data.data.results)?t=e.data.data.results:e.data&&e.data.results&&Array.isArray(e.data.results)&&(t=e.data.results)),t};});function hm(e){let{section:t}=e,r=t.blocks||[],o=Q(G=>r.map(J=>G.records.entities.block[J]).filter(J=>J.type===g.VIZ&&G.variables.status[J.id].allowed)),{variant_slug1:n,slug1:a}=Q(G=>G.variables.attributes),s=Rp(),[i,l]=useState(vt.section),[u,p]=useState(St.png),[d,m]=useState(!1),[b,f]=useState(!1),[y,h]=useState([]),[w,I]=useState(o.length>0?o[0].id:null),k=i!==vt.section,{print:A,downloadLoading:N,error:z}=xp(t.id,n,a,k?w:null),[E,F]=useState(!0),[C,R]=useState(!1),x=Ie("options"),L={...tE,...x.image_tab},{siteProps:D}=Ar(),O=D?.logoSrc&&typeof D.logoSrc=="string",P=t?.settings?.name||`section-${t.id}`,j=`#${P}`,K=useMantineTheme(),q=()=>{let G=ce(w);return select(G).select("svg").size()===1},ee=()=>`${Xt(P)}`,oe=()=>{let G=document.getElementById(P);return select(G).select(".bespoke-section-content").node()},ce=G=>{let J=oe();return select(J).select(`#bespoke-visualization-${G}.bespoke-block-area`).node()},U=()=>new Promise(G=>{let J;i===vt.section?J=oe():i===vt.viz&&(J=ce(w));let Y=document.createElement("div");Y.style.display="flex",Y.style.justifyContent="space-between",Y.classList.add("bespoke-Viz-source"),Y.style.padding=K.spacing.xs,Y.style.width="100%";let ie=document.createElement("div");if(ie.innerText=L.source.replace("{src}",`${window.location}${j}`),ie.style.fontSize=K.fontSizes.xs,Y.appendChild(ie),O){let le=document.createElement("img");le.src=D.logoSrc,le.style.height="30px",le.onload=()=>G(J),le.onerror=()=>{le.remove(),G(J);},Y.appendChild(le),J.appendChild(Y);}else J.appendChild(Y),G(J);}),X=G=>{if(E)return "transparent";let J=select(G).style("background-color");return J!=="rgba(0, 0, 0, 0)"&&J!=="transparent"?J:G===document.body?"white":X(G.parentNode)},H=async(G,J)=>{let{toPng:Y}=await import('html-to-image');Y(G,{backgroundColor:J.background,cacheBust:!0,filter:ie=>ie&&ie.classList?!J.exclusionClasses.some(le=>ie.classList.contains(le)):!0}).then(ie=>{let le=document.createElement("a");le.download=`${J.filename}.png`,le.href=ie,le.click(),eE(),m(!1);}).catch(ie=>{console.log(ie);});},$=(G,J)=>{saveElement(G,{filename:J.filename,type:"svg",callback:()=>m(!1)},{background:J.background});},M=async()=>{m(!0);let G=await U(),J={background:X(G),exclusionClasses:["export-hidden"],filename:ee()},Y=u===St.png?H:$;try{if(G)Y(G,J);else throw new Error(L.wrong_node)}catch{m(!1);}},_=async()=>{let{toCanvas:G}=await import('html-to-image');Promise.all(o.map(J=>{let Y=ce(J.id),ie=Y.querySelector("g.d3plus-geomap-tileGroup");return ie.style.display="none",G(Y).then(le=>(ie.style.display="block",le))})).then(J=>{h(J.map(Y=>Y.toDataURL())),R(!1);});};useEffect(()=>{i===vt.viz&&o.length>0?(I(o[0].id),R(!0),_()):i===vt.section&&h([]);},[i]),useEffect(()=>{w&&(q()?f(!0):(f(!1),p(St.png)));},[w]);useRouter();return jsxs(Stack,{className:"cms-section-options-image",children:[jsx(Space,{h:"xs"}),o.length>0?jsx(Input.Wrapper,{label:`${L.choose_area}:`,children:jsx(SegmentedControl,{fullWidth:!0,value:i,data:[{value:vt.section,label:jsxs(Center,{children:[jsx(IconTemplate,{size:"1rem"}),jsx(Box,{ml:10,children:L.entire_section})]})},{value:vt.viz,label:jsxs(Center,{children:[jsx(IconChartBar,{size:"1rem"}),jsx(Box,{ml:10,children:L.viz_only})]})}],onChange:G=>{l(G),G===vt.section&&p(St.png);}})}):jsx(Text,{fw:"700",color:"gray.7",children:`${L.entire_section}:`}),i===vt.viz&&o.length>0&&jsxs(Input.Wrapper,{label:`${L.choose_viz}:`,style:{minHeight:"161px",position:"relative"},children:[!C&&y.length>0&&jsx(ScrollArea,{style:{height:250},children:jsx(SimpleGrid,{cols:3,children:o.map((G,J)=>jsx(Image,{alt:`Viz ${G.id}`,onClick:()=>{I(G.id);},style:{cursor:"pointer",border:w===G.id?"4px solid #228be6":"4px solid #eee"},radius:0,src:y[J],withPlaceholder:!0},`viz-option-${G.id}`))})}),jsx(LoadingOverlay,{visible:C})]}),b&&i!==vt.section&&jsx(Input.Wrapper,{label:`${L.choose_format}:`,children:jsxs(Button.Group,{children:[jsx(Button,{leftIcon:jsx(IconPolaroid,{size:16}),onClick:()=>p(St.png),variant:u===St.png?"filled":"default",fullWidth:!0,children:St.png}),jsx(Button,{leftIcon:jsx(IconCode,{size:16}),onClick:()=>p(St.svg),variant:u===St.svg?"filled":"default",fullWidth:!0,children:St.svg})]})}),jsx(Checkbox,{checked:E,label:`${L.transparent_bg}`,onChange:()=>F(!E),radius:"xl"}),jsx(Button,{leftIcon:jsx(IconDownload,{size:16}),loading:d||N,onClick:s&&u!==St.svg?()=>A(E):M,fullWidth:!0,children:jsx("span",{children:d||N?L.processing:L.download.replace("{imageFormat}",u)})})]})}var vt,St,eE,tE,ym=v(()=>{c();ln();he();gt();Ut();ea();ye();vt={viz:"viz",section:"section"},St={png:"PNG",svg:"SVG"},eE=()=>{let e=document.getElementsByClassName("bespoke-Viz-source");Array.from(e).forEach(t=>t.remove());},tE={wrong_node:"Wrong node in export",choose_area:"Choose image area",choose_viz:"Choose visualization",choose_format:"Choose format",transparent_bg:"Transparent background",processing:"Processing image...",download:"Download {imageFormat}",entire_section:"Entire section",viz_only:"Visualization only",source:"Source: {src}"};});function vm(e){let{title:t,url:r,disabled:o=!1}=e,n=o?IconCode:IconLink;return jsx(Input.Wrapper,{label:t,children:jsx(Input,{icon:jsx(n,{}),value:r,disabled:o,readOnly:!0,rightSection:jsx(CopyButton,{value:r,timeout:2e3,children:({copied:a,copy:s})=>jsx(Tooltip,{label:a?"Copied":"Copy",withArrow:!0,position:"right",children:jsx(ActionIcon,{variant:a?"filled":"subtle",onClick:s,disabled:o,children:a?jsx(IconClipboardCheck,{size:16}):jsx(IconClipboardCopy,{size:16})})})})})})}var Sm=v(()=>{c();});function xm(e){let{section:t}=e,[r,o]=useState(""),[n,a]=useState(""),[s,i]=useState(!0),l=Ie("options"),u={...AE,...l.share_tab};return useEffect(()=>{a(document.title);let{origin:p,pathname:d}=window.location,m=`${p}${d}`,b=s?t.settings?.name?.length?`#${Xt(t.settings.name)}`:`#section-${t.id}`:"";o(`${m}${b}`);},[s]),jsxs(Stack,{className:"cms-section-options-share",children:[jsx(Space,{h:"xs"}),jsx(vm,{title:`${u.title}: ${n}`,url:r}),jsx(Checkbox,{checked:s,label:u.include_section,onChange:()=>i(!s),radius:"xl"}),jsxs(Group,{position:"center",children:[jsx(FacebookShareButton,{url:r,quote:n,children:jsx(FacebookIcon,{size:32,round:!0})}),jsx(TwitterShareButton,{url:r,title:n,children:jsx(TwitterIcon,{size:32,round:!0})}),jsx(TelegramShareButton,{url:r,title:n,children:jsx(TelegramIcon,{size:32,round:!0})}),jsx(WhatsappShareButton,{url:r,title:n,separator:":: ",children:jsx(WhatsappIcon,{size:32,round:!0})}),jsx(LinkedinShareButton,{url:r,children:jsx(LinkedinIcon,{size:32,round:!0})}),jsx(RedditShareButton,{url:r,title:n,windowWidth:660,windowHeight:460,children:jsx(RedditIcon,{size:32,round:!0})}),jsx(EmailShareButton,{url:r,subject:n,children:jsx(EmailIcon,{size:32,round:!0})})]})]})}var AE,Rm=v(()=>{c();Sm();gt();ln();AE={title:"Title",include_section:"Include Section"};});function Cm(e){let{section:t,initialMode:r,onEnds:o,open:n,title:a}=e,s=la(t.settings),i=useMemo(()=>OE.filter(b=>s[b]),[s]),[l,u]=useState(r||i[0]||"data"),p=Ie("options");useEffect(()=>{r!==l&&u(r);},[r]);let d={...rl,...p},m=useMemo(()=>jsxs(Fragment,{children:[jsxs(Tabs.List,{children:[s.data&&jsx(Tabs.Tab,{value:"data",children:d.download_title}),s.image&&jsx(Tabs.Tab,{value:"image",children:d.image_title}),s.share&&jsx(Tabs.Tab,{value:"share",children:d.share_title})]}),s.data&&jsx(Tabs.Panel,{value:"data",children:jsx(dm,{section:t})}),s.image&&jsx(Tabs.Panel,{value:"image",children:jsx(hm,{section:t})}),s.share&&jsx(Tabs.Panel,{value:"share",children:jsx(xm,{section:t})})]}),[s,t,d]);return jsx("div",{className:"cms-section-options-modal",children:n&&jsx(Modal,{className:"bespoke-options-modal",opened:!0,onClose:()=>o(),size:"xl",title:a,children:jsx(Tabs,{onTabChange:u,value:l,keepMounted:!1,children:m})})})}var rl,OE,Pm=v(()=>{c();Ji();ym();Rm();gt();ca();rl={download_title:"Download Data",image_title:"Save Image",share_title:"Share Link"},OE=["data","image","share"];});function Im(e){let{sectionId:t,disabled:r=!1}=e,[o,n]=useState(!1),[a,s]=useState("data"),i=Mn(t),l=Ie("options"),u={...rl,...l},p=la(i.isSuccess?i.data.settings:{}),d=b=>{s(b),n(!0);},m=()=>{n(!1);};return jsxs("div",{className:"cms-section-options",children:[jsxs(Button.Group,{children:[p.data&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("data"),"aria-label":u.download_title,disabled:r,children:jsx(IconTable,{size:16})}),p.image&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("image"),"aria-label":u.image_title,disabled:r,children:jsx(IconCamera,{size:16})}),p.share&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("share"),"aria-label":u.share_title,disabled:r,children:jsx(IconShare,{size:16})})]}),i.isSuccess&&jsx(Cm,{section:i.data,initialMode:a,open:o,onEnds:m})]})}var Lm=v(()=>{c();Pm();he();gt();ca();});function DE({children:e,containerProps:t},r){return jsx(Flex,{ref:r,className:"bespoke-section-content",pos:"relative",align:"stretch",p:0,direction:{base:"column",md:"row"},wrap:"wrap",...t,children:e})}var ga,Bm,Nm=v(()=>{c();he();Qs();ga=Kt__default.forwardRef(function({children:t,column:r,basis:o,columnSettings:n={},sx:a={},...s},i){let l=Object.values(r).some(m=>m.settings?.display==="inline"),u=n?.width?`${n.width}px`:o,p=n?.width?`${n?.width}px`:"100%",d=n?.full?"100%":p;return jsx(Flex,{ref:i,className:"bespoke-section-col",align:"flex-start",direction:l?"row":"column",wrap:l?"wrap":"nowrap",maw:{base:"100%",md:d},miw:{base:"none",md:300},p:0,pos:"relative",sx:[{flexGrow:1,flexShrink:n?.full?0:1,flexBasis:n?.full?"100%":u},...packSx(a)],...s,children:t})}),Bm=Kt__default.forwardRef(DE);});var Fm=v(()=>{c();});var pn,Dm=v(()=>{c();ze();he();Fm();ye();pn={px:e=>Number.isNaN(parseFloat(e))?"px":`${e}px`.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),"%":e=>Number.isNaN(parseFloat(e))?"%":`${e}%`.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},{px:{defaultValue:400,min:25,step:5,formatter:pn.px},"%":{defaultValue:50,min:20,max:100,step:5,formatter:pn["%"]}};});var ol,Vm=v(()=>{c();ol={backgroundColor:"#fafafa",block:{padding:10},column:{padding:12},section:{backgroundColor:"white",borderRadius:10,boxShadow:"0px 6px 10px rgba(12, 32, 50, 0.14), 0px 1px 15px rgba(12, 32, 50, 0.12), 0px 3px 5px rgba(12, 32, 50, 0.15)",margin:8,padding:32}};});function al({previews:e,translations:t}){let{print:r}=$e(),o=useMemo(()=>e.map(({image:n,name:a},s)=>(n?.author||n?.url)&&jsxs(Stack,{spacing:0,children:[n.author&&jsxs(Text,{size:"xs",children:[a," ",t.image_by," ",jsx("strong",{children:n.author})]}),n.url&&jsxs(Text,{size:"xs",children:["URL: "," ",jsx(Anchor,{href:n.url,target:"_blank",children:n.url})]}),s+1<e.length&&jsx(Divider,{})]},n.id)),[e]);return jsx(Fragment,{children:r?jsx(Fragment,{children:o}):jsxs(Popover,{position:"right",children:[jsx(Popover.Target,{children:jsx(ActionIcon,{variant:"light",radius:"xl",children:jsx(IconPhoto,{size:20})})}),jsx(Popover.Dropdown,{children:o})]})})}var Um=v(()=>{c();jt();});function Gm(){let{locales:e}=useRouter(),t=location&&location.pathname.split("/").filter(r=>r.length>0)[0];return e?.includes(t)}var Hm=v(()=>{c();});function JE({name:e,children:t,id:r,sectionSettings:o,sectionStyles:n,previews:a,translations:s}){let{print:i}=$e(),l=o.memberImageBg&&a.some(({image:p})=>p&&(p.url||p.author)),u=useMemo(()=>o.showAnchor&&o.optionsMenu?"apart":!o.showAnchor&&o.optionsMenu?"right":o.showAnchor&&!o.optionsMenu?"left":"right",[o.showAnchor,o.optionsMenu]);return jsxs(XE,{className:`bespoke-Section-${r} bespoke-Section-root `,settings:o,styles:n?.root||void 0,print:i,children:[o.memberImageBg&&jsx(om,{previews:a}),jsxs(QE,{className:`bespoke-Section-${r} bespoke-Section-container `,settings:o,styles:n?.container,id:e?.length?Xt(e):`section-${r}`,pos:"relative",children:[!i&&jsxs(Group,{position:u,mb:"xs",children:[o.showAnchor&&jsxs(Anchor,{className:"cms-section-anchor",href:`#${o.name?Xt(o.name):"section-"+r}`,sx:{"&:hover .cms-section-name":{visibility:"visible",opacity:1}},children:[jsx(Text,{span:!0,size:"small",children:"#"}),jsx(Text,{span:!0,size:"small",className:"cms-section-name",sx:{visibility:"hidden",opacity:0,transition:"visibility 0s, opacity 0.2s ease-in-out"},children:o.name||"section-"+r})]}),o.optionsMenu&&jsx(Im,{sectionId:r,disabled:!1})]}),jsxs(ZE,{print:i,className:`bespoke-Section-${r} bespoke-Section-container`,settings:o,styles:n?.content,children:[t,l&&jsx(al,{previews:a,translations:s})]})]})]})}function tk({section:e,sectionLoader:t}){let{isEmbed:r}=$e(),{id:o,settings:n}=e,a={...rm,...n},s=Ye(),i=Q(E=>E),l=Q(E=>E.variables.status),{previews:u,isRunConsumersRunning:p}=Q(E=>E.status),d=s.active&&s.status?u.concat(s.status?.previews||[]):u,m=et().Section,b=At(i),f=Object.values(b||{}).filter(E=>E.section_id===o),y=Ie("sections"),h={...YE,...y},w=f.some(E=>{try{return l[E.id].allowed&&![g.GENERATOR,g.SECTION_FLAG].includes(E.type)||E.type===g.NAV}catch{return E.settings.allowed==="always"}}),I=f.filter(E=>![g.GENERATOR,g.SECTION_FLAG].includes(E.type)).reduce((E,F)=>(E[F.blockcol]?E[F.blockcol][F.blockrow]=F:E[F.blockcol]={[F.blockrow]:F},E),{}),k=Object.keys(f).length>0&&!n.hidden&&w,A=Object.keys(I).length;if(!k||s.active&&n.comparisonHide)return null;let N=(E,F=!1)=>{let C=Array.from(new Set(E.map(x=>x.blockcol))).map(x=>({blockcol:x})).sort((x,L)=>je(x,L,"blockcol")),R=[];return C.forEach(({blockcol:x})=>{let L=E.filter(D=>D.blockcol===x).sort((D,O)=>je(D,O,"blockrow")).map(D=>{if(!D.id||!l[D.id]?.allowed&&D.type!==g.NAV)return null;let{settings:O,type:P}=b[D.id],j=O.width&&!O.width.stretch&&O.width.unit?pn[O.width.unit](O.width.value):O.display==="inline"?"auto":"100%",K={alignSelf:P===g.VIZ?"stretch":"flex-start",flexGrow:0,margin:"0",width:j,minWidth:300};return jsx(Box,{className:"bespoke-Block-wrapper",id:`bespoke-Block-${D.id}`,sx:K,py:ol.block.padding,children:jsx(ia,{blockId:D.id,asComparison:F},D.id)},D.id)});R.push(L);}),R.flat()},z=[];if(s.active&&!n.comparisonMerge){let E=f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type)).reduce((F,C)=>({...F,[C.id]:C}),{});z=[jsx(ga,{column:E,basis:"50%",children:N(Object.values(f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type))))},"original"),jsx(ga,{column:E,basis:"50%",children:N(Object.values(f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type))),!0)},"comparison")];}else z=Object.keys(I).sort((E,F)=>-wa(E,F)).map(E=>{let F=I[E],C=n.columnSettings?n.columnSettings[E]:{},R=Object.values(F).sort((x,L)=>je(x,L,"blockrow"));return R.some(x=>!l[x.id]||l[x.id].allowed||x.type===g.NAV)?jsx(ga,{column:F,columnSettings:C,basis:`calc(${100/A}% - (10px * ${A}))`,children:R.map(x=>{if(!x.id||!l[x.id]?.allowed&&x.type!==g.NAV)return null;let{settings:L,type:D}=b[x.id],O=L.width&&!L.width.stretch&&L.width.unit?pn[L.width.unit](L.width.value):L.display==="inline"?"auto":"100%",P={alignSelf:D===g.VIZ?"stretch":"flex-start",flexGrow:0,margin:"0",width:O,minWidth:300};return jsx(Box,{className:`bespoke-Block-wrapper bespoke-${x.type}-wrapper`,id:`bespoke-Block-${x.id}`,sx:P,py:ol.block.padding,children:jsx(ia,{blockId:x.id},x.id)},x.id)})},E):null});return jsxs(JE,{id:o,name:e?.settings?.name,previews:d,sectionSettings:a,sectionStyles:m,translations:h,children:[p.includes(o)&&t,jsx(Bm,{containerProps:{gap:a.columnGutter||"md",wrap:s.active?"nowrap":"wrap",sx:{zIndex:20}},children:z}),r&&jsx(ek,{})]})}var YE,sl,XE,QE,ZE,ek,Xm,Qm=v(()=>{c();he();or();em();ca();zr();nm();Lm();Or();ye();Nm();Dm();Vm();jt();gt();Um();Wt();ln();Ut();Hm();YE={image_by:"image by"},sl=(e,t)=>r=>e?e(r,t):{},XE=({settings:e,styles:t,print:r,children:o,...n})=>{let{position:a,shouldBreak:s}=e,i={normal:{position:"relative",backgroundColor:r?"transparent":"initial",borderRadius:0},sticky:{position:"sticky",zIndex:2,top:0,borderRadius:0,borderTop:r?"none":"initial",borderLeft:r?"none":"initial",borderRight:r?"none":"initial"}},l={normal:{radius:0},sticky:{radius:0,withBorder:!0}},u=[i[a],sl(t,e),s?{pageBreakBefore:"always"}:{}];return jsx(Paper,{component:"section",sx:u,...l[a],...n,children:o})},QE=({settings:e,styles:t,children:r,...o})=>{let{width:n}=e,a={center:{zIndex:1},full:{zIndex:1}},s={center:{size:"lg",p:"sm",fluid:!1},full:{fluid:!0,p:"md"}},i=[a[n],sl(t,e)];return jsx(Container,{sx:i,...s[n],...o,children:r})},ZE=({settings:e,styles:t,print:r,children:o,...n})=>{let{style:a}=e,s={none:{},card:{boxShadow:r?"none":"initial"}},i={none:{bg:"transparent"},card:{shadow:r?"none":"lg",p:"md",radius:"md"}},l=[s[a],sl(t,e)];return jsx(Paper,{sx:l,...i[a],...n,"data-screenshot-target":"true",children:o})};ek=()=>{let e=useRouter(),{query:t,locale:r}=e,{siteProps:o={logoSrc:""},profilePrefix:n,pathSegment:a}=Ar(),s=t[a],i=Array.isArray(s)?s.join("/"):[],u=Gm()?`/${r}`:"";u+=`${n}/${i}/`;let p=new URL(u,window.location.href).href;return jsxs(Group,{position:"apart",noWrap:!0,sx:{flexGrow:1},children:[jsx(Anchor,{href:p,target:"_blank",children:p}),jsx("img",{src:o.logoSrc,height:40,width:"auto",alt:"Site Logo"})]})};Xm=tk;});var Zm=v(()=>{c();ae();W({name:"abbreviate",description:"Abbreviates a number into a smaller more human-readable number.",logicFactory(e){return t=>e.d3plus.formatAbbreviate(t)},inputType:"number",testValue:"123456",type:"formatter"});});var Jm=v(()=>{c();ae();W({name:"abs",description:"Simple Absolute Value.",logicFactory(e){return t=>Math.abs(t)},inputType:"number",testValue:"-123",type:"formatter"});});var nk,ef=v(()=>{c();ae();nk=()=>function(t){let o=new RegExp(/([\$0-9\,]+)[A-z\-\s\&]*([\$0-9\,]*)/g).exec(t);return o?(o=o.slice(1).filter(n=>n.length).map(n=>(n.includes(",")&&(n.indexOf(",")===n.length-4?n=n.replace(/,000$/g,"k").replace(/([0-9]+)(,999$)/g,a=>`${parseInt(a)+1}k`):n.indexOf(",")===n.length-8&&(n=n.replace(/,000,000$/g,"M").replace(/([0-9]+)(,999,999$)/g,a=>`${parseInt(a)+1}M`))),n)),o.length===2?o.join(" - "):t.toLowerCase().match(/under|less|\</g)?`< ${o[0]}`:t.toLowerCase().match(/over|more|\+|\>/g)?`${o[0]}+`:`${o[0]}`):"None"},W({name:"bucket",description:"Sanitizes bucket strings to '< n', 'n1 - n2', and 'n+'",logicFactory:nk,inputType:"number",testValue:"1234",type:"formatter"});});var tf=v(()=>{c();ae();W({name:"commas",description:"* Rounds to nearest whole number and adds commas.",logicFactory(e){return t=>e.d3.format(",")(Math.round(t))},inputType:"number",testValue:"1234.6",type:"formatter"});});var rf=v(()=>{c();ae();W({name:"date",description:"Formats a date into '%B %d, %Y' format.",logicFactory(e){return t=>(typeof t=="string"&&(t=e.d3plus.date(t)),e.d3.timeFormat("%B %d, %Y")(t))},inputType:"date",testValue:"2022-01-01",type:"formatter"});});var of=v(()=>{c();ae();W({name:"dollar",description:"Adds a US dollar sign to the beginning of a String or Number.",logicFactory(e){return t=>(typeof t=="number"&&(t=e.d3plus.formatAbbreviate(t)),t.charAt(0)==="-"?t.replace("-","-$"):`$${t}`)},inputType:"number",testValue:"123",type:"formatter"});});var nf=v(()=>{c();ae();W({name:"formatFieldName",description:"Based on field name returns a string",logicFactory(e){return t=>{if(t.contentType.toLowerCase()==="stat"){if(t.field==="title")return "Stat label";if(t.field==="value")return "Stat value";if(t.field==="subtitle")return "Stat subtitle";if(t.field==="tooltip")return "Tooltip text"}return t.contentType.toLowerCase()==="section"&&t.field==="short"?"Short title":t.contentType.toLowerCase()==="description"&&t.field==="description"?"Paragraph":t.field}},inputType:"object",testValue:'{"field":"title","contentType":"stat"}',type:"formatter"});});var af=v(()=>{c();ae();W({name:"grewTo",description:"Returns the text with grow direction: 'declined from', 'grew to' o 'stayed at'",logicFactory(e){return t=>t<0?"declined from":t>0?"grew to":"stayed at"},inputType:"number",testValue:"-1234",type:"formatter"});});var sf=v(()=>{c();ae();W({name:"grewWord",description:"Returns either 'grew', 'declined', or 'stayed' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"declined":t>0?"grew":"stayed"},inputType:"number",testValue:"-1234",type:"formatter"});});var lf=v(()=>{c();ae();W({name:"growing",description:"Returns either 'declining', 'growing' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"declining":"growing"},inputType:"number",testValue:"-1234",type:"formatter"});});var mk,cf=v(()=>{c();ae();mk=()=>function(t){let{curr:r,currMoe:o=0,prev:n,prevMoe:a=0}=t,s;if(o||a){let i=(-n/r**2)**2*o**2,l=(1/r)**2*a**2;s=Math.sqrt(i+l);}else s=(r-n)/n;return s*100},W({name:"growth",description:"Calculates the growth percentage between two numbers provided the following object format: {curr, prev}. Also supports calculating the growth between two margin of errors using this format: {curr, currMoe, prev, prevMoe}",logicFactory:mk,inputType:"object",testValue:'{"curr":10,"currMoe":0,"prev":13,"prevMoe":0}',type:"formatter"});});var uf=v(()=>{c();ae();W({name:"growthPct",description:"Abbreviates a growth value, turns it absolute, and adds a percent sign.",logicFactory(e){return t=>`${e.d3plus.formatAbbreviate(Math.abs(t))}%`},inputType:"number",testValue:"12345",type:"formatter"});});var pf=v(()=>{c();ae();W({name:"growthWord",description:"Returns either 'growth' or 'decline' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decline":"growth"},inputType:"number",testValue:"-1234",type:"formatter"});});var df=v(()=>{c();ae();W({name:"highWord",description:"Returns either 'higher than', 'lower than', or 'approximately the same as' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"lower than":t>0?"higher than":"approximately the same as"},inputType:"number",testValue:"0",type:"formatter"});});var mf=v(()=>{c();ae();W({name:"increaseWord",description:"Returns either 'increase', 'decrease', or 'change' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decrease":t>0?"increase":"change"},inputType:"number",testValue:"1234",type:"formatter"});});var ff=v(()=>{c();ae();W({name:"increasedWord",description:"Returns either 'increased', 'decreased', or 'remained the same' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decreased":t>0?"increased":"remained the same"},inputType:"number",testValue:"0",type:"formatter"});});var gf=v(()=>{c();ae();W({name:"increasing",description:"Returns either 'decreasing', 'increasing' or 'maintaining' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decreasing":t>0?"increasing":"maintaining"},inputType:"number",testValue:"-1234",type:"formatter"});});var hf=v(()=>{c();ae();W({name:"largerThan",description:"Returns either 'higher than', 'lower than', or 'approximately the same as' depending on the provided number's sign",logicFactory(e){return t=>t<0?"smaller than":t>0?"larger than":"the same as"},inputType:"number",testValue:"-1234",type:"formatter"});});var yf=v(()=>{c();ae();W({name:"list",description:"Joins an array of strings together, adding commas and 'and' when necessary.",logicFactory(e){return t=>t.reduce((r,o,n)=>(n?n===t.length-1&&n===1?r+=` and ${o}`:n===t.length-1?r+=`, and ${o}`:r+=`, ${o}`:r+=o,r),"")},inputType:"object",testValue:'["foo","bar","bee"]',type:"formatter"});});var bf=v(()=>{c();ae();W({name:"longWord",description:"",logicFactory(e){return t=>t<0?"shorter":t>0?"longer":"similar"},inputType:"number",testValue:"5",type:"formatter"});});var vf=v(()=>{c();ae();W({name:"lowerCaseFirst",description:"Converts the first letter of a string to lowercase",logicFactory(e){return t=>typeof t=="string"?t.charAt(0).toLowerCase()+t.slice(1):t},inputType:"string",testValue:"foo",type:"formatter"});});var Sf=v(()=>{c();ae();W({name:"moreFewerWord",description:"",logicFactory(e){return t=>t<0?"fewer":"more"},inputType:"number",testValue:"-5",type:"formatter"});});var Tf=v(()=>{c();ae();W({name:"moreLess",description:"Returns either 'more' or 'less' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"less":"more"},inputType:"number",testValue:"-5",type:"formatter"});});var xf=v(()=>{c();ae();W({name:"moreLess",description:"Returns either 'more than', 'less than', or 'approximately the same' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"less than":t>0?"more than":"approximately the same"},inputType:"number",testValue:"-5",type:"formatter"});});var Rf=v(()=>{c();ae();W({name:"olderWord",description:"",logicFactory(e){return t=>t<0?"getting younger":t>0?"getting older":"staying the same age"},inputType:"number",testValue:"-5",type:"formatter"});});var Ef=v(()=>{c();ae();W({name:"olderYounger",description:"",logicFactory(e){return t=>t<0?"younger than":t>0?"older than":"the same age as"},inputType:"number",testValue:"-5",type:"formatter"});});var kf=v(()=>{c();ae();W({name:"plural",description:"Pluralizes a word.",logicFactory(e){return t=>t.replace(/\w$/g,r=>r==="y"?"ies":`${r}s`)},inputType:"string",testValue:"Foo",type:"formatter"});});var Cf=v(()=>{c();ae();W({name:"pxToInt",description:"Takes a pixel value and converts it to an integer",logicFactory(e){return t=>parseInt(t.replace(/\D+/g,""),10)},inputType:"string",testValue:"12px",type:"formatter"});});var Pf=v(()=>{c();ae();W({name:"salary",description:"Displays salary values with proper precision (ie. '$74,200' instead of '$74.2k')",logicFactory(e){return t=>{let r;return t<1e6?r=e.d3.format(",")(t.toFixed(0)):r=e.d3plus.formatAbbreviate(t),`$${r}`}},inputType:"number",testValue:"1000000",type:"formatter"});});var Af=v(()=>{c();ae();W({name:"stripEntities",description:"Removes non breaking spaces & other html entities from a string",logicFactory(e){return t=>typeof t=="string"?String(t).replace(/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});/ig," "):t},inputType:"string",testValue:"<b>MyText</b>",type:"formatter"});});var il,wf=v(()=>{c();ae();il=W({name:"stripHTML",description:"Converts html tags to spaces, then removes redundant spaces",logicFactory(e){return t=>{let r={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"," ":""},o=`(?:${Object.keys(r).join("|")})`,n=RegExp(o),a=RegExp(o,"g"),s=String(t).replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim();return n.test(s)?s.replace(a,i=>r[i]):s}},inputType:"string",testValue:"<b>My text</b>",type:"formatter"});});var If=v(()=>{c();ae();W({name:"stripOL",description:"Removes ordered list wrapper tags from a string.",logicFactory(e){return t=>t.replace(/<ol>/g,"").replace(/<\/ol>/g,"")},inputType:"string",testValue:"<ol><li>My list</li></ol>",type:"formatter"});});var Lf=v(()=>{c();ae();W({name:"stripP",description:"Removes all paragraph tags from a string.",logicFactory(e){return t=>t.replace(/<p>/g,"").replace(/<\/p>/g,"")},inputType:"string",testValue:"<p>My p</p>",type:"formatter"});});var Of=v(()=>{c();ae();W({name:"stripUL",description:"Removes unordered list wrapper tags from a string.",logicFactory(e){return t=>t.replace(/<ul>/g,"").replace(/<\/ul>/g,"")},inputType:"string",testValue:"<ul><li>My list</li></ul>",type:"formatter"});});var _f=v(()=>{c();ae();W({name:"toKebabCase",description:"Takes a camelCase or PascalCase string and converts it to kebab-case.",logicFactory(e){return t=>typeof t=="string"?(t=t.charAt(0).toLowerCase()+t.substring(1),t.replace(/([A-Z])/g,"-$1").toLowerCase()):"invalid string passed to toKebabCase()"},inputType:"string",testValue:"camelCaseText",type:"formatter"});});var Bf=v(()=>{c();ae();W({name:"toSpacedCase",description:"Takes a camelCase or PascalCase string and adds spaces (I know Spaced Case isn't a thing, deal with it).",logicFactory(e){return t=>typeof t=="string"?t.replace(/([A-Z])/g," $1").toLowerCase().trim():"invalid string passed to toSpacedCase()"},inputType:"string",testValue:"camelCaseText",type:"formatter"});});var Mf=v(()=>{c();ae();W({name:"upperCaseFirst",description:"Converts the first letter of a string to uppercase",logicFactory(e){return t=>t.charAt(0).toUpperCase()+t.slice(1)},inputType:"string",testValue:"my name",type:"formatter"});});var Nf=v(()=>{c();Zm();Jm();ef();tf();rf();of();nf();af();sf();lf();cf();uf();pf();df();mf();ff();gf();hf();yf();bf();vf();Sf();Tf();xf();Rf();Ef();kf();Cf();Pf();Af();wf();If();Lf();Of();_f();Bf();Mf();});function zf({onDownloadPDF:e,onDownloadCSV:t}){let[r,o]=useState(!1),[n,a]=useState(!1),[s,i]=useState(!1),l=useMediaQuery("(max-width: 768px)"),u=Ie("export"),p={...Wk,...u},d=async()=>{if(e){o(!0);try{await e();}finally{o(!1),i(!1);}}},m=async()=>{if(t){a(!0);try{await t();}finally{a(!1),i(!1);}}},b=(h,w,I,k,A,N)=>jsx(Button,{id:N,size:"sm",onClick:h,disabled:w,fullWidth:!0,variant:"subtle",h:"auto",px:"xs",w:"100%",styles:z=>({inner:{width:"100%",display:"block"}}),children:jsxs(Group,{noWrap:!0,position:"left",spacing:"xs",w:"100%",children:[w?jsx(Loader,{size:"1.75rem"}):I,jsxs(Stack,{spacing:0,w:"100%",py:"0.5rem",className:"bespoke-report-download-btn-text-container",children:[jsx(Text,{w:"100%",size:"sm",lineClamp:1,className:"bespoke-report-download-btn-text-container-cta",children:k}),A&&jsx(Text,{size:"xs",w:"100%",lineClamp:2,maw:"100%",style:{wordWrap:"break-word",whiteSpace:"normal"},variant:"dimmed",lh:"0.9rem",h:"1.9rem",className:"bespoke-report-download-btn-text-desc",children:A})]})]})}),f=e&&b(d,r,jsx(IconFileTypePdf,{size:"1.75rem"}),p.pdf.label,p.pdf.desc,"bespoke-download-pdf-btn"),y=t&&b(m,n,jsx(IconFileTypeXls,{size:"1.75rem"}),p.xlsx.label,p.xlsx.desc,"bespoke-download-xlsx-btn");return e||t?jsx(Affix,{position:{bottom:l?rem(0):rem(20),right:l?rem(0):rem(20)},id:"bespoke-report-download-affix",style:{width:l?"100%":"auto",boxShadow:l?"0px -2px 6px rgba(0, 0, 0, 0.1)":"0px 2px 6px rgba(0, 0, 0, 0.1)",borderRadius:"0.25rem",background:"white"},p:"xs",children:jsxs(Popover,{opened:s,onChange:i,position:"top",shadow:"md",width:l?"100%":250,id:"bespoke-report-download-popover",children:[jsx(Popover.Target,{children:jsx(Button,{id:"bespoke-report-download-btn",size:"sm",onClick:()=>i(h=>!h),leftIcon:jsx(IconDownload,{size:"1.2rem"}),variant:"subtle",loading:r||n,fullWidth:l,children:p.export})}),jsx(Popover.Dropdown,{p:"0.5rem",children:jsxs(Stack,{spacing:"xs",children:[f,y]})})]})}):null}var Wk,$f=v(()=>{"use client";c();gt();Wk={export:"Export",pdf:{label:"Download PDF",desc:"Generates a printable version of the report page in PDF format."},xlsx:{label:"Download XLSX",desc:"Creates a downloadable spreadsheet of the report page data."}};});function Qk(e,t){let r=e.replace(/[:\\/?*[\]]/g,"");return r.trim().length===0&&(r=`Sheet${t+1}`),r.slice(0,31)}function Zk(e){let t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o)&255;return t}function Uf(e){return `data_export_${new Date().toISOString()}`}var Xk,Jk,Gf,Hf=v(()=>{c();Xk=e=>new Promise((t,r)=>{let o="xlsx";if(!e||e.length===0){r(new Error("No data provided"));return}try{let n=Ro.utils.book_new();e.forEach((l,u)=>{if(l.data&&l.data.length>0){let p=l.data[0],d=Ro.utils.json_to_sheet(p),m=Qk(l.fileName||`Sheet${u+1}`,u),b=1;for(;n.SheetNames.includes(m);){let f=` (${b})`;m=`${m.slice(0,31-f.length)}${f}`,b++;}Ro.utils.book_append_sheet(n,d,m);}});let a=Ro.write(n,{bookType:"xlsx",type:"binary"}),s=new Blob([Zk(a)],{type:"application/octet-stream"}),i=new TR;i.file(`${Uf(o)}.xlsx`,s),i.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}}).then(l=>{t(l);}).catch(r);}catch(n){r(n);}});Jk=async e=>{try{let t=await Xk(e);saveAs(t,`${Uf("xlsx")}.zip`);}catch(t){console.error("Error generating file:",t);}},Gf=Jk;});function $e(){let e=useContext(Kf);if(e===void 0)throw new Error("usePrint must be used within a PrintContext");return e}function cC(e){return useMemo(()=>e.data.reduce((r,o)=>(o.blocks&&o.blocks.forEach(n=>{r[n]=o.id;}),r),{}),[e.data])}function uC({pathSegmentsKey:e="bespoke",sectionLoader:t,mode:r}){let{query:o}=useRouter(),n=zo(),a=Ye(),s=Xo(),i=Ig(o.print)??!1,l=r==="embed",{printReport:u,error:p,setError:d}=Jn();Yn();let m=jf.locale,b=Pt(m),f=useMemo(()=>n.data?.sort(je).filter(R=>!R.settings?.hidden).reduce((R,x)=>(x.blocks&&x.blocks.length>0&&R.push(...x.blocks),R),[]),[n.data]),y=cC({data:n.data||[]}),{sectionsVariables:h,resetSectionVariables:w,setSectionVariables:I}=wc(n.data?.map(R=>R.id)||[]),k=Q(R=>R),A=Ie("options"),N={...Zi,...A.data_tab},z=useMemo(()=>f.reduce((R,x)=>{let L=k.records.entities.block[x],D=k.variables.status[x];return g.VIZ===L?.type&&D.allowed&&R.push({id:x,entity:L,variables:k.variables.variables[x],status:k.variables.status[x],inputVariablesFlat:L.inputs.reduce((O,P)=>({...O,...k.variables.variables[P]}),k.variables.attributes)}),R},[]),[f,k.records.entities.block,k.variables.attributes,k.variables.status,k.variables.variables]);function E(R){return R=R.replace(/<p>/g,""),R=R.replace(/<\/p>/g,""),R}let F=async(R,x,L)=>{let D=dataLoad.bind({});return new Promise((O,P)=>{D(x,null,null,(j,K)=>{if(j)P(j);else try{R||(R={data:[]}),Array.isArray(R.data)||(R.data=[]);let q=L instanceof Function?L(K):K;R.data.unshift(q),R.rawData=K,O(R);}catch(q){P(q);}});})},C=async()=>{if(!s.XlsxVizActive)return;let R=[],x=[],L=0;for(let P of z){let j=P.entity,K=Oe(j),q=P.inputVariablesFlat,ee={variables:q},oe=ot({logic:K.logic},b,ee).logic,ce={router:jf,section:{variables:h[y[j.id]],setVariables:I(h[y[j.id]]),resetVariables:w(h[y[j.id]])}},U=ir(oe,b,q,m,j.id,{},ce),X=U.config._downloadTitle||U.config.title||`${N.viz_source} ${L+1}`,H=U.config._downloadFileName||X;if(U.config._downloadEnabled!==!1){let $=U.config._downloadUrl||U.config.data;if(!$){console.error("API is undefined for block:",j.id);continue}let M=typeof $=="string"?[$]:$,_=U.dataFormat instanceof Function?U.dataFormat:!1,te=U.config._downloadDataFormat instanceof Function?U.config._downloadDataFormat:!1,G=U.config._downloadSectionName,J=U.config._downloadSource;try{let Y=await F({ix:L,id:j.id,title:il(X),fileName:G?E(G):H,data:M,loading:!1,type:g.VIZ},$,te||_);if(J){let ie=J(Y.rawData);x.push({Name:G?`${E(G)} ${H}`:H,Source:`${ie.name} - ${ie.description} (${ie.link})`});}R.push(Y),L++;}catch(Y){console.error(`Error loading data for block ${j.id}:`,Y);}}}let D=R,O={fileName:"Metadata",data:x.length>0?[x]:[]};return D.unshift(O),D};return jsxs(Kf.Provider,{value:{print:i,isEmbed:l},children:[jsxs(Container,{id:"bespoke-report",className:a.comparisonLoaded?"compare":"",p:0,pos:"relative",fluid:!0,children:[n.isSuccess&&n.data.sort(je).map(R=>jsx(Xm,{section:R,sectionLoader:t},R.id)),pC({pdf:s,print:i,printReport:u,downloadCSV:Gf,isPosition:Qn,handleLoadData:C})]}),p&&jsx(Affix,{position:{bottom:rem(80),right:rem(20)},children:jsx(Notification,{title:"Error",color:"red",onClose:()=>d(null),icon:jsx(IconX,{size:"1.1rem"}),children:p})})]})}function pC({pdf:e,print:t,printReport:r,downloadCSV:o,isPosition:n,handleLoadData:a}){return t||!n(e.position,"DEFAULT")?null:e.active||e.XlsxVizActive?jsx(zf,{onDownloadPDF:e.active?r:void 0,onDownloadCSV:e.XlsxVizActive?async()=>{let s=await a();s&&s.length>0?await o(s):console.error("No data loaded for CSV download");}:void 0}):null}var Kf,Yf,jt=v(()=>{c();he();zr();Qm();Wt();Xn();Ws();ea();ei();ye();br();hr();Se();Jo();Nf();gt();$f();Hf();Ji();Kf=createContext({print:!1,isEmbed:!1});Yf=uC;});c();c();Ut();jt();Ys();gt();Wt();Xn();co();function mC({pathSegmentsKey:e="bespoke",translations:t,bespokeStyles:r,buildTime:o,siteProps:n,profilePrefix:a="/defaultPath",loader:s=jsx(LoadingOverlay,{visible:!0}),sectionLoader:i=jsx(LoadingOverlay,{visible:!0}),mantineProviderProps:l={},mode:u}){return Kn(e)?jsx(Fragment,{children:s}):jsx(MantineProvider,{...l,theme:{other:{bespokeStyles:r}},inherit:!0,children:jsxs(Nc,{pathSegment:"bespoke",profilePrefix:a,siteProps:n,children:[jsx(xs,{translations:t,children:jsx(Os,{children:jsx(Xs,{children:jsx(tu,{pageSize:12,children:jsx(Yf,{sectionLoader:i||s,mode:u})})})})}),jsx("small",{className:"bespoke-timestamp",children:o})]})})}/*! Bundled license information:
|
|
62
|
+
Try to open the source and check the data directly.`,open_in_window:"Open {src} response in a new window",formatted_src:"Formatted {src}",formatted_group:"Formatted Data",raw_group:"Raw Data",rows_preview:"(First {nrows} rows as preview)",choose_format:"Choose format",processing_file:"Processing file...",download:"Download data as",preview:"Preview",copy:"Click to copy",copied:"Copied!"},MR=e=>{let t=[];return e&&e.data&&(e.data&&Array.isArray(e.data)?t=e.data:e.data&&e.data.data&&Array.isArray(e.data.data)?t=e.data.data:e.data&&e.data.data&&e.data.data.results&&Array.isArray(e.data.data.results)?t=e.data.data.results:e.data&&e.data.results&&Array.isArray(e.data.results)&&(t=e.data.results)),t};});function hm(e){let{section:t}=e,r=t.blocks||[],o=Q(G=>r.map(J=>G.records.entities.block[J]).filter(J=>J.type===g.VIZ&&G.variables.status[J.id].allowed)),{variant_slug1:n,slug1:a}=Q(G=>G.variables.attributes),s=Rp(),[i,l]=useState(vt.section),[u,p]=useState(St.png),[d,m]=useState(!1),[b,f]=useState(!1),[y,h]=useState([]),[w,I]=useState(o.length>0?o[0].id:null),k=i!==vt.section,{print:A,downloadLoading:N,error:z}=xp(t.id,n,a,k?w:null),[E,F]=useState(!0),[C,R]=useState(!1),x=Ie("options"),L={...tE,...x.image_tab},{siteProps:D}=Ar(),O=D?.logoSrc&&typeof D.logoSrc=="string",P=t?.settings?.name||`section-${t.id}`,j=`#${P}`,K=useMantineTheme(),q=()=>{let G=ce(w);return select(G).select("svg").size()===1},ee=()=>`${Xt(P)}`,oe=()=>{let G=document.getElementById(P);return select(G).select(".bespoke-section-content").node()},ce=G=>{let J=oe();return select(J).select(`#bespoke-visualization-${G}.bespoke-block-area`).node()},U=()=>new Promise(G=>{let J;i===vt.section?J=oe():i===vt.viz&&(J=ce(w));let Y=document.createElement("div");Y.style.display="flex",Y.style.justifyContent="space-between",Y.classList.add("bespoke-Viz-source"),Y.style.padding=K.spacing.xs,Y.style.width="100%";let ie=document.createElement("div");if(ie.innerText=L.source.replace("{src}",`${window.location}${j}`),ie.style.fontSize=K.fontSizes.xs,Y.appendChild(ie),O){let le=document.createElement("img");le.src=D.logoSrc,le.style.height="30px",le.onload=()=>G(J),le.onerror=()=>{le.remove(),G(J);},Y.appendChild(le),J.appendChild(Y);}else J.appendChild(Y),G(J);}),X=G=>{if(E)return "transparent";let J=select(G).style("background-color");return J!=="rgba(0, 0, 0, 0)"&&J!=="transparent"?J:G===document.body?"white":X(G.parentNode)},H=async(G,J)=>{let{toPng:Y}=await import('html-to-image');Y(G,{backgroundColor:J.background,cacheBust:!0,filter:ie=>ie&&ie.classList?!J.exclusionClasses.some(le=>ie.classList.contains(le)):!0}).then(ie=>{let le=document.createElement("a");le.download=`${J.filename}.png`,le.href=ie,le.click(),eE(),m(!1);}).catch(ie=>{console.log(ie);});},$=(G,J)=>{saveElement(G,{filename:J.filename,type:"svg",callback:()=>m(!1)},{background:J.background});},M=async()=>{m(!0);let G=await U(),J={background:X(G),exclusionClasses:["export-hidden"],filename:ee()},Y=u===St.png?H:$;try{if(G)Y(G,J);else throw new Error(L.wrong_node)}catch{m(!1);}},_=async()=>{let{toCanvas:G}=await import('html-to-image');Promise.all(o.map(J=>{let Y=ce(J.id),ie=Y.querySelector("g.d3plus-geomap-tileGroup");return ie.style.display="none",G(Y).then(le=>(ie.style.display="block",le))})).then(J=>{h(J.map(Y=>Y.toDataURL())),R(!1);});};useEffect(()=>{i===vt.viz&&o.length>0?(I(o[0].id),R(!0),_()):i===vt.section&&h([]);},[i]),useEffect(()=>{w&&(q()?f(!0):(f(!1),p(St.png)));},[w]);useRouter();return jsxs(Stack,{className:"cms-section-options-image",children:[jsx(Space,{h:"xs"}),o.length>0?jsx(Input.Wrapper,{label:`${L.choose_area}:`,children:jsx(SegmentedControl,{fullWidth:!0,value:i,data:[{value:vt.section,label:jsxs(Center,{children:[jsx(IconTemplate,{size:"1rem"}),jsx(Box,{ml:10,children:L.entire_section})]})},{value:vt.viz,label:jsxs(Center,{children:[jsx(IconChartBar,{size:"1rem"}),jsx(Box,{ml:10,children:L.viz_only})]})}],onChange:G=>{l(G),G===vt.section&&p(St.png);}})}):jsx(Text,{fw:"700",color:"gray.7",children:`${L.entire_section}:`}),i===vt.viz&&o.length>0&&jsxs(Input.Wrapper,{label:`${L.choose_viz}:`,style:{minHeight:"161px",position:"relative"},children:[!C&&y.length>0&&jsx(ScrollArea,{style:{height:250},children:jsx(SimpleGrid,{cols:3,children:o.map((G,J)=>jsx(Image,{alt:`Viz ${G.id}`,onClick:()=>{I(G.id);},style:{cursor:"pointer",border:w===G.id?"4px solid #228be6":"4px solid #eee"},radius:0,src:y[J],withPlaceholder:!0},`viz-option-${G.id}`))})}),jsx(LoadingOverlay,{visible:C})]}),b&&i!==vt.section&&jsx(Input.Wrapper,{label:`${L.choose_format}:`,children:jsxs(Button.Group,{children:[jsx(Button,{leftIcon:jsx(IconPolaroid,{size:16}),onClick:()=>p(St.png),variant:u===St.png?"filled":"default",fullWidth:!0,children:St.png}),jsx(Button,{leftIcon:jsx(IconCode,{size:16}),onClick:()=>p(St.svg),variant:u===St.svg?"filled":"default",fullWidth:!0,children:St.svg})]})}),jsx(Checkbox,{checked:E,label:`${L.transparent_bg}`,onChange:()=>F(!E),radius:"xl"}),jsx(Button,{leftIcon:jsx(IconDownload,{size:16}),loading:d||N,onClick:s&&u!==St.svg?()=>A(E):M,fullWidth:!0,children:jsx("span",{children:d||N?L.processing:L.download.replace("{imageFormat}",u)})})]})}var vt,St,eE,tE,ym=v(()=>{c();ln();he();gt();Ut();ea();ye();vt={viz:"viz",section:"section"},St={png:"PNG",svg:"SVG"},eE=()=>{let e=document.getElementsByClassName("bespoke-Viz-source");Array.from(e).forEach(t=>t.remove());},tE={wrong_node:"Wrong node in export",choose_area:"Choose image area",choose_viz:"Choose visualization",choose_format:"Choose format",transparent_bg:"Transparent background",processing:"Processing image...",download:"Download {imageFormat}",entire_section:"Entire section",viz_only:"Visualization only",source:"Source: {src}"};});function vm(e){let{title:t,url:r,disabled:o=!1}=e,n=o?IconCode:IconLink;return jsx(Input.Wrapper,{label:t,children:jsx(Input,{icon:jsx(n,{}),value:r,disabled:o,readOnly:!0,rightSection:jsx(CopyButton,{value:r,timeout:2e3,children:({copied:a,copy:s})=>jsx(Tooltip,{label:a?"Copied":"Copy",withArrow:!0,position:"right",children:jsx(ActionIcon,{variant:a?"filled":"subtle",onClick:s,disabled:o,children:a?jsx(IconClipboardCheck,{size:16}):jsx(IconClipboardCopy,{size:16})})})})})})}var Sm=v(()=>{c();});function xm(e){let{section:t}=e,[r,o]=useState(""),[n,a]=useState(""),[s,i]=useState(!0),l=Ie("options"),u={...AE,...l.share_tab};return useEffect(()=>{a(document.title);let{origin:p,pathname:d}=window.location,m=`${p}${d}`,b=s?t.settings?.name?.length?`#${Xt(t.settings.name)}`:`#section-${t.id}`:"";o(`${m}${b}`);},[s]),jsxs(Stack,{className:"cms-section-options-share",children:[jsx(Space,{h:"xs"}),jsx(vm,{title:`${u.title}: ${n}`,url:r}),jsx(Checkbox,{checked:s,label:u.include_section,onChange:()=>i(!s),radius:"xl"}),jsxs(Group,{position:"center",children:[jsx(FacebookShareButton,{url:r,quote:n,children:jsx(FacebookIcon,{size:32,round:!0})}),jsx(TwitterShareButton,{url:r,title:n,children:jsx(TwitterIcon,{size:32,round:!0})}),jsx(TelegramShareButton,{url:r,title:n,children:jsx(TelegramIcon,{size:32,round:!0})}),jsx(WhatsappShareButton,{url:r,title:n,separator:":: ",children:jsx(WhatsappIcon,{size:32,round:!0})}),jsx(LinkedinShareButton,{url:r,children:jsx(LinkedinIcon,{size:32,round:!0})}),jsx(RedditShareButton,{url:r,title:n,windowWidth:660,windowHeight:460,children:jsx(RedditIcon,{size:32,round:!0})}),jsx(EmailShareButton,{url:r,subject:n,children:jsx(EmailIcon,{size:32,round:!0})})]})]})}var AE,Rm=v(()=>{c();Sm();gt();ln();AE={title:"Title",include_section:"Include Section"};});function Cm(e){let{section:t,initialMode:r,onEnds:o,open:n,title:a}=e,s=la(t.settings),i=useMemo(()=>OE.filter(b=>s[b]),[s]),[l,u]=useState(r||i[0]||"data"),p=Ie("options");useEffect(()=>{r!==l&&u(r);},[r]);let d={...rl,...p},m=useMemo(()=>jsxs(Fragment,{children:[jsxs(Tabs.List,{children:[s.data&&jsx(Tabs.Tab,{value:"data",children:d.download_title}),s.image&&jsx(Tabs.Tab,{value:"image",children:d.image_title}),s.share&&jsx(Tabs.Tab,{value:"share",children:d.share_title})]}),s.data&&jsx(Tabs.Panel,{value:"data",children:jsx(dm,{section:t})}),s.image&&jsx(Tabs.Panel,{value:"image",children:jsx(hm,{section:t})}),s.share&&jsx(Tabs.Panel,{value:"share",children:jsx(xm,{section:t})})]}),[s,t,d]);return jsx("div",{className:"cms-section-options-modal",children:n&&jsx(Modal,{className:"bespoke-options-modal",opened:!0,onClose:()=>o(),size:"xl",title:a,children:jsx(Tabs,{onTabChange:u,value:l,keepMounted:!1,children:m})})})}var rl,OE,Pm=v(()=>{c();Ji();ym();Rm();gt();ca();rl={download_title:"Download Data",image_title:"Save Image",share_title:"Share Link"},OE=["data","image","share"];});function Im(e){let{sectionId:t,disabled:r=!1}=e,[o,n]=useState(!1),[a,s]=useState("data"),i=Mn(t),l=Ie("options"),u={...rl,...l},p=la(i.isSuccess?i.data.settings:{}),d=b=>{s(b),n(!0);},m=()=>{n(!1);};return jsxs("div",{className:"cms-section-options",children:[jsxs(Button.Group,{children:[p.data&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("data"),"aria-label":u.download_title,disabled:r,children:jsx(IconTable,{size:16})}),p.image&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("image"),"aria-label":u.image_title,disabled:r,children:jsx(IconCamera,{size:16})}),p.share&&jsx(Button,{variant:"default",size:"xs",compact:!0,onClick:()=>d("share"),"aria-label":u.share_title,disabled:r,children:jsx(IconShare,{size:16})})]}),i.isSuccess&&jsx(Cm,{section:i.data,initialMode:a,open:o,onEnds:m})]})}var Lm=v(()=>{c();Pm();he();gt();ca();});function DE({children:e,containerProps:t},r){return jsx(Flex,{ref:r,className:"bespoke-section-content",pos:"relative",align:"stretch",p:0,direction:{base:"column",md:"row"},wrap:"wrap",...t,children:e})}var ga,Bm,Nm=v(()=>{c();he();Qs();ga=Kt__default.forwardRef(function({children:t,column:r,basis:o,columnSettings:n={},sx:a={},...s},i){let l=Object.values(r).some(m=>m.settings?.display==="inline"),u=n?.width?`${n.width}px`:o,p=n?.width?`${n?.width}px`:"100%",d=n?.full?"100%":p;return jsx(Flex,{ref:i,className:"bespoke-section-col",align:"flex-start",direction:l?"row":"column",wrap:l?"wrap":"nowrap",maw:{base:"100%",md:d},miw:{base:"none",md:300},p:0,pos:"relative",sx:[{flexGrow:1,flexShrink:n?.full?0:1,flexBasis:n?.full?"100%":u},...packSx(a)],...s,children:t})}),Bm=Kt__default.forwardRef(DE);});var Fm=v(()=>{c();});var pn,Dm=v(()=>{c();ze();he();Fm();ye();pn={px:e=>Number.isNaN(parseFloat(e))?"px":`${e}px`.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),"%":e=>Number.isNaN(parseFloat(e))?"%":`${e}%`.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},{px:{defaultValue:400,min:25,step:5,formatter:pn.px},"%":{defaultValue:50,min:20,max:100,step:5,formatter:pn["%"]}};});var ol,Vm=v(()=>{c();ol={backgroundColor:"#fafafa",block:{padding:10},column:{padding:12},section:{backgroundColor:"white",borderRadius:10,boxShadow:"0px 6px 10px rgba(12, 32, 50, 0.14), 0px 1px 15px rgba(12, 32, 50, 0.12), 0px 3px 5px rgba(12, 32, 50, 0.15)",margin:8,padding:32}};});function al({previews:e,translations:t}){let{print:r}=$e(),o=useMemo(()=>e.map(({image:n,name:a},s)=>(n?.author||n?.url)&&jsxs(Stack,{spacing:0,children:[n.author&&jsxs(Text,{size:"xs",children:[a," ",t.image_by," ",jsx("strong",{children:n.author})]}),n.url&&jsxs(Text,{size:"xs",children:["URL: "," ",jsx(Anchor,{href:n.url,target:"_blank",children:n.url})]}),s+1<e.length&&jsx(Divider,{})]},n.id)),[e]);return jsx(Fragment,{children:r?jsx(Fragment,{children:o}):jsxs(Popover,{position:"right",children:[jsx(Popover.Target,{children:jsx(ActionIcon,{variant:"light",radius:"xl",children:jsx(IconPhoto,{size:20})})}),jsx(Popover.Dropdown,{children:o})]})})}var Um=v(()=>{c();jt();});function Gm(){let{locales:e}=useRouter(),t=location&&location.pathname.split("/").filter(r=>r.length>0)[0];return e?.includes(t)}var Hm=v(()=>{c();});function JE({name:e,children:t,id:r,sectionSettings:o,sectionStyles:n,previews:a,translations:s}){let{print:i}=$e(),l=o.memberImageBg&&a.some(({image:p})=>p&&(p.url||p.author)),u=useMemo(()=>o.showAnchor&&o.optionsMenu?"apart":!o.showAnchor&&o.optionsMenu?"right":o.showAnchor&&!o.optionsMenu?"left":"right",[o.showAnchor,o.optionsMenu]);return jsxs(XE,{className:`bespoke-Section-${r} bespoke-Section-root `,settings:o,styles:n?.root||void 0,print:i,children:[o.memberImageBg&&jsx(om,{previews:a}),jsxs(QE,{className:`bespoke-Section-${r} bespoke-Section-container `,settings:o,styles:n?.container,id:e?.length?Xt(e):`section-${r}`,pos:"relative",children:[!i&&jsxs(Group,{position:u,mb:"xs",children:[o.showAnchor&&jsxs(Anchor,{className:"cms-section-anchor",href:`#${o.name?Xt(o.name):"section-"+r}`,sx:{"&:hover .cms-section-name":{visibility:"visible",opacity:1}},children:[jsx(Text,{span:!0,size:"small",children:"#"}),jsx(Text,{span:!0,size:"small",className:"cms-section-name",sx:{visibility:"hidden",opacity:0,transition:"visibility 0s, opacity 0.2s ease-in-out"},children:o.name||"section-"+r})]}),o.optionsMenu&&jsx(Im,{sectionId:r,disabled:!1})]}),jsxs(ZE,{print:i,className:`bespoke-Section-${r} bespoke-Section-container`,settings:o,styles:n?.content,children:[t,l&&jsx(al,{previews:a,translations:s})]})]})]})}function tk({section:e,sectionLoader:t}){let{isEmbed:r}=$e(),{id:o,settings:n}=e,a={...rm,...n},s=Ye(),i=Q(E=>E),l=Q(E=>E.variables.status),{previews:u,isRunConsumersRunning:p}=Q(E=>E.status),d=s.active&&s.status?u.concat(s.status?.previews||[]):u,m=et().Section,b=At(i),f=Object.values(b||{}).filter(E=>E.section_id===o),y=Ie("sections"),h={...YE,...y},w=f.some(E=>{try{return l[E.id].allowed&&![g.GENERATOR,g.SECTION_FLAG].includes(E.type)||E.type===g.NAV}catch{return E.settings.allowed==="always"}}),I=f.filter(E=>![g.GENERATOR,g.SECTION_FLAG].includes(E.type)).reduce((E,F)=>(E[F.blockcol]?E[F.blockcol][F.blockrow]=F:E[F.blockcol]={[F.blockrow]:F},E),{}),k=Object.keys(f).length>0&&!n.hidden&&w,A=Object.keys(I).length;if(!k||s.active&&n.comparisonHide)return null;let N=(E,F=!1)=>{let C=Array.from(new Set(E.map(x=>x.blockcol))).map(x=>({blockcol:x})).sort((x,L)=>je(x,L,"blockcol")),R=[];return C.forEach(({blockcol:x})=>{let L=E.filter(D=>D.blockcol===x).sort((D,O)=>je(D,O,"blockrow")).map(D=>{if(!D.id||!l[D.id]?.allowed&&D.type!==g.NAV)return null;let{settings:O,type:P}=b[D.id],j=O.width&&!O.width.stretch&&O.width.unit?pn[O.width.unit](O.width.value):O.display==="inline"?"auto":"100%",K={alignSelf:P===g.VIZ?"stretch":"flex-start",flexGrow:0,margin:"0",width:j,minWidth:300};return jsx(Box,{className:"bespoke-Block-wrapper",id:`bespoke-Block-${D.id}`,sx:K,py:ol.block.padding,children:jsx(ia,{blockId:D.id,asComparison:F},D.id)},D.id)});R.push(L);}),R.flat()},z=[];if(s.active&&!n.comparisonMerge){let E=f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type)).reduce((F,C)=>({...F,[C.id]:C}),{});z=[jsx(ga,{column:E,basis:"50%",children:N(Object.values(f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type))))},"original"),jsx(ga,{column:E,basis:"50%",children:N(Object.values(f.filter(F=>![g.GENERATOR,g.SECTION_FLAG].includes(F.type))),!0)},"comparison")];}else z=Object.keys(I).sort((E,F)=>-wa(E,F)).map(E=>{let F=I[E],C=n.columnSettings?n.columnSettings[E]:{},R=Object.values(F).sort((x,L)=>je(x,L,"blockrow"));return R.some(x=>!l[x.id]||l[x.id].allowed||x.type===g.NAV)?jsx(ga,{column:F,columnSettings:C,basis:`calc(${100/A}% - (10px * ${A}))`,children:R.map(x=>{if(!x.id||!l[x.id]?.allowed&&x.type!==g.NAV)return null;let{settings:L,type:D}=b[x.id],O=L.width&&!L.width.stretch&&L.width.unit?pn[L.width.unit](L.width.value):L.display==="inline"?"auto":"100%",P={alignSelf:D===g.VIZ?"stretch":"flex-start",flexGrow:0,margin:"0",width:O,minWidth:300};return jsx(Box,{className:`bespoke-Block-wrapper bespoke-${x.type}-wrapper`,id:`bespoke-Block-${x.id}`,sx:P,py:ol.block.padding,children:jsx(ia,{blockId:x.id},x.id)},x.id)})},E):null});return jsxs(JE,{id:o,name:e?.settings?.name,previews:d,sectionSettings:a,sectionStyles:m,translations:h,children:[p.includes(o)&&t,jsx(Bm,{containerProps:{gap:a.columnGutter||"md",wrap:s.active?"nowrap":"wrap",sx:{zIndex:20}},children:z}),r&&jsx(ek,{})]})}var YE,sl,XE,QE,ZE,ek,Xm,Qm=v(()=>{c();he();or();em();ca();zr();nm();Lm();Or();ye();Nm();Dm();Vm();jt();gt();Um();Wt();ln();Ut();Hm();YE={image_by:"image by"},sl=(e,t)=>r=>e?e(r,t):{},XE=({settings:e,styles:t,print:r,children:o,...n})=>{let{position:a,shouldBreak:s}=e,i={normal:{position:"relative",backgroundColor:r?"transparent":"initial",borderRadius:0},sticky:{position:"sticky",zIndex:2,top:0,borderRadius:0,borderTop:r?"none":"initial",borderLeft:r?"none":"initial",borderRight:r?"none":"initial"}},l={normal:{radius:0},sticky:{radius:0,withBorder:!0}},u=[i[a],sl(t,e),s?{pageBreakBefore:"always"}:{}];return jsx(Paper,{component:"section",sx:u,...l[a],...n,children:o})},QE=({settings:e,styles:t,children:r,...o})=>{let{width:n}=e,a={center:{zIndex:1},full:{zIndex:1}},s={center:{size:"lg",p:"sm",fluid:!1},full:{fluid:!0,p:"md"}},i=[a[n],sl(t,e)];return jsx(Container,{sx:i,...s[n],...o,children:r})},ZE=({settings:e,styles:t,print:r,children:o,...n})=>{let{style:a}=e,s={none:{},card:{boxShadow:r?"none":"initial"}},i={none:{bg:"transparent"},card:{shadow:r?"none":"lg",p:"md",radius:"md"}},l=[s[a],sl(t,e)];return jsx(Paper,{sx:l,...i[a],...n,"data-screenshot-target":"true",children:o})};ek=()=>{let e=useRouter(),{query:t,locale:r}=e,{siteProps:o={logoSrc:""},profilePrefix:n,pathSegment:a}=Ar(),s=t[a],i=Array.isArray(s)?s.join("/"):[],u=Gm()?`/${r}`:"";u+=`${n}/${i}/`;let p=new URL(u,window.location.href).href;return jsxs(Group,{position:"apart",noWrap:!0,sx:{flexGrow:1},children:[jsx(Anchor,{href:p,target:"_blank",children:p}),jsx("img",{src:o.logoSrc,height:40,width:"auto",alt:"Site Logo"})]})};Xm=tk;});var Zm=v(()=>{c();ae();W({name:"abbreviate",description:"Abbreviates a number into a smaller more human-readable number.",logicFactory(e){return t=>e.d3plus.formatAbbreviate(t)},inputType:"number",testValue:"123456",type:"formatter"});});var Jm=v(()=>{c();ae();W({name:"abs",description:"Simple Absolute Value.",logicFactory(e){return t=>Math.abs(t)},inputType:"number",testValue:"-123",type:"formatter"});});var nk,ef=v(()=>{c();ae();nk=()=>function(t){let o=new RegExp(/([\$0-9\,]+)[A-z\-\s\&]*([\$0-9\,]*)/g).exec(t);return o?(o=o.slice(1).filter(n=>n.length).map(n=>(n.includes(",")&&(n.indexOf(",")===n.length-4?n=n.replace(/,000$/g,"k").replace(/([0-9]+)(,999$)/g,a=>`${parseInt(a)+1}k`):n.indexOf(",")===n.length-8&&(n=n.replace(/,000,000$/g,"M").replace(/([0-9]+)(,999,999$)/g,a=>`${parseInt(a)+1}M`))),n)),o.length===2?o.join(" - "):t.toLowerCase().match(/under|less|\</g)?`< ${o[0]}`:t.toLowerCase().match(/over|more|\+|\>/g)?`${o[0]}+`:`${o[0]}`):"None"},W({name:"bucket",description:"Sanitizes bucket strings to '< n', 'n1 - n2', and 'n+'",logicFactory:nk,inputType:"number",testValue:"1234",type:"formatter"});});var tf=v(()=>{c();ae();W({name:"commas",description:"* Rounds to nearest whole number and adds commas.",logicFactory(e){return t=>e.d3.format(",")(Math.round(t))},inputType:"number",testValue:"1234.6",type:"formatter"});});var rf=v(()=>{c();ae();W({name:"date",description:"Formats a date into '%B %d, %Y' format.",logicFactory(e){return t=>(typeof t=="string"&&(t=e.d3plus.date(t)),e.d3.timeFormat("%B %d, %Y")(t))},inputType:"date",testValue:"2022-01-01",type:"formatter"});});var of=v(()=>{c();ae();W({name:"dollar",description:"Adds a US dollar sign to the beginning of a String or Number.",logicFactory(e){return t=>(typeof t=="number"&&(t=e.d3plus.formatAbbreviate(t)),t.charAt(0)==="-"?t.replace("-","-$"):`$${t}`)},inputType:"number",testValue:"123",type:"formatter"});});var nf=v(()=>{c();ae();W({name:"formatFieldName",description:"Based on field name returns a string",logicFactory(e){return t=>{if(t.contentType.toLowerCase()==="stat"){if(t.field==="title")return "Stat label";if(t.field==="value")return "Stat value";if(t.field==="subtitle")return "Stat subtitle";if(t.field==="tooltip")return "Tooltip text"}return t.contentType.toLowerCase()==="section"&&t.field==="short"?"Short title":t.contentType.toLowerCase()==="description"&&t.field==="description"?"Paragraph":t.field}},inputType:"object",testValue:'{"field":"title","contentType":"stat"}',type:"formatter"});});var af=v(()=>{c();ae();W({name:"grewTo",description:"Returns the text with grow direction: 'declined from', 'grew to' o 'stayed at'",logicFactory(e){return t=>t<0?"declined from":t>0?"grew to":"stayed at"},inputType:"number",testValue:"-1234",type:"formatter"});});var sf=v(()=>{c();ae();W({name:"grewWord",description:"Returns either 'grew', 'declined', or 'stayed' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"declined":t>0?"grew":"stayed"},inputType:"number",testValue:"-1234",type:"formatter"});});var lf=v(()=>{c();ae();W({name:"growing",description:"Returns either 'declining', 'growing' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"declining":"growing"},inputType:"number",testValue:"-1234",type:"formatter"});});var mk,cf=v(()=>{c();ae();mk=()=>function(t){let{curr:r,currMoe:o=0,prev:n,prevMoe:a=0}=t,s;if(o||a){let i=(-n/r**2)**2*o**2,l=(1/r)**2*a**2;s=Math.sqrt(i+l);}else s=(r-n)/n;return s*100},W({name:"growth",description:"Calculates the growth percentage between two numbers provided the following object format: {curr, prev}. Also supports calculating the growth between two margin of errors using this format: {curr, currMoe, prev, prevMoe}",logicFactory:mk,inputType:"object",testValue:'{"curr":10,"currMoe":0,"prev":13,"prevMoe":0}',type:"formatter"});});var uf=v(()=>{c();ae();W({name:"growthPct",description:"Abbreviates a growth value, turns it absolute, and adds a percent sign.",logicFactory(e){return t=>`${e.d3plus.formatAbbreviate(Math.abs(t))}%`},inputType:"number",testValue:"12345",type:"formatter"});});var pf=v(()=>{c();ae();W({name:"growthWord",description:"Returns either 'growth' or 'decline' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decline":"growth"},inputType:"number",testValue:"-1234",type:"formatter"});});var df=v(()=>{c();ae();W({name:"highWord",description:"Returns either 'higher than', 'lower than', or 'approximately the same as' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"lower than":t>0?"higher than":"approximately the same as"},inputType:"number",testValue:"0",type:"formatter"});});var mf=v(()=>{c();ae();W({name:"increaseWord",description:"Returns either 'increase', 'decrease', or 'change' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decrease":t>0?"increase":"change"},inputType:"number",testValue:"1234",type:"formatter"});});var ff=v(()=>{c();ae();W({name:"increasedWord",description:"Returns either 'increased', 'decreased', or 'remained the same' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decreased":t>0?"increased":"remained the same"},inputType:"number",testValue:"0",type:"formatter"});});var gf=v(()=>{c();ae();W({name:"increasing",description:"Returns either 'decreasing', 'increasing' or 'maintaining' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"decreasing":t>0?"increasing":"maintaining"},inputType:"number",testValue:"-1234",type:"formatter"});});var hf=v(()=>{c();ae();W({name:"largerThan",description:"Returns either 'higher than', 'lower than', or 'approximately the same as' depending on the provided number's sign",logicFactory(e){return t=>t<0?"smaller than":t>0?"larger than":"the same as"},inputType:"number",testValue:"-1234",type:"formatter"});});var yf=v(()=>{c();ae();W({name:"list",description:"Joins an array of strings together, adding commas and 'and' when necessary.",logicFactory(e){return t=>t.reduce((r,o,n)=>(n?n===t.length-1&&n===1?r+=` and ${o}`:n===t.length-1?r+=`, and ${o}`:r+=`, ${o}`:r+=o,r),"")},inputType:"object",testValue:'["foo","bar","bee"]',type:"formatter"});});var bf=v(()=>{c();ae();W({name:"longWord",description:"",logicFactory(e){return t=>t<0?"shorter":t>0?"longer":"similar"},inputType:"number",testValue:"5",type:"formatter"});});var vf=v(()=>{c();ae();W({name:"lowerCaseFirst",description:"Converts the first letter of a string to lowercase",logicFactory(e){return t=>typeof t=="string"?t.charAt(0).toLowerCase()+t.slice(1):t},inputType:"string",testValue:"foo",type:"formatter"});});var Sf=v(()=>{c();ae();W({name:"moreFewerWord",description:"",logicFactory(e){return t=>t<0?"fewer":"more"},inputType:"number",testValue:"-5",type:"formatter"});});var Tf=v(()=>{c();ae();W({name:"moreLess",description:"Returns either 'more' or 'less' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"less":"more"},inputType:"number",testValue:"-5",type:"formatter"});});var xf=v(()=>{c();ae();W({name:"moreLess",description:"Returns either 'more than', 'less than', or 'approximately the same' depending on the provided number's sign.",logicFactory(e){return t=>t<0?"less than":t>0?"more than":"approximately the same"},inputType:"number",testValue:"-5",type:"formatter"});});var Rf=v(()=>{c();ae();W({name:"olderWord",description:"",logicFactory(e){return t=>t<0?"getting younger":t>0?"getting older":"staying the same age"},inputType:"number",testValue:"-5",type:"formatter"});});var Ef=v(()=>{c();ae();W({name:"olderYounger",description:"",logicFactory(e){return t=>t<0?"younger than":t>0?"older than":"the same age as"},inputType:"number",testValue:"-5",type:"formatter"});});var kf=v(()=>{c();ae();W({name:"plural",description:"Pluralizes a word.",logicFactory(e){return t=>t.replace(/\w$/g,r=>r==="y"?"ies":`${r}s`)},inputType:"string",testValue:"Foo",type:"formatter"});});var Cf=v(()=>{c();ae();W({name:"pxToInt",description:"Takes a pixel value and converts it to an integer",logicFactory(e){return t=>parseInt(t.replace(/\D+/g,""),10)},inputType:"string",testValue:"12px",type:"formatter"});});var Pf=v(()=>{c();ae();W({name:"salary",description:"Displays salary values with proper precision (ie. '$74,200' instead of '$74.2k')",logicFactory(e){return t=>{let r;return t<1e6?r=e.d3.format(",")(t.toFixed(0)):r=e.d3plus.formatAbbreviate(t),`$${r}`}},inputType:"number",testValue:"1000000",type:"formatter"});});var Af=v(()=>{c();ae();W({name:"stripEntities",description:"Removes non breaking spaces & other html entities from a string",logicFactory(e){return t=>typeof t=="string"?String(t).replace(/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});/ig," "):t},inputType:"string",testValue:"<b>MyText</b>",type:"formatter"});});var il,wf=v(()=>{c();ae();il=W({name:"stripHTML",description:"Converts html tags to spaces, then removes redundant spaces",logicFactory(e){return t=>{let r={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"," ":""},o=`(?:${Object.keys(r).join("|")})`,n=RegExp(o),a=RegExp(o,"g"),s=String(t).replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim();return n.test(s)?s.replace(a,i=>r[i]):s}},inputType:"string",testValue:"<b>My text</b>",type:"formatter"});});var If=v(()=>{c();ae();W({name:"stripOL",description:"Removes ordered list wrapper tags from a string.",logicFactory(e){return t=>t.replace(/<ol>/g,"").replace(/<\/ol>/g,"")},inputType:"string",testValue:"<ol><li>My list</li></ol>",type:"formatter"});});var Lf=v(()=>{c();ae();W({name:"stripP",description:"Removes all paragraph tags from a string.",logicFactory(e){return t=>t.replace(/<p>/g,"").replace(/<\/p>/g,"")},inputType:"string",testValue:"<p>My p</p>",type:"formatter"});});var Of=v(()=>{c();ae();W({name:"stripUL",description:"Removes unordered list wrapper tags from a string.",logicFactory(e){return t=>t.replace(/<ul>/g,"").replace(/<\/ul>/g,"")},inputType:"string",testValue:"<ul><li>My list</li></ul>",type:"formatter"});});var _f=v(()=>{c();ae();W({name:"toKebabCase",description:"Takes a camelCase or PascalCase string and converts it to kebab-case.",logicFactory(e){return t=>typeof t=="string"?(t=t.charAt(0).toLowerCase()+t.substring(1),t.replace(/([A-Z])/g,"-$1").toLowerCase()):"invalid string passed to toKebabCase()"},inputType:"string",testValue:"camelCaseText",type:"formatter"});});var Bf=v(()=>{c();ae();W({name:"toSpacedCase",description:"Takes a camelCase or PascalCase string and adds spaces (I know Spaced Case isn't a thing, deal with it).",logicFactory(e){return t=>typeof t=="string"?t.replace(/([A-Z])/g," $1").toLowerCase().trim():"invalid string passed to toSpacedCase()"},inputType:"string",testValue:"camelCaseText",type:"formatter"});});var Mf=v(()=>{c();ae();W({name:"upperCaseFirst",description:"Converts the first letter of a string to uppercase",logicFactory(e){return t=>t.charAt(0).toUpperCase()+t.slice(1)},inputType:"string",testValue:"my name",type:"formatter"});});var Nf=v(()=>{c();Zm();Jm();ef();tf();rf();of();nf();af();sf();lf();cf();uf();pf();df();mf();ff();gf();hf();yf();bf();vf();Sf();Tf();xf();Rf();Ef();kf();Cf();Pf();Af();wf();If();Lf();Of();_f();Bf();Mf();});function zf({onDownloadPDF:e,onDownloadCSV:t}){let[r,o]=useState(!1),[n,a]=useState(!1),[s,i]=useState(!1),l=useMediaQuery("(max-width: 768px)"),u=Ie("export"),p={...Wk,...u},d=async()=>{if(e){o(!0);try{await e();}finally{o(!1),i(!1);}}},m=async()=>{if(t){a(!0);try{await t();}finally{a(!1),i(!1);}}},b=(h,w,I,k,A,N)=>jsx(Button,{id:N,size:"sm",onClick:h,disabled:w,fullWidth:!0,variant:"subtle",h:"auto",px:"xs",w:"100%",styles:z=>({inner:{width:"100%",display:"block"}}),children:jsxs(Group,{noWrap:!0,position:"left",spacing:"xs",w:"100%",children:[w?jsx(Loader,{size:"1.75rem"}):I,jsxs(Stack,{spacing:0,w:"100%",py:"0.5rem",className:"bespoke-report-download-btn-text-container",children:[jsx(Text,{w:"100%",size:"sm",lineClamp:1,className:"bespoke-report-download-btn-text-container-cta",children:k}),A&&jsx(Text,{size:"xs",w:"100%",lineClamp:2,maw:"100%",style:{wordWrap:"break-word",whiteSpace:"normal"},variant:"dimmed",lh:"0.9rem",h:"1.9rem",className:"bespoke-report-download-btn-text-desc",children:A})]})]})}),f=e&&b(d,r,jsx(IconFileTypePdf,{size:"1.75rem"}),p.pdf.label,p.pdf.desc,"bespoke-download-pdf-btn"),y=t&&b(m,n,jsx(IconFileTypeXls,{size:"1.75rem"}),p.xlsx.label,p.xlsx.desc,"bespoke-download-xlsx-btn");return e||t?jsx(Affix,{position:{bottom:l?rem(0):rem(20),right:l?rem(0):rem(20)},id:"bespoke-report-download-affix",style:{width:l?"100%":"auto",boxShadow:l?"0px -2px 6px rgba(0, 0, 0, 0.1)":"0px 2px 6px rgba(0, 0, 0, 0.1)",borderRadius:"0.25rem",background:"white"},p:"xs",children:jsxs(Popover,{opened:s,onChange:i,position:"top",shadow:"md",width:l?"100%":250,id:"bespoke-report-download-popover",children:[jsx(Popover.Target,{children:jsx(Button,{id:"bespoke-report-download-btn",size:"sm",onClick:()=>i(h=>!h),leftIcon:jsx(IconDownload,{size:"1.2rem"}),variant:"subtle",loading:r||n,fullWidth:l,children:p.export})}),jsx(Popover.Dropdown,{p:"0.5rem",children:jsxs(Stack,{spacing:"xs",children:[f,y]})})]})}):null}var Wk,$f=v(()=>{"use client";c();gt();Wk={export:"Export",pdf:{label:"Download PDF",desc:"Generates a printable version of the report page in PDF format."},xlsx:{label:"Download XLSX",desc:"Creates a downloadable spreadsheet of the report page data."}};});function Qk(e,t){let r=e.replace(/[:\\/?*[\]]/g,"");return r.trim().length===0&&(r=`Sheet${t+1}`),r.slice(0,31)}function Zk(e){let t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o)&255;return t}function Uf(e){return `data_export_${new Date().toISOString()}`}var Xk,Jk,Gf,Hf=v(()=>{c();Xk=e=>new Promise((t,r)=>{let o="xlsx";if(!e||e.length===0){r(new Error("No data provided"));return}try{let n=Ro.utils.book_new();e.forEach((l,u)=>{if(l.data&&l.data.length>0){let p=l.data[0],d=Ro.utils.json_to_sheet(p),m=Qk(l.fileName||`Sheet${u+1}`,u),b=1;for(;n.SheetNames.includes(m);){let f=` (${b})`;m=`${m.slice(0,31-f.length)}${f}`,b++;}Ro.utils.book_append_sheet(n,d,m);}});let a=Ro.write(n,{bookType:"xlsx",type:"binary"}),s=new Blob([Zk(a)],{type:"application/octet-stream"}),i=new TR;i.file(`${Uf(o)}.xlsx`,s),i.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}}).then(l=>{t(l);}).catch(r);}catch(n){r(n);}});Jk=async e=>{try{let t=await Xk(e);saveAs(t,`${Uf("xlsx")}.zip`);}catch(t){console.error("Error generating file:",t);}},Gf=Jk;});function $e(){let e=useContext(Kf);if(e===void 0)throw new Error("usePrint must be used within a PrintContext");return e}function cC(e){return useMemo(()=>e.data.reduce((r,o)=>(o.blocks&&o.blocks.forEach(n=>{r[n]=o.id;}),r),{}),[e.data])}function uC({pathSegmentsKey:e="bespoke",sectionLoader:t,mode:r}){let{query:o}=useRouter(),n=zo(),a=Ye(),s=Xo(),i=Ig(o.print)??!1,l=r==="embed",{printReport:u,error:p,setError:d}=Jn();Yn();let m=jf.locale,b=Pt(m),f=useMemo(()=>n.data?.sort(je).filter(R=>R.settings?.hidden!==!0).reduce((R,x)=>(x.blocks&&x.blocks.length>0&&R.push(...x.blocks),R),[]),[n.data]),y=cC({data:n.data||[]}),{sectionsVariables:h,resetSectionVariables:w,setSectionVariables:I}=wc(n.data?.map(R=>R.id)||[]),k=Q(R=>R),A=Ie("options"),N={...Zi,...A.data_tab},z=useMemo(()=>f.reduce((R,x)=>{let L=k.records.entities.block[x],D=k.variables.status[x];return g.VIZ===L?.type&&D.allowed&&R.push({id:x,entity:L,variables:k.variables.variables[x],status:k.variables.status[x],inputVariablesFlat:L.inputs.reduce((O,P)=>({...O,...k.variables.variables[P]}),k.variables.attributes)}),R},[]),[f,k.records.entities.block,k.variables.attributes,k.variables.status,k.variables.variables]);function E(R){return R=R.replace(/<p>/g,""),R=R.replace(/<\/p>/g,""),R}let F=async(R,x,L)=>{let D=dataLoad.bind({});return new Promise((O,P)=>{D(x,null,null,(j,K)=>{if(j)P(j);else try{R||(R={data:[]}),Array.isArray(R.data)||(R.data=[]);let q=L instanceof Function?L(K):K;R.data.unshift(q),R.rawData=K,O(R);}catch(q){P(q);}});})},C=async()=>{if(!s.XlsxVizActive)return;let R=[],x=[],L=0;for(let P of z){let j=P.entity,K=Oe(j),q=P.inputVariablesFlat,ee={variables:q},oe=ot({logic:K.logic},b,ee).logic,ce={router:jf,section:{variables:h[y[j.id]],setVariables:I(h[y[j.id]]),resetVariables:w(h[y[j.id]])}},U=ir(oe,b,q,m,j.id,{},ce),X=U.config._downloadTitle||U.config.title||`${N.viz_source} ${L+1}`,H=U.config._downloadFileName||X;if(U.config._downloadEnabled!==!1){let $=U.config._downloadUrl||U.config.data;if(!$){console.error("API is undefined for block:",j.id);continue}let M=typeof $=="string"?[$]:$,_=U.dataFormat instanceof Function?U.dataFormat:!1,te=U.config._downloadDataFormat instanceof Function?U.config._downloadDataFormat:!1,G=U.config._downloadSectionName,J=U.config._downloadSource;try{let Y=await F({ix:L,id:j.id,title:il(X),fileName:G?E(G):H,data:M,loading:!1,type:g.VIZ},$,te||_);if(J){let ie=J(Y.rawData);x.push({Name:G?`${E(G)} - ${H}`:H,Source:`${ie.name} - ${ie.description} (${ie.link})`});}R.push(Y),L++;}catch(Y){console.error(`Error loading data for block ${j.id}:`,Y);}}}let D=R,O={fileName:"Metadata",data:x.length>0?[x]:[]};return D.unshift(O),D};return jsxs(Kf.Provider,{value:{print:i,isEmbed:l},children:[jsxs(Container,{id:"bespoke-report",className:a.comparisonLoaded?"compare":"",p:0,pos:"relative",fluid:!0,children:[n.isSuccess&&n.data.sort(je).map(R=>jsx(Xm,{section:R,sectionLoader:t},R.id)),pC({pdf:s,print:i,printReport:u,downloadCSV:Gf,isPosition:Qn,handleLoadData:C})]}),p&&jsx(Affix,{position:{bottom:rem(80),right:rem(20)},children:jsx(Notification,{title:"Error",color:"red",onClose:()=>d(null),icon:jsx(IconX,{size:"1.1rem"}),children:p})})]})}function pC({pdf:e,print:t,printReport:r,downloadCSV:o,isPosition:n,handleLoadData:a}){return t||!n(e.position,"DEFAULT")?null:e.active||e.XlsxVizActive?jsx(zf,{onDownloadPDF:e.active?r:void 0,onDownloadCSV:e.XlsxVizActive?async()=>{let s=await a();s&&s.length>0?await o(s):console.error("No data loaded for CSV download");}:void 0}):null}var Kf,Yf,jt=v(()=>{c();he();zr();Qm();Wt();Xn();Ws();ea();ei();ye();br();hr();Se();Jo();Nf();gt();$f();Hf();Ji();Kf=createContext({print:!1,isEmbed:!1});Yf=uC;});c();c();Ut();jt();Ys();gt();Wt();Xn();co();function mC({pathSegmentsKey:e="bespoke",translations:t,bespokeStyles:r,buildTime:o,siteProps:n,profilePrefix:a="/defaultPath",loader:s=jsx(LoadingOverlay,{visible:!0}),sectionLoader:i=jsx(LoadingOverlay,{visible:!0}),mantineProviderProps:l={},mode:u}){return Kn(e)?jsx(Fragment,{children:s}):jsx(MantineProvider,{...l,theme:{other:{bespokeStyles:r}},inherit:!0,children:jsxs(Nc,{pathSegment:"bespoke",profilePrefix:a,siteProps:n,children:[jsx(xs,{translations:t,children:jsx(Os,{children:jsx(Xs,{children:jsx(tu,{pageSize:12,children:jsx(Yf,{sectionLoader:i||s,mode:u})})})})}),jsx("small",{className:"bespoke-timestamp",children:o})]})})}/*! Bundled license information:
|
|
63
63
|
|
|
64
64
|
@tanstack/react-virtual/build/lib/_virtual/_rollupPluginBabelHelpers.mjs:
|
|
65
65
|
(**
|