1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2915],{6611:function(e,t,o){"use strict";o.d(t,{Z:function(){return i}});class n{static getDescendantProperty(e,t,o=[]){let i,r,a,l,d,s;if(t){if(-1===(a=t.indexOf("."))?i=t:(i=t.slice(0,a),r=t.slice(a+1)),null!=(l=e[i])){if(r||"string"!=typeof l&&"number"!=typeof l){if("[object Array]"===Object.prototype.toString.call(l))for(d=0,s=l.length;d<s;d++)n.getDescendantProperty(l[d],r,o);else r&&n.getDescendantProperty(l,r,o)}else o.push(l)}}else o.push(e);return o}}class i{constructor(e=[],t=[],o={}){Array.isArray(t)||(o=t,t=[]),this.haystack=e,this.keys=t,this.options=Object.assign({caseSensitive:!1,sort:!1},o)}search(e=""){if(""===e)return this.haystack;let t=[];for(let o=0;o<this.haystack.length;o++){let r=this.haystack[o];if(0===this.keys.length){let a=i.isMatch(r,e,this.options.caseSensitive);a&&t.push({item:r,score:a})}else for(let l=0;l<this.keys.length;l++){let d=n.getDescendantProperty(r,this.keys[l]),s=!1;for(let c=0;c<d.length;c++){let u=i.isMatch(d[c],e,this.options.caseSensitive);if(u){s=!0,t.push({item:r,score:u});break}}if(s)break}}return this.options.sort&&t.sort((e,t)=>e.score-t.score),t.map(e=>e.item)}static isMatch(e,t,o){e=String(e),t=String(t),o||(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase());let n=i.nearestIndexesFor(e,t);return!!n&&(e===t?1:n.length>1?2+(n[n.length-1]-n[0]):2+n[0])}static nearestIndexesFor(e,t){let o=t.split(""),n=[],r=i.indexesOfFirstLetter(e,t);return r.forEach((t,i)=>{let r=t+1;n[i]=[t];for(let a=1;a<o.length;a++){let l=o[a];if(-1===(r=e.indexOf(l,r))){n[i]=!1;break}n[i].push(r),r++}}),!!(n=n.filter(e=>!1!==e)).length&&n.sort((e,t)=>1===e.length?e[0]-t[0]:(e=e[e.length-1]-e[0])-(t=t[t.length-1]-t[0]))[0]}static indexesOfFirstLetter(e,t){let o=t[0];return e.split("").map((e,t)=>e===o&&t).filter(e=>!1!==e)}}},6785:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/[dataset]",function(){return o(9041)}])},7909:function(e,t,o){"use strict";var n=o(6042),i=o(9396),r=o(9534),a=o(5893),l=o(8527),d=o(7604);t.Z=function(e){var t=e.copied,o=e.icon,s=e.checkIcon,c=void 0===s?d.Z:s,u=e.width,p=void 0===u?"18px":u,x=e.height,h=void 0===x?"18px":x,g=(0,r.Z)(e,["copied","icon","checkIcon","width","height"]);return(0,a.jsxs)(l.xu,(0,i.Z)((0,n.Z)({position:"relative",width:p,height:h,display:"inline-block"},g),{children:[(0,a.jsx)(l.xu,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.2s ease, transform 0.2s ease",opacity:t?0:1,transform:t?"scale(0.5) rotate(-40deg)":"scale(1) rotate(0deg)",children:(0,a.jsx)(o,{width:p,height:h})}),(0,a.jsx)(l.xu,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.2s ease, transform 0.2s ease",opacity:t?1:0,transform:t?"scale(1) rotate(0deg)":"scale(0.5) rotate(40deg)",children:(0,a.jsx)(c,{width:p,height:h})})]}))}},73:function(e,t,o){"use strict";o.d(t,{Z:function(){return d}});var n=o(6042),i=o(9396),r=o(9534),a=o(5893);o(7294);var l=o(3465);function d(e){var t=e.children,o=(0,r.Z)(e,["children"]);return(0,a.jsx)(l.OK,(0,i.Z)((0,n.Z)({position:"relative",top:"1px",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",color:"#71757A",fill:"#71757A",padding:"12px 24px 13px",_selected:{color:"#2B8C4D",fill:"#2B8C4D",pointerEvents:"none",borderBottom:"3px solid #2B8C4D"},_hover:{color:"#464A51",fill:"#464A51"}},o),{children:t}))}},7317:function(e,t,o){"use strict";o.d(t,{Z:function(){return s}});var n=o(6042),i=o(9534),r=o(5893),a=o(4304),l=o(451),d=o.n(l);function s(e){var t=e.value,o=e.onChange,l=e.className,s=(0,i.Z)(e,["value","onChange","className"]);return(0,r.jsx)(a.r,(0,n.Z)({className:d()[void 0===l?"toggle":l],value:t,onChange:o},s))}},9041:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return e3},default:function(){return e8}});var n=o(7568),i=o(4924),r=o(6042),a=o(7582),l=o(5893),d=o(7375),s=o(8527),c=o(4651),u=o(7294),p=o(1163),x=o(9008),h=o.n(x),g=o(9573),v=o(6486),f=o(1955),b=o(5550),m=o(9396),j=o(7989),C=o(5152);function y(){var e=(0,p.useRouter)().query,t=e.dataset,o=e.table,n={letterSpacing:"0.1px",lineHeight:"18px",fontWeight:"400",fontSize:"12px",fontFamily:"Roboto",color:"#252A32",backgroundColor:"#FFF",padding:"0 16px 10px",_focus:{backgroundColor:"transparent"},_hover:{backgroundColor:"transparent",opacity:"0.7"}};if(!t)return null;var i="".concat("https://backend.basedosdados.org","/admin/v1/dataset/").concat(t,"/change/"),a="".concat("https://backend.basedosdados.org","/admin/v1/table/").concat(o,"/change/");return(0,l.jsxs)(j.v2,{children:[(0,l.jsx)(j.j2,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed","aria-label":"Editar",width:"28px",height:"28px",borderRadius:"50%",zIndex:"11",backgroundColor:"#2B8C4D",padding:"25px",bottom:"20px",right:"20px",children:(0,l.jsx)(C.Z,{alt:"editar",justifyContent:"center",width:"28px",height:"28px",fill:"#FFF"})}),(0,l.jsxs)(j.qy,{boxShadow:"0px 1.5px 16px rgba(0, 0, 0, 0.16)",_focus:{boxShadow:"0px 1.5px 16px rgba(0, 0, 0, 0.16) !important"},padding:"16px 0 6px",borderRadius:"8px",zIndex:"11",color:"#252A32",children:[(0,l.jsx)(j.sN,(0,m.Z)((0,r.Z)({},n),{onClick:function(){return window.open(i,"_blank")},children:"Editar Conjunto"})),o&&(0,l.jsx)(j.sN,(0,m.Z)((0,r.Z)({},n),{onClick:function(){return window.open(a,"_blank")},children:"Editar Tabela"}))]})]})}var w=o(7248),F=o(9318),_=o(763),Z=o(3692),S=o(9534);function k(e){var t=e.children,o=e.id,n=(0,S.Z)(e,["children","id"]),i=(0,u.useState)(!1),a=i[0],d=i[1],c=(0,u.useState)(!1),p=c[0],x=c[1],h=(0,u.useRef)(null),v=(0,g.$G)("dataset").t,f="\n ".concat(t.trim(),'\n\n <span\n id="').concat(o,'"\n style="\n cursor: pointer;\n color: #0068C5;\n font-family: Roboto;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n background-color: #FFF;\n margin-left: 4px;\n "\n onmouseover="this.style.color=\'#0057A4\'"\n onmouseout="this.style.color=\'#0068C5\'"\n >').concat(v("readLess"),"</span>");(0,u.useEffect)(function(){if(h.current){var e=h.current,t=e.clientHeight;x(e.scrollHeight>t)}},[t]),(0,u.useEffect)(function(){var e=document.getElementById(o);return e&&e.addEventListener("click",b),function(){e&&e.removeEventListener("click",b)}},[a]);var b=function(){d(!a)};return(0,l.jsxs)(s.kC,(0,m.Z)((0,r.Z)({position:"relative"}
1,n),{children:[(0,l.jsx)(s.xv,{ref:h,display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:a?"break-spaces":"normal",sx:{WebkitLineClamp:a?"unset":3,WebkitBoxOrient:"vertical"},fontFamily:"Roboto",fontSize:"14px",fontWeight:"400",lineHeight:"20px",color:"#464A51",children:p?(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:f.trim()}}):t}),p&&(0,l.jsxs)(_.Z,{typography:"small",display:a?"none":"flex",onClick:b,cursor:"pointer",_hover:{color:"#0057A4"},color:"#0068C5",backgroundColor:"#FFF",position:"absolute",bottom:"0",right:"0",children:[(0,l.jsx)(s.xv,{as:"span",color:"#464A51",marginRight:"4px",children:"..."}),v("readMore")]})]}))}var D=o(7398),E=o(2684),T=o(9609),A=o(3558),L=o(4107),R=o(3238),B=o(1313),q=o(1439),z=o(9042);function I(e){var t=e.resource,o=function(e,t){return e.order<t.order?-1:e.order>t.order?1:0},n=(0,g.$G)("dataset").t,i=(0,p.useRouter)().locale,r=[n("observationLevelTable.entityHeader"),n("observationLevelTable.columnsHeader")],a=[];return Object.keys(null==t?void 0:t.observationLevels),Object.values(null==t?void 0:t.observationLevels).sort(o).forEach(function(e){var t,o,r,l,d,s=[(null==e?void 0:null===(t=e.entity)||void 0===t?void 0:t["name".concat((0,v.capitalize)(i))])?null==e?void 0:null===(o=e.entity)||void 0===o?void 0:o["name".concat((0,v.capitalize)(i))]:(null==e?void 0:null===(r=e.entity)||void 0===r?void 0:r.name)?null==e?void 0:null===(l=e.entity)||void 0===l?void 0:l.name:n("observationLevelTable.notProvided"),(d=[],(null==e?void 0:e.columns[0])?Object.values(e.columns).map(function(e){d.push(null==e?void 0:e.name)}):d=[n("observationLevelTable.notProvided")],d.join(", "))];a.push(s)}),(0,l.jsx)(z.xJ,{width:"100%",height:"100%",border:"1px solid #DEDFE0",overflow:"hidden",borderBottom:"0px",borderRadius:"16px",children:(0,l.jsxs)(z.iA,{position:"relative",role:"table",children:[(0,l.jsx)(z.hr,{role:"rowgroup",position:"relative",children:(0,l.jsx)(z.Tr,{children:r.map(function(e,t){return(0,l.jsx)(z.Th,{role:"row",position:"sticky",top:"0",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",color:"#252A32",backgroundColor:"#F7F7F7",borderBottom:"1px solid #DEDFE0 !important",textTransform:"none",padding:"14px 22px",letterSpacing:"inherit",boxSizing:"content-box",zIndex:1,children:e},t)})})}),(0,l.jsx)(z.p3,{role:"rowgroup",position:"relative",children:a.map(function(e,t){return(0,l.jsxs)(z.Tr,{role:"row",borderBottom:"1px solid #DEDFE0",children:[(0,l.jsx)(z.Td,{width:"50%",role:"cell",position:"relative",padding:"14px 22px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",color:"#464A51",backgroundColor:"#FFF",borderColor:"#DEDFE0",textTransform:"none",letterSpacing:"inherit",children:e[0]}),(0,l.jsx)(z.Td,{width:"50%",role:"cell",position:"relative",padding:"14px 22px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",color:"#464A51",backgroundColor:"#FFF",borderColor:"#DEDFE0",textTransform:"none",letterSpacing:"inherit",whiteSpace:"break-spaces",children:e[1]})]},t)})})]})})}var O=o(8826),H=o(7604);function N(e){var t=e.value,o=(0,g.$G)(["dataset","prices"]).t,n=(0,u.useState)({}),i=n[0],a=n[1],d=function(){var e;return f.Z.get("userBD")&&(e=JSON.parse(f.Z.get("userBD"))),(0,B.jl)(e)},c=function(e){var t=e.string,o=(0,S.Z)(e,["string"]);return(0,l.jsx)(_.Z,(0,m.Z)((0,r.Z)({typography:"small",color:"#464A51"},o),{children:t}))};return((0,u.useEffect)(function(){if(null==t)return a(null);var e,o,n,i,r,l={};(null===(e=t["2"])||void 0===e?void 0:e.type)==="closed"&&(l["3"]=t["2"].date),(null===(o=t["0"])||void 0===o?void 0:o.type)==="open"&&(l["0"]=t["0"].date),(null===(n=t["0"])||void 0===n?void 0:n.type)==="closed"&&(l["2"]=t["0"].date),(null===(i=t["1"])||void 0===i?void 0:i.type)==="open"&&(l["1"]=t["1"].date),(null===(r=t["1"])||void 0===r?void 0:r.type)==="closed"&&(l["3"]=t["1"].date),a(l)},[t]),null===i)?(0,l.jsx)(c,{string:o("temporalCoverageBar.notProvided")}):(0,l.jsxs)(s.Ug,{position:"relative",width:"100%",maxWidth:"325px",height:"65px",alignItems:"normal",spacing:0,children:[(0,l.jsx)(D.u,{hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"160px",label:o("temporalCoverageBar.accessGranted"),children:(0,l.jsxs)(s.xu,{flex:3,marginRight:(null==i?void 0:i["3"])?"":{base:"24px !important",lg:"0"},display:(null==i?void 0:i["0"])?"":"none",children:[(0,l.jsx)(s.xu,{width:"100%",height:"24px",backgroundColor:"#D5E8DB",fontFamily:"Roboto",fontWeight:"500",fontSize:"12px",lineHeight:"20px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",letterSpacing:"0.2px",color:"#2B8C4D",marginBottom:"10px",padding:"6px 16px",children:o("temporalCoverageBar.free")}),(0,l.jsxs)(s.xu,{position:"relative",width:"100%",borderBottom:"solid 3px #2B8C4D",marginBottom:"10px",children:[(0,l.jsx)(s.xu,{position:"absolute",width:"100%",children:(0,l.jsxs)(s.xu,{position:"absolute",display:"flex",alignItems:"start",flexDirection:"column",left:0,top:"-3px",children:[(0,l.jsx)(s.xu,{width:"8px",height:"8px",backgroundColor:"#2B8C4D",borderRadius:"50%"}),(0,l.jsx)(c,{position:"absolute",top:"14px",width:"max-content",string:null==i?void 0:i["0"]})]})}),(0,l.jsx)(s.xu,{position:"absolute",width:"100%",children:(0,l.jsxs)(s.xu,{position:"absolute",display:"flex",alignItems:"center",flexDirection:"column",right:(null==i?void 0:i["3"])?"-4px":"0",top:"-3px",zIndex:1,children:[(0,l.jsx)(s.xu,{width:"8px",height:"8px",backgroundColor:"#2B8C4D",borderRadius:"50%"}),(0,l.jsx)(c,{position:"absolute",top:"14px",width:"max-content",string:null==i?void 0:i["1"]})]})})]})]})}),(0,l.jsx)(D.u,{hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"160px",label:o(d()?"temporalCoverageBar.accessGranted":"temporalCoverageBar.upgradeRequired"),
1children:(0,l.jsxs)(s.xu,{flex:2,marginRight:{base:"24px !important",lg:"0"},display:(null==i?void 0:i["3"])?"":"none",children:[(0,l.jsxs)(s.xu,{as:"a",cursor:d()?"default":"pointer",width:"100%",height:"24px",backgroundColor:d()?"#D5E8DB":"#E4F2FF",fontFamily:"Roboto",fontWeight:"500",fontSize:"12px",lineHeight:"20px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",letterSpacing:"0.2px",color:d()?"#2B8C4D":"#0068C5",fill:d()?"#2B8C4D":"#0068C5",gap:"10px",marginBottom:"10px",padding:"6px 16px",marginLeft:"2px",_hover:{color:d()?"#2B8C4D":"#0057A4",fill:d()?"#2B8C4D":"#0057A4",backgroundColor:d()?"#D5E8DB":"#E4F2FF"},onClick:function(){d()||((0,B.SM)("table_coverage_redirect_bdpro","click"),window.open("/bdpro","_blank"))},children:[o("temporalCoverageBar.paid"),d()?(0,l.jsx)(H.Z,{width:"20px",height:"20px"}):(0,l.jsx)(O.Z,{width:"12px",height:"12px"})]}),(0,l.jsxs)(s.xu,{position:"relative",width:"100%",borderBottom:"solid 3px",borderColor:d()?"#22703E":"#0068C5",marginBottom:"10px",children:[(0,l.jsx)(s.xu,{position:"absolute",width:"100%",display:(null==i?void 0:i["2"])?"":"none",children:(0,l.jsxs)(s.xu,{position:"absolute",display:"flex",alignItems:"start",flexDirection:"column",left:0,top:"-3px",children:[(0,l.jsx)(s.xu,{width:"8px",height:"8px",backgroundColor:"#0068C5",borderRadius:"50%"}),(0,l.jsx)(c,{position:"absolute",top:"14px",width:"max-content",string:null==i?void 0:i["2"]})]})}),(0,l.jsx)(s.xu,{position:"absolute",width:"100%",children:(0,l.jsxs)(s.xu,{position:"absolute",display:"flex",alignItems:"center",flexDirection:"column",top:"-3px",right:"-4px",children:[(0,l.jsx)(s.xu,{width:"8px",height:"8px",backgroundColor:d()?"#22703E":"#0068C5",borderRadius:"50%"}),(0,l.jsx)(c,{position:"absolute",top:"14px",width:"max-content",string:null==i?void 0:i["3"]})]})})]})]})})]})}var W=o(3465),P=o(837),M=o(4085),U=o(5037),G=o(140);o(2339);var Q=o(73),K=o(7317),V=o(9815),$=o(6611),Y=o(760),J=o(1081),X=o(3780),ee=o(5017),et=o(2866),eo=o(894),en=(0,eo.IU)({displayName:"download",viewBox:"0 -960 960 960",path:(0,l.jsx)("path",{fill:"current-color",d:"M480-328.46 309.23-499.23l42.16-43.38L450-444v-336h60v336l98.61-98.61 42.16 43.38L480-328.46ZM252.31-180Q222-180 201-201q-21-21-21-51.31v-108.46h60v108.46q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h455.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-108.46h60v108.46Q780-222 759-201q-21 21-51.31 21H252.31Z"})}),ei=o(8649);function er(e){var t=e.isLoaded,o=e.resource,n=e.columns,i=function(e){if(clearTimeout(v),t(!0),""===e.trim())return t(!1),n(o);f(setTimeout(function(){var i=new $.Z(o,["name","description"],{sort:!0}).search(e.trim());i.length>0?n(i):n(o),t(!1)},500))},r=(0,g.$G)("dataset").t,a=(0,u.useState)(!1),d=a[0],s=a[1],c=(0,u.useState)(""),p=c[0],x=c[1],h=(0,u.useState)(null),v=h[0],f=h[1];return(0,u.useEffect)(function(){i(p)},[p,o]),(0,l.jsx)(J.fs,{value:p,onChange:x,inputFocus:d,changeInputFocus:s,placeholder:r("column.search"),fill:"#464A51",height:"48px",maxWidth:"100%",width:"100%",icon:(0,l.jsx)(ei.Z,{alt:"pesquisar",width:"16.8px",height:"16.8px"})})}o(3132);var ea=(0,u.memo)(function(e){var t=e.header,o=(0,S.Z)(e,["header"]),n=(0,g.$G)("dataset").t;return(0,l.jsxs)(z.Th,(0,m.Z)((0,r.Z)({role:"row",position:"sticky",top:"0",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",color:"#252A32",backgroundColor:"#F7F7F7",border:"none !important",padding:"0 !important",textTransform:"none",letterSpacing:"inherit",boxSizing:"content-box",zIndex:1},o),{children:[(0,l.jsxs)(s.xu,{display:"flex",gridGap:"8px",alignItems:"center",role:"columnheader",padding:"14px 22px",children:[t.pt,(0,l.jsx)(D.u,(0,m.Z)((0,r.Z)({label:t.tooltip,hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"300px"},o),{children:(0,l.jsx)(et.Z,{alt:"tip",cursor:"pointer",fill:"#878A8E",width:"16px",height:"16px"})}))]}),(0,l.jsx)(s.xu,{display:t.pt===n("column.name")?{base:"none",lg:"flex"}:"none",position:"absolute",right:"0",top:"0",height:"100%",width:"1px",backgroundColor:"#DEDFE0"}),(0,l.jsx)(s.xu,{position:"absolute",bottom:"0",height:"1px",width:"100%",backgroundColor:"#DEDFE0"})]}))}),el=(0,u.memo)(function(e){var t=e.children,o=(0,S.Z)(e,["children"]);return(0,l.jsx)(z.Td,(0,m.Z)((0,r.Z)({role:"cell",position:"relative",padding:"14px 22px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",color:"#464A51",backgroundColor:"#FFF",borderColor:"#DEDFE0",textTransform:"none",letterSpacing:"inherit"},o),{children:t}))});function ed(e,t){return e.order<t.order?-1:e.order>t.order?1:0}
1function es(e){var t=e.tableId,o=e.checkedColumns,i=e.onChangeCheckedColumns,d=e.hasLoading,c=e.setHasLoading,x=e.numberColumns,h=e.template,b=function(e){var t=!1,o="";return e&&(e<104857600?(t=!0,o="free"):e<1073741824?(t=K(),o="100mbBetween1gb"):(t=!1,o="biggest1gb")),{downloadPermitted:t,downloadWarning:o}},j=function(){function e(){return(e=(0,n.Z)(function(){var e,t,o,n,i,r;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return[4,fetch("/api/tables/getDictionaryTable?p=".concat(btoa(F.dataset)),{method:"GET"}).then(function(e){return e.json()})];case 1:if(null==(n=a.sent())?void 0:n.error)return[2];return i=null===(t=null==n?void 0:null===(e=n.cloudTables)||void 0===e?void 0:e.edges[0])||void 0===t?void 0:t.node,r=b(null==n?void 0:n.uncompressedFileSize),(0,B.ke)("download_table",{gcp_path:"".concat((null==i?void 0:i.gcpProjectId)+"."+(null==i?void 0:i.gcpDatasetId)+"."+(null==i?void 0:i.gcpTableId)),file_size:"".concat(null==n?void 0:n.uncompressedFileSize),dataset_id:"".concat(F.dataset),dataset_name:"".concat(null==n?void 0:null===(o=n.dataset)||void 0===o?void 0:o.name),table_id:"".concat(null==n?void 0:n._id),table_name:"".concat(null==n?void 0:n.name),column_download:!0}),window.open("/api/tables/downloadTable?p=".concat(btoa(null==i?void 0:i.gcpDatasetId),"&q=").concat(btoa(null==i?void 0:i.gcpTableId),"&d=").concat(btoa(r.downloadPermitted),"&s=").concat(btoa(r.downloadWarning))),[2]}})})).apply(this,arguments)}return(0,l.jsxs)(s.xu,{children:[(0,l.jsxs)(s.xv,{as:"button",onClick:function(){return function(){return e.apply(this,arguments)}()},display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",color:"#0068C5",fill:"#0068C5",_hover:{color:"#0057A4",fill:"#0057A4"},children:[U("column.downloadTranslationTable"),(0,l.jsx)(en,{width:"18px",height:"18px"})]}),(0,l.jsx)(s.xv,{children:U("column.dictionary")})]})},C=function(e){var t,o,n,i,r,a,d,c,u,p,x=e.value,h=e.dictionary,g=b(null==x?void 0:null===(t=x.table)||void 0===t?void 0:t.uncompressed_file_size),v=null==x?void 0:null===(o=x.table)||void 0===o?void 0:o.cloud_table,f=(null==v?void 0:v.gcp_project_id)||"",m=(null==v?void 0:v.gcp_dataset_id)||"",C=(null==v?void 0:v.gcp_table_id)||"",y=(null==x?void 0:null===(n=x.table)||void 0===n?void 0:null===(i=n.dataset)||void 0===i?void 0:i.name)||"",w=(null==x?void 0:null===(r=x.table)||void 0===r?void 0:r.name)||"";return"br_bd_diretorios_data_tempo"===m||"br_bd_diretorios_brasil"===m&&("empresa"===C||"cep"===C)||(null==x?void 0:x.name)==="ddd"?U("column.noTranslationNeeded"):(0,l.jsxs)(s.xu,{children:[null===x?(0,l.jsx)(s.xv,{display:!0===h?"none":"",children:U("column.noTranslationNeeded")}):(0,l.jsxs)(s.xu,{children:[(0,l.jsx)(s.xv,{as:"a",target:"_blank",href:(null==x?void 0:null===(a=x.table)||void 0===a?void 0:a.is_closed)||!g.downloadPermitted?"".concat("https://basedosdados.org","/dataset/").concat(null==x?void 0:null===(d=x.table)||void 0===d?void 0:null===(c=d.dataset)||void 0===c?void 0:c._id,"?table=").concat(null==x?void 0:null===(u=x.table)||void 0===u?void 0:u._id):"/api/tables/downloadTable?p=".concat(btoa(m),"&q=").concat(btoa(C),"&d=").concat(btoa(g.downloadPermitted),"&s=").concat(btoa(g.downloadWarning)),display:"flex",onClick:function(){var e,t,o,n,i,r,a;g.downloadPermitted&&(0,B.ke)("download_table",{gcp_path:"".concat(f+"."+m+"."+C),file_size:"".concat(null==x?void 0:null===(e=x.table)||void 0===e?void 0:e.uncompressed_file_size),dataset_id:"".concat(null==x?void 0:null===(t=x.table)||void 0===t?void 0:null===(o=t.dataset)||void 0===o?void 0:o.id),dataset_name:"".concat(null==x?void 0:null===(n=x.table)||void 0===n?void 0:null===(i=n.dataset)||void 0===i?void 0:i.name),table_id:"".concat(null==x?void 0:null===(r=x.table)||void 0===r?void 0:r.id),table_name:"".concat(null==x?void 0:null===(a=x.table)||void 0===a?void 0:a.name),column_download:!0})},flexDirection:"row",alignItems:"center",gap:"8px",color:"#0068C5",fill:"#0068C5",_hover:{color:"#0057A4",fill:"#0057A4"},children:(null==x?void 0:null===(p=x.table)||void 0===p?void 0:p.is_closed)||!g.downloadPermitted?(0,l.jsxs)(l.Fragment,{children:[U("column.accessTranslationTable"),(0,l.jsx)(O.Z,{width:"14px",height:"14px"})]}):(0,l.jsxs)(l.Fragment,{children:[U("column.downloadTranslationTable"),(0,l.jsx)(en,{width:"18px",height:"18px"})]})}),(0,l.jsxs)(s.xv,{children:[y," - ",w]})]}),!0===h&&(0,l.jsx)(j,{})]})},y=function(e){var t,o,n,i=e.value,r=null==i?void 0:null===(t=i.directory_primary_key)||void 0===t?void 0:null===(o=t.table)||void 0===o?void 0:o.cloud_table,a=(null==r?void 0:r.gcp_dataset_id)||"",l=(null==r?void 0:r.gcp_table_id)||"";return"br_bd_diretorios_data_tempo"===a||"br_bd_diretorios_brasil"===a&&("empresa"===l||"cep"===l)||(null==i?void 0:i.name)==="ddd"?U("column.no"):(null==i?void 0:i.covered_by_dictionary)===!0||(null==i?void 0:null===(n=i.directory_primary_key)||void 0===n?void 0:n.id)?U("column.yes"):(null==i?void 0:i.covered_by_dictionary)===!1?U("column.no"):U("column.notProvided")},w=(0,p.useRouter)(),F=w.query,_=w.locale,Z=(0,u.useState)([]),S=Z[0],k=Z[1],D=(0,u.useState)([]),E=D[0],T=D[1],A=(0,u.useState)(!1),R=A[0],q=A[1],I=(0,u.useState)(!0),H=I[0],N=I[1],W=(0,u.useState)(!0),P=W[0],M=W[1],U=(0,g.$G)("dataset").t;(0,u.useEffect)(function(){var e=function(e){c(!0),M(!0),N(!0)};return window.addEventListener("loadingColumnsEvent",e),function(){window.removeEventListener("loadingColumnsEvent",e)}},[]);var G,Q=(0,u.useCallback)(function(e){return o.includes(e)},[o]),K=(0,u.useCallback)(function(){var e;return f.Z.get("userBD")&&(e=JSON.parse(f.Z.get("userBD"))),(0,B.jl)(e)},[]),$=(0,u.useCallback)(function(e){Q(e)?i(o.filter(function(t){return t!==e})):i((0,V.Z)(o).concat([e]))},[Q,o,i]),J=(0,u.useCallback)(function(){if(o.length>0)return i([]);var e=S.map(function(e){return e.name});
1o.length===e.length?i([]):i(e)},[o,S,i]),et=(0,u.useMemo)(function(){return[{pt:U("column.name"),tooltip:U("column.nameTooltip")},{pt:"download"===h?U("column.translationTable"):U("column.needsTranslation"),tooltip:"download"===h?U("column.translationTableTooltip"):U("column.needsTranslationTooltip")},{pt:U("column.description"),tooltip:U("column.descriptionTooltip")},{pt:U("column.bigQueryType"),tooltip:U("column.bigQueryTypeTooltip")},{pt:U("column.temporalCoverage"),tooltip:U("column.temporalCoverageTooltip")},{pt:U("column.measurementUnit"),tooltip:U("column.measurementUnitTooltip")},{pt:U("column.sensitiveData"),tooltip:U("column.sensitiveDataTooltip")},{pt:U("column.observations"),tooltip:U("column.observationsTooltip")}]},[U,h]),eo=(G=(0,n.Z)(function(){var e,o,n,i,r;return(0,a.__generator)(this,function(o){switch(o.label){case 0:if(void 0===t)return[2];c(!0),M(!0),o.label=1;case 1:return o.trys.push([1,4,5,6]),e="/api/tables/getTableColumns?id=".concat(t,"&locale=").concat(_),[4,fetch(e,{method:"GET"})];case 2:return[4,o.sent().json()];case 3:return(n=o.sent()).success?(i=n.resource.sort(ed),k(i),x(n.resource.length),T(i),c(!1),M(!1),q(!1)):(console.error(n.error),q(!0)),[3,6];case 4:return r=o.sent(),console.error(r),q(!0),[3,6];case 5:return N(!1),[7];case 6:return[2]}})}),function(){return G.apply(this,arguments)});(0,u.useEffect)(function(){eo()},[t,_]),(0,u.useEffect)(function(){N(d)},[d]);var ei=function(e){if(!e)return U("column.notProvided");var t,o=e.split(/([^a-z])/);return(0,l.jsx)(Y.Z,{children:"$".concat(o.map(function(e){return e}).join(""),"$")})};return R?(0,l.jsx)(s.Kq,{justifyContent:"center",alignItems:"center",children:(0,l.jsx)(ee.Z,{widthImage:"300",heightImage:"300"})}):(0,l.jsxs)(s.Kq,{width:"100%",gap:"16px",spacing:0,children:[(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"14px",height:"40px",width:"100%",isLoaded:!P,children:(0,l.jsx)(er,{resource:S,columns:T,isLoaded:N})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!H,children:(0,l.jsx)(z.xJ,{height:"100%",maxHeight:"50vh",overflowY:"auto",border:"1px solid #DEDFE0",borderBottom:"0px",borderRadius:"16px",children:(0,l.jsxs)(z.iA,{position:"relative",role:"table",children:[(0,l.jsx)(z.hr,{role:"rowgroup",position:"relative",children:(0,l.jsxs)(z.Tr,{children:["checks"===h&&(0,l.jsxs)(z.Th,{role:"row",position:"sticky",left:0,top:"0",boxSizing:"content-box",alignItems:"center",border:"none !important",backgroundColor:"#F7F7F7",padding:"0 !important",zIndex:6,children:[(0,l.jsx)(s.xu,{padding:"14px 22px 14px 30px",children:(0,l.jsx)(X.Z,{isChecked:o.length===S.length,onChange:J,isIndeterminate:o.length!==S.length&&o.length>0,hasIndeterminate:o.length!==S.length&&o.length>0})}),(0,l.jsx)(s.xu,{position:"absolute",bottom:"0",height:"1px",width:"100%",backgroundColor:"#DEDFE0"}),(0,l.jsx)(s.xu,{display:{base:"flex",lg:"none"},position:"absolute",right:"0",top:"0",height:"100%",width:"1px",backgroundColor:"#DEDFE0"})]}),(0,l.jsx)(ea,{header:et[0],zIndex:5,left:{base:"none",lg:"download"===h?"0":"72px"}}),et.map(function(e,t){return 0!=t&&(0,l.jsx)(ea,{header:e},t)})]})}),(0,l.jsx)(z.p3,{role:"rowgroup",position:"relative",children:E.length>0&&E.map(function(e,t){var o,n,i,a=(null==e?void 0:e.namePt)||(null==e?void 0:e.name)||(null==e?void 0:e["name".concat((0,v.capitalize)(_))]),d=!a,c="download"!==h?y({value:e}):null,u="download"!==h&&c===U("column.notProvided"),p=(null==e?void 0:e["description".concat((0,v.capitalize)(_))])||(null==e?void 0:e.description),x=!p,g=null==e?void 0:null===(o=e.bigquery_type)||void 0===o?void 0:o.name,f=!g,b
1=null==e?void 0:null===(n=e.temporal_coverage)||void 0===n?void 0:n.start,j=null==e?void 0:null===(i=e.temporal_coverage)||void 0===i?void 0:i.end,w=!(b&&j),F=null==e?void 0:e.measurement_unit,Z=!F,S=null==e?void 0:e.contains_sensitive_data,k=!0!==S&&!1!==S,D=(null==e?void 0:e["observations".concat((0,v.capitalize)(_))])||(null==e?void 0:e.observations),E=!D;return(0,l.jsxs)(z.Tr,{role:"row",borderBottom:"1px solid #DEDFE0",children:["checks"===h&&(0,l.jsxs)(z.Td,{role:"cell",position:"sticky",left:0,zIndex:5,padding:"0 !important",backgroundColor:"#FFF",borderColor:"#DEDFE0",children:[(0,l.jsx)(s.xu,{display:"flex",alignItems:"center",padding:"14px 22px 14px 30px",children:(0,l.jsx)(X.Z,{isChecked:Q(e["name".concat((0,v.capitalize)(_))]||e.name),onChange:function(){return $(e["name".concat((0,v.capitalize)(_))]||e.name)}})}),(0,l.jsx)(s.xu,{display:{base:"flex",lg:"none"},position:"absolute",right:"0",top:"0",height:"100%",width:"1px",backgroundColor:"#DEDFE0"})]}),(0,l.jsxs)(el,{position:"sticky",left:{base:"none",lg:"download"===h?"0":"72px"},zIndex:"4",backgroundColor:d?"#F7F7F7":"#FFF",children:[d?"":a,(0,l.jsx)(s.xu,{display:{base:"none",lg:"flex"},position:"absolute",right:"0",top:"0",height:"100%",width:"1px",backgroundColor:"#DEDFE0"})]}),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},u&&{backgroundColor:"#F7F7F7"}),{children:u?"":"download"===h?(0,l.jsx)(C,{value:null==e?void 0:e.directory_primary_key,dictionary:null==e?void 0:e.covered_by_dictionary}):c})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},x&&{backgroundColor:"#F7F7F7"}),{children:x?"":p})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},f&&{backgroundColor:"#F7F7F7"}),{children:f?"":g})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},w&&{backgroundColor:"#F7F7F7"}),{children:w?"":b+" - "+j})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},Z&&{backgroundColor:"#F7F7F7"}),{children:Z?"":ei(F)})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},k&&{backgroundColor:"#F7F7F7"}),{children:k?"":!0===S?U("column.yes"):U("column.no")})),(0,l.jsx)(el,(0,m.Z)((0,r.Z)({},E&&{backgroundColor:"#F7F7F7"}),{children:E?"":D}))]},t)})})]})})})]})}var ec=o(8824),eu=o(1128),ep=o(1558);function ex(e){var t=e.type,o=void 0===t?"info":t,n=e.text,i=e.children,a=(0,S.Z)(e,["type","text","children"]),d={info:"#0068C5",warning:"#F9C50B",error:"#BF3434",success:"#2B8C4D"};return(0,l.jsxs)(s.xu,{position:"relative",display:"flex",flexDirection:"row",height:"100%",children:[(0,l.jsx)(s.xu,{position:"absolute",left:0,width:"40px",height:"100%",borderRadius:"10px",backgroundColor:d[o]||"#252A32"}),(0,l.jsxs)(s.Kq,(0,m.Z)((0,r.Z)({flexDirection:"row",spacing:0,gap:"16px",width:"100%",padding:"16px 24px",marginLeft:"4px",borderRadius:"8px",backgroundColor:{info:"#E4F2FF",warning:"#FFF8DF",error:"#F6E3E3",success:"#D5E8DB"}[o]||"#FFF",zIndex:"10"},a),{children:["info"===o&&(0,l.jsx)(et.Z,{width:"20px",height:"20px",padding:"2px",fill:d[o]}),"warning"===o&&(0,l.jsx)(ec.Z,{width:"20px",height:"20px",padding:"2px",fill:d[o]}),"error"===o&&(0,l.jsx)(eu.Z,{width:"20px",height:"20px",padding:"2px",fill:d[o]}),"success"===o&&(0,l.jsx)(ep.S,{width:"20px",height:"20px",padding:"2px",fill:d[o]}),(0,l.jsxs)(_.Z,{typography:"small",whiteSpace:{base:"normal",lg:"break-spaces"},children:[n,i]})]}))]})}f.Z.get("token"),"".concat("https://backend.basedosdados.org","/api/v1/graphql"),"".concat("https://backend.basedosdados.org","/api/v1/graphql"),"".concat("https://backend.basedosdados.org","/api/v1/graphql"),f.Z.get("token"),"".concat("https://backend.basedosdados.org","/api/v1/graphql");var eh=o(5121),eg="".concat("https://backend.basedosdados.org","/api/v1/graphql");function ev(){return(ev=(0,n.Z)(function(e,t,o){var n,i,r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,eh.Z)({url:eg,method:"POST",data:{query:'\n query {\n getTableOneBigTableQuery (tableId: "'.concat(e,'", columns: [').concat(t.map(function(e){return'"'.concat(e,'"')}).join(", "),"], includeTableTranslation: ").concat(o,")\n }\n "),variables:null}})];case 1:return[2,n.sent().data.data.getTableOneBigTableQuery];case 2:return r=n.sent(),console.error(r),[2,"err"];case 3:return[2]}})})).apply(this,arguments)}var ef=o(6676),eb=o(6250),em=o(7909),ej=(0,u.memo)(function(e){var t=e.language,o=e.children,n=(0,g.$G)("dataset").t,i=(0,u.useRef)(null),r=(0,u.useState)(!1),a=r[0],c=r[1],p=(0,u.useState)(!0),x=p[
10],h=p[1],v=(0,u.useState)(""),f=v[0],b=v[1],m=(0,d.VP)(o),j=m.hasCopied,C=m.onCopy;(0,u.useEffect)(function(){"sql"===t&&P.Z.registerLanguage("sql",M.Z),"python"===t&&P.Z.registerLanguage("python",U.Z),"r"===t&&P.Z.registerLanguage("r",G.Z),b(P.Z.highlight(o,{language:t}).value)},[o,t]),(0,u.useEffect)(function(){if(i.current){c(!1),h(!0);var e=i.current.clientHeight;c(e>190),e>190&&h(!1)}},[f]);var y=(0,u.useCallback)(function(){h(!x)},[x]);return(0,l.jsxs)(s.xu,{display:"flex",gap:"20px",flexDirection:"column",width:"100%",borderRadius:"8px",backgroundColor:"#252A32",children:[(0,l.jsxs)(s.xu,{display:"flex",justifyContent:"space-between",width:"100%",overflow:"hidden",padding:"22px 16px",height:x?"auto":"190px",children:[(0,l.jsx)(s.xv,{as:"code",padding:"0 !important",ref:i,whiteSpace:"break-spaces",className:"hljs ".concat(t),dangerouslySetInnerHTML:{__html:f}}),(0,l.jsxs)(s.xu,{id:"copy-".concat(t),display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",height:"20px",onClick:C,fontFamily:"Roboto",fontWeight:"500",fontSize:"12px",lineHeight:"18px",color:"#878A8E",fill:"#878A8E",_hover:{fill:"#9D9FA3",color:"#9D9FA3"},children:[n(j?"table.copied":"table.copy"),(0,l.jsx)(em.Z,{copied:j,icon:ef.l,width:"24px",height:"24px",marginLeft:"5px"})]})]}),a&&(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",gap:"8px",width:"100%",padding:"12px 16px",borderTop:"1px solid #464A51",onClick:y,fill:"#878A8E",color:"#878A8E",_hover:{fill:"#9D9FA3",color:"#9D9FA3"},children:[(0,l.jsx)(eb.Z,{alt:"expand/collapse",width:"24px",height:"24px",transform:x?"rotate(-90deg)":"rotate(90deg)"}),(0,l.jsx)(F.Z,{typography:"x-small",children:n(x?"table.collapse":"table.expand")})]})]})}),eC=(0,u.memo)(function(e){var t,o,i,r,d=e.resource,c=e.datasetName,x=e.changeTab,h=(0,g.$G)("dataset").t,v=(0,p.useRouter)().locale,b=(0,u.useState)(0),m=b[0],j=b[1],C=(0,u.useState)(0),y=C[0],w=C[1],S=(0,u.useState)(!1),k=S[0],E=S[1],A=(0,u.useState)(""),R=A[0],z=A[1],I=(0,u.useState)([]),O=I[0],H=I[1],N=(0,u.useState)(0),P=N[0],M=N[1],U=(0,u.useState)(""),G=U[0],V=U[1],$=(0,u.useState)(!1),Y=$[0],J=$[1],X=(0,u.useState)(!0),ee=X[0],eo=X[1],ei=(0,u.useState)(!0),er=ei[0],ea=ei[1],el=(0,u.useState)(!1),ed=el[0],ec=el[1],eu=(0,u.useState)(!1),ep=eu[0],eh=eu[1],eg=(0,u.useState)(!1),ef=eg[0],eb=eg[1],em=(0,u.useState)(""),eC=em[0],ey=em[1],ew=(0,u.useState)(""),eF=ew[0],e_=ew[1],eZ=(0,u.useState)(""),eS=eZ[0],ek=eZ[1],eD=(0,u.useCallback)(function(){var e;return f.Z.get("userBD")&&(e=JSON.parse(f.Z.get("userBD"))),(0,B.jl)(e)},[]),eE=(0,u.useCallback)(function(){try{return f.Z.get("tourBD")?JSON.parse(f.Z.get("tourBD")):null}catch(e){return console.error("Error parsing tourBD:",e),null}},[]),eT=(0,u.useCallback)(function(){if(0===y)e="SQL_section";else if(1===y)e="python_section";else{if(2!==y)return;e="r_section"}var e,t=document.getElementById(e);if(t){var o=t.getBoundingClientRect().top,n=window.innerHeight,i=o+window.pageYOffset;window.scrollTo({top:i-n/2,behavior:"smooth"})}},[y]),eA=(0,u.useCallback)((0,n.Z)(function(){var e,t;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,function(e,t,o){return ev.apply(this,arguments)}(null==d?void 0:d._id,O,ee)];case 1:if(null===(e=o.sent()))return[2];return V((0,B.iG)(e.trim(),v)),ec(!1),eh(!1),(t=eE())&&"begin"===t.state&&f.Z.set("tourBD",'{"state":"table"}',{expires:360}),[2]}})}),[null==d?void 0:d._id,O,ee,eE,v]),eL=(0,u.useCallback)(function(e){var t=[h("table.bigQueryAndPackages"),h("table.download")];j(e),(0,B.SM)("category_click",t[e])},[h]),eR=(0,u.useCallback)(function(e){w(e),(0,B.SM)("category_click",["SQL","Python","R"][e])},[]),eB=(0,u.useCallback)(function(){return({0:"SQL",1:"Python",2:"R"})[y]||""},[y]),eq=(0,u.useCallback)(function(){if(0===O.length){J(!0);return}(0,B.SM)("generate_query_click",eB()),eb(!0)},[O.length,eB]),ez=(0,u.useCallback)(function(){var e;if("free"!==R&&!1===eD()){window.open("/bdpro","_blank");return}window.open("/api/tables/downloadTable?p=".concat(btoa(eF),"&q=").concat(btoa(eS),"&d=").concat(btoa(k),"&s=").concat(btoa(R)),"_blank"),(0,B.ke)("download_table",{gcp_path:"".concat(eC+"."+eF+"."+eS),file_size:"".concat(null==d?void 0:d.uncompressedFileSize),dataset_id:"".concat(null==d?void 0:null===(e=d.dataset)||void 0===e?void 0:e._id),dataset_name:"".concat(c),table_id:"".concat(null==d?void 0:d._id),table_name:"".concat(null==d?void 0:d.name),column_download:!1})},[R,eD,eF,eS,k,eC,d]);(0,u.useEffect)(function(){if(!0===x){j(1);var e=eE();e&&"table"===e.state&&f.Z.set("tourBD",'{"state":"download"}',{expires:360})}},[x,eE]),(0,u.useEffect)(function(){var e;(null==d?void 0:null===(e=d.dataset)||void 0===e?void 0:e._id)==="e083c9a2-1cee-4342-bedc-535cbad6f3cd"&&eo(!1)},[null==d?void 0:null===(t=d.dataset)||void 0===t?void 0:t._id]),(0,u.useEffect)(function(){if(null==d?void 0:d.uncompressedFileSize){var e,t,o,n;(null==d?void 0:d.uncompressedFileSize)<104857600?(E(!0),z("free")):(null==d?void 0:d.uncompressedFileSize)<1073741824?(E(eD()),z("100mbBetween1gb")):z("biggest1gb")}(null==d?void 0:null===(e=d.cloudTables)||void 0===e?void 0:e[0])&&(ey((null===(t=null==d?void 0:d.cloudTables[0])||void 0===t?void 0:t.gcpProjectId)||""),e_((null===(o=null==d?void 0:d.cloudTables[0])||void 0===o?void 0:o.gcpDatasetId)||""),ek((null===(n=null==d?void 0:d.cloudTables[0])||void 0===n?void 0:n.gcpTableId)||""))},[null==d?void 0:d.uncompressedFileSize,null==d?void 0:d.cloudTables,eD]),(0,u.useEffect)(function(){(null==d?void 0:d._id)!==void 0&&(ec(!0),eb(!1),V(""),J(!1))},[null==d?void 0:d._id,O,ee]),(0,u.useEffect)(function(){!0===ef&&(eh(!0),eA())},[ef,eA]),(0,u.useEffect)(function(){""!==G&&eT()},[G,eT]),(0,u.useEffect)(function(){!1===er&&window.dispatchEvent(new CustomEvent("tablePageLoaded"))},[er]),(0,u.useEffect)(function(){(null==d?void 0:d._id)&&(H([]),J(!1),V(""),eb(!1),ec(!1),eh(!1))},[null==d?void 0:d._id]);var eI,eO,eH=(0,u.useMemo)(function(){return'import basedosdados as bd\n\nbilling_id = <seu_billing_id>\n\nquery = """\n '.concat(G,'\n"""\n\nbd.read_sql(query = query, billing_project_id = billing_id)')},[G]),eN=(0,u.useMemo)(function(){return'\n# Defina o seu projeto no Google Cloud\nset_billing_id("<YOUR_PROJECT_ID>")\n\n# Para carregar o dado direto no R\nquery <- "\n'.concat(G,'\n"\n\nread_sql(query, billing_project_id = get_billing_id())')},[G]);return(0,l.jsx)(s.gC,{alignItems:"flex-start",width:"100%",border:"1px solid #DEDFE0",borderRadius:"16px",children:(0,l.jsxs)(W.mQ,{width:"100%",variant:"unstyled",isLazy:!0,onChange:function(e){return eL(e)},index:m,overflow:"hidden",children:[(0,l.jsxs)(W.td,{position:"relative",pointerEvents:er?"none":"default",padding:"8px 24px 0",borderBottom:"1px solid #DEDFE0 !important",children:[(0,l.jsx)(s.xu,{id:"table_access_data",position:"absolute",width:"380px",height:"130px",top:"-55px",left:"-22px"}),(0,l.jsx)(Q.Z,{children:h("table.bigQueryAndPackages")}),(0,l.jsx)(Q.Z,{children:h("table.download")})]}),(0,l.jsxs)(s.gC,{id:"access_content_table",spacing:0,padding:"24px",overflow:"hidden",children:[(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"column",width:"100%",gap:"16px",id:"access_via_bigquery",children:[(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",lineHeight:"20px",width:"fit-content",isLoaded:!er,children:(0,l.jsx)(_.Z,{typography:"small",children:0===m?h("table.selectColumns"):h("table.checkColumns")})}),(0,l.jsx)(es,{tableId:null==d?void 0:d._id,checkedColumns:O,onChangeCheckedColumns:H,numberColumns:M,hasLoading:er,setHasLoading:ea,template:1===m?"download":"checks"}),(0,l.jsx)(L.Od,{display:(null==d?void 0:null===(o=d.dataset)||void 0===o?void 0:o._id)==="e083c9a2-1cee-4342-bedc-535cbad6f3cd"&&1!==m?"flex":"none",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!er,children:(0,l.jsxs)(ex,{type:"info",children:[h("table.infoTranslationNotAvailable",{returnObjects:!0})[0],(0,l.jsx)(Z.Z,{href:"https://basedosdados.org/dataset/e083c9a2-1cee-4342-bedc-535cbad6f3cd?table=0308fbe0-270c-4135-9115-ea1100f400f6",margin:"0 4px 0 0",display:"inline",target:"_blank",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.infoTranslationNotAvailable",{returnObjects:!0})[1]}),h("table.infoTranslationNotAvailable",{returnObjects:!0})[2],(0,l.jsx)(Z.Z,{href:"https://basedosdados.org/dataset/33b49786-fb5f-496f-bb7c-9811c985af8e?table=dffb65ac-9df9-4151-94bf-88c45bfcb056",margin:"0 4px",display:"inline",target:"_blank",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.infoTranslationNotAvailable",{returnObjects:!0})[3]}),h("table.infoTranslationNotAvailable",{returnObjects:!0})[4]]})}),(0,l.jsx)(L.Od,{display:1===m?"none":"flex",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"34px",width:"fit-content",isLoaded:!er,children:(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"row",gap:"8px",alignItems:"center",children:[(0,l.jsxs)(_.Z,{typography:"small",as:"label",display:"flex",flexDirection:"row",alignItems:"center",gap:"16px",pointerEvents:(null==d?void 0:null===(i=d.dataset)||void 0===i?void 0:i._id)==="e083c9a2-1cee-4342-bedc-535cbad6f3cd"?"none":"",children:[(0,l.jsx)(K.Z,{defaultChecked:(null==d?void 0:null===(r=d.dataset)||void 0===r?void 0:r._id)!=="e083c9a2-1cee-4342-bedc-535cbad6f3cd",value:ee,onChange:function(){return eo(!ee)}}),(0,l.jsx)(s.xv,{as:"span",children:h("table.translateInstitutionalCodes")})]}),(0,l.jsx)(D.u,{label:h("table.translateTooltip"),hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"230px",children:(0,l.jsx)(et.Z,{alt:"tip",cursor:"pointer",fill:"#878A8E",width:"16px",height:"16px"})})]})}),O.length>0&&d.uncompressedFileSize&&d.uncompressedFileSize/1073741824>5&&((null==(eI=eE())?void 0:eI.state)==="begin"?null:(0,l.jsx)(L.Od,{display:1===m?"none":"",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!er,children:(0,l.jsxs)(ex,{type:"warning",children:[h("table.warningLargeTable",{returnObjects:!0})[0],(0,l.jsx)(s.xv,{as:"span",fontWeight:"700",children:(0,B.td)(d.uncompressedFileSize)}),h("table.warningLargeTable",{returnObjects:!0})[1],(0,l.jsx)(s.xv,{as:"a",marginRight:"4px",href:"https://basedosdados.org/docs/access_data_bq/#entenda-o-uso-gratuito-do-big-query-bq",target:"_blank",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.warningLargeTable",{returnObjects:!0})[2]}),h("table.warningLargeTable",{returnObjects:!0})[3],(0,l.jsx)(s.xv,{as:"br",display:{base:"none",lg:"flex"}}),P===O.length&&h("table.warningLargeTableOptimize")]})})),Y&&((null==(eO=eE())?void 0:eO.state)==="begin"?null:(0,l.jsx)(L.Od,{display:1===m?"none":"",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!er,children:(0,l.jsx)(ex,{type:"error",text:h("table.errorInsufficientChecks")})})),(0,l.jsx)(L.Od,{display:1!==m?"flex":"none",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"40px",width:"fit-content",isLoaded:!er,children:(0,l.jsxs)(q.Z,{onClick:eq,children:[h("table.generateQuery")," ",(0,l.jsx)(T.$,{display:ep?"flex":"none",width:"16px",height:"16px"})]})})]}),(0,l.jsx)(s.gC,{alignItems:"flex-start",width:"100%",display:1===m?"flex":"none",children:(0,l.jsxs)(s.Kq,{id:"download_table",display:er?"none":"flex",flexDirection:"column",width:"100%",gap:"16px",marginTop:"16px",padding:0,children:[!1===eD()&&"free"===R&&(0,l.jsxs)(ex,{type:"info",children:[h("table.infoDataAvailability",{returnObjects:!0})[0],(0,l.jsx)(Z.Z,{display:"inline",target:"_blank",href:"en"===v?"/en/docs/colab_data/":"es"===v?"/es/docs/colab_data/":"/docs/colab_data/",fontWeight:"400",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.infoDataAvailability",{returnObjects:!0})[1]}),"."]}),!1===eD()&&"100mbBetween1gb"===R&&(0,l.jsxs)(ex,{type:"warning",children:[h("table.warningPaidPlanRequired",{returnObjects:!0})[0],(0,l.jsx)(Z.Z,{display:"inline",target:"_blank",href:"/prices",fontWeight:"400",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.warningPaidPlanRequired",{returnObjects:!0})[1]}),h("table.warningPaidPlanRequired",{returnObjects:!0})[2]]}),"biggest1gb"===R&&(0,l.jsx)(ex,{type:"error",text:h("table.errorTableTooLarge")}),(0,l.jsxs)(q.Z,{onClick:ez,backgroundColor:"biggest1gb"!==R?"#2B8C4D":"#ACAEB1",cursor:"biggest1gb"!==R?"pointer":"default",pointerEvents:"biggest1gb"!==R?"default":"none",children:[(0,l.jsx)(en,{width:"18px",height:"18px"}),h("table.downloadTable")," ","biggest1gb"!==R&&"(".concat((0,B.td)(null==d?void 0:d.uncompressedFileSize),")")]})]})}),(0,l.jsx)(s.gC,{display:0===m&&""!==G?"flex":"none",alignItems:"flex-start",width:"100%",border:"1px solid #DEDFE0",borderRadius:"16px",marginTop:"24px !important",children:(0,l.jsxs)(W.mQ,{width:"100%",variant:"unstyled",isLazy:!0,onChange:function(e){return eR(e)},index:y,overflow:"hidden",children:[(0,l.jsxs)(W.td,{id:"access_query_language",pointerEvents:er?"none":"default",padding:"8px 24px 0",borderBottom:"1px solid #DEDFE0 !important",children:[(0,l.jsx)(Q.Z,{children:"SQL"}),(0,l.jsx)(Q.Z,{children:"Python"}),(0,l.jsx)(Q.Z,{children:"R"})]}),(0,l.jsx)(s.gC,{id:"access_generated_query",spacing:0,padding:"24px",overflow:"hidden",children:(0,l.jsxs)(W.nP,{children:[(0,l.jsxs)(W.x4,{id:"SQL_section",display:ef?"flex":"none",flexDirection:"column",gap:"16px",padding:0,children:[(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"20px",width:"fit-content",isLoaded:!ed,children:(0,l.jsx)(_.Z,{typography:"small",children:h("table.bigQueryInstructions")})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsxs)(ex,{type:"info",children:[h("table.firstTimeBigQuery"),(0,l.jsx)(Z.Z,{display:"inline",marginLeft:"4px",target:"_blank",href:"en"===v?"/en/docs/access_data_bq/#getting-started":"es"===v?"/es/docs/access_data_bq/#pinitos":"/docs/access_data_bq/#primeiros-passos",fontWeight:"400",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.followStepByStep")})]})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsx)(s.xu,{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"2px",backgroundColor:"#2B8C4D",borderRadius:"10px",children:(0,l.jsx)(s.xu,{as:"a",i
1d:"acessar_o_bigquery_button",href:"https://console.cloud.google.com/bigquery?p=".concat(eC,"&d=").concat(eF,"&t=").concat(eS,"&page=table"),target:"_blank",display:"flex",alignItems:"center",height:"40px",borderRadius:"8px",backgroundColor:"#FFF",padding:"8px 16px",cursor:"pointer",color:"#2B8C4D",_hover:{color:"#22703E"},children:(0,l.jsx)(F.Z,{color:"#2B8C4D",_hover:{color:"#22703E"},typography:"small",children:h("table.accessBigQuery")})})})}),(0,l.jsx)(L.Od,{id:"SQL_section",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"10px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsx)(ej,{language:"sql",children:G})})]}),(0,l.jsxs)(W.x4,{id:"python_section",display:ef?"flex":"none",flexDirection:"column",gap:"16px",padding:0,children:[(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"20px",width:"fit-content",isLoaded:!ed,children:(0,l.jsx)(_.Z,{typography:"small",children:h("table.pythonInstructions")})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsxs)(ex,{type:"info",children:[h("table.firstTimePython"),(0,l.jsx)(Z.Z,{display:"inline",marginLeft:"4px",target:"_blank",href:"en"===v?"https://basedosdados.org/en/docs/api_reference_python/":"es"===v?"https://basedosdados.org/es/docs/api_reference_python/":"https://basedosdados.org/docs/api_reference_python/",fontWeight:"400",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.followStepByStep")})]})}),(0,l.jsx)(L.Od,{id:"python_section",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"10px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsx)(ej,{language:"python",children:eH})})]}),(0,l.jsxs)(W.x4,{id:"r_section",display:ef?"flex":"none",flexDirection:"column",gap:"16px",padding:0,children:[(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"20px",width:"fit-content",isLoaded:!ed,children:(0,l.jsx)(_.Z,{typography:"small",children:h("table.rInstructions")})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsxs)(ex,{type:"info",children:[h("table.firstTimeR"),(0,l.jsx)(Z.Z,{display:"inline",marginLeft:"4px",target:"_blank",href:"en"===v?"https://basedosdados.org/en/docs/api_reference_r/":"es"===v?"https://basedosdados.org/es/docs/api_reference_r/":"https://basedosdados.org/docs/api_reference_r/",fontWeight:"400",color:"#0068C5",_hover:{color:"#0057A4"},children:h("table.followStepByStep")})]})}),(0,l.jsx)(L.Od,{id:"r_section",startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"10px",height:"100%",width:"100%",isLoaded:!ed,children:(0,l.jsx)(ej,{language:"r",children:eN})})]})]})})]})})]})]})})}),ey=o(3173),ew=o(8602),eF=o(5929),e_=(0,eo.IU)({displayName:"notificationSolid",viewBox:"0 0 18 18",path:(0,l.jsx)("path",{fill:"current-color",d:"M3.4877 14.2879C3.26457 14.2879 3.07754 14.2124 2.9266 14.0615C2.77566 13.9105 2.7002 13.7235 2.7002 13.5004C2.7002 13.2773 2.77566 13.0902 2.9266 12.9393C3.07754 12.7884 3.26457 12.7129 3.4877 12.7129H4.2752L4.2752 7.20039C4.2752 6.11102 4.60332 5.14305 5.25957 4.29648C5.91582 3.44992 6.76895 2.89539 7.81895 2.63289V2.08164C7.81895 1.75352 7.93379 1.47461 8.16348 1.24492C8.39316 1.01523 8.67207 0.900391 9.0002 0.900391C9.32832 0.900391 9.60723 1.01523 9.83691 1.24492C10.0666 1.47461 10.1814 1.75352 10.1814 2.08164V2.63289C11.2314 2.89539 12.0846 3.44992 12.7408 4.29648C13.3971 5.14305 13.7252 6.11102 13.7252 7.20039L13.7252 12.7129H14.5127C14.7358 12.7129 14.9229 12.7884 15.0738 12.9393C15.2247 13.0902 15.3002 13.2773 15.3002 13.5004C15.3002 13.7235 15.2247 13.9105 15.0738 14.0615C14.9229 14.2124 14.7358 14.2879 14.5127 14.2879L3.4877 14.2879ZM9.0002 16.6504C8.56707 16.6504 8.19629 16.4962 7.88785 16.1877C7.57941 15.8793 7.4252 15.5085 7.4252 15.0754L10.5752 15.0754C10.5752 15.5085 10.421 15.8793 10.1125 16.1877C9.8041 16.4962 9.43332 16.6504 9.0002 16.6504Z"})}),eZ=(0,eo.IU)({displayName:"notificationDeactivate",viewBox:"0 0 18 18",path:(0,l.jsx)("path",{fill:"current-color",d:"M12.9829 14.1718L4.27843 14.1718C4.05724 14.1718 3.87183 14.097 3.7222 13.9473C3.57257 13.7977 3.49776 13.6123 3.49776 13.3911C3.49776 13.1699 3.57257 12.9845 3.7222 12.8349C3.87183 12.6852 4.05724 12.6104 4.27843 12.6104H5.0591L5.0591 7.14574C5.0591 6.71638 5.
11144 6.29351 5.22499 5.87716C5.33559 5.4608 5.50148 5.06396 5.72267 4.68664L8.18178 7.14574H5.9959L2.01449 3.16433C1.87137 3.02121 1.7998 2.83905 1.7998 2.61786C1.7998 2.39667 1.87137 2.21452 2.01449 2.07139C2.15761 1.92827 2.33977 1.85671 2.56096 1.85671C2.78215 1.85671 2.9643 1.92827 3.10743 2.07139L16.3788 15.3428C16.5219 15.4859 16.5967 15.6648 16.6032 15.8795C16.6098 16.0942 16.5349 16.2796 16.3788 16.4357C16.2357 16.5788 16.0535 16.6504 15.8323 16.6504C15.6111 16.6504 15.429 16.5788 15.2859 16.4357L12.9829 14.1718ZM14.4271 9.27307C14.4271 9.4292 14.3816 9.57232 14.2905 9.70244C14.1994 9.83255 14.0823 9.93013 13.9392 9.99519C13.7961 10.0602 13.6465 10.0765 13.4903 10.044C13.3342 10.0115 13.2041 9.94314 13.1 9.83905L7.53772 4.27678C7.44665 4.18571 7.38159 4.08812 7.34256 3.98403C7.30352 3.87994 7.28401 3.76935 7.28401 3.65225C7.28401 3.50913 7.31979 3.36926 7.39135 3.23264C7.46291 3.09602 7.56375 2.99519 7.69386 2.93013C7.83698 2.86507 7.9801 2.80652 8.12323 2.75448C8.26635 2.70244 8.41598 2.6569 8.57211 2.61786V2.07139C8.57211 1.74612 8.68596 1.46963 8.91365 1.24193C9.14135 1.01424 9.41784 0.900391 9.74311 0.900391C10.0684 0.900391 10.3449 1.01424 10.5726 1.24193C10.8003 1.46963 10.9141 1.74612 10.9141 2.07139V2.61786C11.955 2.87809 12.8007 3.43106 13.4513 4.27678C14.1019 5.12251 14.4271 6.07883 14.4271 7.14574L14.4271 9.27307ZM9.74311 16.5138C9.35278 16.5138 9.00473 16.4064 8.69897 16.1917C8.39321 15.9771 8.24033 15.6876 8.24033 15.3233C8.24033 15.2192 8.28261 15.1313 8.36719 15.0598C8.45176 14.9882 8.54609 14.9524 8.65018 14.9524L10.8361 14.9524C10.9401 14.9524 11.0345 14.9882 11.119 15.0598C11.2036 15.1313 11.2459 15.2192 11.2459 15.3233C11.2459 15.6876 11.093 15.9771 10.7873 16.1917C10.4815 16.4064 10.1334 16.5138 9.74311 16.5138Z"})}),eS=o(5146),ek=(0,u.memo)(function(e){var t=e.text,o=e.info,n=(0,S.Z)(e,["text","info"]);return(0,l.jsx)(s.xu,{children:(0,l.jsxs)(w.Z,(0,m.Z)((0,r.Z)({typography:"small",display:"flex",flexDirection:"row",alignItems:"center",gap:"8px"},n),{children:[t,(0,l.jsx)(D.u,(0,m.Z)((0,r.Z)({label:o,hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"300px"},n),{children:(0,l.jsx)(s.xu,{as:"span",display:"inline-flex",children:(0,l.jsx)(et.Z,{alt:"tip",cursor:"pointer",fill:"#878A8E",width:"16px",height:"16px"})})}))]}))})}),eD=(0,u.memo)(function(e){var t=e.children,o=e.isLoading,n=(0,S.Z)(e,["children","isLoading"]);return(0,l.jsx)(L.Od,(0,m.Z)((0,r.Z)({startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"36px",width:"100%",isLoaded:!o},n),{children:t}))}),eE=(0,u.memo)(function(e){var t=e.resource,o=e.t,n=e.router,i=(0,u.useMemo)(function(){return function(e){var t="",o="";if(e.github_user){var n=e.github_user.replace(/(https:)\/\/(github.com)\//gim,"");t="https://github.com/".concat(n),o="github basedosdados"}if(e.twitter_user){var i=e.twitter_user.replace(/(https:)\/\/(twitter.com)\//gim,"");t="https://x.com/".concat(i),o="twitter basedosdados"}if(e.email&&(t="mailto:".concat(e.email),o="email do contribuidor"),e.website){var r=e.website.replace(/(https?:)\/\//gim,"");t="https://".concat(r),o="website pessoal"}return{"aria-label":o,role:"link",tabIndex:0,cursor:t?"pointer":"default",width:"20px",height:"20px",fill:"#0068C5",_hover:{fill:"#0057A4"},onClick:t?function(){return window.open(t,"_blank","noopener,noreferrer")}:void 0}}},[n]);if(!t||"object"!=typeof t||0===Object.keys(t).length)return(0,l.jsx)(_.Z,{typography:"small",marginRight:"4px !important",color:"#464A51",children:o("table.notProvided")});var a=Object.values(t);return(0,l.jsx)(s.Kq,{spacing:"8px",children:a.map(function(e,t){return(0,l.jsxs)(s.Ug,{spacing:"4px",children:[(0,l.jsx)(_.Z,{typography:"small",marginRight:"4px !important",color:"#464A51",children:(null==e?void 0:e.firstName)&&(null==e?void 0:e.lastName)?"".concat(e.firstName," ").concat(e.lastName):o("table.notProvided")}),(null==e?void 0:e.github)&&(0,l.jsx)(ew.Z,(0,r.Z)({},i({github_user:e.github}))),(null==e?void 0:e.website)&&(0,l.jsx)(eF.Z,(0,r.Z)({},i({website:e.website})))]},t)})})});function eT(e){var t,o,i,r,d,c,x,h,b,m,j,C,y,S,E,T,A,z,W,P,M,U,G,Q,K,V,$,Y,J,X,ee,et,eo,ei,er,ea,el,ed,es,eu,ep,ex,eh,eg,ev,ef,eb,em,ej,ew,eF,eT,eA,eL,eR,eB,eq,ez,eI,eO,eH,eN,eW,eP,eM,eU,eG,eQ=e.id,eK=e.isBDSudo,eV=e.changeTab,e$=e.datasetName,eY=(0,g.$G)(["dataset","prices"]).t,eJ=(0,p.useRouter)(),eX=eJ.locale,e0=(0,R.pm)(),e1=(0,u.useState)(!1),e2=e1[0],e4=e1[1],e3=(0,u.useState)(!1),e8=e3[0],e6=e3[1],e5=(0,u.useState)(!1),e7=e5[0],e9=e5[1],te=(0,u.useState)(!0),tt=te[0],to=te[1],tn=(0,u.useState)({}),ti=tn[0],tr=tn[1],ta=(0,u.useState)(!1),tl=ta[0],td=ta[1],ts=(0,u.useCallback)(function(){var e=f.Z.get("userBD");if(!e)return null;try{var t=JSON.parse(e),o=null==t?void 0:t.id;if(!o)return null;return String(o).includes(":")?String(o).split(":").pop():String(o)}catch(n){return console.error("Error parsing userBD cookie",n),null}},[]),tc=(0,u.useCallback)(function(){var e=f.Z.get("userBD"),t=e?JSON.parse(e):null;(null==t?void 0:t.isAdmin)||(0,B.jl)(t)?e4(!0):e4(!1)},[]);function tu(){return(tu=(0,n.Z)(function(){var e,t,o,n;return(0,a.__generator)(this,function(t){switch(t.label){case 0:if(!(e=ts()))return[2];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch("/api/tables/getStatusTableUpdateNotification?p=".concat(btoa(e),"&q=").concat(btoa(eQ)),{method:"GET"})];case 2:return[4,t.sent().json()];case 3:return(o=t.sent())&&e6(null==o?void 0:o.status),[3,5];case 4:return n=t.sent(),console.error("Error fetching table notification status",n),[3,5];case 5:return[2]}})})).apply(this,arguments)}function tp(){return(tp=(0,n.Z)(function(){var e,t,o,n,i,r,d,c,u,p,x;return(0,a.__generator)(this,function(t){switch(t.label){case 0:if(e7||!(e=ts()))return[2];e9(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),[4,fetch("/api/tables/toggleTableUpdateNotification?p=".concat(btoa(e),"&q=").concat(btoa(eQ),"&s=").concat(btoa(String(e8))),{method:"GET"})];case 2:case 4:return[4,t.sent().json()];case 3:return o=t.sent(),[4,fetch("/api/tables/getStatusTableUpdateNotification?p=".concat(btoa(e),"&q=").concat(btoa(eQ)),{method:"GET"})];case 5:return(i=t.sent())&&void 0!==i.status?(e6(i.status),d=eY("table.notificationEnabled"),c=eY("table.notificationDisabled"),u={dataset_id:"".concat((null==ti?void 0:null===(r=ti.dataset)||void 0===r?void 0:r._id)||""),dataset_name:"".concat(e$||""),table_id:"".concat((null==ti?void 0:ti._id)||""),table_name:"".concat((null==ti?void 0:ti.name)||""),notification_status:i.status?"enabled":"disabled"},(0,B.ke)("table_notification_toggle",u),e0({status:"success",duration:3e3,position:"bottom",render:function(){return(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"row",gap:"8px",padding:"12px 16px",backgroundColor:"#252A32",borderRadius:"8px",color:"#FFF",fill:"#FFF",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",children:[(0,l.jsx)(H.Z,{width:"20px",height:"20px"}),i.status?d:c]})}})):o&&o.message&&e0({status:"info",duration:3e3,position:"bottom",render:function(){return(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"row",gap:"8px",padding:"12px 16px",backgroundColor:"#252A32",borderRadius:"8px",color:"#FFF",fill:"#FFF",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",children:[(0,l.jsx)(ec.Z,{width:"20px",height:"20px"}),o.message]})}}),[3,8];case 6:return p=t.sent(),console.error("Error toggling table notification",p),x=eY("table.notificationToggleFailed"),e0({title:x,status:"error",duration:4e3,position:"bottom",render:function(){return(0,l.jsxs)(s.xu,{display:"flex",flexDirection:"row",gap:"8px",padding:"12px 16px",backgroundColor:"#252A32",borderRadius:"8px",color:"#FFF",fill:"#FFF",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",children:[(0,l.jsx)(eS.Z,{width:"20px",height:"20px"}),toggleResult.message]})}}),[3,8];case 7:return setTimeout(function(){return e9(!1)},3e3),[7];case 8:return[2]}})})).apply(this,arguments)}var tx=(0,u.useCallback)((0,n.Z)(function(){var e,t,o,n,i,r;return(0,a.__generator)(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,4,5]),[4,fetch("/api/tables/getTable?id=".concat(eQ,"&locale=").concat(eX),{method:"GET"})];case 1:return[4,e.sent().json()];case 2:return(t=e.sent()).success?("under_review"===(i=(null==t?void 0:null===(o=t.resource)||void 0===o?void 0:null===(n=o.status)||void 0===n?void 0:n.slug)||"")||"excluded"===i)&&!1===eK?td(!0):(tr(t.resource),td(!1)):(console.error(t.error),td(!0)),[3,5];case 3:return r=e.sent(),console.error("Fetch error: ",r),td(!0),[3,5];case 4:return tc(),!function(){return tu.apply(this,arguments)}(),to(!1),[7];case 5:return[2]}})}),[eQ,eX,eK]);(0,u.useEffect)(function(){to(!0),tx()},[tx]);var th=(0,u.useCallback)(function(e){var t=new Date(e);return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")},[]),tg=(0,u.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0,n=t?{second:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.seconds")),minute:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.minutes")),hour:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.hours")),day:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.days")),week:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.weeks")),month:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.months")),bimester:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.bimonths")),quarter:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.quarters")),semester:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.semesters")),year:"".concat(eY("table.updateEvery")," ").concat(o," ").concat(eY("table.years"))}:{second:eY("table.updatePerSecond"),minute:eY("table.updatePerMinute"),hour:eY("table.updatePerHour"),day:eY("table.dailyUpdate"),week:eY("table.weeklyUpdate"),month:eY("table.monthlyUpdate"),bimester:eY("table.bimonthlyUpdate"),quarter:eY("table.quarterlyUpdate"),semester:eY("table.semiannualUpdate"),year:eY("table.annualUpdate")};return n[e]?n[e]:eY("table.updateNotDefined")},[eY]),tv=(0,u.useMemo)(function(){return(null==ti?void 0:ti["name".concat((0,v.capitalize)(eX))])||(null==ti?void 0:ti.name)},[ti,eX]),tf=(0,u.useMemo)(function(){return(null==ti?void 0:ti["description".concat((0,v.capitalize)(eX))])||(null==ti?void 0:ti.description)||eY("table.notProvided")},[ti,eX,eY]);return tl?(0,l.jsx)(ey.Z,{}):(0,l.jsxs)(s.Kq,{flex:1,overflow:"hidden",spacing:0,children:[(0,l.jsxs)(eD,{display:"flex",width:"100%",height:"fit-content",flexDirection:"row",gap:"8px",justifyContent:"space-between",alignItems:"center",isLoading:tt,children:[(0,l.jsxs)(s.Kq,{display:"flex",width:"100%",minWidth:"0",height:"fit-content",flexDirection:{base:"column",lg:"row"},alignItems:{base:"start",lg:"center"},gap:"8px",spacing:0,children:[(0,l.jsx)(w.Z,{display:"block",width:"fit-content",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:{base:"normal",lg:"nowrap"},children:tv}),(null==ti?void 0:ti.uncompressedFileSize)&&(0,l.jsx)(F.Z,{width:"fit-content",typography:"x-small",color:"#71757A",whiteSpace:"nowrap",flexShrink:0,children:"(".concat((0,B.td)(ti.uncompressedFileSize),")")})]}),(0,l.jsx)(D.u,{label:e2?e8?eY("table.tooltipDisableNotification"):eY("table.tooltipEnableNotification"):eY("table.tooltipUpgradeRequired"),hasArrow:!0,maxWidth:e2?e8?"212px":"245px":"250px",padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",children:(0,l.jsx)(s.xu,{display:"flex",flexShrink:0,children:(0,l.jsxs)(q.Z,{width:"fit-content",padding:"11px 16px",borderRadius:"8px",flexShrink:0,justifyContent:"center",isVariant:!0,onClick:function(){if(!e2){window.open("/bdpro","_blank"),(0,B.SM)("table_notification_redirect_bdpro","click");return}e7||function(){tp.apply(this,arguments)}()},"aria-disabled":e7,opacity:e2&&e7?.6:1,color:e2?"currentColor":"#ACAEB1",borderColor:e2?"currentColor":"#ACAEB1",_hover:{opacity:.8},pointerEvents:e7?"none":"auto",children:[e8?(0,l.jsx)(eZ,{width:"18px",height:"18px"}):(0,l.jsx)(e_,{width:"18px",height:"18px",fill:e2?"currentColor":"#ACAEB1"}),(0,l.jsx)(F.Z,{color:"currentColor",children:e8?eY("table.disableNotification"):eY("table.enableNotification")})]})})})]}),(0,l.jsx)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:"100%",height:"fit-content",spacing:"6px",skeletonHeight:"16px",noOfLines:3,marginTop:"8px !important",marginBottom:"40px !important",isLoaded:!tt,children:(0,l.jsx)(k,{id:"readLessTable",children:tf})}),(0,l.jsxs)(s.Kq,{id:"table_temporalcoverage",width:{base:"100%",lg:"fit-content"},spacing:"8px",marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"300px",height:"28px",isLoading:tt,children:(0,l.jsx)(w.Z,{typography:"small",children:eY("table.temporalCoverage")})}),(0,l.jsx)(eD,{width:"100%",height:tt?"65px":"fit-content",isLoading:tt,children:(0,l.jsx)(N,{value:null==ti?void 0:ti.fullTemporalCoverage})})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",marginBottom:"40px !important",backgroundColor:"#FFFFFF",children:[(0,l.jsx)(eD,{width:"200px",height:"28px",isLoading:tt,children:(0,l.jsx)(w.Z,{typography:"small",children:eY("table.dataAccess")})}),(0,l.jsx)(eC,{resource:ti,datasetName:e$,changeTab:eV})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"380px",height:"28px",isLoading:tt,children:(0,l.jsx)(w.Z,{typography:"small",children:eY("table.dataUpdateFrequency")})}),(0,l.jsxs)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:tt?"500px":"100%",spacing:"4px",skeletonHeight:"18px",noOfLines:3,isLoaded:!tt,children:[(0,l.jsxs)(s.xu,{display:"flex",marginBottom:{base:"24px",lg:"0"},flexDirection:{base:"column",lg:"row"},gap:"4px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"22px",color:"#464A51",children:[(null==ti?void 0:null===(t=ti.updates)||void 0===t?void 0:null===(o=t[0])||void 0===o?void 0:o.latest)?"".concat(th(ti.updates[0].latest)):eY("table.notProvided"),": ",eY("table.lastUpdateBD"),(null==ti?void 0:null===(i=ti.updates)||void 0===i?void 0:null===(r=i[0])||void 0===r?void 0:r.frequency)&&(0,l.jsx)(F.Z,{typography:"x-small",width:"fit-content",backgroundColor:"#EEEEEE",padding:"2px 4px",borderRadius:"4px",children:(null==ti?void 0:null===(d=ti.updates)||void 0===d?void 0:null===(c=d[0])||void 0===c?void 0:c.frequency)===1?tg(null==ti?void 0:null===(x=ti.updates)||void 0===x?void 0:null===(h=x[0])||void 0===h?void 0:null===(b=h.entity)||void 0===b?void 0:b.slug):tg(null==ti?void 0:null===(m=ti.updates)||void 0===m?void 0:null===(j=m[0])||void 0===j?void 0:null===(C=j.entity)||void 0===C?void 0:C.slug,!0,null==ti?void 0:null===(y=ti.updates)||void 0===y?void 0:null===(S=y[0])||void 0===S?void 0:S.frequency)}),!(null==ti?void 0:null===(E=ti.updates)||void 0===E?void 0:null===(T=E[0])||void 0===T?void 0:T.frequency)&&(0,l.jsx)(F.Z,{typography:"x-small",width:"fit-content",backgroundColor:"#EEEEEE",padding:"2px 4px",borderRadius:"4px",children:eY("table.noUpdateScheduled")})]}),(0,l.jsxs)(s.xu,{display:"flex",flexDirection:{base:"column",lg:"row"},marginBottom:{base:"24px",lg:"0"},gap:"4px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"22px",marginTop:"4px",color:"#464A51",children:[(null==ti?void 0:null===(A=ti.rawDataSource)||void 0===A?void 0:null===(z=A[0])||void 0===z?void 0:null===(W=z.updates)||void 0===W?void 0:null===(P=W[0])||void 0===P?void 0:P.latest)?"".concat(th(ti.rawDataSource[0].updates[0].latest)):eY("table.notProvided"),": ",eY("table.lastUpdateRawDataSource"),(null==ti?void 0:null===(M=ti.rawDataSource)||void 0===M?void 0:null===(U=M[0])||void 0===U?void 0:null===(G=U.updates)||void 0===G?void 0:null===(Q=G[0])||void 0===Q?void 0:Q.frequency)?(0,l.jsx)(F.Z,{typography:"x-small",width:"fit-content",backgroundColor:"#EEEEEE",padding:"2px 4px",borderRadius:"4px",children:(null==ti?void 0:null===(K=ti.rawDataSource)||void 0===K?
1void 0:null===(V=K[0])||void 0===V?void 0:null===($=V.updates)||void 0===$?void 0:null===(Y=$[0])||void 0===Y?void 0:Y.frequency)===1?tg(null==ti?void 0:null===(J=ti.rawDataSource)||void 0===J?void 0:null===(X=J[0])||void 0===X?void 0:null===(ee=X.updates)||void 0===ee?void 0:null===(et=ee[0])||void 0===et?void 0:null===(eo=et.entity)||void 0===eo?void 0:eo.slug):tg(null==ti?void 0:null===(ei=ti.rawDataSource)||void 0===ei?void 0:null===(er=ei[0])||void 0===er?void 0:null===(ea=er.updates)||void 0===ea?void 0:null===(el=ea[0])||void 0===el?void 0:null===(ed=el.entity)||void 0===ed?void 0:ed.slug,!0,null==ti?void 0:null===(es=ti.rawDataSource)||void 0===es?void 0:null===(eu=es[0])||void 0===eu?void 0:null===(ep=eu.updates)||void 0===ep?void 0:null===(ex=ep[0])||void 0===ex?void 0:ex.frequency)}):(null==ti?void 0:null===(eh=ti.rawDataSource)||void 0===eh?void 0:null===(eg=eh[0])||void 0===eg?void 0:null===(ev=eg.updates)||void 0===ev?void 0:ev[0])&&(null==ti?void 0:null===(ef=ti.updates)||void 0===ef?void 0:null===(eb=ef[0])||void 0===eb?void 0:eb.frequency)?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(F.Z,{typography:"x-small",width:"fit-content",backgroundColor:"#EEEEEE",padding:"2px 4px",borderRadius:"4px",children:eY("table.noUpdateScheduled")})]}),(0,l.jsxs)(s.xu,{display:"flex",flexDirection:{base:"column",lg:"row"},gap:"4px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"22px",marginTop:"4px",color:"#464A51",children:[(null==ti?void 0:null===(em=ti.rawDataSource)||void 0===em?void 0:null===(ej=em[0])||void 0===ej?void 0:null===(ew=ej.polls)||void 0===ew?void 0:null===(eF=ew[0])||void 0===eF?void 0:eF.latest)?"".concat(th(ti.rawDataSource[0].polls[0].latest)):eY("table.notProvided"),": ",eY("table.lastCheckRawDataSource")]})]})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"300px",height:"28px",isLoading:tt,children:(0,l.jsx)(w.Z,{typography:"small",children:eY("table.bigQueryID")})}),(0,l.jsx)(eD,{height:"20px",width:(null==ti?void 0:ti.cloudTables)?"fit-content":"500px",isLoading:tt,children:(0,l.jsxs)(Z.Z,{id:"acessar_o_bigquery_section",gap:"8px",href:"https://console.cloud.google.com/bigquery?p=".concat(null==ti?void 0:null===(eT=ti.cloudTables)||void 0===eT?void 0:null===(eA=eT[0])||void 0===eA?void 0:eA.gcpProjectId,"&d=").concat(null==ti?void 0:null===(eL=ti.cloudTables)||void 0===eL?void 0:null===(eR=eL[0])||void 0===eR?void 0:eR.gcpDatasetId,"&t=").concat(null==ti?void 0:null===(eB=ti.cloudTables)||void 0===eB?void 0:null===(eq=eB[0])||void 0===eq?void 0:eq.gcpTableId,"&page=table"),target:"_blank",rel:"noopener noreferrer",cursor:"pointer",fontWeight:"400",color:(null==ti?void 0:ti.cloudTables)?"#0068C5":"#464A51",pointerEvents:(null==ti?void 0:ti.cloudTables)?"default":"none",fill:"#0068C5",_hover:{color:"#0057A4",fill:"#0057A4"},children:[(null==ti?void 0:ti.cloudTables)?(null==ti?void 0:null===(ez=ti.cloudTables)||void 0===ez?void 0:null===(eI=ez[0])||void 0===eI?void 0:eI.gcpProjectId)+"."+(null==ti?void 0:null===(eO=ti.cloudTables)||void 0===eO?void 0:null===(eH=eO[0])||void 0===eH?void 0:eH.gcpDatasetId)+"."+(null==ti?void 0:null===(eN=ti.cloudTables)||void 0===eN?void 0:null===(eW=eN[0])||void 0===eW?void 0:eW.gcpTableId):eY("table.notProvided"),(0,l.jsx)(O.Z,{display:(null==ti?void 0:ti.cloudTables)?"flex":"none",width:"12px",height:"12px"})]})})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"260px",height:"28px",isLoading:tt,children:(0,l.jsx)(ek,{text:eY("table.partitionsInBigQuery"),info:eY("table.partitionsTooltip")})}),(0,l.jsx)(eD,{height:"20px",width:(null==ti?void 0:ti.partitions)?"100%":"200px",isLoading:tt,children:(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null==ti?void 0:ti.partitions)?ti.partitions:eY("table.notProvided")})})]}),(0,l.jsxs)(s.Kq,{marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"300px",height:"28px",isLoading:tt,children:(0,l.jsx)(ek,{text:eY("table.observationLevel"),info:eY("table.observationLevelTooltip")})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"16px",height:"100%",width:"100%",isLoaded:!tt,children:(null==ti?void 0:ti.observationLevels)&&Object.keys(null==ti?void 0:ti.observationLevels).length>0?(0,l.jsx)(I,{resource:ti}):(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:eY("table.notProvided")})})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",marginBottom:"40px !important",children:[(0,l.jsx)(eD,{width:"240px",height:"28px",isLoading:tt,children:(0,l.jsx)(ek,{text:eY("table.auxiliaryFiles"),info:eY("table.auxiliaryFilesTooltip")})}),(0,l.jsx)(eD,{width:(null==ti?void 0:ti.auxiliaryFilesUrl)?"100%":"178px",height:"24px",isLoading:tt,children:(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null==ti?void 0:ti.auxiliaryFilesUrl)?(0,l.jsxs)(Z.Z,{gap:"8px",fontWeight:"400",color:"#0068C5",fill:"#0068C5",_hover:{fill:"#0057A4",color:"#0057A4"},href:ti.auxiliaryFilesUrl,children:[eY("table.downloadFiles"),(0,l.jsx)(en,{width:"18px",height:"18px"})]}):eY("table.notProvided")})})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",children:[(0,l.jsx)(eD,{width:"240px",height:"28px",isLoading:tt,children:(0,l.jsx)(ek,{text:eY("table.rawDataSources"),info:eY("table.rawDataSourcesTooltip")})}),(0,l.jsx)(eD,{height:"20px",width:(null==ti?void 0:null===(eP=ti.rawDataSource)||void 0===eP?void 0:null===(eM=eP[0])||void 0===eM?void 0:eM.name)?"100%":"132px",isLoading:tt,children:(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null==ti?void 0:null===(eU=ti.rawDataSource)||void 0===eU?void 0:null===(eG=eU[0])||void 0===eG?void 0:eG._id)?Object.values(null==ti?void 0:ti.rawDataSource).map(function(e,t){var o;return(0,l.jsx)(Z.Z,{target:"_blank",rel:"noopener noreferrer",display:"flex",flexDirection:"row",gap:"8px",alignItems:"center",fontWeight:"400",color:"#0068C5",fill:"#0068C5",_hover:{fill:"#0057A4",color:"#0057A4"},href:"/dataset/".concat(null==e?void 0:null===(o=e.dataset)||void 0===o?void 0:o._id,"?raw_data_source=").concat(null==e?void 0:e._id),children:(null==e?void 0:e["name".concat((0,v.capitalize)(eX))])||(null==e?void 0:e.name)},t)}):eY("table.notProvided")})})]}),(0,l.jsx)(s.iz,{marginY:"40px !important",borderColor:"#DEDFE0"}),(0,l.jsx)(eD,{width:"240px",height:"28px",marginBottom:"20px !important",isLoading:tt,children:(0,l.jsx)(w.Z,{typography:"small",children:eY("table.additionalInformation")})}),(0,l.jsxs)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:(null==ti?void 0:ti.publishedByInfo)?"100%":"200px",minHeight:"40px",spacing:"4px",skeletonHeight:"16px",noOfLines:2,marginBottom:"24px !important",isLoaded:!tt,children:[(0,l.jsx)(F.Z,{typography:"small",children:eY("table.publishedBy")}),(0,l.jsx)(eE,{resource:(null==ti?void 0:ti.publishedByInfo)||eY("table.notProvided"),t:eY,router:eJ})]}),(0,l.jsxs)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:(null==ti?void 0:ti.dataCleanedByInfo)?"100%":"200px",minHeight:"40px",spacing:"4px",skeletonHeight:"16px",noOfLines:2,marginBottom:"24px !important",isLoaded:!tt,children:[(0,l.jsx)(F.Z,{typography:"small",children:eY("table.dataCleanedBy")}),(0,l.jsx)(eE,{resource:(null==ti?void 0:ti.dataCleanedByInfo)||eY("table.notProvided"),t:eY,router:eJ})]}),(0,l.jsxs)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:(null==ti?void 0:ti.version)?"100%":"100px",minHeight:"40px",spacing:"4px",skeletonHeight:"18px",noOfLines:2,marginBottom:"24px !important",isLoaded:!tt,children:[(0,l.jsx)(F.Z,{typography:"small",children:eY("table.ver
1sion")}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null==ti?void 0:ti.version)||eY("table.notProvided")})]}),(0,l.jsxs)(s.xu,{display:"flex",padding:"40px",boxSizing:"border-box",flexDirection:"column",alignItems:"center",textAlign:"center",background:"#FFFFFF",border:"1px solid #DEDFE0",borderRadius:"16px",children:[(0,l.jsx)(w.Z,{children:eY("table.helpInFooterTitle")}),(0,l.jsx)(w.Z,{typography:"small",color:"#71757A",marginBottom:"16px",children:eY("table.helpInFooterSubtitle")}),(0,l.jsx)(Z.Z,{href:"/contact",target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)(q.Z,{padding:"10px 20px",children:eY("table.helpInFooterButton")})})]})]})}function eA(e){var t,o=e.id,i=e.isBDSudo,d=(0,g.$G)("dataset").t,c=(0,p.useRouter)().locale,x=(0,u.useState)(!0),h=x[0],f=x[1],b=(0,u.useState)({}),j=b[0],C=b[1],y=(0,u.useState)(!1),Z=y[0],E=y[1];(0,u.useEffect)(function(){var e;(e=(0,n.Z)(function(){var e,t,n,r,l,d,s;return(0,a.__generator)(this,function(t){switch(t.label){case 0:f(!0),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,fetch(e="/api/rawDataSources/getRawDataSource?id=".concat(o,"&locale=").concat(c),{method:"GET"})];case 2:return[4,t.sent().json()];case 3:return(n=t.sent()).success?"under_review"===(d=(null==n?void 0:null===(r=n.resource)||void 0===r?void 0:null===(l=r.status)||void 0===l?void 0:l.slug)||"")||"excluded"===d&&!1===i?E(!0):(C(n.resource),E(!1)):(console.error(n.error),E(!0)),[3,6];case 4:return s=t.sent(),console.error("Fetch error: ",s),E(!0),[3,6];case 5:return f(!1),[7];case 6:return[2]}})}),function(){return e.apply(this,arguments)})()},[o,c]);var T=function(e){if(void 0===e||0===Object.keys(e).length)return d("rawDataSource.notProvided");var t=[];return(Object.values(e).map(function(e){var o=e["name".concat((0,v.capitalize)(c))]||e.name;t.push(o)}),0===t.length)?d("rawDataSource.notProvided"):t.join(", ").toString()},A=function(e){switch(e){case!0:return d("rawDataSource.yes");case!1:return d("rawDataSource.no");default:return d("rawDataSource.notProvided")}},R=function(e){var t=e.text,o=e.info,n=(0,S.Z)(e,["text","info"]);return(0,l.jsx)(s.xu,{children:(0,l.jsxs)(w.Z,(0,m.Z)((0,r.Z)({typography:"small",display:"flex",flexDirection:"row",alignItems:"center",gap:"8px"},n),{children:[t,(0,l.jsx)(D.u,{label:o,hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"300px",children:(0,l.jsx)(et.Z,{alt:"tip",cursor:"pointer",fill:"#878A8E",width:"16px",height:"16px"})})]}))})},B=function(e){var t=e.children,o=(0,S.Z)(e,["children"]);return(0,l.jsx)(L.Od,(0,m.Z)((0,r.Z)({startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"36px",width:"100%",isLoaded:!h},o),{children:t}))},z=function(e){var t=e.title,o=e.text,n=(0,S.Z)(e,["title","text"]);return(0,l.jsxs)(L.N2,(0,m.Z)((0,r.Z)({startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",minHeight:"40px",width:"100%",spacing:"4px",skeletonHeight:"18px",noOfLines:2,marginBottom:"24px !important",isLoaded:!h},n),{children:[(0,l.jsx)(F.Z,{typography:"small",children:t}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:o||d("rawDataSource.notProvided")})]}))};return Z?(0,l.jsx)(ey.Z,{}):(0,l.jsxs)(s.Kq,{flex:1,overflow:"hidden",paddingLeft:{base:"0",lg:"24px"},spacing:0,children:[(0,l.jsxs)(s.Kq,{spacing:0,id:"dataset_rawdatasource_header",marginBottom:"40px !important",children:[(0,l.jsx)(B,{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",children:(0,l.jsx)(w.Z,{width:"fit-content",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:(null==j?void 0:j["name".concat((0,v.capitalize)(c))])||(null==j?void 0:j.name)})}),(0,l.jsx)(B,{minHeight:"56px",height:"fit-content",marginTop:"8px !important",children:(0,l.jsx)(ex,{children:d("rawDataSource.rawDataDisclaimer")})}),(0,l.jsx)(B,{width:"fit-content",height:"40px",marginTop:"8px !important",children:(0,l.jsxs)(q.Z,{as:"a",href:null==j?void 0:j.url,target:"_blank",onClick:function(){},backgroundColor:(null==j?void 0:j.url)?"#2B8C4D":"#ACAEB1",cursor:(null==j?void 0:j.url)?"pointer":"default",_hover:{backgroundColor:(null==j?void 0:j.url)?"#22703E":"#ACAEB1"},children:[d("rawDataSource.accessOriginalSource"),(0,l.jsx)(O.Z,{width:"12px",height:"12px"})]})})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",children:[(0,l.jsx)(B,{width:"160px",height:"28px",children:(0,l.jsx)(w.Z,{typography:"small",children:d("rawDataSource.description")})}),(0,l.jsx)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:"100%",height:"fit-content",spacing:"6px",skeletonHeight:"16px",noOfLines:3,marginTop:"8px !important",isLoaded:!h,children:(0,l.jsx)(k,{id:"readLessRawDescription",children:(null==j?void 0:j["description".concat((0,v.capitalize)(c))])||(null==j?void 0:j.description)||d("rawDataSource.notProvided")})})]}),(0,l.jsx)(s.iz,{marginY:"40px !important",borderColor:"#DEDFE0"}),(0,l.jsx)(B,{width:"190px",height:"28px",marginBottom:"20px !important",children:(0,l.jsx)(w.Z,{typography:"small",children:d("rawDataSource.additionalInfo")})}),(0,l.jsx)(z,{title:d("rawDataSource.language"),text:T(null==j?void 0:j.languages)}),(0,l.jsx)(z,{title:d("rawDataSource.availability"),text:null==j?void 0:null===(t=j.availability)||void 0===t?void 0:t.name}
1),(0,l.jsx)(z,{title:d("rawDataSource.hasStructuredData"),text:A(null==j?void 0:j.containsStructuredData)}),(0,l.jsx)(z,{title:d("rawDataSource.hasAPI"),text:A(null==j?void 0:j.containsApi)}),(0,l.jsx)(z,{title:d("rawDataSource.updateFrequency"),text:function(){var e,t,o,n=null==j?void 0:null===(e=j.updates)||void 0===e?void 0:e[0];if(!n||0===Object.keys(n).length)return d("rawDataSource.notProvided");var i=null==n?void 0:null===(t=n.entity)||void 0===t?void 0:t["name".concat((0,v.capitalize)(c))],r=null==n?void 0:null===(o=n.entity)||void 0===o?void 0:o.name;return(null==n?void 0:n.frequency)>=0&&(i||r)?"".concat(null==n?void 0:n.frequency," ").concat(i||r):i||r?"".concat(i||r):d("rawDataSource.notProvided")}()}),(0,l.jsxs)(s.Kq,{marginBottom:"24px !important",children:[(0,l.jsx)(B,{width:"190px",height:"28px",children:(0,l.jsx)(R,{text:d("rawDataSource.observationLevel"),info:d("rawDataSource.observationLevelTooltip"),fontSize:"14px"})}),(0,l.jsx)(L.Od,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"16px",height:"100%",width:"100%",isLoaded:!h,children:(null==j?void 0:j.observationLevels)&&Object.keys(null==j?void 0:j.observationLevels).length>0?(0,l.jsx)(I,{resource:j}):(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:d("rawDataSource.notProvided")})})]}),(0,l.jsx)(z,{title:d("rawDataSource.requiresRegistration"),text:A(null==j?void 0:j.requiresRegistration)}),(0,l.jsx)(z,{title:d("rawDataSource.requiresIPFromCountry"),text:T(null==j?void 0:j.areaIpAddressRequired)}),(0,l.jsx)(z,{title:d("rawDataSource.isFree"),text:A(null==j?void 0:j.isFree)})]})}function eL(e){var t,o,i=e.id,d=e.isBDSudo,c=(0,g.$G)("dataset").t,x=(0,p.useRouter)().locale,h=(0,u.useState)(!0),f=h[0],b=h[1],j=(0,u.useState)({}),C=j[0],y=j[1],Z=(0,u.useState)(!1),D=Z[0],E=Z[1];(0,u.useEffect)(function(){var e;(e=(0,n.Z)(function(){var e,t,o,n,r,l,s;return(0,a.__generator)(this,function(t){switch(t.label){case 0:b(!0),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,fetch(e="/api/informationRequests/getInformationRequest?id=".concat(i,"&locale=").concat(x),{method:"GET"})];case 2:return[4,t.sent().json()];case 3:return(o=t.sent()).success?"under_review"===(l=(null==o?void 0:null===(n=o.resource)||void 0===n?void 0:null===(r=n.status)||void 0===r?void 0:r.slug)||"")||"excluded"===l&&!1===d?E(!0):(y(o.resource),E(!1)):(console.error(o.error),E(!0)),[3,6];case 4:return s=t.sent(),console.error("Fetch error: ",s),E(!0),[3,6];case 5:return b(!1),[7];case 6:return[2]}})}),function(){return e.apply(this,arguments)})()},[i,x]);var T=function(e){var t=e.title,o=e.text,n=(0,S.Z)(e,["title","text"]);return(0,l.jsxs)(L.N2,(0,m.Z)((0,r.Z)({startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",minHeight:"40px",width:"100%",spacing:"4px",skeletonHeight:"18px",noOfLines:2,marginBottom:"24px !important",isLoaded:!f},n),{children:[(0,l.jsx)(F.Z,{typography:"small",children:t}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:o||c("informationRequest.notProvided")})]}))},A=function(e){var t=e.children,o=(0,S.Z)(e,["children"]);return(0,l.jsx)(L.Od,(0,m.Z)((0,r.Z)({startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",height:"36px",width:"100%",isLoaded:!f},o),{children:t}))};return D?(0,l.jsx)(ey.Z,{}):(0,l.jsxs)(s.Kq,{flex:1,overflow:"hidden",paddingLeft:{base:"0",lg:"24px"},spacing:0,children:[(0,l.jsx)(A,{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",children:(0,l.jsx)(w.Z,{width:"fit-content",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:c("informationRequest.requestNumber",{number:null==C?void 0:C.number})})}),(0,l.jsx)(A,{minHeight:"56px",height:"fit-content",marginTop:"8px !important",children:(0,l.jsx)(ex,{children:c("informationRequest.disclaimer")})}),(0,l.jsxs)(A,{display:"flex",flexDirection:"row",gap:"16px",width:"fit-content",height:"40px",marginTop:"8px !important",marginBottom:"40px !important",children:[(0,l.jsxs)(q.Z,{as:"a",href:null==C?void 0:C.dataUrl,target:"_blank",onClick:function(){},backgroundColor:(null==C?void 0:C.dataUrl)?"#2B8C4D":"#ACAEB1",cursor:(null==C?void 0:C.dataUrl)?"pointer":"default",_hover:{backgroundColor:(null==C?void 0:C.dataUrl)?"#22703E":"#ACAEB1"},children:[c("informationRequest.accessData"),(0,l.jsx)(O.Z,{width:"12px",height:"12px"})]}),(0,l.jsxs)(q.Z,{as:"a",href:null==C?void 0:C.url,target:"_blank",onClick:function(){},backgroundColor:(null==C?void 0:C.url)?"#2B8C4D":"#ACAEB1",cursor:(null==C?void 0:C.url)?"pointer":"default",_hover:{backgroundColor:(null==C?void 0:C.url)?"#22703E":"#ACAEB1"},children:[c("informationRequest.accessRequest"),(0,l.jsx)(O.Z,{width:"12px",height:"12px"})]})]}),(0,l.jsxs)(s.Kq,{spacing:"8px",children:[(0,l.jsx)(A,{width:"160px",height:"20px",children:(0,l.jsx)(w.Z,{fontFamily:"Roboto",fontWeight:"500",fontSize:"18px",lineHeight:"20px",color:"#252A32",children:c("informationRequest.description")})}),(0,l.jsx)(L.N2,{startColor:"#F0F0F0",endColor:"#F3F3F3",borderRadius:"6px",width:"100%",height:"fit-content",spacing:"6px",skeletonHeight:"16px",noOfLines:3,marginTop:"8px !important",isLoaded:!f,children:(0,l.jsx)(k,{id:"readLessRawDescription",children:(null==C?void 0:C["observations".concat((0,v.capitalize)(x))])||(null==C?void 0:C.observations)||c("informationRequest.notProvided")})})]}),(0,l.jsx)(s.iz,{marginY:"40px !important",borderColor:"#DEDFE0"}),(0,l.jsx)(A,{width:"190px",height:"28px",marginBottom:"20px !important",children:(0,l.jsx)(w.Z,{typography:"small",children:c("informationRequest.additionalInformation")})}),(0,l.jsx)(T,{title:c("informationRequest.status"),text:(null==C?void 0:null===(t=C.status)||void 0===t?void 0:t["name".concat((0,v.capitalize)(x))])||(null==C?void 0:null===(o=C.status)||void 0===o?void 0:o.name)})]})}var eR=o(1378);o(9155);var eB=(0,u.memo)(function(e){var t=e.id,o=e.fieldName,n=e.choices,a=e.onChange,d=e.value,c=e.hasDivider,x=(0,u.useState)({}),h=x[0],g=x[1],f=(0,u.useRef)({}),b=(0,p.useRouter)().locale,j=(0,u.useMemo)(function(){return n.map(function(e){return(0,m.Z)((0,r.Z)({},e),{displayName:e["name".concat((0,v.capitalize)(b))]||e.name||e.number})})},[n,b]),C=(0,u.useCallback)(function(e){a(e)},[a]);
1return((0,u.useEffect)(function(){j.forEach(function(e,t){var o=f.current[t];o&&g(function(e){return(0,m.Z)((0,r.Z)({},e),(0,i.Z)({},t,o.scrollWidth>o.clientWidth))})})},[j]),0===n.length)?null:(0,l.jsxs)(s.xu,{width:"272px",children:[(0,l.jsx)(s.iz,{display:void 0===c||c?"flex":"none",marginY:"24px",borderColor:"#DEDFE0"}),(0,l.jsxs)(s.Kq,{spacing:0,id:t,backgroundColor:"#FFFFFF",children:[(0,l.jsx)(F.Z,{typography:"small",paddingLeft:"15px",marginBottom:"8px",children:o}),(0,l.jsx)(s.xu,{children:j.map(function(e,t){return(0,l.jsxs)(s.Ug,{spacing:"4px",cursor:"pointer",pointerEvents:e._id===d?"none":"default",children:[(0,l.jsx)(s.xu,{width:"3px",height:"24px",backgroundColor:e._id===d&&"#2B8C4D",borderRadius:"10px"}),(0,l.jsx)(D.u,{label:e.displayName,isDisabled:!h[t],hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"100%",children:(0,l.jsx)(F.Z,{typography:"small",ref:function(e){return f.current[t]=e},textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"100%",color:e._id===d?"#2B8C4D":"#71757A",backgroundColor:e._id===d&&"#F7F7F7",_hover:{backgroundColor:e._id===d?"#F7F7F7":"#EEEEEE"},borderRadius:"8px",padding:"6px 8px",onClick:function(){return C(e._id)},children:e.displayName})})]},t)})})]})]})}),eq=(0,u.memo)(function(e){var t=e.selectedResource,o=e.pushQuery,n=e.tables,i=e.rawDataSources,a=e.informationRequests,d=(0,g.$G)("dataset").t,s=(0,u.useState)(0),c=s[0],x=s[1],h=(0,u.useState)(""),f=h[0],b=h[1],C=(0,p.useRouter)().locale,y=t.table,w=t.raw_data_source,Z=t.information_request,S=(0,u.useCallback)(function(e,t){var o=e.find(function(e){return e._id===t});return o?o["name".concat((0,v.capitalize)(C))]||o.name:""},[C]),k=(0,u.useCallback)(function(){x(window.innerWidth-48)},[]),D=(0,u.useMemo)(function(){return{tables:n.map(function(e){return(0,m.Z)((0,r.Z)({},e),{displayName:e.name||e.number})}),rawDataSources:i.map(function(e){return(0,m.Z)((0,r.Z)({},e),{displayName:e.name||e.number})}),informationRequests:a.map(function(e){return(0,m.Z)((0,r.Z)({},e),{displayName:e.name||e.number})})}},[n,i,a]);(0,u.useEffect)(function(){return b(y?S(n,y):w?S(i,w):Z?S(a,Z):""),k(),window.addEventListener("resize",k),function(){window.removeEventListener("resize",k)}},[y,w,Z,S,k,n,i,a]);var E=(0,u.useCallback)(function(e,t){o(e,t)},[o]);return(0,l.jsxs)(j.v2,{children:[(0,l.jsxs)(F.Z,{as:"label",display:"flex",flexDirection:"column",gap:"8px",children:[d("selectResource"),(0,l.jsx)(j.j2,{width:"100%",maxWidth:"360px",borderRadius:"8px",padding:"14px 20px",backgroundColor:"#EEEEEE",textAlign:"start",children:(0,l.jsxs)(_.Z,{typography:"small",display:"flex",color:"#464A51",justifyContent:"space-between",alignItems:"center",children:[f,(0,l.jsx)(eb.Z,{marginLeft:"auto",transform:"rotate(90deg)"})]})})]}),(0,l.jsxs)(j.qy,{minWidth:c,maxWidth:c,maxHeight:"420px",overflowY:"auto",borderWidth:0,padding:0,zIndex:100,boxShadow:"0 1.6px 16px 0 rgba(100, 96, 103, 0.16)",children:[D.tables.length>0&&(0,l.jsx)(j.__,{title:"Tabelas tratadas",fontFamily:"Roboto",fontWeight:"400",fontSize:"16px",lineHeight:"24px",color:"#71757A",margin:"0",padding:"24px 20px 8px",children:D.tables.map(function(e,t){return(0,l.jsx)(j.sN,{width:"100%",whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-all",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",color:"#252A32",padding:"16px 20px",_hover:{backgroundColor:"transparent"},_focus:{backgroundColor:"transparent"},_active:{backgroundColor:"transparent"},_focusVisible:{backgroundColor:"transparent"},onClick:function(){return E("table",e._id)},children:e.displayName},t)})}),D.rawDataSources.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j.R,{margin:"0",borderWidth:"2px",borderColor:"#DEDFE0"}),(0,l.jsx)(j.__,{title:"Fontes originais",fontFamily:"Roboto",fontWeight:"400",fontSize:"16px",lineHeight:"24px",color:"#71757A",margin:"0",padding:"24px 20px 8px",children:D.rawDataSources.map(function(e,t){return(0,l.jsx)(j.sN,{width:"100%",whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-all",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",color:"#252A32",padding:"16px 20px",_hover:{backgroundColor:"transparent"},_focus:{backgroundColor:"transparent"},_active:{backgroundColor:"transparent"},_focusVisible:{backgroundColor:"transparent"},onClick:function(){return E("raw_data_source",e._id)},children:e.displayName},t)})})]}),D.informationRequests.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j.R,{margin:"0",borderWidth:"2px",borderColor:"#DEDFE0"}),(0,l.jsx)(j.__,{title:"Pedidos LAI",fontFamily:"Roboto",fontWeight:"400",fontSize:"16px",lineHeight:"24px",color:"#71757A",margin:"0",padding:"24px 20px 8px",children:D.informationRequests.map(function(e,t){return(0,l.jsx)(j.sN,{width:"100%",whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-all",fontFamily:"Roboto",fontWeight:"500",fontSize:"14px",lineHeight:"20px",color:"#252A32",padding:"16px 20px",_hover:{backgroundColor:"transparent"},_focus:{backgroundColor:"transparent"},_active:{backgroundColor:"transparent"},_focusVisible:{backgroundColor:"transparent"},onClick:function(){return E("information_request",e._id)},children:e.displayName},t)})})]})]})]})}),ez=(0,u.memo)(function(e){var t=e.route,o=e.isBDSudo,n=e.changeTabDataInformationQuery,i=e.datasetName,r=e.locale;switch(!0){case t.hasOwnProperty("table"):return(0,l.jsx)(eT,{id:t.table,isBDSudo:o,changeTab:n,datasetName:i});case t.hasOwnProperty("raw_data_source"):return(0,l.jsx)(eA,{id:t.raw_data_source,locale:r,isBDSudo:o});case t.hasOwnProperty("information_request"):return(0,l.jsx)(eL,{id:t.information_request,isBDSudo:o});default:return null}});function eI(e){var t=e.dataset,o=e.isBDSudo,n=e.tourBegin,r=(0,g.$G)("dataset").t,a=(0,p.useRouter)(),d=a.query,c=a.locale,x=(0,u.useState)([]),h=x[0],v=x[1],b=(0,u.useState)([]),m=b[0],j=b[1],C=(0,u.useState)([]),y=C[0],w=C[1],F=(0,u.useState)(!1),_=F[0],Z=F[1],S=(0,E.Sx)({base:"mobile",lg:"desktop"}),k=(0,u.useState)(!1),D=k[0],L=k[1],R=(0,u.useState)(!1),B=R[0],q=R[1],z=(0,u.useState)(!1),I=z[0],O=z[1],H=(0,u.useCallback)(function(){try{return f.Z.get("tourBD")?JSON.parse(f.Z.get("tourBD")):null}catch(e){return console.error("Error parsing tourBD:",e),null}},[]),N=(0,u.useCallback)(function(e,t){a.replace({pathname:"/dataset/".concat(d.dataset),query:(0,i.Z)({},e,t)},void 0,{shallow:!0})},[d.dataset,a]),W=(0,u.useCallback)(function(e,t){return e.order<t.order?-1:e.order>t.order?1:0},[]);(0,u.useEffect)(function(){if(n){var e=H();if(e&&"begin"===e.state&&!d.table){var o,i,r,a,l,s=(null===(a=null===(r=null==t?void 0:null===(o=t.tables)||void 0===o?void 0:null===(i=o.edges)||void 0===i?void 0:i.map(function(e){return e.no
1de}))||void 0===r?void 0:r.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)&&!["dicionario","dictionary"].includes(null==e?void 0:e.slug)}))||void 0===a?void 0:a.sort(W))||[];s.length>0&&N("table",null===(l=s[0])||void 0===l?void 0:l._id)}}},[n,d.table,t,H,N,W]),(0,u.useEffect)(function(){return document.body.style.overflow=_?"hidden":"auto",document.body.style.pointerEvents=_?"none":"auto",function(){document.body.style.overflow="auto",document.body.style.pointerEvents="auto"}},[_]),(0,u.useEffect)(function(){var e=function(e){L(!0)};return window.addEventListener("tablePageLoaded",e),function(){window.removeEventListener("tablePageLoaded",e)}},[]),(0,u.useEffect)(function(){var e=function(e){Z(!0)};return window.addEventListener("loadingTourBegin",e),function(){window.removeEventListener("loadingTourBegin",e)}},[]);var P=(0,u.useRef)({activeTour:null,isTourRunning:!1});return(0,u.useEffect)(function(){var e={EXPLORE:"explore",SKIP:"skip",BEGIN:"begin",TABLE:"table",DOWNLOAD:"download",LAST:"last"},t=function(t){var o=function(e){setTimeout(function(){requestAnimationFrame(function(){e(),P.current.isTourRunning=!1})},500)};switch(t){case e.BEGIN:o(function(){(0,A.MI)(c),P.current.activeTour=e.BEGIN});break;case e.TABLE:o(function(){(0,A.OO)(O,c),P.current.activeTour=e.TABLE});break;case e.DOWNLOAD:o(function(){(0,A.mg)(c),P.current.activeTour=e.DOWNLOAD});break;case e.LAST:o(function(){(0,A.Nv)(c),P.current.activeTour=e.LAST})}},o=function(){try{var o,n=H();if(null==n||!n.state||n.state===e.EXPLORE||n.state===e.SKIP||n.state!==e.LAST&&!D||"desktop"!==S||P.current.isTourRunning||(q(!0),P.current.activeTour&&P.current.activeTour!==n.state&&((0,eR.Z)().exit(),P.current.activeTour=null),Z(!1),P.current.activeTour===n.state))return;P.current.isTourRunning=!0,t(n.state)}catch(i){console.error("Tour error:",i),P.current.isTourRunning=!1}},n=H();if((null==n?void 0:n.state)!==e.EXPLORE&&(null==n?void 0:n.state)!==e.SKIP){var i=setInterval(o,1e3);return function(){clearInterval(i),(0,eR.Z)().exit()}}},[f.Z,S,D,_,c,H]),(0,u.useEffect)(function(){var e,n,i,r,a,l,d,s,c,u,p,x,h,g,f,b,m,C,y,F,_,Z,S,k,D,E,T;if(o?(e=(null===(l=null==t?void 0:null===(r=t.tables)||void 0===r?void 0:null===(a=r.edges)||void 0===a?void 0:a.map(function(e){return e.node}))||void 0===l?void 0:l.sort(W))||[],n=(null===(c=null==t?void 0:null===(d=t.rawDataSources)||void 0===d?void 0:null===(s=d.edges)||void 0===s?void 0:s.map(function(e){return e.node}))||void 0===c?void 0:c.sort(W))||[],i=(null===(x=null==t?void 0:null===(u=t.informationRequests)||void 0===u?void 0:null===(p=u.edges)||void 0===p?void 0:p.map(function(e){return e.node}))||void 0===x?void 0:x.sort(W))||[]):(e=(null===(b=null===(f=null==t?void 0:null===(h=t.tables)||void 0===h?void 0:null===(g=h.edges)||void 0===g?void 0:g.map(function(e){return e.node}))||void 0===f?void 0:f.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)&&!["dicionario","dictionary"].includes(null==e?void 0:e.slug)}))||void 0===b?void 0:b.sort(W))||[],n=(null===(F=null===(y=null==t?void 0:null===(m=t.rawDataSources)||void 0===m?void 0:null===(C=m.edges)||void 0===C?void 0:C.map(function(e){return e.node}))||void 0===y?void 0:y.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)}))||void 0===F?void 0:F.sort(W))||[],i=(null===(k=null===(S=null==t?void 0:null===(_=t.informationRequests)||void 0===_?void 0:null===(Z=_.edges)||void 0===Z?void 0:Z.map(function(e){return e.node}))||void 0===S?void 0:S.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)}))||void 0===k?void 0:k.sort(W))||[]),v(e),j(n),w(i),0===new URLSearchParams(window.location.search).toString().length){if(e.length>0)return N("table",null===(D=e[0])||void 0===D?void 0:D._id);if(n.length>0)return N("raw_data_source",null===(E=n[0])||void 0===E?void 0:E._id);if(i.length>0)return N("information_request",null===(T=i[0])||void 0===T?void 0:T._id)}},[t,o,W,N]),(0,l.jsxs)(s.Kq,{paddingTop:"32px",direction:{base:"column",lg:"row"},gap:"24px",spacing:0,height:"100%",children:[(0,l.jsx)(s.Kq,{display:_?"flex":"none",position:"fixed",top:"0",left:"0",zIndex:"99999999",width:"100%",height:"100vh",justifyContent:"center",backgroundColor:"#00000025",children:(0,l.jsx)(T.$,{margin:"0 auto",width:"200px",height:"200px",color:"#2B8C4D"})}),"desktop"===S?(0,l.jsxs)(s.Kq,{minWidth:{base:"100%",lg:"296px"},maxWidth:{base:"100%",lg:"296px"},spacing:0,position:B?"relative":"sticky",height:"100%",top:B?"0":"80px",children:[(0,l.jsx)(eB,{id:"dataset_select_tables",fieldName:r("tables"),choices:h,value:d.table,onChange:function(e){N("table",e),window.dispatchEvent(new CustomEvent("loadingColumnsEvent"))},hasDivider:!1}),(0,l.jsx)(eB,{id:"dataset_select_rawdatasource",fieldName:r("rawDataSources"),choices:m,value:d.raw_data_source,onCh
1ange:function(e){N("raw_data_source",e);var t=H();t&&"download"===t.state&&f.Z.set("tourBD",'{"state":"last"}',{expires:360})},hasDivider:h.length>0}),(0,l.jsx)(eB,{fieldName:r("informationRequests"),choices:y,value:d.information_request,onChange:function(e){N("information_request",e)},hasDivider:h.length>0||m.length>0})]}):(0,l.jsx)(eq,{selectedResource:d,pushQuery:N,tables:h,rawDataSources:m,informationRequests:y}),(0,l.jsx)(ez,{route:d,isBDSudo:o,changeTabDataInformationQuery:I,datasetName:null==t?void 0:t.name,locale:c})]})}var eO=o(4349),eH=o(1664),eN=o.n(eH),eW=o(6167),eP=o(7919),eM=o(2352),eU=["sql","python","r","bash","sh","stata","markdown","md"];function eG(e){var t,o,n,i,r,a,c=e.children,u=(0,g.$G)("dataset").t,p="string"==typeof(a=null!==(r=null==c?void 0:null===(i=c.props)||void 0===i?void 0:i.children)&&void 0!==r?r:c)?a:Array.isArray(a)?a.join(""):null==a?"":String(a),x=(null===(o=((null==c?void 0:null===(t=c.props)||void 0===t?void 0:t.className)||"").match(/language-([\w-]+)/))||void 0===o?void 0:o[1])||"",h=(0,d.VP)(p),v=h.hasCopied,f=h.onCopy,b=p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");if(eU.includes(x)&&p)try{b=P.Z.highlight(p,{language:x}).value}catch(m){}return(0,l.jsxs)(s.xu,{marginY:"16px",borderRadius:"8px",backgroundColor:"#252A32",maxWidth:"100%",minWidth:"0",overflow:"hidden",children:[(0,l.jsxs)(s.xu,{display:"flex",alignItems:"center",padding:"0 8px",children:[x?(0,l.jsx)(s.xv,{as:"span",display:"block",paddingLeft:"7px",fontWeight:"500",fontSize:"12px",color:"#878A8E",textTransform:"capitalize",userSelect:"none",fontFamily:"Roboto",children:["sh","sql"].includes(x)?x.toUpperCase():x}):null,(0,l.jsxs)(s.xu,{as:"button",type:"button",onClick:f,display:"flex",marginLeft:"auto",alignItems:"center",backgroundColor:"transparent",padding:"4px 0",cursor:"pointer",fontFamily:"Roboto",fontWeight:"500",fontSize:"12px",color:"#878A8E",fill:"#878A8E",_hover:{fill:"#9D9FA3",color:"#9D9FA3"},children:[u(v?"table.copied":"table.copy"),(0,l.jsx)(em.Z,{copied:v,icon:ef.T,width:"24px",height:"24px",marginLeft:"4px"})]})]}),(0,l.jsx)(s.xu,{as:"pre",margin:"0",width:"100%",maxHeight:"70vh",overflowX:"auto",overflowY:"auto",whiteSpace:"pre",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",children:(0,l.jsx)(s.xv,{as:"code",display:"block",width:"max-content",minWidth:"100%",padding:"12px 16px",fontFamily:"ui-monospace, monospace",fontSize:"13px",lineHeight:"20px",className:"hljs ".concat(x),dangerouslySetInnerHTML:{__html:b}})})]})}function eQ(e){var t=e.headings,o=(0,g.$G)("dataset").t,n=(0,u.useState)({}),a=n[0],d=n[1],c=(0,u.useRef)({}),p=(0,u.useState)(null),x=p[0],h=p[1],v=(0,u.useRef)();return((0,u.useEffect)(function(){var e=function(e){e.forEach(function(e){e.isIntersecting&&h(e.target.id)})};t.forEach(function(e,t){var o=c.current[t];o&&d(function(e){return(0,m.Z)((0,r.Z)({},e),(0,i.Z)({},t,o.scrollWidth>o.clientWidth))})});var o=new IntersectionObserver(e,{root:null,rootMargin:"0px 0px -50% 0px",threshold:.5});v.current=o;var n=document.querySelectorAll(t.map(function(e){var t=e.id;return"#".concat(t)}).join(", "));return n.forEach(function(e){return o.observe(e)}),function(){n.forEach(function(e){return o.unobserve(e)}),o.disconnect()}},[t]),0===t.length)?null:(0,l.jsxs)(s.xu,{children:[(0,l.jsx)(F.Z,{typography:"small",paddingLeft:"15px",marginBottom:"8px",children:o("tableContents")}),(0,l.jsx)(s.xu,{children:t.map(function(e,t){var o=e.id,n=e.title;return(0,l.jsxs)(s.Ug,{spacing:"4px",cursor:"pointer",pointerEvents:o===x?"none":"default",children:[(0,l.jsx)(s.xu,{width:"3px",height:"24px",backgroundColor:o===x&&"#2B8C4D",borderRadius:"10px"}),(0,l.jsx)(D.u,{label:n,isDisabled:!a[t],hasArrow:!0,padding:"16px",backgroundColor:"#252A32",boxSizing:"border-box",borderRadius:"8px",fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",textAlign:"center",color:"#FFFFFF",placement:"top",maxWidth:"100%",children:(0,l.jsx)(F.Z,{typography:"small",as:"a",href:"#".concat(o),ref:function(e){return c.current[t]=e}
1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"100%",color:o===x?"#2B8C4D":"#71757A",backgroundColor:o===x&&"#F7F7F7",_hover:{backgroundColor:o===x?"#F7F7F7":"#EEEEEE"},borderRadius:"8px",padding:"6px 8px",children:n})})]},o)})})]})}function eK(e){return(0,l.jsx)(w.Z,(0,m.Z)((0,r.Z)({as:"h2",scrollMarginTop:"100px",margin:"40px 0 16px",role:"group",_first:{marginTop:"0"}},e),{children:e.children}))}function eV(e){return(0,l.jsx)(s.xv,(0,m.Z)((0,r.Z)({fontFamily:"Roboto",fontWeight:"500",color:"#252A32",margin:"16px 0 8px"},e),{children:e.children}))}P.Z.registerLanguage("sql",M.Z),P.Z.registerLanguage("python",U.Z),P.Z.registerLanguage("r",G.Z),P.Z.registerLanguage("bash",eW.Z),P.Z.registerLanguage("sh",eW.Z),P.Z.registerLanguage("stata",eM.Z),P.Z.registerLanguage("markdown",eP.Z),P.Z.registerLanguage("md",eP.Z);var e$={h1:function(e){return(0,l.jsx)(eK,(0,r.Z)({},e))},h2:function(e){return(0,l.jsx)(eV,(0,r.Z)({as:"h3",fontSize:"18px",lineHeight:"28px"},e))},h3:function(e){return(0,l.jsx)(eV,(0,r.Z)({as:"h3",fontSize:"18px",lineHeight:"28px"},e))},h4:function(e){return(0,l.jsx)(eV,(0,r.Z)({as:"h4",fontSize:"18px",lineHeight:"28px"},e))},h5:function(e){return(0,l.jsx)(eV,(0,r.Z)({as:"h5",fontSize:"16px",lineHeight:"24px"},e))},h6:function(e){return(0,l.jsx)(eV,(0,r.Z)({as:"h6",fontSize:"15px",lineHeight:"24px"},e))},blockquote:function(e){return(0,l.jsxs)(s.xu,{as:"blockquote",position:"relative",display:"flex",flexDirection:"row",marginBottom:"16px",children:[(0,l.jsx)(s.xu,{position:"absolute",left:0,width:"40px",height:"100%",borderRadius:"10px",backgroundColor:"#0068C5"}),(0,l.jsxs)(s.Kq,{flexDirection:"row",alignItems:"center",spacing:0,gap:"16px",width:"100%",padding:"16px 24px",marginLeft:"4px",borderRadius:"8px",backgroundColor:"#E4F2FF",zIndex:"10",children:[(0,l.jsx)(et.Z,{width:"20px",height:"20px",padding:"2px",fill:"#0068C5"}),(0,l.jsx)(_.Z,(0,r.Z)({typography:"small",as:"span"},e))]})]})},a:function(e){var t=(0,p.useRouter)().locale,o=e.href,n=void 0===o?"":o,i=(0,S.Z)(e,["href"]),a="string"==typeof n&&n.startsWith("/")&&!/^\/(pt|en|es)(\/|$)/.test(n),d=(0,l.jsx)(_.Z,(0,r.Z)({typography:"small",as:"a",color:"#0068C5",_hover:{color:"#0057A4"}},e));return a?(0,l.jsx)(eN(),{href:n,locale:t,passHref:!0,legacyBehavior:!0,children:(0,l.jsx)(_.Z,(0,r.Z)({typography:"small",as:"a",color:"#0068C5",_hover:{color:"#0057A4"}},i))}):d},hr:function(e){return(0,l.jsx)(s.iz,(0,r.Z)({borderWidth:"0px",borderTop:"3px solid #252A32",opacity:"1",margin:"24px 0"},e))},p:function(e){return(0,l.jsx)(_.Z,(0,r.Z)({typography:"small",as:"p",color:"#464A51",marginBottom:"4px"},e))},code:function(e){return(0,l.jsx)(s.xv,(0,r.Z)({as:"code",fontFamily:"ui-monospace, monospace",backgroundColor:"#e7e7e7",color:"#3b3b3b",fontSize:"90%",padding:"2px 4px",borderRadius:"3px"},e))},pre:function(e){return(0,l.jsx)(eG,(0,r.Z)({},e))},ol:function(e){return(0,l.jsx)(s.GS,(0,r.Z)({},e))},ul:function(e){return(0,l.jsx)(s.QI,(0,r.Z)({margin:"8px 0 8px 20px"},e))},li:function(e){return(0,l.jsx)(s.HC,(0,r.Z)({fontFamily:"Roboto",fontWeight:"400",fontSize:"14px",lineHeight:"20px",letterSpacing:"0.1px",color:"#464A51",margin:"0 0 4px 0"},e))},table:function(e){return(0,l.jsx)(z.xJ,{maxWidth:"100%",overflowX:"auto",children:(0,l.jsx)(z.iA,(0,r.Z)({variant:"simple",border:"1px solid #edf2f7"},e))})},thead:function(e){return(0,l.jsx)(z.hr,(0,r.Z)({},e))},tbody:function(e){return(0,l.jsx)(z.p3,(0,r.Z)({},e))},tr:function(e){return(0,l.jsx)(z.Tr,(0,r.Z)({},e))},td:function(e){return(0,l.jsx)(z.Td,(0,r.Z)({fontFamily:"Roboto",color:"rgb(55, 65, 81)",paddingY:"0.5rem",style:{textWrap:"wrap"}},e))},th:function(e){return(0,l.jsx)(z.Th,(0,r.Z)({fontFamily:"Roboto"},e))},Blockquote:function(e){var t=e.children,o=t.length>1,n=o?t[0]:null,i=o?t[1]:t;return(0,l.jsxs)(s.xu,{as:"blockquote",padding:"16px 20px",borderLeft:"4px solid #2B8C4D",marginY:"24px",position:"relative",children:[(0,l.jsx)(s.xv,{as:"span",position:"absolute",top:"0",pointerEvents:"none",userSelect:"none",fontFamily:"Roboto",fontSize:"65px",children:"â"}),(0,l.jsx)(_.Z,(0,r.Z)({marginTop:"35px"},i.props)),n?(0,l.jsx)(_.Z,(0,r.Z)({marginTop:"16px",color:"#71757A"},n.props)):null]})}};function eY(e){var t,o,n,i=e.data,a=e.locale,d=e.slug,c=(0,g.$G)("dataset").t,p=(0,u.useState)((null==i?void 0:i.mdxSource)||null)[0],x=(0,u.useState)(!!(null==i?void 0:null===(t=i.mdxSource)||void 0===t?void 0:null===(o=t.frontmatter)||void 0===o?void 0:o.title))[0];return(0,l.jsxs)(s.Kq,{paddingTop:"32px",spacing:0,flexDirection:"row",width:"100%",minWidth:"0",height:"100%",children:[(null==i?void 0:i.headings.length)>0&&(0,l.jsx)(s.xu,{display:{base:"none",md:"flex"},as:"aside",position:"sticky",height:"100%",top:"80px",overflowY:"auto",minWidth:"272px",maxWidth:"272px",boxSizing:"content-box",padding:"4px 26p
1x 0 0",children:(0,l.jsx)(eQ,{headings:i.headings})}),(0,l.jsxs)(s.xu,{as:"section",width:"100%",minWidth:"0",overflow:"hidden",paddingLeft:{base:"0",md:(null==i?void 0:i.headings.length)===0?"0":"24px"},children:[p&&(0,l.jsx)(eO.R,(0,m.Z)((0,r.Z)({},p),{components:e$})),(0,l.jsx)(s.xu,{display:x?"flex":"none",justifyContent:"center",id:"hotjarSurveyGuiaDeUso",marginTop:"40px"}),(0,l.jsxs)(s.xu,{marginTop:"40px",borderRadius:"16px",border:x?"1px solid #DEDFE0":"",padding:"40px 24px",children:[(0,l.jsx)(w.Z,{textAlign:"center",children:c(x?"gotAnyQuestionsGuide":"notHaveUserGuide")}),(0,l.jsx)(w.Z,{typography:"small",textAlign:"center",color:"#71757A",children:c("contributeToTheUsageGuide")}),(0,l.jsxs)(s.xu,{display:"flex",flexDirection:{base:"column",lg:"row"},alignItems:"center",justifyContent:"center",gap:"16px",marginTop:"16px",children:[(0,l.jsx)(Z.Z,{width:{base:"100%",lg:"fit-content"},href:"/contact",target:"_self",children:(0,l.jsx)(q.Z,{width:{base:"100%",lg:"fit-content"},justifyContent:"center",children:c("sendQuestionUsageGuide")})}),(0,l.jsx)(Z.Z,{width:{base:"100%",lg:"fit-content"},href:"https://github.com/basedosdados/website/edit/".concat("http://localhost:3000"==(n="https://basedosdados.org")||"https://development.basedosdados.org"===n||"https://staging.basedosdados.org"===n?"staging":"https://basedosdados.org"===n?"main":null,"/next/content/userGuide/").concat(void 0===a?"pt":a,"/").concat(x?d:"README",".md"),target:"_self",children:(0,l.jsx)(q.Z,{width:{base:"100%",lg:"fit-content"},justifyContent:"center",isVariant:!0,children:c("makeSuggestionUsageGuide")})})]}),(0,l.jsxs)(_.Z,{typography:"small",display:x?"none":"flex",marginTop:"32px",color:"#71757A",justifyContent:"center",textAlign:"center",flexWrap:"wrap",children:[c("haveAnyQuestions",{returnObjects:!0}).replace("{{content}}",""),(0,l.jsx)(Z.Z,{href:"/faq",color:"#0068C5",fontWeight:"400",marginLeft:"4px",_hover:{color:"#0057A4"},children:c("pageFaq")}),"."]})]})]})]})}var eJ=o(660);function eX(e){var t=e.id,o=e.title,n=e.description,i=e.alternateTitle,r=void 0===i?"":i,a=e.buttonText,d=e.link,u=e.imageUrl,p=e.value;return(0,l.jsxs)(s.Kq,{id:t,width:"100%",maxWidth:"1440px",flexDirection:{base:"column",md:"row"},justifyContent:"space-between",gap:"40px",padding:"32px",margin:"24px auto !important",borderRadius:"16px",boxSizing:"border-box",backgroundColor:"#EAF3ED",spacing:0,children:[(0,l.jsxs)(s.Kq,{width:"100%",maxWidth:"560px",spacing:0,children:[(0,l.jsx)(w.Z,{children:o}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",marginTop:"16px !important",children:n}),r&&(0,l.jsx)(w.Z,{maxWidth:"320px",typography:"small",marginTop:"16px !important",children:r}),(0,l.jsx)(Z.Z,{href:d,target:"_blank",children:(0,l.jsxs)(q.Z,{isVariant:!0,padding:"10px 16px 10px 20px",marginTop:"16px !important",backgroundColor:"transparent",_hover:{backgroundColor:"transparent"},onClick:function(){(0,B.SM)("button_service_highlight_ab",p)},children:[(0,l.jsx)(F.Z,{typography:"small",color:"current-color",children:a}),(0,l.jsx)(O.Z,{width:"18px",height:"18px",alt:"hiperlink"})]})})]}),(0,l.jsx)(c.Ee,{src:u,objectFit:"contain",width:"474px",height:{base:"100%",md:"198px"},borderRadius:"16px"})]})}function e0(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default-abtest",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["A","B"],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,n=(0,u.useState)(null),i=n[0],r=n[1];return(0,u.useEffect)(function(){var n=f.Z.get(e);n&&t.includes(n)||(n=t[Math.floor(Math.random()*t.length)],f.Z.set(e,n,{expires:o})),r(n)},[e,t,o]),i}function e1(e){var t=e.title,o=e.description,n=e.buttonText,i=e.href,a=e.onClick,d=e.imageSrc,u=e.imageProps,p=(0,S.Z)(e,["title","description","buttonText","href","onClick","imageSrc","imageProps"]);return(0,l.jsxs)(s.xu,(0,m.Z)((0,r.Z)({width:"100%",maxWidth:"1440px",display:"flex",flexDirection:{base:"column",md:"row"},justifyContent:"space-between",gap:"40px",padding:"32px",margin:"24px auto !important",borderRadius:"16px",boxSizing:"border-box",backgroundColor:"#EAF3ED",alignItems:"center"},p),{children:[(0,l.jsxs)(s.Kq,{width:"100%",maxWidth:"540px",spacing:0,children:[(0,l.jsx)(w.Z,{children:t}),o&&(0,l.jsx)(_.Z,{typography:"small",marginTop:"16px !important",children:o}),(0,l.jsx)(Z.Z,{href:i,target:"_blank",children:(0,l.jsxs)(q.Z,{isVariant:!0,padding:"10px 16px 10px 20px",marginTop:"16px !important",backgroundColor:"transparent",_hover:{backgroundColor:"transparent"},onClick:a,children:[(0,l.jsx)(F.Z,{typography:"small",color:"current-color",children:n}),(0,l.jsx)(O.Z,{width:"18px",height:"18px",alt:"hiperlink"})]})})]}),(0,l.jsx)(c.Ee,(0,r.Z)({src:d,objectFit:"contain",width:"220px",height:{base:"100%",md:"225px"},borderRadius:"16px"},void 0===u?{}:u))]}))}var e2=o(2508),e4=(0,eo.IU)({displayName:"book",viewBox:"0 0 24 23",path:(0,l.jsx)("path",{fill:"current-color",d:"M4 17.4545C5.13939 17.4545 6.24848 17.5818 7.32727 17.8364C8.40606 18.0909 9.47879 18.4727 10.5455 18.9818V4.65455C9.55151 4.07273 8.49697 3.63636 7.38182 3.34545C6.26667 3.05455 5.13939 2.90909 4 2.90909C3.12727 2.90909 2.26061 2.99394 1.4 3.16364C0.539394 3.33333 -0.290909 3.58788 -1.09091 3.92727V18.3273C-0.242424 18.0364 0.6 17.8182 1.43
1636 17.6727C2.27273 17.5273 3.12727 17.4545 4 17.4545ZM13.4545 18.9818C14.5212 18.4727 15.5939 18.0909 16.6727 17.8364C17.7515 17.5818 18.8606 17.4545 20 17.4545C20.8727 17.4545 21.7273 17.5273 22.5636 17.6727C23.4 17.8182 24.2424 18.0364 25.0909 18.3273V3.92727C24.2909 3.58788 23.4606 3.33333 22.6 3.16364C21.7394 2.99394 20.8727 2.90909 20 2.90909C18.8606 2.90909 17.7333 3.05455 16.6182 3.34545C15.503 3.63636 14.4485 4.07273 13.4545 4.65455V18.9818ZM12 22.5091C11.6606 22.5091 11.3394 22.4667 11.0364 22.3818C10.7333 22.297 10.4485 22.1818 10.1818 22.0364C9.23636 21.4788 8.24242 21.0606 7.2 20.7818C6.15758 20.503 5.09091 20.3636 4 20.3636C2.98182 20.3636 1.98182 20.497 1 20.7636C0.0181818 21.0303 -0.921212 21.4061 -1.81818 21.8909C-2.32727 22.1576 -2.81818 22.1455 -3.29091 21.8545C-3.76364 21.5636 -4 21.1394 -4 20.5818V3.05455C-4 2.78788 -3.93333 2.53333 -3.8 2.29091C-3.66667 2.04849 -3.46667 1.86667 -3.2 1.74545C-2.08485 1.16364 -0.921212 0.727273 0.290909 0.436364C1.50303 0.145455 2.73939 0 4 0C5.40606 0 6.78182 0.181818 8.12727 0.545455C9.47273 0.909091 10.7636 1.45455 12 2.18182C13.2364 1.45455 14.5273 0.909091 15.8727 0.545455C17.2182 0.181818 18.5939 0 20 0C21.2606 0 22.497 0.145455 23.7091 0.436364C24.9212 0.727273 26.0848 1.16364 27.2 1.74545C27.4667 1.86667 27.6667 2.04849 27.8 2.29091C27.9333 2.53333 28 2.78788 28 3.05455V20.5818C28 21.1394 27.7636 21.5636 27.2909 21.8545C26.8182 22.1455 26.3273 22.1576 25.8182 21.8909C24.9212 21.4061 23.9818 21.0303 23 20.7636C22.0182 20.497 21.0182 20.3636 20 20.3636C18.9091 20.3636 17.8424 20.503 16.8 20.7818C15.7576 21.0606 14.7636 21.4788 13.8182 22.0364C13.5515 22.1818 13.2667 22.297 12.9636 22.3818C12.6606 22.4667 12.3394 22.5091 12 22.5091Z"})}),e3=!0;function e8(e){var t,o,x,m,j,C,S,D,E,T,L,R,q,z,I,O,H,N,W,P,M=e.dataset,U=e.userGuide,G=e.hiddenDataset,Q=function(e,t){return e.order<t.order?-1:e.order>t.order?1:0},K=(0,g.$G)("dataset","common","bdpro","chatbot").t,V=(0,p.useRouter)(),$=V.locale,Y=V.query,J=(0,u.useState)(0),X=J[0],ee=J[1],et=(0,u.useState)(null),eo=et[0],en=et[1],ei=(0,u.useState)(!1),er=ei[0],ea=ei[1],el=(0,u.useState)(!1),ed=el[0],es=el[1],ec=(0,d.qY)(),eu=(0,d.qY)(),ep=e0("service-highlight-ab",["A","B"]),ex=e0("dataset-banner-ab",["bdpro","chatbot"],1),eh=(0,u.useState)(!1),eg=eh[0],ev=eh[1],ef=(0,u.useState)(!1),eb=ef[0],em=ef[1],ej=!M||0===Object.keys(M).length,eC=(0,u.useMemo)(function(){var e,t;return((null==M?void 0:null===(e=M.tables)||void 0===e?void 0:null===(t=e.edges)||void 0===t?void 0:t.map(function(e){return e.node}))||[]).some(function(e){if(!(!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)&&!["dicionario","dictionary"].includes(null==e?void 0:e.slug)))return!1;var t,o=null==e?void 0:e.fullTemporalCoverage;return!!o&&Object.values(o).some(function(e){return(null==e?void 0:e.type)==="closed"})})},[M]);(0,u.useEffect)(function(){var e=function(e){eu.onOpen()};return window.addEventListener("datasetSurveyTour",e),function(){window.removeEventListener("datasetSurveyTour",e)}},[]),(0,u.useEffect)(function(){(0,b.Z)()&&f.Z.set("tourBD",'{"state":"skip"}',{expires:360});var e=f.Z.get("userBD"),t=e?JSON.parse(e):null;(0,B.jl)(t)&&ev(!0),(0,B.cx)(t)&&em(!0)},[]);var ey=eC&&!eg,ew=(0,u.useMemo)(function(){return ey&&ex?"chatbot"===ex&&eb?"bdpro":ex:null},[ey,ex,eb]);function eF(){return(eF=(0,n.Z)(function(){var e,t,o,n,i,r,l,d;return(0,a.__generator)(this,function(t){switch(t.label){case 0:e=f.Z.get("userBD")?JSON.parse(f.Z.get("userBD")):null,t.label=1;case 1:return t.trys.push([1,8,,9]),[4,fetch("/api/user/getPermissionSudo")];case 2:case 4:return[4,t.sent().json()];case 3:if((null==(o=t.sent())?void 0:o.isAdmin)===!0)return en(!0),[2];if(!o||"undefined"===o.email||e&&o.email===e.email)return en(!1),[2];if(n={isAdmin:!1,email:"undefined"},!(null==e?void 0:e.isAdmin)||!(i=e.id.split(":").pop()))return[3,6];return[4,fetch("/api/user/getUser?p=".concat(btoa(i)),{method:"GET",credentials:"same-origin"})];case 5:l=t.sent(),n.isAdmin=!!(null==l?void 0:l.isAdmin),n.email=(null==l?void 0:l.email)||"undefined",t.label=6;case 6:return[4,fetch("/api/user/setPermissionSudo?p=".concat(btoa(String(n.isAdmin)),"&q=").concat(btoa(n.email)))];case 7:return t.sent(),en(n.isAdmin),[3,9];case 8:return d=t.sent(),console.error("Erro ao verificar permiss\xe3o sudo:",d),en(!1),[3,9];case 9:return[2]}})})).apply(this,arguments)}(0,u.useEffect)(function(){ej&&V.replace("/404");var e,t,o,n,i=f.Z.get("tourBD")?JSON.parse(f.Z.get("tourBD")):null;null===i&&ec.onOpen(),i&&"explore"===i.state&&((null===(n=null===(o=null==M?void 0:null===(e=M.tables)||void 0===e?void 0:null===(t=e.edges)||void 0===t?void 0:t.map(function(e){return e.no
1de}))||void 0===o?void 0:o.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)&&!["dicionario","dictionary"].includes(null==e?void 0:e.slug)}))||void 0===n?void 0:n.sort(Q))||[]).length>0&&(0,A.HN)(eZ,ee,ea,Y,$)},[ej,V,ed]),(0,u.useEffect)(function(){!function(){return eF.apply(this,arguments)}()},[]),(0,u.useEffect)(function(){(f.Z.get("userBD")?JSON.parse(f.Z.get("userBD")):null)||!G||V.replace("/404",void 0,{shallow:!0}),null!==eo&&!eo&&G&&V.replace("/404",void 0,{shallow:!0})},[eo,G]);var e_=function(e,t){V.replace({pathname:"/dataset/".concat(Y.dataset),query:(0,i.Z)({},e,t)},void 0,{shallow:!0})};function eZ(){return eS.apply(this,arguments)}function eS(){return(eS=(0,n.Z)(function(){var e,t,o,n,i,r,l,d,s,c,u,p,x,h,g,v,f,b;return(0,a.__generator)(this,function(a){return(v=(null===(n=null===(o=null==M?void 0:null===(e=M.tables)||void 0===e?void 0:null===(t=e.edges)||void 0===t?void 0:t.map(function(e){return e.node}))||void 0===o?void 0:o.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)&&!["dicionario","dictionary"].includes(null==e?void 0:e.slug)}))||void 0===n?void 0:n.sort(Q))||[],f=(null===(d=null===(l=null==M?void 0:null===(i=M.rawDataSources)||void 0===i?void 0:null===(r=i.edges)||void 0===r?void 0:r.map(function(e){return e.node}))||void 0===l?void 0:l.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)}))||void 0===d?void 0:d.sort(Q))||[],b=(null===(p=null===(u=null==M?void 0:null===(s=M.informationRequests)||void 0===s?void 0:null===(c=s.edges)||void 0===c?void 0:c.map(function(e){return e.node}))||void 0===u?void 0:u.filter(function(e){var t;return!["under_review","excluded"].includes(null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.slug)}))||void 0===p?void 0:p.sort(Q))||[],v.length>0)?[2,e_("table",null===(x=v[0])||void 0===x?void 0:x._id)]:f.length>0?[2,e_("raw_data_source",null===(h=f[0])||void 0===h?void 0:h._id)]:b.length>0?[2,e_("information_request",null===(g=b[0])||void 0===g?void 0:g._id)]:[2]})})).apply(this,arguments)}(0,u.useEffect)(function(){Y.tab&&ee(1)},[Y.tab]);var ek=function(e){var t=e.index,o=e.onClick,n=e.children;return(0,l.jsx)(F.Z,{typography:"small",as:"div",cursor:"pointer",position:"relative",top:"1px",color:X===t?"#2B8C4D":"#71757A",fill:X===t?"#2B8C4D":"#71757A",pointerEvents:X===t?"none":"default",borderBottom:X===t&&"3px solid #2B8C4D",padding:"12px 24px 13px",_hover:{color:"#464A51",fill:"#464A51"},onClick:o,children:n})};if(ej)return null;var eD={A:{id:"construa-uma-arquitetura-de-dados-escalavel",title:K("abTest.aTitle"),description:K("abTest.aDescription"),buttonText:K("abTest.aButton"),link:"/services",imageUrl:"https://storage.googleapis.com/basedosdados-website/images/image-servicos.svg",value:"A"},B:{id:"solucoes-de-dados-para-toda-a-jornada",alternateTitle:K("abTest.bTitle"),buttonText:K("abTest.bButton"),link:"/services",imageUrl:"https://storage.googleapis.com/basedosdados-website/images/image-servicos.svg",value:"B"}},eE=M["name".concat((0,v.capitalize)($))]||M.name,eT="".concat(eE," â ").concat(K("dataBasis")),eA=(0,B.ev)(M["description".concat((0,v.capitalize)($))]||M.description),eL="https://storage.googleapis.com/basedosdados-website/thumbnails/".concat($,"/dataset.png"),eR="https://basedosdados.org",eB=eR?"".concat(eR,"/dataset/").concat(M._id):null;return(0,l.jsxs)(eJ.A,{userTemplate:!0,footerTemplate:"simple",children:[(0,l.jsxs)(h(),{children:[(0,l.jsx)("title",{children:eT}),(0,l.jsx)("link",{rel:"image_src",href:eL},"imagesrc"),eB&&(0,l.jsx)("link",{rel:"canonical",href:eB},"canonical"),(0,l.jsx)("meta",{property:"og:image",content:eL},"ogimage"),(0,l.jsx)("meta",{name:"twitter:image",content:eL},"twimage"),(0,l.jsx)("meta",{property:"og:title",content:eT},"ogtitle"),eB&&(0,l.jsx)("meta",{property:"og:url",content:eB},"ogurl"),(0,l.jsx)("meta",{name:"description",content:eA}),(0,l.jsx)("meta",{property:"og:description",content:eA},"ogdesc")]}),(0,l.jsxs)(s.gC,{maxWidth:"1440px",minWidth:"0",marginX:"auto",boxSizing:"content-box",paddingX:"24px",height:"100%",spacing:0,children:[(0,l.jsx)(A.cO,{isOpen:ec.isOpen,onClose:ec.onClose,begin:es}),(0,l.jsx)(A.J,{isOpen:eu.isOpen,onClose:eu.onClose}),(0,l.jsxs)(s.Kq,{display:{base:"none",md:"flex"},width:"100%",spacing:"0",gap:"8px",paddingY:"8px",flexDirection:"row",alignItems:"flex-start",children:[(0,l.jsx)(Z.Z,{target:"_self",href:"/search",children:(0,l.jsx)(_.Z,{color:"#0068C5",_hover:{color:"#0057A4"},children:K("data")})}),(0,l.jsx)(_.Z,{children:"/"}),(0,l.jsx)(_.Z,{children:M["name".concat((0,v.capitalize)($))]||M.name||K("noName")})]}),(0,l.jsxs)(s.rj,{templateColumns:{base:"1fr",lg:"295px 1fr"},width:"100%",gap:"24px",paddingY:"24px",children:[(0,l.jsx)(s.P4,{display:"flex",height:"fit-content",justifyContent:"center",border:"1px solid #DEDFE0",borderRadius:"16px",children:(0,l.jsx)(c.Ee,{src:(null==M?void 0:null===(t=M.organizations)||void 0===t?void 0:null===(o=t.edges)||void 0===o?void 0:null===(x=o[0])||void 0===x?void 0:null===(m=x.node)||void 0===m?void 0:m.picture)?null==M?void 0:null===(j=M.organizations)||void 0===j?void 0:null===(C=j.edges)||void 0===C?void 0:null===(S=C[0])||void 0===S?void 0:null===(D=S.node)||void 0===D?void 0:D.picture:"https://storage.googleapis.com/basedosdados-website/equipe/sem_foto.png",objectFit:"contain",width:"295px",height:"252px",borderRadius:"16px"})}),(0,l.jsx)(s.P4,{children:(0,l.jsxs)(s.rj,{templateColumns:"1fr 1fr 1fr 1fr 1fr",gap:"8px",children:[(0,l.jsx)(s.P4,{colSpan:5,children:(0,l.jsx)(w.Z,{typography:"large",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:{base:"inherit",lg:"nowrap"},children:M["name".concat((0,v.capitalize)($))]||M.name||K("noName")})}),(0,l.jsx)(s.P4,{colSpan:5,minHeight:"60px",marginBottom:"8px",children:(0,l.jsx)(k,{id:"readLessDataset",children:M["description".concat((0,v.capitalize)($))]||M.description||K("noDescription")})}),(0,l.jsxs)(s.P4,{colSpan:5,marginBottom:"8px",children:[(0,l.jsx)(F.Z,{typography:"large",marginBottom:"8px",children:K("organization")}),(0,l.jsx)(Z.Z,{href:"/search?organization=".concat((null==M?void 0:null===(E=M.organizations)||void 0===E?void 0:null===(T=E.edges)||void 0===T?void 0:null===(L=T[0])||void 0===L?void 0:null===(R=L.node)||void 0===R?void 0:R.slug)||""),children:(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null===(q=M.organizations)||void 0===q?void 0:null===(z=q.edges)||void 0===z?void 0:null===(I=z[0])||void 0===I?void 0:null===(O=I.node)||void 0===O?void 0:O["name".concat((0,v.capitalize)($))])||(null===(H=M.organizations)||void 0===H?void 0:null===(N=H.edges)||void 0===N?void 0:null===(W=N[0])||void 0===W?void 0:null===(P=W.node)||void 0===P?void 0:P.name)||K("noOrganization")})})]}),(0,l.jsxs)(s.P4,{colSpan:{base:5,lg:1},marginBottom:"8px",children:[(0,l.jsx)(F.Z,{typography:"large",marginBottom:"8px",children:K("temporalCoverage")}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:M.temporalCoverage||K("notProvided")})]}),"pt"!==$&&(0,l.jsxs)(s.P4,{colSpan:{base:5,lg:4},marginBottom:"8px",children:[(0,l.jsx)(F.Z,{typography:"large",marginBottom:"8px",children:K("spatialCoverage")}),(0,l.jsx)(_.Z,{typography:"small",color:"#464A51",children:(null==M?void 0:M["spatialCoverageName".concat((0,v.capitalize)($))])?Object.values(M["spatialCoverageName".concat((0,v.capitalize)($))]).sort(function(e,t){return e.localeCompare(t,$)}).join(", "):K("notProvided")})]})]})})]}
1),"bdpro"===ew&&(0,l.jsx)(e1,{title:K("banner.title",{ns:"bdpro"}),description:K("banner.description",{ns:"bdpro"}),buttonText:K("banner.button",{ns:"bdpro"}),href:"/bdpro",onClick:function(){return(0,B.SM)("button_banner_bdpro_lp","click")},imageSrc:"en"===$?"/img/banner_db_pro.svg":"/img/banner_bd_pro.svg"}),"chatbot"===ew&&(0,l.jsx)(e1,{title:K("banner.title",{ns:"chatbot"}),buttonText:K("banner.button",{ns:"chatbot"}),href:"/chatbot-lp",onClick:function(){return(0,B.qY)({value:"dataset_banner",placement:"dataset_page_banner",pagePath:V.pathname,isMobile:(0,b.Z)()})},imageSrc:"https://storage.googleapis.com/basedosdados-website/images/image-servicos-chatbot.svg",imageProps:{width:"474px",height:"198px"}}),(0,B.l3)()&&!ey&&ep&&(0,l.jsx)(eX,(0,r.Z)({},eD[ep])),(0,l.jsxs)(s.Kq,{spacing:0,width:"100%",minWidth:"0",height:"100%",children:[(0,l.jsxs)(s.Kq,{spacing:0,flexDirection:"row",borderBottom:"1px solid #DEDFE0",children:[(0,l.jsx)(s.Kq,{id:"tab_database_dataset",children:(0,l.jsxs)(ek,{index:0,onClick:function(){ee(0),eZ()},children:[(0,l.jsx)(e2.Ty,{alt:K("dataAlt"),width:"18px",height:"18px",marginRight:"6px"}),K("data")]})}),(0,l.jsxs)(ek,{index:1,onClick:function(){ee(1),V.replace({pathname:"/dataset/".concat(Y.dataset),query:{tab:"userGuide"}},void 0,{shallow:!0})},children:[(0,l.jsx)(e4,{alt:K("userGuideAlt"),width:"24px",height:"16px",marginRight:"6px"}),K("userGuide")]})]}),0===X&&(0,l.jsx)(eI,{dataset:M,isBDSudo:eo,tourBegin:er}),1===X&&(0,l.jsx)(eY,{data:U,locale:$,slug:null==M?void 0:M.usageGuide})]})]}),!0===eo&&(0,l.jsx)(y,{})]})}},6676:function(e,t,o){"use strict";o.d(t,{T:function(){return r},l:function(){return a}});var n=o(5893),i=o(894),r=(0,i.IU)({displayName:"copy",viewBox:"0 -960 960 960",path:(0,n.jsx)("path",{fill:"current-color",d:"M362.31-260Q332-260 311-281q-21-21-21-51.31v-455.38Q290-818 311-839q21-21 51.31-21h335.38Q728-860 749-839q21 21 21 51.31v455.38Q770-302 749-281q-21 21-51.31 21H362.31Zm0-60h335.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85Zm-140 200Q192-120 171-141q-21-21-21-51.31v-485.38q0-12.77 8.62-21.39 8.61-8.61 21.38-8.61t21.39 8.61q8.61 8.62 8.61 21.39v485.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h365.38q12.77 0 21.39 8.61 8.61 8.62 8.61 21.39 0 12.77-8.61 21.38-8.62 8.62-21.39 8.62H222.31ZM350-320v-480 480Z"})}),a=(0,i.IU)({displayName:"copysolid",viewBox:"0 -960 960 960",path:(0,n.jsx)("path",{fill:"current-color",d:"M362.31-260Q332-260 311-281q-21-21-21-51.31v-455.38Q290-818 311-839q21-21 51.31-21h335.38Q728-860 749-839q21 21 21 51.31v455.38Q770-302 749-281q-21 21-51.31 21H362.31Zm-140 140Q192-120 171-141q-21-21-21-51.31v-485.38q0-12.77 8.62-21.39 8.61-8.61 21.38-8.61t21.39 8.61q8.61 8.62 8.61 21.39v485.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h365.38q12.77 0 21.39 8.61 8.61 8.62 8.61 21.39 0 12.77-8.61 21.38-8.62 8.62-21.39 8.62H222.31Z"})})},5146:function(e,t,o){"use strict";var n=o(5893),i=(0,o(894).IU)({displayName:"cross",viewBox:"0 0 16 16",path:(0,n.jsx)("path",{fill:"current-color",d:"M3.78742 11.4931C3.54259 11.7557 3.55695 12.167 3.8195 12.4118C4.08204 12.6566 4.49335 12.6423 4.73818 12.3797L8.04464 8.83398L11.3519 12.3806C11.5967 12.6431 12.008 12.6575 12.2706 12.4127C12.5331 12.1678 12.5475 11.7565 12.3027 11.494L8.9334 7.8809L12.0356 4.55424C12.2804 4.29169 12.266 3.88039 12.0035 3.63556C11.7409 3.39073 11.3296 3.4051 11.0848 3.66764L8.04464 6.92781L5.00527 3.66849C4.76044 3.40595 4.34913 3.39158 4.08659 3.63641C3.82404 3.88124 3.80968 4.29254 4.05451 4.55509L7.15587 7.8809L3.78742 11.4931Z"})});t.Z=i},5152:function(e,t,o){"use strict";var n=o(5893),i=(0,o(894).IU)({displayName:"pen",viewBox:"0 0 32 32",path:(0,n.jsx)("path",{fill:"current-color",d:"M6.04366 25.9548H8.07033L21.9726 12.0526L19.9459 10.0259L6.04366 23.9281V25.9548ZM3.19922 28.7992V22.7548L21.9726 4.017C22.257 3.75626 22.5711 3.55477 22.9148 3.41255C23.2585 3.27033 23.62 3.19922 23.9992 3.19922C24.3785 3.19922 24.7459 3.27033 25.1014 3.41255C25.457 3.55477 25.7651 3.76811 26.0259 4.05255L27.9814 6.04366C28.2659 6.3044 28.4733 6.61255 28.6037 6.96811C28.734 7.32366 28.7992 7.67922 28.7992 8.03477C28.7992 8.41403 28.734 8.77552 28.6037 9.11922C28.4733 9.46292 28.2659 9.777 27.9814 10.0614L9.24366 28.7992H3.19922ZM20.9414 11.057L19.9459 10.0259L21.9726 12.0526L20.9414 11.057Z"})});t.Z=i},1558:function(e,t,o){"use strict";o.d(t,{S:function(){return a},t:function(){return r}});var n=o(5893),i=o(894),r=(0,i.IU)({displayName:"sucess",viewBox:"0 0 90 64",path:(0,n.jsx)("path",{fill:"current-color",d:"M44.1945 64C61.8675 64 76.1943 49.6731 76.1943 32.0002C76.1943 14.3269 61.8675 0 44.1945 0C26.5212 0 12.1943 14.3269 12.1943 32.0002C12.1943 49.6731 26.5212 64 44.1945 64L41.1587 47.0367C40.5146 47.6809 39.4481 47.688 38.7932 47.0367L27.846 36.0824C27.184 35.4311 27.1911 34.3539 27.846 33.699L30.2151 31.3084C30.8879 30.675 31.9544 30.6571 32.6093 31.3084L39.9706 38.6912L55.7633 22.9057C56.4254 22.2436 57.5061 22.2508 58.1467 22.8949L60.5337 25.2783C61.1778 25.9225 61.1492 26.9925 60.5337 27.6367L41.1587 47.0367"})}),a=(0,i.IU)({displayName:"solid sucess",viewBox:"0 0 20 20",path:(0,n.jsx)("path",{fill:"current-color",d:"M7.79796 11.9929L5.07658 9.27152C4.71039 8.90533 4.25349 8.72223 3.70588 8.72223C3.15827 8.72223 2.70138 8.90533 2.33521 9.27152C1.96902 9.63769 1.78953 10.0946 1.79673 10.6422C1.80393 11.1898 1.99061 11.6467 2.35678 12.0129L6.36256 16.0187C6.77379 16.4247 7.25357 16.6277 7.80189 16.6277C8.35021 16.6277 8.82736 16.4247 9.23335 16.0187L17.5354 7.71666C17.9015 7.350
15 18.0846 6.89721 18.0846 6.3568C18.0846 5.81636 17.9015 5.36306 17.5354 4.9969C17.1692 4.6307 16.7123 4.44761 16.1647 4.44761C15.617 4.44761 15.1602 4.6307 14.794 4.9969L7.79796 11.9929ZM10 26C7.77307 26 5.68784 25.5807 3.74431 24.742C1.80076 23.9034 0.110145 22.7652 -1.32753 21.3275C-2.76523 19.8899 -3.9034 18.1992 -4.74204 16.2557C-5.58068 14.3122 -6 12.2269 -6 10C-6 7.77307 -5.58068 5.68784 -4.74204 3.74432C-3.9034 1.80076 -2.76523 0.110145 -1.32753 -1.32753C0.110145 -2.76523 1.80076 -3.9034 3.74431 -4.74204C5.68784 -5.58068 7.77307 -6 10 -6C12.2269 -6 14.3122 -5.58068 16.2557 -4.74204C18.1992 -3.9034 19.8899 -2.76523 21.3275 -1.32753C22.7652 0.110145 23.9034 1.80076 24.742 3.74432C25.5807 5.68784 26 7.77307 26 10C26 12.2269 25.5807 14.3122 24.742 16.2557C23.9034 18.1992 22.7652 19.8899 21.3275 21.3275C19.8899 22.7652 18.1992 23.9034 16.2557 24.742C14.3122 25.5807 12.2269 26 10 26Z"})})},8824:function(e,t,o){"use strict";var n=o(5893),i=(0,o(894).IU)({displayName:"warning",path:(0,n.jsxs)("svg",{viewBox:"0 0 18 16",children:[(0,n.jsx)("path",{d:"M1.31863 15.4072C1.16679 15.4072 1.02876 15.3693 0.904536 15.2934C0.780306 15.2174 0.683686 15.1174 0.614671 14.9932C0.545656 14.869 0.507701 14.7343 0.500796 14.5894C0.493896 14.4445 0.531856 14.303 0.614671 14.165L8.27535 0.91409C8.35815 0.77606 8.46515 0.67254 8.59625 0.603525C8.7274 0.53451 8.86195 0.5 9 0.5C9.13805 0.5 9.2726 0.53451 9.40375 0.603525C9.53485 0.67254 9.64185 0.77606 9.72465 0.91409L17.3854 14.165C17.4682 14.303 17.5061 14.4445 17.4992 14.5894C17.4923 14.7343 17.4544 14.869 17.3854 14.9932C17.3163 15.1174 17.2197 15.2174 17.0955 15.2934C16.9713 15.3693 16.8332 15.4072 16.6814 15.4072H1.31863Z",fill:"#F9C50B"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.59013 12.6847C9.43138 12.8435 9.23467 12.9228 9.00002 12.9228C8.76537 12.9228 8.56868 12.8435 8.40998 12.6847C8.25123 12.526 8.17188 12.3293 8.17188 12.0947C8.17188 11.86 8.25123 11.6633 8.40998 11.5046C8.56868 11.3458 8.76537 11.2665 9.00002 11.2665C9.23467 11.2665 9.43138 11.3458 9.59013 11.5046C9.74883 11.6633 9.82823 11.86 9.82823 12.0947C9.82823 12.3293 9.74883 12.526 9.59013 12.6847ZM9.59013 10.2002C9.43138 10.3589 9.23467 10.4383 9.00002 10.4383C8.76537 10.4383 8.56868 10.3589 8.40998 10.2002C8.25123 10.0415 8.17188 9.84476 8.17188 9.61011V7.12556C8.17188 6.89091 8.25123 6.69421 8.40998 6.53546C8.56868 6.37676 8.76537 6.29736 9.00002 6.29736C9.23467 6.29736 9.43138 6.37676 9.59013 6.53546C9.74883 6.69421 9.82823 6.89091 9.82823 7.12556V9.61011C9.82823 9.84476 9.74883 10.0415 9.59013 10.2002Z",fill:"#252A32"})]})});t.Z=i},5929:function(e,t,o){"use strict";var n=o(5893),i=(0,o(894).IU)({displayName:"web",viewBox:"0 0 22 22",path:(0,n.jsx)("path",{fill:"current-color",d:"M 14.8436 8.9243 H 19.3057 C 19.4905 9.6176 19.5895 10.3458 19.5895 11.0972 C 19.5895 11.8486 19.4905 12.5769 19.3057 13.2701 H 14.8436 C 15.0186 11.8086 15.0113 10.325 14.8436 8.9243 Z M 8.7662 14.3565 C 9.1288 16.1791 9.8925 18.1766 11.1471 19.5169 C 11.1546 19.5169 11.162 19.5171 11.1696 19.5171 C 11.177 19.5171 11.1845 19.5169 11.192 19.5169 C 12.4485 18.1743 13.2109 16.1756 13.5728 14.3565 H 8.7662 Z M 14.6782 7.8379 H 18.9351 C 17.8512 5.2584 15.5196 3.3327 12.6957 2.8157 C 13.7222 4.2796 14.3532 6.0863 14.6782 7.8379 Z M 13.7497 8.9243 H 8.5894 C 8.4082 10.3474 8.4079 11.8454 8.5894 13.2701 H 13.7497 C 13.9309 11.8471 13.9311 10.349 13.7497 8.9243 Z M 7.6608 14.3565 H 3.4038 C 4.4878 16.9361 6.8193 18.8619 9.6433 19.3788 C 8.6164 17.9142 7.9857 16.1077 7.6608 14.3565 Z M 14.6782 14.3565 C 14.3531 16.1087 13.722 17.9151 12.6957 19.3788 C 15.5196 18.8619 17.8512 16.9361 18.9351 14.3565 H 14.6782 Z M 13.5728 7.8379 C 13.2103 6.0153 12.4465 4.0179 11.192 2.6775 C 11.1845 2.6775 11.177 2.6772 11.1696 2.6772 C 11.162 2.6772 11.1546 2.6775 11.1471 2.6775 C 9.8905 4.0201 9.1281 6.0189 8.7662 7.8379 H 13.5728 Z M 3.0332 8.9243 C 2.8485 9.6176 2.7495 10.3458 2.7495 11.0972 C 2.7495 11.8486 2.8485 12.5769 3.0332 13.2701 H 7.4955 C 7.3277 11.8695 7.3204 10.3859 7.4955 8.9243 H 3.0332 Z M 7.6608 7.8379 C 7.9859 6.0859 8.617 4.2794 9.6434 2.8157 C 6.8194 3.3327 4.4878 5.2584 3.4038 7.8379 H 7.6608 Z"})});t.Z=i},451:function(e){e.exports={toggle:"toggle_toggle__wpTs_",toggle_variant:"toggle_toggle_variant__dL9ap"}},3132:function(){}},function(e){e.O(0,[3662,1153,9744,5093,5121,6608,3177,7350,3238,450,2467,660,8501,7265,3173,9774,2888,179],function(){return e(e.s=6785)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.