PageSourceSearch

https://dbw.stat.gov.pl/_next/static/chunks/2313.d01193c747cd3eaa.js

js stat.gov.pl collected 2026-09-24 08:09:07 UTC 12,106 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2313],{12313:function(e,l,i){i.r(l),i.d(l,{default:function(){return $}});var n=i(85893),t=i(67294),o=i(5152),r=i.n(o),a=i(33299),s=i(88196),d=i(60990),c=i(96788),p=i(52857),u=i(40110),m=i(44723),h=i(84166),x=i(93454),f=i(17204),g=i(56912),v=i(4291),j=i(41796),Z=i(90633),b=i(96727),y=i(67641),w=i(44357),S=i(38444),k=i(73837),z=i(85413),F=i(99067),C=i(86010),I=i(98620),W=i(45578),N=i.n(W),A=i(4037),R=i.n(A),B=i(31567),E=i(76442),P=i(22217),T=i(17056),O=i(14416),G=i(51458),J=i(21808),_=i(97182),H=e=>{let{duration:l=30,onEnd:i,children:o}=e,r=l,[a,s]=(0,t.useState)({time:r,progress:100});return(0,t.useEffect)(()=>{var e,n=null===(e=window)||void 0===e?void 0:e.setInterval(()=>{if(s({time:(r-=.05).toFixed(0),progress:100*r/l}),r<=0){var e;null===(e=window)||void 0===e||e.clearInterval(n),i&&i()}},50);return()=>{var e;null===(e=window)||void 0===e||e.clearInterval(n)}},[l]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.Z,{sx:{position:"relative",display:"inline-flex"},children:[(0,n.jsx)(_.Z,{variant:"determinate",value:a.progress,thickness:2,size:34}),(0,n.jsx)(d.Z,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:o})]})})},M=i(46833);let q=r()(()=>i.e(755).then(i.bind(i,755)),{loadableGenerated:{webpack:()=>[755]}}),D=r()(()=>i.e(9963).then(i.bind(i,75443)),{loadableGenerated:{webpack:()=>[75443]}}),Y=(0,y.Z)(e=>({paper:{...e.shape.boxedWrapper,padding:e.spacing(2,2,0,3),margin:0,maxHeight:"calc(100% - 16px)",overflow:"hidden",minHeight:"55vh","&:focus-visible":{outline:"none"}},paperSmall:{minHeight:"unset"},dialogTitle:{display:"flex",alignItems:"center",justifyContent:"space-between",margin:0,padding:e.spacing(0,0,2,0)},title:{fontSize:"1.11111111rem",fontWeight:600,display:"flex",alignItems:"center"},dialogContent:{padding:e.spacing(3,3),margin:e.spacing(0,-2,0,-3),backgroundColor:"#F8F9FA"},dialogContentAlert:{padding:e.spacing(3,3),margin:e.spacing(0,-2,0,-3),backgroundColor:"#F8F9FA"},dialogContentAlertWhite:{backgroundColor:"#FFF"},dialogContentSteps:{padding:e.spacing(1,2),margin:e.spacing(0,-2,0,-3),backgroundColor:"#FFF",borderBottom:"none"},collapseSection:{...e.shape.boxedWrapper,padding:e.spacing(1,2,1,2),minHeight:"50%","& + &":{marginTop:e.spacing(3)}},inputBox:{...e.shape.boxedWrapper,padding:e.spacing(1,4,4,4)},listBox:{...e.shape.boxedWrapper},alertBox:{padding:e.spacing(2,3,2,3),overflow:"hidden"},list:{"& li:nth-child(odd)":{},"& li:nth-child(even)":{}},helperText:{fontSize:"0.7rem",color:"rgba(0, 0, 0, 0.5)","& a":{cursor:"pointer",color:e.palette.primary.main,textDecoration:"underline",fontStyle:"italic",fontWeight:500}},srOnly:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",border:0}}));var $=e=>{var l,i;let{open:o,onClose:r,source:y,onGetItems:W}=e,A=Y(),{t:_,i18n:$}=(0,B.$)(),{translationFromJson:K}=(0,I.ZP)();(0,O.I0)();let{data:L,status:Q}=(0,a.useSession)(),U=(0,t.useRef)(),V=(0,t.useRef)(),{openFilePicker:X,filesContent:ee,plainFiles:el,loading:ei}=(0,E.s)({accept:[".json",".zip"],onFilesSelected:e=>{let{plainFiles:l,filesContent:i,errors:n}=e;eC({plainFiles:l,filesContent:i,errors:n}),eu("files")}}),[en,et]=(0,t.useState)([]),[eo,er]=(0,t.useState)([]),[ea,es]=(0,t.useState)(null),[ed,ec]=(0,t.useState)(!1),[ep,eu]=(0,t.useState)("repo"),[em,eh]=(0,t.useState)(!1),[ex,ef]=(0,t.useState)([]),[eg,ev]=(0,t.useState)(null),[ej,eZ]=(0,t.useState)(null),[eb,ey]=(0,t.useState)(null),ew=(0,O.v9)(T.YM);(0,t.useEffect)(()=>{if(!ew||!y)return;let e=null==ew?void 0:ew.filter(e=>e.source===y);return et(e),W&&W({count:null==e?void 0:e.length}),()=>{et([])}},[ew,y]),(0,t.useEffect)(()=>{var e,l,i;if(!(null==eb?void 0:null===(e=eb.filesContent)||void 0===e?void 0:e.length))return;let n=[],t=[];eh(!1);try{if(n=null==eb?void 0:null===(i=eb.filesContent)||void 0===i?void 0:null===(l=i.flatMap((e,l)=>{let i=e.json;(null==i?void 0:i.error)&&t.push(i.error);let n=null==i?void 0:i.item;if(Array.isArray(n)){let l=n.map(l=>(0,P.J6)({newItem:{...l,filename:e.name}}));return!!n&&l}{let l=(0,P.J6)({newItem:{...n,filename:e.name}});return!!n&&l}}))||void 0===l?void 0:l.filter(e=>e&&(null==e?void 0:e.source)==="db"),n=N()([...eo,...n],"id"),(null==t?void 0:t.length)&&eh(t),JSON.stringify(n)!==JSON.stringify(eo)){let e=(null==n?void 0:n.length)-(null==eo?void 0:eo.length);es(e),er(n)}}catch(e){console.log(e)}},[null==eb?void 0:eb.filesContent,eo]),(0,t.useEffect)(()=>{o||(U.current=null,ec(!1),eh(!1),eZ(null))},[o]);let eS=e=>{ep===e?eu(!1):eu(e)},ek=()=>{U.current=null,r&&r()},ez=e=>{ec(e)},eF=()=>{let e=[...en,...eo].find(e=>e.id===ed),l=null==eo?void 0:eo.find(e=>e.id===ed);if(e){let i=R().decompress(e._d,{inputEncoding:"Base64"});try{i=JSON.parse(i)}catch(e){console.log(e)}ev({...i,id:e.id,title:e.title,skipFields:e.skipFields||[],_fileItem:l})}},eC=async e=>{let{plainFiles:l,filesContent:i,errors:n}=e;if(!(null==l?void 0:l.length)||!(null==i?void 0:i.length))return;let t={plainFiles:[],filesContent:[]};t.plainFiles=await Promise.all(l.map(e=>(0,P.tS)({file:e}))).then(e=>e),t.filesContent=await Promise.all(i.map(async(e,l)=>{var i,n,o,r,a,s,d;let c=(null===(n=t.plainFiles)||void 0===n?void 0:null===(i=n[l])||void 0===i?void 0:i.detect)==="plain"?(0,P.au)({file:e}):null;if((null===(r=t.plainFiles)||void 0===r?void 0:null===(o=r[l])||void 0===o?void 0:o.detect)==="application/zip"){let e=await (0,P.iP)({file:null===(a=t.plainFiles)||void 0===a?void 0:a[l]});c=(0,P.au)({file:{content:e,name:null===(d=t.plainFiles)||void 0===d?void 0:null===(s=d[l])||void 0===s?void 0:s.name}})}return e.json=c,e})),ey({plainFiles:l,filesContent:i,errors:n})};return(0,n.jsxs)(t.Fragment,{children:[(0,n.jsxs)(s.Z,{open:o,fullWidth:!0,maxWidth:e
1j?"sm":(null==en?void 0:en.length)>2?"xl":"lg",classes:{paper:(0,C.Z)(A.paper,ej&&A.paperSmall)},PaperProps:{tabIndex:-1,ref:e=>{!e||(null==U?void 0:U.current)||(U.current=!0,e.focus())},"aria-label":_("Wczytaj z zestawień dialog"),"aria-roledescription":" "},ref:e=>{e&&o&&e.focus()},children:[(0,n.jsxs)(d.Z,{className:A.dialogTitle,children:[(0,n.jsxs)(c.Z,{variant:"body1",className:A.title,id:"import-to-repository-dialog-title","aria-hidden":!0,children:[(0,n.jsx)(w.Z,{fontSize:"small",sx:{mr:2}}),_("Wczytaj z zestawień")]}),(0,n.jsx)(G.default,{title:_("Zamknij okno"),arrow:!0,placement:"top-end",type:"dark",children:(0,n.jsx)(p.Z,{"aria-label":_("Zamknij okno"),onClick:ek,size:"small",sx:e=>({color:e.palette.primary.main}),children:(0,n.jsx)(S.Z,{})})})]}),(0,n.jsx)(u.Z,{dividers:!0,className:(0,C.Z)(A.dialogContentAlert,ej&&A.dialogContentAlertWhite),children:ej?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Z,{severity:(null==ej?void 0:ej.error)?"error":"success",variant:"outlined",sx:{width:"100%",mb:0,bgcolor:"#FFF","&, & *":{color:(null==ej?void 0:ej.error)?"#621B16":"#2e7d32"}},children:_('Zestawienie "{{title}}" dodano pomyślnie{{dot}}',{title:null==ej?void 0:ej.title,dot:"."})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(h.Z,{spacing:0,children:[(0,n.jsxs)(x.Z,{className:A.collapseSection,role:"group","aria-label":"".concat(_('Grupa "Repozytorium"{{dot}}',{dot:"."})),"aria-roledescription":" ",children:[(0,n.jsx)(f.Z,{onClick:()=>{eS("repo")},sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"repo"===ep?2:0,textTransform:"none",letterSpacing:"0.00938em",fontWeight:500,px:2,py:1,height:40},disableRipple:!0,disableFocusRipple:!0,fullWidth:!0,endIcon:(0,n.jsx)(G.default,{title:"repo"===ep?_("Zwiń"):_("Rozwiń"),arrow:!0,placement:"top",type:"dark",children:"repo"===ep?(0,n.jsx)(k.Z,{fontSize:"small"}):(0,n.jsx)(z.Z,{fontSize:"small"})}),"aria-expanded":"repo"===ep,"aria-roledescription":("repo"===ep?_("Zwiń grupę"):_("Rozwiń grupę"))+" "+_("przycisk"),children:(0,n.jsx)(g.Z,{textAlign:"left",sx:{fontSize:"0.77777778rem",flexGrow:1,ml:-1},"aria-hidden":!0,children:_("Repozytorium")})}),(0,n.jsx)(v.Z,{in:"repo"===ep,sx:{mb:"repo"===ep?2:0},children:(0,n.jsxs)(n.Fragment,{children:[(null==en?void 0:en.length)?"":(0,n.jsx)(c.Z,{variant:"body1",sx:{fontSize:"0.88888889rem",textAlign:"center",mt:2,mb:5,fontStyle:"italic",color:"rgba(0, 0, 0, 0.6)"},children:_("Brak element\xf3w w repozytorium")}),(0,n.jsx)(q,{id:y,items:en,choosable:!0,onChoise:ez,choise:ed,onImport:eF})]})})]}),(!!(null==eo?void 0:eo.length)||!!(null==em?void 0:em.length)||ei)&&(0,n.jsxs)(x.Z,{className:A.collapseSection,role:"group","aria-label":"".concat(_('Grupa "Importowane z plik\xf3w"{{dot}}',{dot:"."})),"aria-roledescription":" ",tabIndex:-1,ref:V,children:[(0,n.jsx)(f.Z,{onClick:()=>{eS("files")},sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"files"===ep?2:0,textTransform:"none",letterSpacing:"0.00938em",fontWeight:500,px:2,py:1,height:40},fullWidth:!0,endIcon:(0,n.jsx)(G.default,{title:"files"===ep?_("Zwiń"):_("Rozwiń"),arrow:!0,placement:"top",type:"dark",children:"files"===ep?(0,n.jsx)(k.Z,{fontSize:"small"}):(0,n.jsx)(z.Z,{fontSize:"small"})}),"aria-expanded":"files"===ep,"aria-roledescription":("repo"===ep?_("Zwiń grupę"):_("Rozwiń grupę"))+" "+_("przycisk"),children:(0,n.jsx)(g.Z,{textAlign:"left",sx:{fontSize:"0.77777778rem",flexGrow:1,ml:-1},"aria-hidden":!0,children:_("Importowane z plik\xf3w")})}),!!ei&&(0,n.jsx)(J.default,{type:"linear"}),(0,n.jsx)(v.Z,{in:"files"===ep,sx:{mb:"files"===ep&&(null==eo?void 0:eo.length)?2:0},children:(0,n.jsxs)(n.Fragment,{children:[null===ea?null:(0,n.jsx)(m.Z,{severity:"success",action:(0,n.jsx)(d.Z,{sx:{display:"flex",alignItems:"center",fontSize:"0.77777778rem"},children:(0,n.jsx)(H,{onEnd:()=>es(null),children:(0,n.jsx)(G.default,{title:_("Zamknij powiadomienie"),arrow:!0,placement:"top",type:"dark",children:(0,n.jsx)(p.Z,{size:"small",onClick:()=>es(null),children:(0,n.jsx)(S.Z,{fontSize:"small"})})})})}),sx:{bgcolor:e=>(0,j.Fq)(e.palette.success.main,.075),"&, & *":{color:"success.dark"},mb:2,pb:0},children:(0,n.jsx)(Z.Z,{children:_("Pomyślnie zaimportowano {{count}} zestawień{{dot}}",{count:ea,dot:"."})})}),!!em&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m.Z,{severity:"error",action:(0,n.jsx)(d.Z,{sx:{display:"flex",alignItems:"center",fontSize:"0.77777778rem"},children:(0,n.jsx)(H,{onEnd:()=>eh(!1),children:(0,n.jsx)(G.default,{title:_("Zamknij powiadomienie"),arrow:!0,placement:"top",type:"dark",children:(0,n.jsx)(p.Z,{size:"small",onClick:()=>eh(!1),children:(0,n.jsx)(S.Z,{fontSize:"small"})})})})}),sx:{mt:(null==eo||eo.length,-1),mb:1,"&, & *":{color:"#621B16"}},children:[(0,n.jsx)(Z.Z,{children:_("Błędy importu{{colon}}",{colon:":"})}),(0,n.jsx)(h.Z,{direction:"column",spacing:1,children:null==em?void 0:em.map(e=>(0,n.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",fontSize:"0.77777778rem",ml:0},children:[(0,n.jsxs)(d.Z,{sx:{fontWeight:600,mr:1},children:["-","\xa0",(0,n.jsx)("span",{className:A.srOnly,children:_("Plik{{colon}}",{colon:":"})}),'"'.concat(null==e?void 0:e.file,'":')]}),(0,n.jsxs)(d.Z,{sx:{fontStyle:"italic"},children:[(0,n.jsx)("span",{className:A.srOnly,children:_("- Opis błędu{{colon}}",{colon:":"})}),'"'.concat(null==e?void 0:e.message,'".')]})]},null==e?void 0:e.file))})]}),(0,n.jsx)(g.Z,{sx:{mt:1,mb:3}}
1)]}),(0,n.jsx)(q,{id:y,items:eo,choosable:!0,onChoise:ez,choise:ed,highlight:ex,onImport:eF,repositoryIds:null==ew?void 0:ew.map(e=>e.id),filePanel:!0})]})})]})]})})}),(0,n.jsxs)(b.Z,{sx:{justifyContent:"space-between",my:ej?1:2},children:["authenticated"===Q&&(0,n.jsx)(M.Z,{authStatus:Q,userId:null==L?void 0:null===(l=L.user)||void 0===l?void 0:l.id,accessToken:null==L?void 0:null===(i=L.user)||void 0===i?void 0:i.accessToken,sx:{mb:0,borderColor:"inherit"},fullWidth:!0}),ej?(0,n.jsx)("span",{}):(0,n.jsx)(f.Z,{variant:"contained",onClick:()=>{eh(!1),X()},startIcon:(0,n.jsx)(F.Z,{}),sx:{textTransform:"none"},fullWidth:!0,children:_("Importuj z plik\xf3w")}),ej?(0,n.jsx)(f.Z,{variant:"contained",onClick:ek,children:_("Zamknij")}):null]})]}),!!eg&&(0,n.jsx)(D,{item:eg,onImport:e=>{eZ(e)}})]})}}}]);
2//# sourceMappingURL=2313.d01193c747cd3eaa.js.map

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.