1import{r as d,p as E,u as g,d as h,aE as y,$ as T}from"./vendor-react-DEvm0Yd7.js";import"./i18n-BDV6UXRb.js";import{b1 as b}from"./vendor-BNeuUSwa.js";import{u as A}from"./useCustomMutation-0u9fi4tz.js";import{c as _}from"./services-CAE4f3Xe.js";import{d as P,a as v}from"./queries-CIEo1ySU.js";import{i as C}from"./api-B6flkda-.js";import{u as p}from"./useWithLoading-NPnK_OQq.js";import{g as f}from"./getMidTypeFromPath-D-txVVnt.js";import{A as I}from"./apiPaths-CEGqu0tW.js";import{d as S}from"./usePostResultPdfByFileSrlMutation-t3cCUL-s.js";try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="20c9b885-9c2e-40de-aa8f-3a7aa35044f6",e._sentryDebugIdIdentifier="sentry-dbid-20c9b885-9c2e-40de-aa8f-3a7aa35044f6")})()}catch{}const Y=e=>d.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("path",{d:"M6.49333 12.5067L1 10L6.49333 7.49333L9 2L11.5067 7.49333L17 10L11.5067 12.5067L9 18L6.49333 12.5067Z",fill:"current"})),a=b.t,$={DOCUMENT_CATEGORY:{0:a("문ì.ì ë í¸.문ìì í.ê³¼ì 물"),1:a("문ì.ì ë í¸.문ìì í.ê³¼ì 물"),2:a("문ì.ì ë í¸.문ìì í.ì기ìê°ì"),3:a("문ì.ì ë í¸.문ìì í.íìë ¼ë¬¸"),4:a("문ì.ì ë í¸.문ìì í.íì ë ¼ë¬¸"),5:a("문ì.ì ë í¸.문ìì í.ì°êµ¬ì ì± ë³´ê³ ì"),6:a("문ì.ì ë í¸.문ìì í.ì°êµ¬ëí공모ìë£"),7:a("문ì.ì ë í¸.문ìì í.ë íê°"),8:a("문ì.ì ë í¸.문ìì í.ë³´ëìë£"),10:a("문ì.ì ë í¸.문ìì í.ë¸ë¡ê·¸"),9:a("문ì.ì ë í¸.문ìì í.기í")}},w=["post-check-recheck"],q=e=>{const{toast:t}=E(),{t:o}=g(),s=h(),{documentSrl:r}=y(),{startLoading:n,stopLoading:u}=p();return A({mutationKey:w,mutationFn:_.postCheckReCheck,onMutate:i=>{n()},onSettled:()=>{u()},onSuccess:()=>{s.invalidateQueries({queryKey:[...P.SRL(f(),r)]})},onError:i=>{if(C(i))switch(i.response?.data?.code){case 7:t({variant:"error",description:o("APIì¤ë¥.E7.í ì¤í¸.ì¤ëª ")});break;case 2024:t({variant:"error",description:o("APIì¤ë¥.E2024.í ì¤í¸.ì¤ëª ")});break;default:t({description:o("APIì¤ë¥.ëí´í¸"),variant:"error"})}}})},m=e=>e.totalCount!==e.completedCount,B=(e,t)=>{const{stopLoading:o}=p(),[s,r]=d.useState(!1),{data:n}=T({...P.documentPdfAllStatus(f(),e,t),enabled:s,refetchInterval:s?3e3:!1}),u=(c,l)=>{m(c)?r(!0):(i(c.filename,l),o())};d.useEffect(()=>{n&&(m(n)||(r(!1),o(),i(n.filename,t.type)))},[n]);const i=(c,l)=>{const L=new URLSearchParams({l:b.language,type:l,filename:S(c)});document.location.href=`/api${I.DOCUMENT.DOCUMENT_PDF_ALL(f(),e)}?${L.toString()}`};return{enablePolling:u}},D=["post-document-pdf-all"],G=e=>{const{toast:t}=E(),{t:o}=g(),{startLoading:s,stopLoading:r}=p();return A({mutationKey:D,mutationFn:v.postDocumentPdfAllByDocumentSrl,onMutate:n=>{s()},onError:n=>{if(!C(n)){r();return}switch(n.response?.data?.code){case 7:t({variant:"error",description:o("APIì¤ë¥.E7.í ì¤í¸.ì¤ëª ")});break;case 2002:t({variant:"error",description:o("APIì¤ë¥.E2002.í ì¤í¸.ì¤ëª ")});break;case 2003:t({variant:"error",description:o("APIì¤ë¥.E2003.í ì¤í¸.ì¤ëª ")});break;default:t({description:o("APIì¤ë¥.ëí´í¸"),variant:"error"})}}})};export{$ as C,Y as S,G as a,B as b,q as u}; 2//# sourceMappingURL=usePostDocumentPdfAllMutation-Dv89ryPi.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.