1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CNHyijYN.js","./DDDL0Jn_.js","./entry.Dgke-6fa.css"])))=>i.map(i=>d[i]); 2import{_ as _e,o as y,b as T,w as i,e as b,d as n,bO as Oe,R as D,Q as f,f as M,h as j,j as l,V as k,b7 as Ds,aH as te,b9 as ve,O as be,bd as Et,e9 as Xt,M as pe,N as Ee,K as ge,cW as Ut,be as Ye,bu as nt,bh as mt,aI as Me,aC as He,aD as Qe,bC as ye,aE as we,aF as Re,aG as Ke,i as dt,bv as Be,a as De,ay as ks,bk as Ni,gn as ct,ar as Ot,aa as Tt,bi as kt,bt as Is,bx as et,by as Ve,bB as Ze,b8 as ht,bq as ms,c1 as Oi,X as ut,W as Ls,c as oe,aA as lt,m as ke,aj as Mi,u as $e,gS as fs,E as Se,P as Ae,a4 as at,d9 as Mt,d8 as zt,dr as qs,ds as zi,df as Gt,T as Ne,b3 as Li,f1 as qi,f2 as Bi,aL as Qt,br as Zt,bs as xt,cQ as Ft,gT as Bs,gU as ni,bL as ji,bp as We,bK as oi,cO as ps,aJ as hs,aq as gs,aK as Jt,ga as Vi,bl as ri,bm as Rt,bn as li,bo as $t,bN as di,dn as Ui,bf as Ht,D as ft,t as Te,y as pt,C as ys,v as Cs,av as Hi,A as Ss,x as Ps,db as es,dc as Wi,fo as Gi,gV as Qi,fp as Zi,fq as Yi,fr as Ki,fs as Xi,ft as Ji,fu as ea,fv as ta,fX as bs,ao as sa,cT as ia,n as gt,gW as aa,c5 as na,ae as ci,q as vs,G as ts,z as ss,B as oa,bg as ra,H as la,I as Fe,d7 as Nt,gX as da,cn as ui,gY as ca,bz as is,dl as ua,cK as St,cS as bt,aB as ma,as as fa,dN as pa,gl as as,r as js,bb as je,f$ as ha,g0 as ga,g1 as ya}from"./DDDL0Jn_.js";import{_ as ba,r as va}from"./Bj42r2aA.js";import{R as wa}from"./lJhUoOAG.js";import{a as mi,_ as _a}from"./0y4nzu7g.js";import{r as jt}from"./awIZyCRg.js";import{a as yt,i as Aa,e as Da,s as ka}from"./IPEwSfjg.js";import{Q as Vs}from"./tkO-jISz.js";import{u as fi}from"./CH1IFI98.js";import{u as le}from"./DR1qn2I-.js";import{u as Ia,r as Ca,d as Sa,e as Pa,s as Ea,f as Ta}from"./BHuf9W_c.js";import{f as pi,d as ws}from"./hdUn0n6f.js";import{u as Je,s as vt}from"./B0dR7OaS.js";import{V as hi}from"./C69Sq2GE.js";import{_ as Es,u as Us,c as Fa,g as Ra,a as $a}from"./DB2XAXfJ.js";import{P as Ts,_ as xa}from"./BA1VSLRc.js";import{_ as ot,h as Na}from"./BUfNumuU.js";import{c as gi}from"./GMko6ml5.js";import{V as Oa}from"./Eq9SJLwR.js";import{d as Ma,g as za}from"./BAgKAl7O.js";import{u as Fs}from"./Cv5z8cPj.js";import{t as La,i as qa}from"./Be4I4htC.js";import{u as Ba}from"./C3CYwJBf.js";import{_ as yi}from"./CIZylnEl.js";import{i as wt}from"./D1hLHx03.js";import{s as Pt}from"./BfYdWFwO.js";import{d as ja,c as Va,_ as bi,a as Ua,b as Ha,g as Wa}from"./BOVnERJ_.js";import{_ as Ga}from"./DaI18MQd.js";import{u as vi}from"./CwcBlteV.js";import{C as wi}from"./CNHyijYN.js";import{u as _s}from"./DIemAg9i.js";import{a as Hs}from"./CXPR6KdW.js";import{V as Qa}from"./DFVGMskk.js";import{m as Za}from"./BubLILTD.js";import{V as _i,a as Ai,b as Di,c as ki}from"./DkcwsUlO.js";import{i as Wt}from"./z7mQQLb5.js";import{e as ns}from"./D0N8Lhbp.js";import{p as Ws}from"./Z0_aZ5UO.js";import{m as Gs}from"./BH0wDLf3.js";import{i as It}from"./imBgL1WR.js";import{i as os}from"./BAD-3r6c.js";import{a as Ya,r as Ka}from"./B1So8NJI.js";import{r as Xa,a as Ja}from"./CZo_ZjUz.js";import{u as en}from"./BRh1gC7i.js";import{_ as tn,u as sn}from"./YSXYuQLs.js";import{u as an}from"./v9r4jxiX.js";import{_ as nn}from"./B1tavSRN.js";import{_ as on}from"./BhHC8_NH.js";import{b as rn}from"./uC3_2SY7.js";import{s as ln}from"./BIv9zTRR.js";import"./nIWKocCk.js";import"./D28xhaB-.js";import"./C9UZ5MOZ.js";import"./_865mAot.js";import"./WaeUfC5K.js";import"./CzPSZZ_4.js";import"./DLo8V_Z6.js";import"./rZL9cWaQ.js";import"./B4cwKlF9.js";import"./B-pYW4Jw.js";import"./CUabFjwt.js";import"./xDr_DGtI.js";import"./D3Ff4FMM.js";import"./B9x-4sxM.js";import"./OCcl1Uw6.js";import"./CrSKa64O.js";import"./ciG39NzV.js";import"./BuawYzmz.js";import"./COUKm-te.js";import"./DdQRm5iZ.js";import"./CEN171sj.js";import"./FXZaW1gO.js";import"./Bj0SFZKV.js";import"./BeJ10Sb2.js";import"./DOmzNbfd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"8d1006f63956406f81992318d8812f4374ba5f92"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="501e9b54-cf33-411d-9db8-c1bd3726a30b",e._sentryDebugIdIdentifier="sentry-dbid-501e9b54-cf33-411d-9db8-c1bd3726a30b")}catch{}})();function Rs(e,t,s){const c=Ma(e,t)/1e3;return za(s?.roundingMethod)(c)}const dn={name:"InfoProcedureColumn1",props:{viewItem:{type:Object,default:()=>{},required:!0},folio:{type:String,default:""},preFolio:{type:String,default:""},createdAt:{type:String,default:""}},data(){return{}},computed:{}},cn={key:0}
2,un={class:"text-title text-h6 font-weight-bold","data-pw":"procedureFolio"},mn={class:"mt-3"},fn={class:"text-subtitle-base"},pn={class:"mt-3"},hn={class:"text-subtitle-base"};function gn(e,t,s,c,o,r){const d=ba;return y(),T(k,null,{default:i(()=>[s.viewItem?.saveParent?.privateProcedure?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(Oe,{color:"#ecf4fe",class:"mb-0"},{prepend:i(()=>[n(d,{style:{width:"24px",height:"24px"}})]),default:i(()=>[D(" "+f(e.$t("procedures.interProcedure")),1)]),_:1})]),_:1})):M("",!0),n(b,{cols:"12"},{default:i(()=>[s.folio&&s.folio!==""||s.preFolio&&s.preFolio!==""?(y(),j("div",cn,[D(f(e.$t("details.ticket"))+" ",1),l("h2",un,f(s.folio||s.preFolio||""),1)])):M("",!0),l("div",mn,[D(f(e.$t("details.name"))+" ",1),l("h4",fn,f(s.viewItem.title),1)]),l("div",pn,[D(f(e.$t("details.createdAt"))+" ",1),l("h4",hn,f(s.createdAt),1)])]),_:1})]),_:1})}const yn=Object.assign(_e(dn,[["render",gn]]),{__name:"InfoProcedureColumn1"}),bn={name:"Timeline",props:{historical:{type:Array,default(){return[]}},request:{type:Object,default(){return{}}}},data(){return{showOperatorsStage:-1,editedStage:-1,listParticipants:null,headers:[{text:"Nombre del involucrado",align:"start",sortable:!1,value:"name",width:"30%%"},{text:"Email",align:"start",sortable:!1,value:"email",width:"30%%"},{text:"Fecha de validación",align:"center",sortable:!1,value:"dateValidate",width:"20%%"},{text:"¿Validado?",align:"center",sortable:!1,value:"validate",width:"20%%"}],windowSize:{x:0,y:0}}},mounted(){this.onResize()},methods:{formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?this.$vuetify.display.smAndDown?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy")+" "+ge(new Date((e.seconds||e._seconds)*1e3),"HH:mm:ss")+" hrs":ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy")+"<br>"+ge(new Date((e.seconds||e._seconds)*1e3),"HH:mm:ss")+" hrs":(e=new Date(e),this.$vuetify.display.smAndDown?ge(new Date(e),"dd/MM/yyyy")+" "+ge(new Date(e),"HH:mm:ss")+" hrs":ge(new Date(e),"dd/MM/yyyy")+"<br>"+ge(new Date(e),"HH:mm:ss")+" hrs")}},mostrarOperadores(e,t){this.showOperatorsStage=t},addAcciones(){this.headers.push({text:"Acciones",align:"center",sortable:!1,value:"acciones",width:"20%"})},onResize(){this.windowSize={x:window.innerWidth,y:window.innerHeight}}}},vn={class:"text-green pt-3 text-center"},wn=["innerHTML"],_n={class:"text-justify w-90 mb-1 font-italic"},An={key:0,class:"mt-2"},Dn={class:"text-green pt-3 text-center"},kn=["innerHTML"],In={key:1,class:"mt-1 d-block text-green text-caption"},Cn={class:"mr-1"},Sn={key:2,class:"mt-1 d-block text-green text-caption"},Pn={class:"mr-1"},En={class:"text-green pt-3 text-center"},Tn=["innerHTML"],Fn={key:0},Rn={class:"text-green pt-3 text-center"},$n=["innerHTML"],xn={class:"text-caption"},Nn={class:"text-green pt-3 text-center"},On=["innerHTML"],Mn={key:0},zn={class:"text-green pt-3 text-center"},Ln=["innerHTML"],qn={class:"text-caption"},Bn={key:1,class:"mt-1 d-block text-green text-caption"},jn={class:"mr-1"},Vn={class:"text-green pt-3 text-center"},Un=["innerHTML"],Hn={class:"text-caption px-4"},Wn={key:0,class:"px-4 mt-1 d-block text-green text-caption"},Gn={class:"text-green pt-3 text-center"},Qn=["innerHTML"],Zn={class:"text-caption px-4"},Yn={key:0,class:"px-4 mt-1 d-block text-green text-caption"},Kn={class:"text-green pt-3 text-center"},Xn=["innerHTML"],Jn={key:0},eo={key:1},to={class:"text-justify w-90 mb-1 font-italic"},so={key:0},io={class:"text-green pt-3 text-center"},ao=["innerHTML"],no={key:1,class:"mt-1 d-block text-green text-caption"},oo={class:"mr-1"},ro={key:2,class:"mt-1 d-block text-caption"},lo={key:0,class:"mr-1 text-primary"},co={key:1,class:"mr-1 text-amber-darken-3"},uo={class:"text-red pt-3 text-center"},mo=["innerHTML"],fo=["innerHTML"],po={class:"text-red pt-3 text-center"},ho=["innerHTML"],go=["innerHTML"],yo={class:"mt-1 d-block text-red text-caption"},bo={class:"mr-1"};function vo(e,t,s,c,o,r){return Ds((y(),T(k,{class:"py-5"},{default:i(()=>[n(b,{cols:"12",class:"timeline"},{default:i(()=>[n(k,{class:"py-0"},{default:i(()=>[n(b,{cols:e.$vuetify.display.smAndDown?"0":"2"},{default:i(()=>[e.$vuetify.display.smAndDown?M("",!0):(y(),T(k,{key:0,justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",vn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(s.request.createdAt)},null,8,wn)])]),_:1}))]),_:1},8,["cols"]),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-success"},{default:i(()=>[...t[0]||(t[0]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(be,{elevation:"0",style:{"box-shadow":"none !important"},class:"px-0"},{default:i(()=>[n(Et,null,{default:i(()=>[l("h4",null,f(e.$t("details.request"))+": "+f(s.request.title),
21)]),_:1}),n(Xt,null,{default:i(()=>[l("span",_n,f(s.request.description),1),e.$vuetify.display.smAndDown?(y(),j("div",An,[l("label",Dn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(s.request.createdAt)},null,8,kn)])])):M("",!0),s.request.firstName!==null&&s.request.firstName!==""?(y(),j("span",In,[l("b",Cn,f(e.$t("details.requiredBy"))+": ",1),D(" "+f(s.request.firstName)+" "+f(s.request.lastName)+" "+f(s.request.lastName2?s.request.lastName2:""),1)])):(y(),j("span",Sn,[l("b",Pn,f(e.$t("details.requiredBy"))+": ",1),t[1]||(t[1]=D(" No definido",-1))]))]),_:1})]),_:1})]),_:1})]),_:1}),(y(!0),j(pe,null,Ee(s.historical,(d,a)=>(y(),T(k,{key:a,class:"py-0"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[(y(!0),j(pe,null,Ee(d.feedbacks,(m,v)=>(y(),j(pe,{key:`${v}-contFeedback`},[m.prevention.date!==null?(y(),T(k,{key:0,class:"py-0"},{default:i(()=>[n(b,{cols:e.$vuetify.display.smAndDown?"0":"2"},{default:i(()=>[e.$vuetify.display.smAndDown?M("",!0):(y(),T(k,{key:0,justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",En,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.prevention.date)},null,8,Tn)])]),_:2},1024))]),_:2},1032,["cols"]),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-success"},{default:i(()=>[...t[2]||(t[2]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9",class:"pl-7"},{default:i(()=>[e.$vuetify.display.smAndDown?(y(),j("div",Fn,[l("label",Rn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.prevention.date)},null,8,$n)])])):M("",!0),l("span",xn,[D(f(m.prevention.title)+" ",1),t[3]||(t[3]=l("br",null,null,-1))])]),_:2},1024)]),_:2},1024)):M("",!0),m.preventionResponse.date!==null?(y(),T(k,{key:1,class:"py-0"},{default:i(()=>[n(b,{cols:e.$vuetify.display.smAndDown?"0":"2"},{default:i(()=>[e.$vuetify.display.smAndDown?M("",!0):(y(),T(k,{key:0,justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",Nn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.preventionResponse.date)},null,8,On)])]),_:2},1024))]),_:2},1032,["cols"]),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-success"},{default:i(()=>[...t[4]||(t[4]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9",class:"pl-7"},{default:i(()=>[e.$vuetify.display.smAndDown?(y(),j("div",Mn,[l("label",zn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.preventionResponse.date)},null,8,Ln)])])):M("",!0),l("span",qn,[D(f(m.preventionResponse.title)+" ",1),t[5]||(t[5]=l("br",null,null,-1))]),m.preventionResponse.sendNameFeedback?(y(),j("span",Bn,[l("b",jn,f(e.$t("details.preventionResponse")),1)])):M("",!0)]),_:2},1024)]),_:2},1024)):M("",!0)],64))),128)),(y(!0),j(pe,null,Ee(d.retries,(m,v)=>(y(),j(pe,{key:`${v}-contRetry`},[m.retrySend.date!==null?(y(),T(k,{key:0,class:"py-0"},{default:i(()=>[n(b,{cols:"2"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",Vn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.retrySend.date)},null,8,Un)])]),_:2},1024)]),_:2},1024),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-success"},{default:i(()=>[...t[6]||(t[6]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9"},{default:i(()=>[l("span",Hn,[D(f(m.retrySend.title)+" ",1),t[7]||(t[7]=l("br",null,null,-1))]),m.retrySend.sendName?(y(),j("span",Wn,[l("b",null,f(e.$t("details.retrySendBy"))+": ",1),D(" "+f(m.retrySend.sendName),1)])):M("",!0)]),_:2},1024)]),_:2},1024)):M("",!0),m.retryResponse.date!==null?(y(),T(k,{key:`${v}-cont`,class:"py-0"},{default:i(()=>[n(b,{cols:"2"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",Gn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(m.retryResponse.date)},null,8,Qn)])]),_:2},1024)]),_:2},1024),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-success"},{default:i(()=>[...t[8]||(t[8]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9"},{default:i(()=>[l("span",Zn,[D(f(m.retryResponse.title)+" ",1),t[9]||(t[9]=l("br",null,null,-1))]),m.retryResponse.sendName?(y(),j("span",Yn,[l("b",null,f(e.$t("details.sendPreventionBy"))+": ",1),D(" "+f(m.preventionResponse.sendName),1)])):M("",!0)]),_:2},1024)]),_:2},1024)):M("",!0)],64))),128)),n(k,{class:"py-0"},{default:i(()=>[n(b,{cols:e.$vuetify.display.smAndDown?"0":"2"},{default:i(()=>[d.complete===!0&&!e.$vuetify.display.smAndDown?(y(),T(k,{key:0,justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",Kn,[l("span",{class:"text-green caption",innerHTML:r.formatDate(d.completeAt)},null,8,Xn)])]),_:2},1024)):M("",!0)]),_:2},1032,["cols"]),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{class:"mx-2",icon:"",variant:"elevated",size:"small",color:d.complete===!0?"white":"primary",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[d.complete===!0?(y(),T(ve,{key:0,class:"text-success"},{default:i(()=>[...t[10]||(t[10]=[D(" mdi-checkbox-marked-circle-outline",-1)])]),_:1})):M("",!0)]),_:2},1032,["color"])]),_:2},1024)]),_:2},1024),n(b,{cols:"9"},{default:i(()=>[n(be,{elevation:"0",style:{"box-shadow":"none !important"},class:"px-0"},{default:i(()=>[n(Et,null,{default:i(()=>[d.configStage.type==="dictaminacion"?(y(),j("h4",Jn,[D(f(e.$t("stageTitle"))+" "+f(a+1)+" - ",1),t[11]||(t[11]=l("span",null,"Dictaminación",-1))])):(y(),j("h4",eo,f(e.$t("stageTitle"))+" "+f(a+1)+" - "+f(d.title),1))]),_:2},1024),n(Xt,{class:"pt-0"},{default:i(()=>[l("span",to,f(d.description),1),e.$vuetify.display.smAndDown?(y(),j("div",so,[l("label",io,[l("span",{class:"text-green caption",innerHTML:r.formatDate(d.completeAt)},null,8,ao)])])):M("",!0),d.complete===!0?(y(),j("span",no,[l("b",oo,f(e.$t("details.completedStage")),1)])):M("",!0),d.complete===!1&&s.request.status!=="Rechazado"&&s.request.status!=="Rechazado por falta de respuesta"?(y(),j("span",ro,[a===s.request.stage-1?(y(),j("b",lo,f(e.$t("details.stageInProccess")),1)):(y(),j("b",co,f(e.$t("details.stagePending")),1))])):M("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024),d.complete===!1&&(s.request.status==="Rechazado"||s.request.status==="Rechazado por falta de respuesta")&&a===s.request.stage-1?(y(),T(k,{key:0,class:"py-0"},{default:i(()=>[n(b,{cols:e.$vuetify.display.smAndDown?"0":"2"},{default:i(()=>[e.$vuetify.display.smAndDown?M("",!0):(y(),T(k,{key:0,justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[l("label",uo,[d.dateDeny?(y(),j("span",{key:0,class:"text-red caption",innerHTML:r.formatDate(d.dateDeny)},null,8,mo)):(y(),j("span",{key:1,class:"text-red caption",innerHTML:r.formatDate(s.request.updatedAt)},null,8,fo))])]),_:2},1024))]),_:2},1032,["cols"]),n(b,{cols:"1"},{default:i(()=>[n(k,{justify:"center",align:"center",style:{height:"100%"}},{default:i(()=>[n(te,{icon:"",variant:"elevated",class:"mx-2",size:"small",color:"white",style:{height:"40px !important","z-index":"3"}},{default:i(()=>[n(ve,{class:"text-red"},{default:i(()=>[...t[12]||(t[12]=[D(" mdi-close-circle-outline",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(be,{elevation:"0",style:{"box-shadow":"none !important"},class:"px-0"},{default:i(()=>[e.$vuetify.display.smAndDown?(y(),T(Et,{key:0},{default:i(()=>[l("div",null,[l("label",po,[s.request?.deny?.denyAt?(y(),j("span",{key:0,class:"text-red caption",innerHTML:r.formatDate(s.request.deny.denyAt)},null,8,ho)):(y(),j("span",{key:1,class:"text-red caption",innerHTML:r.formatDate(s.request.updatedAt)},null,8,go))])])]),_:1})):M("",!0),n(Xt,{class:"pt-0"},{default:i(()=>[l("span",yo,[l("b",bo,f(e.$t("details.requestDenyTimeline")),1)])]),_:1})]),_:1})]),_:1})]),_:2},1024)):M("",!0)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})),[[wa,r.onResize]])}const wo=Object.assign(_e(bn,[["render",vo],["__scopeId","data-v-1346c88d"]]),{__name:"Timeline"}),_o={name:"InfoProcedureColumn2",props:{viewItem:{type:Object,default:()=>{},required:!0},updatedAt:{type:String,default:""},dialog:{type:Boolean,default:!1}},data(){return{}},computed:{dialogHistorial:{get(){return this.dialog},set(e){this.$emit("setDialog",e)}}}},Ao={key:0},Do={key:6,class:"body-2 mt-2"},ko={class:"pl-1"},Io={key:1},Co={key:0},So={key:1},Po={key:2,class:"mt-3"},Eo={class:"text-subtitle-base"},To={key:3,class:"mt-8"};function Fo(e,t,s,c,o,r){const d=wo;return y(),T(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[l("div",null,[D(f(e.$t("details.status"))+" ",1),s.viewItem.status2!=="Verificando pago"?(y(),j("div",Ao,[s.viewItem.status2==="En prevención"?(y(),T(Ut,{key:0,color:"warning","max-width":"300",bottom:""},{activator:i(({props:a})=>[n(Ye,nt({size:"small",color:"warning",class:"rounded-lg"},a),{default:i(()=>[D(f(e.$t("statusProcedure.prevention")),1),n(ve,{end:"",style:{"font-size":"18px"}},{default:i(()=>[...t[3]||(t[3]=[D("mdi-help-circle",-1)])]),_:1})]),_:1},16)]),default:i(()=>[t[4]||(t[4]=l("span",null,'En una o varias secciones el operador a solicitado cambios, para avanzar revisa las observaciones cuidadosamente, realiza los cambios solicitados y envÃalos haciendo clic en el botón "Responder prevenciónâ',-1))]),_:1})):s.viewItem.status2==="En preventiva"?(y(),T(Ye,{key:1,size:"small",color:"warning",class:"rounded-lg"},{default:i(()=>[D(f(e.$t("statusProcedure.preventive")),1)]),_:1})):s.viewItem.status2==="Rechazado"?(y(),T(Ye,{key:2,size:"small",color:"error",class:"rounded-lg"},{default:i(()=>[D(f(e.$t("statusProcedure.deny")),1)]),_:1})):s.viewItem.status2==="Desistido"?(y(),T(Ye,{key:3,size:"small",color:"error",class:"rounded-lg"},{default:i(()=>[D(f(e.$t("statusProcedure.desisted")),1)]),_:1})):s.viewItem.status2==="Aprobado"?(y(),T(Ye,{key:4,size:"small",color:"success",class:"rounded-lg"},{default:i(()=>[D(f(s.viewItem.status2),1)]),_:1})):(y(),T(Ye,{key:5,size:"small",color:"info",class:"rounded-lg"},{default:i(()=>[D(f(s.viewItem.status2),1)]),_:1})),s.viewItem.stageAll!==0&&!s.viewItem.processExternal?(y(),j("div",Do,[t[5]||(t[5]=D(" Etapa ( ",-1)),l("b",ko,f(s.viewItem.stageNow)+" / "+f(s.viewItem.stageAll),1),t[6]||(t[6]=D(" ) ",-1))])):M("",!0)])):(y(),j("div",Io,[n(Ye,{size:"small",color:"warning",class:"rounded-lg"},{default:i(()=>[D(f(e.$t("details.payments.verifyPayment"))+" ",1),n(mt,{class:"pl-5",size:10,
2color:"white",width:1,indeterminate:""})]),_:1})]))]),s.viewItem.status2==="Rechazado"?(y(),j("div",Co,[l("label",null,[l("b",null,f(e.$t("details.motiveDeny"))+":",1),D(" "+f(s.viewItem.reasonsDeny),1)])])):M("",!0),s.viewItem.status2==="Desistido"?(y(),j("div",So,[l("label",null,f(s.viewItem.reasonsDeny),1)])):M("",!0),s.updatedAt!==null?(y(),j("div",Po,[D(f(e.$t("details.updatedAt"))+" ",1),l("h4",Eo,f(s.updatedAt),1)])):M("",!0),s.viewItem.processExternal?M("",!0):(y(),j("div",To,[n(Me,{modelValue:r.dialogHistorial,"onUpdate:modelValue":t[2]||(t[2]=a=>r.dialogHistorial=a),width:"1000",scrollable:""},{activator:i(({props:a})=>[n(te,nt({color:"btnPrimary",variant:"outlined"},a,{size:"small"}),{default:i(()=>[D(f(e.$t("details.historical")),1)]),_:1},16)]),default:i(()=>[n(be,{elevation:"0"},{default:i(()=>[n(He,{color:"cardToolbar",style:{"z-index":"999"}},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("details.historical")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[0]||(t[0]=a=>r.dialogHistorial=!1)})]),_:1}),n(we),n(Re,{class:"pt-3"},{default:i(()=>[n(d,{historical:s.viewItem.historical,request:{user:s.viewItem.createdBy,firstName:s.viewItem.user.firstName,lastName:s.viewItem.user.lastName,lastName2:s.viewItem.user.lastName2,createdAt:s.viewItem.createdAt,status:s.viewItem.status2,stage:s.viewItem.stageNow,updatedAt:s.viewItem.updatedAt||s.viewItem.updateAt,title:s.viewItem.title||"",description:s.viewItem.description,deny:s.viewItem.deny}},null,8,["historical","request"])]),_:1}),n(we),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"btnPrimary",variant:"outlined",onClick:t[1]||(t[1]=a=>r.dialogHistorial=!1)},{default:i(()=>[D(f(e.$t("details.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))]),_:1})]),_:1})}const Ro=Object.assign(_e(_o,[["render",Fo]]),{__name:"InfoProcedureColumn2"}),$o={},xo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512.336 512.336","xml:space":"preserve",width:"512",height:"512"};function No(e,t){return y(),j("svg",xo,[...t[0]||(t[0]=[dt('<g id="XMLID_1031_"><g id="XMLID_971_"><g id="XMLID_977_"><path id="XMLID_1030_" d="M457.671,98.001h15.83c5.522,0,10-4.478,10-10s-4.478-10-10-10h-38c-5.522,0-10,4.478-10,10v38 c0,5.522,4.478,10,10,10s10-4.478,10-10v-11.003c30.342,40.621,46.835,89.908,46.835,141.17 c0,130.224-105.944,236.168-236.168,236.168S20,386.392,20,256.168S125.944,20,256.168,20c9.631,0,19.324,0.585,28.812,1.738 c5.475,0.662,10.468-3.237,11.134-8.72c0.667-5.482-3.237-10.468-8.72-11.134C277.108,0.634,266.603,0,256.168,0 C187.743,0,123.413,26.646,75.03,75.03C26.646,123.413,0,187.743,0,256.168s26.646,132.755,75.03,181.138 c48.383,48.384,112.713,75.03,181.138,75.03s132.755-26.646,181.138-75.03c48.384-48.383,75.03-112.713,75.03-181.138 C512.336,198.427,493.046,142.995,457.671,98.001z"></path><path id="XMLID_1029_" d="M108.472,151.013c-4.667-2.954-10.844-1.564-13.799,3.1c-22.829,36.056-32.935,79.418-28.456,122.099 c4.545,43.314,24.04,84.16,54.894,115.015c37.235,37.235,86.146,55.853,135.058,55.853s97.822-18.617,135.058-55.853 c74.471-74.471,74.471-195.645,0-270.115c-30.807-30.806-71.586-50.294-114.828-54.874 c-42.602-4.515-85.917,5.512-121.958,28.229c-4.673,2.945-6.072,9.12-3.128,13.792c2.945,4.673,9.12,6.072,13.792,3.128 c67.938-42.82,155.105-33.007,211.979,23.867c66.673,66.673,66.673,175.157,0,241.83c-66.672,66.674-175.158,66.674-241.83,0 c-56.088-56.088-66.048-145.361-23.682-212.271C114.525,160.146,113.138,153.968,108.472,151.013z"></path><path id="XMLID_1028_" d="M386.169,266.33h12.332c5.522,0,10-4.478,10-10s-4.478-10-10-10h-12.332c-5.522,0-10,4.478-10,10 S380.646,266.33,386.169,266.33z"></path><path id="XMLID_1004_" d="M103.835,256.006c0,5.522,4.478,10,10,10h12.332c5.522,0,10-4.478,10-10s-4.478-10-10-10h-12.332 C108.313,246.006,103.835,250.483,103.835,256.006z"></path><path id="XMLID_1001_" d="M266.33,126.167v-12.332c0-5.522-4.478-10-10-10s-10,4.478-10,10v12.332c0,5.522,4.478,10,10,10 S266.33,131.689,266.33,126.167z"></path><path id="XMLID_1415_" d="M246.006,386.169v12.332c0,5.522,4.478,10,10,10s10-4.478,10-10v-12.332c0-5.522-4.478-10-10-10 S246.006,380.646,246.006,386.169z"></path><path id="XMLID_996_" d="M206.044,191.901c-3.906-3.904-10.236-3.904-14.143,0c-3.905,3.905-3.905,10.237,0,14.143l33.891,33.891 c-2.597,4.84-4.074,10.367-4.074,16.233c0,18.996,15.454,34.45,34.45,34.45s34.45-15.454,34.45-34.45 c0-5.866-1.478-11.393-4.074-16.233l68.383-68.383c3.905-3.905,3.905-10.237,0-14.143c-3.906-3.904-10.236-3.904-14.143,0 l-68.383,68.383c-4.84-2.597-10.367-4.074-16.233-4.074s-11.393,1.478-16.233,4.074L206.044,191.901z M270.618,256.168 c0,7.968-6.482,14.45-14.45,14.45s-14.45-6.482-14.45-14.45s6.482-14.45,14.45-14.45S270.618,248.2,270.618,256.168z"></path><path id="XMLID_980_" d="M135.248,135.248c1.87-1.86,2.939-4.44,2.939-7.07s-1.069-5.2-2.939-7.07 c-1.86-1.859-4.431-2.93-7.07-2.93c-2.63,0-5.21,1.07-7.07,2.93c-1.859,1.86-2.93,4.44-2.93,7.07c0,2.64,1.07,5.21,2.93,7.07 c1.86,1.859,4.44,2.93,7.07,2.93C130.817,138.178,133.388,137.107,135.248,135.248z"></path><path id="XMLID_979_" d="M325.438,29.878c2.641,0,5.221-1.061,7.08-2.93c1.86-1.86,2.931-4.431,2.931-7.07 c0-2.63-1.07-5.21-2.931-7.07c-1.859-1.859-4.439-2.93-7.08-2.93c-2.63,0-5.21,1.07-7.069,2.93c-1.86,1.86-2.931,4.44-2.931,7.07 c0,2.64,1.07,5.21,2.931,7.07C320.228,28.817,322.808,29.878,325.438,29.878z"></path></g></g></g>',1)])])}const Yt=Object.assign(_e($o,[["render",No]]),{__name:"TimeIcon"}),Oo={name:"Preventive",props:{viewItem:{type:Object,default:()=>{},required:!0},changePrevention:{type:Boolean,default:!1,required:!0},canAnswerFeedback:{type:Boolean,default:!1,required:!0},disabledResponseFeedback:{type:Boolean,default:!1,required:!0},tiempoRestanteFeedback:{type:Object,default:()=>{},required:!0},dialogResponse:{type:Boolean,default:!1,required:!0}},data(){return{}},computed:{dialog:{get(){return this.dialogResponse},set(e){this.$emit("setDialogResponse",e)}},hideTimerPrevention(){return ks().hideTimerPrevention}},methods:{validate(){if(this.changePrevention===!0)this.dialog=!0;else{const e=document.getElementById("buttonPreventive");e.disabled=!0,e.classList.add("v-btn--disabled"),De().open({color:"error",text:"Formulario inválido"})}}}},Mo={key:0,class:"text-body-2 font-weight-medium mb-0"},zo={key:1,class:"text-body-2 font-weight-medium mb-0"},Lo={class:"caption"},qo={class:"caption"},Bo={class:"caption"},jo=["innerHTML"],Vo=["innerHTML"],Uo=["innerHTML"];function Ho(e,t,s,c,o,r){const d=Yt;return y(),T(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[r.hideTimerPrevention===!1?(y(),T(Oe,{key:0,color:"btnSecondary",variant:"outlined",align:"center",class:"px-5 py-6 border-time"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"4",sm:"4",md:"4",class:"align-content-center"},{default:i(()=>[n(d,{fill:"rgb(var(--v-theme-btnSecondary))",width:"38px",height:"38px"})]),_:1}),n(b,{cols:"8",sm:"8",md:"8",class:"text-left"},{default:i(()=>[s.viewItem.status2==="En prevención"?(y(),j("p",Mo,f(e.$t("timeRemainingFeedback")),1)):s.viewItem.status2==="En preventiva"?(y(),j("p",zo,f(e.$t("timeRemainingPreventive")),1)):M("",!0)]),_:1})]),_:1}),n(k,{class:"mt-1"},{default:i(()=>[n(b,null,{default:i(()=>[l("div",null,f(s.tiempoRestanteFeedback.hora),1),l("div",Lo,f(e.$t("details.hours")),1)]),_:1}),n(b,null,{default:i(()=>[l("div",null,f(s.tiempoRestanteFeedback.minuto),1),l("div",qo,f(e.$t("details.minutes")),1)]),_:1}),n(b,null,{default:i(()=>[l("div",null,f(s.tiempoRestanteFeedback.segundo),1),l("div",Bo,f(e.$t("details.seconds")),1)]),_:1})]),_:1})]),_:1})):M("",!0),s.canAnswerFeedback===!0?(y(),T(k,{key:1},{default:i(()=>[n(b,{class:"px-2 py-4"},{default:i(()=>[s.viewItem.status2==="En prevención"?(y(),T(te,{key:0,id:"buttonPreventive",color:"btnPrimary",size:"small",block:"",class:Be([{btnDisabled:s.changePrevention===!1||s.disabledResponseFeedback===!0},"text-wrap d-inline-block"]),disabled:s.changePrevention===!1||s.disabledResponseFeedback===!0,onClick:t[0]||(t[0]=a=>r.validate())},{default:i(()=>[D(f(e.$t("details.responseFeedback")),1)]),_:1},8,["class","disabled"])):s.viewItem.status2==="En preventiva"?(y(),T(te,{key:1,id:"buttonPreventive",color:"btnPrimary",size:"small",block:"",class:Be(["text-wrap d-inline-block",{btnDisabled:s.changePrevention===!1||s.disabledResponseFeedback===!0}]),disabled:s.changePrevention===!1||s.disabledResponseFeedback===!0,onClick:t[1]||(t[1]=a=>r.validate())},{default:i(()=>[D(f(e.$t("details.responseFeedbackPreventive")),1)]),_:1},8,["class","disabled"])):M("",!0),n(Me,{modelValue:r.dialog,"onUpdate:modelValue":t[5]||(t[5]=a=>r.dialog=a),width:"500"},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[s.viewItem.status2==="En prevención"?(y(),T(Qe,{key:0},{default:i(()=>[D(f(e.$t("details.responseFeedback")),1)]),_:1})):(y(),T(Qe,{key:1},{default:i(()=>[D(f(e.$t("details.responseFeedbackPreventive")),1)]),_:1})),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[2]||(t[2]=a=>r.dialog=!1)})]),_:1}),n(we),n(Re,{class:"pt-3 text-black"},{default:i(()=>[s.viewItem.status2==="En prevención"?(y(),j("div",{key:0,innerHTML:e.$t("details.textResponseFeedback")},null,8,jo)):(y(),j("div",{key:1,innerHTML:e.$t("details.textResponseFeedbackPreventive")},null,8,Vo)),t[6]||(t[6]=l("br",null,null,-1)),l("div",{innerHTML:e.$t("details.textChangedLogic")},null,8,Uo)]),_:1}),n(we),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"btnSecondary",variant:"outlined",onClick:t[3]||(t[3]=a=>r.dialog=!1)},{default:i(()=>[D(f(e.$t("details.close")),1)]),_:1}),n(te,{color:"btnPrimary",onClick:t[4]||(t[4]=a=>{e.$emit("requestFeedback"),r.dialog=!1})},{default:i(()=>[D(f(e.$t("details.continue")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):M("",!0)]),_:1})]),_:1})}const Wo=Object.assign(_e(Oo,[["render",Ho],["__scopeId","data-v-2e71a0b2"]]),{__name:"Preventive"}),Go={props:{status:String,timer:Object,operatorHasRequestedSignature:Boolean},computed:{showAlert(){return this.status==="Pendiente de firma"&&this.operatorHasRequestedSignature===!0},alertTitle(){return this.status==="Pendiente de firma"?this.$t("timeRemainingSign"):""}}},Qo={class:"text-body-2 font-weight-medium mb-0"},Zo={class:"font-weight-medium"},Yo={class:"caption"},Ko={class:"font-weight-medium"},Xo={class:"caption"},Jo={class:"font-weight-medium"},er={class:"caption"};function tr(e,t,s,c,o,r){const d=Yt;return r.showAlert?(y(),T(Oe,{key:0,color:"#053F6F",variant:"outlined",align:"center",class:"px-6 py-8 border-time"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"4",class:"align-content-center"},{default:i(()=>[n(d,{fill:"#053F6F",width:"40px",height:"40px"})]),_:1}),n(b,{cols:"8",class:"text-left"},{default:i(()=>[l("p",Qo,f(r.alertTitle),1)]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"4"},{default:i(()=>
2[l("div",Zo,f(s.timer.hora),1),l("div",Yo,f(e.$t("details.hours")),1)]),_:1}),n(b,{cols:"4"},{default:i(()=>[l("div",Ko,f(s.timer.minuto),1),l("div",Xo,f(e.$t("details.minutes")),1)]),_:1}),n(b,{cols:"4"},{default:i(()=>[l("div",Jo,f(s.timer.segundo),1),l("div",er,f(e.$t("details.seconds")),1)]),_:1})]),_:1})]),_:1})]),_:1})):M("",!0)}const sr=Object.assign(_e(Go,[["render",tr]]),{__name:"TimerAlert"}),ir={name:"TimeAppointment",props:{viewItem:{type:Object,default:()=>{},required:!0},scheduleAppointment:{type:Boolean,default:!1,required:!0}}},ar={class:"caption text-center"},nr={class:"caption"},or={class:"caption"},rr={class:"caption"};function lr(e,t,s,c,o,r){const d=Yt;return y(),T(k,null,{default:i(()=>[Ds(n(Oe,{color:"btnSecondary",variant:"outlined",align:"center",class:"px-5 py-8"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[n(d,{fill:"rgb(var(--v-theme-btnSecondary))",width:"35px",height:"35px"})]),_:1}),n(k,{class:"justify-center pt-3"},{default:i(()=>[l("span",ar,f(e.$t("appointments.remainingTime")),1)]),_:1}),n(k,null,{default:i(()=>[n(b,null,{default:i(()=>[t[1]||(t[1]=l("div",null,"72",-1)),l("div",nr,f(e.$t("details.hours")),1)]),_:1}),n(b,null,{default:i(()=>[t[2]||(t[2]=l("div",null,"59",-1)),l("div",or,f(e.$t("details.minutes")),1)]),_:1}),n(b,null,{default:i(()=>[t[3]||(t[3]=l("div",null,"59",-1)),l("div",rr,f(e.$t("details.seconds")),1)]),_:1})]),_:1})]),_:1},512),[[Ni,!1]]),n(k,null,{default:i(()=>[n(b,{class:"px-5 py-8"},{default:i(()=>[s.scheduleAppointment?M("",!0):(y(),T(te,{key:0,color:"btnPrimary",size:"small",block:"",class:"text-wrap d-inline-block",height:"35px",onClick:t[0]||(t[0]=a=>e.$emit("setScheduleAppointment",!0))},{default:i(()=>[D(f(e.$t("details.scheduleAppointment")),1)]),_:1}))]),_:1})]),_:1})]),_:1})}const dr=Object.assign(_e(ir,[["render",lr]]),{__name:"TimeAppoinment"});function Bt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rs={exports:{}};var Qs;function cr(){return Qs||(Qs=1,(function(e,t){(function(s){e.exports=s()})(function(){return(function s(c,o,r){function d(v,p){if(!o[v]){if(!c[v]){var u=typeof Bt=="function"&&Bt;if(!p&&u)return u(v,!0);if(a)return a(v,!0);var A=new Error("Cannot find module '"+v+"'");throw A.code="MODULE_NOT_FOUND",A}var g=o[v]={exports:{}};c[v][0].call(g.exports,function(C){var _=c[v][1][C];return d(_||C)},g,g.exports,s,c,o,r)}return o[v].exports}for(var a=typeof Bt=="function"&&Bt,m=0;m<r.length;m++)d(r[m]);return d})({1:[function(s,c,o){var r=s("./utils"),d=s("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(m){for(var v,p,u,A,g,C,_,S=[],I=0,P=m.length,F=P,L=r.getTypeOf(m)!=="string";I<m.length;)F=P-I,u=L?(v=m[I++],p=I<P?m[I++]:0,I<P?m[I++]:0):(v=m.charCodeAt(I++),p=I<P?m.charCodeAt(I++):0,I<P?m.charCodeAt(I++):0),A=v>>2,g=(3&v)<<4|p>>4,C=1<F?(15&p)<<2|u>>6:64,_=2<F?63&u:64,S.push(a.charAt(A)+a.charAt(g)+a.charAt(C)+a.charAt(_));return S.join("")},o.decode=function(m){var v,p,u,A,g,C,_=0,S=0,I="data:";if(m.substr(0,I.length)===I)throw new Error("Invalid base64 input, it looks like a data url.");var P,F=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===a.charAt(64)&&F--,m.charAt(m.length-2)===a.charAt(64)&&F--,F%1!=0)throw new Error("Invalid base64 input, bad content length.");for(P=d.uint8array?new Uint8Array(0|F):new Array(0|F);_<m.length;)v=a.indexOf(m.charAt(_++))<<2|(A=a.indexOf(m.charAt(_++)))>>4,p=(15&A)<<4|(g=a.indexOf(m.charAt(_++)))>>2,u=(3&g)<<6|(C=a.indexOf(m.charAt(_++))),P[S++]=v,g!==64&&(P[S++]=p),C!==64&&(P[S++]=u);return P}},{"./support":30,"./utils":32}],2:[function(s,c,o){var r=s("./external"),d=s("./stream/DataWorker"),a=s("./stream/Crc32Probe"),m=s("./stream/DataLengthProbe");function v(p,u,A,g,C){this.compressedSize=p,this.uncompressedSize=u,this.crc32=A,this.compression=g,this.compressedContent=C}v.prototype={getContentWorker:function(){var p=new d(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),u=this;return p.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new d(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},v.createWorkerFrom=function(p,u,A){return p.pipe(new a).pipe(new m("uncompressedSize")).pipe(u.compressWorker(A)).pipe(new m("compressedSize")).withStreamInfo("compression",u)},c.exports=v},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,c,o){var r=s("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},o.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,c,o){var r=s("./utils"),d=(function(){for(var a,m=[],v=0;v<256;v++){a=v;for(var p=0;p<8;p++)a=1&a?3988292384^a>>>1:a>>>1;m[v]=a}return m})();c.exports=function(a,m){return a!==void 0&&a.length?r.getTypeOf(a)!=="string"?(function(v,p,u,A){var g=d,
vendor: 34,999 bytes, lines 2-3
2C=A+u;v^=-1;for(var _=A;_<C;_++)v=v>>>8^g[255&(v^p[_])];return-1^v})(0|m,a,a.length,0):(function(v,p,u,A){var g=d,C=A+u;v^=-1;for(var _=A;_<C;_++)v=v>>>8^g[255&(v^p.charCodeAt(_))];return-1^v})(0|m,a,a.length,0):0}},{"./utils":32}],5:[function(s,c,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(s,c,o){var r=null;r=typeof Promise<"u"?Promise:s("lie"),c.exports={Promise:r}},{lie:37}],7:[function(s,c,o){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",d=s("pako"),a=s("./utils"),m=s("./stream/GenericWorker"),v=r?"uint8array":"array";function p(u,A){m.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=A,this.meta={}}o.magic="\b\0",a.inherits(p,m),p.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(v,u.data),!1)},p.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new d[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(A){u.push({data:A,meta:u.meta})}},o.compressWorker=function(u){return new p("Deflate",u)},o.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,c,o){function r(g,C){var _,S="";for(_=0;_<C;_++)S+=String.fromCharCode(255&g),g>>>=8;return S}function d(g,C,_,S,I,P){var F,L,z=g.file,V=g.compression,X=P!==v.utf8encode,J=a.transformTo("string",P(z.name)),G=a.transformTo("string",v.utf8encode(z.name)),U=z.comment,me=a.transformTo("string",P(U)),$=a.transformTo("string",v.utf8encode(U)),Y=G.length!==z.name.length,w=$.length!==U.length,q="",O="",Q="",Z=z.dir,H=z.date,ae={crc32:0,compressedSize:0,uncompressedSize:0};C&&!_||(ae.crc32=g.crc32,ae.compressedSize=g.compressedSize,ae.uncompressedSize=g.uncompressedSize);var N=0;C&&(N|=8),X||!Y&&!w||(N|=2048);var x=0,fe=0;Z&&(x|=16),I==="UNIX"?(fe=798,x|=(function(de,ze){var Ge=de;return de||(Ge=ze?16893:33204),(65535&Ge)<<16})(z.unixPermissions,Z)):(fe=20,x|=(function(de){return 63&(de||0)})(z.dosPermissions)),F=H.getUTCHours(),F<<=6,F|=H.getUTCMinutes(),F<<=5,F|=H.getUTCSeconds()/2,L=H.getUTCFullYear()-1980,L<<=4,L|=H.getUTCMonth()+1,L<<=5,L|=H.getUTCDate(),Y&&(O=r(1,1)+r(p(J),4)+G,q+="up"+r(O.length,2)+O),w&&(Q=r(1,1)+r(p(me),4)+$,q+="uc"+r(Q.length,2)+Q);var ce="";return ce+=` 3\0`,ce+=r(N,2),ce+=V.magic,ce+=r(F,2),ce+=r(L,2),ce+=r(ae.crc32,4),ce+=r(ae.compressedSize,4),ce+=r(ae.uncompressedSize,4),ce+=r(J.length,2),ce+=r(q.length,2),{fileRecord:u.LOCAL_FILE_HEADER+ce+J+q,dirRecord:u.CENTRAL_FILE_HEADER+r(fe,2)+ce+r(me.length,2)+"\0\0\0\0"+r(x,4)+r(S,4)+J+q+me}}var a=s("../utils"),m=s("../stream/GenericWorker"),v=s("../utf8"),p=s("../crc32"),u=s("../signature");function A(g,C,_,S){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=C,this.zipPlatform=_,this.encodeFileName=S,this.streamFiles=g,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(A,m),A.prototype.push=function(g){var C=g.meta.percent||0,_=this.entriesCount,S=this._sources.length;this.accumulate?this.contentBuffer.push(g):(this.bytesWritten+=g.data.length,m.prototype.push.call(this,{data:g.data,meta:{currentFile:this.currentFile,percent:_?(C+100*(_-S-1))/_:100}}))},A.prototype.openedSource=function(g){this.currentSourceOffset=this.bytesWritten,this.currentFile=g.file.name;var C=this.streamFiles&&!g.file.dir;if(C){var _=d(g,C,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:_.fileRecord,meta:{percent:0}})}else this.accumulate=!0},A.prototype.closedSource=function(g){this.accumulate=!1;var C=this.streamFiles&&!g.file.dir,_=d(g,C,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(_.dirRecord),C)this.push({data:(function(S){return u.DATA_DESCRIPTOR+r(S.crc32,4)+r(S.compressedSize,4)+r(S.uncompressedSize,4)})(g),meta:{percent:100}});else for(this.push({data:_.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},A.prototype.flush=function(){for(var g=this.bytesWritten,C=0;C<this.dirRecords.length;C++)this.push({data:this.dirRecords[C],meta:{percent:100}});var _=this.bytesWritten-g,S=(function(I,P,F,L,z){var V=a.transformTo("string",z(L));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(I,2)+r(I,2)+r(P,4)+r(F,4)+r(V.length,2)+V})(this.dirRecords.length,_,g,this.zipComment,this.encodeFileName);this.push({data:S,meta:{percent:100}})},A.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},A.prototype.registerPrevious=function(g){this._sources.push(g);var C=this;return g.on("data",function(_){C.processChunk(_)}),g.on("end",function(){C.closedSource(C.previous.streamInfo),C._sources.length?C.prepareNextSource():C.end()}),g.on("error",function(_){C.error(_)}),this},A.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},A.prototype.error=function(g){var C=this._sources;if(!m.prototype.error.call(this,g))return!1;for(var _=0;_<C.length;_++)try{C[_].error(g)}catch{}return!0},A.prototype.lock=function(){m.prototype.lock.call(this);for(var g=this._sources,C=0;C<g.length;C++)g[C].lock()},c.exports=A},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,c,o){var r=s("../compressions"),d=s("./ZipFileWorker");o.generateWorker=function(a,m,v){var p=new d(m.streamFiles,v,m.platform,m.encodeFileName),u=0;try{a.forEach(function(A,g){u++;var C=(function(P,F){var L=P||F,z=r[L];if(!z)throw new Error(L+" is not a valid compression method !");return z})(g.options.compression,m.compression),_=g.options.compressionOptions||m.compressionOptions||{},S=g.dir,I=g.date;g._compressWorker(C,_).withStreamInfo("file",{name:A,dir:S,date:I,comment:g.comment||"",unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions}).pipe(p)}),p.entriesCount=u}catch(A){p.error(A)}return p}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,c,o){function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var d=new r;for(var a in this)typeof this[a]!="function"&&(d[a]=this[a]);return d}}(r.prototype=s("./object")).loadAsync=s("./load"),r.support=s("./support"),r.defaults=s("./defaults"),r.version="3.10.1",r.loadAsync=function(d,a){return new r().loadAsync(d,a)},r.external=s("./external"),c.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,c,o){var r=s("./utils"),d=s("./external"),a=s("./utf8"),m=s("./zipEntries"),v=s("./stream/Crc32Probe"),p=s("./nodejsUtils");function u(A){return new d.Promise(function(g,C){var _=A.decompressed.getContentWorker().pipe(new v);_.on("error",function(S){C(S)}).on("end",function(){_.streamInfo.crc32!==A.decompressed.crc32?C(new Error("Corrupted zip : CRC32 mismatch")):g()}).resume()})}c.exports=function(A,g){var C=this;return g=r.extend(g||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),p.isNode&&p.isStream(A)?d.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",A,!0,g.optimizedBinaryString,g.base64).then(function(_){var S=new m(g);return S.load(_),S}).then(function(_){var S=[d.Promise.resolve(_)],I=_.files;if(g.checkCRC32)for(var P=0;P<I.length;P++)S.push(u(I[P]));return d.Promise.all(S)}).then(function(_){for(var S=_.shift(),I=S.files,P=0;P<I.length;P++){var F=I[P],L=F.fileNameStr,z=r.resolve(F.fileNameStr);C.file(z,F.decompressed,{binary:!0,optimizedBinaryString:!0,date:F.date,dir:F.dir,comment:F.fileCommentStr.length?F.fileCommentStr:null,unixPermissions:F.unixPermissions,dosPermissions:F.dosPermissions,createFolders:g.createFolders}),F.dir||(C.file(z).unsafeOriginalName=L)}return S.zipComment.length&&(C.comment=S.zipComment),C})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,c,o){var r=s("../utils"),d=s("../stream/GenericWorker");function a(m,v){d.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(v)}r.inherits(a,d),a.prototype._bindStream=function(m){var v=this;(this._stream=m).pause(),m.on("data",function(p){v.push({data:p,meta:{percent:0}})}).on("error",function(p){v.isPaused?this.generatedError=p:v.error(p)}).on("end",function(){v.isPaused?v._upstreamEnded=!0:v.end()})},a.prototype.pause=function(){return!!d.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,c,o){var r=s("readable-stream").Readable;function d(a,m,v){r.call(this,m),this._helper=a;var p=this;a.on("data",function(u,A){p.push(u)||p._helper.pause(),v&&v(A)}).on("error",function(u){p.emit("error",u)}).on("end",function(){p.push(null)})}s("../utils").inherits(d,r),d.prototype._read=function(){this._helper.resume()},c.exports=d},{"../utils":32,"readable-stream":16}],14:[function(s,c,o){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,d){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,d);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,d)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var d=new Buffer(r);return d.fill(0),d},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(s,c,o){function r(z,V,X){var J,G=a.getTypeOf(V),U=a.extend(X||{},p);U.date=U.date||new Date,U.compression!==null&&(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&&(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&&16384&U.unixPermissions&&(U.dir=!0),U.dosPermissions&&16&U.dosPermissions&&(U.dir=!0),U.dir&&(z=I(z)),U.createFolders&&(J=S(z))&&P.call(this,J,!0);var me=G==="string"&&U.binary===!1&&U.base64===!1;X&&X.binary!==void 0||(U.binary=!me),(V instanceof u&&V.uncompressedSize===0||U.dir||!V||V.length===0)&&(U.base64=!1,U.binary=!0,V="",U.compression="STORE",G="string");var $=null;$=V instanceof u||V instanceof m?V:C.isNode&&C.isStream(V)?new _(z,V):a.prepareContent(z,V,U.binary,U.optimizedBinaryString,U.base64);var Y=new A(z,$,U);this.files[z]=Y}var d=s("./utf8"),a=s("./utils"),m=s("./stream/GenericWorker"),v=s("./stream/StreamHelper"),p=s("./defaults"),u=s("./compressedObject"),A=s("./zipObject"),g=s("./generate"),C=s("./nodejsUtils"),_=s("./nodejs/NodejsStreamInputAdapter"),S=function(z){z.slice(-1)==="/"&&(z=z.substring(0,z.length-1));var V=z.lastIndexOf("/");return 0<V?z.substring(0,V):""},I=function(z){return z.slice(-1)!=="/"&&(z+="/"),z},P=function(z,V){return V=V!==void 0?V:p.createFolders,z=I(z),this.files[z]||r.call(this,z,null,{dir:!0,createFolders:V}),this.files[z]};function F(z){return Object.prototype.toString.call(z)==="[object RegExp]"}var L={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(z){var V,X,J;for(V in this.files)J=this.files[V],(X=V.slice(this.root.length,V.length))&&V.slice(0,this.root.length)===this.root&&z(X,J)},filter:function(z){var V=[];return this.forEach(function(X,J){z(X,J)&&V.push(J)}),V},file:function(z,V,X){if(arguments.length!==1)return z=this.root+z,r.call(this,z,V,X),this;if(F(z)){var J=z;return this.filter(function(U,me){return!me.dir&&J.test(U)})}var G=this.files[this.root+z];return G&&!G.dir?G:null},folder:function(z){if(!z)return this;if(F(z))return this.filter(function(G,U){return U.dir&&z.test(G)});var V=this.root+z,X=P.call(this,V),J=this.clone();return J.root=X.name,J},remove:function(z){z=this.root+z;var V=this.files[z];if(V||(z.slice(-1)!=="/"&&(z+="/"),V=this.files[z]),V&&!V.dir)delete this.files[z];else for(var X=this.filter(function(G,U){return U.name.slice(0,z.length)===z}),J=0;J<X.length;J++)delete this.files[X[J].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(z){var V,X={};try{if((X=a.extend(z||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:d.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");a.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var J=X.comment||this.comment||"";V=g.generateWorker(this,X,J)}catch(G){(V=new m("error")).error(G)}return new v(V,X.type||"string",X.mimeType)},generateAsync:function(z,V){return this.generateInternalStream(z).accumulate(V)},generateNodeStream:function(z,V){return(z=z||{}).type||(z.type="nodebuffer"),this.generateInternalStream(z).toNodejsStream(V)}};c.exports=L},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,c,o){c.exports=s("stream")},{stream:void 0}],17:[function(s,c,o){var r=s("./DataReader");function d(a){r.call(this,a);for(var m=0;m<this.data.length;m++)a[m]=255&a[m]}s("../utils").inherits(d,r),d.prototype.byteAt=function(a){return this.data[this.zero+a]},d.prototype.lastIndexOfSignature=function(a){for(var m=a.charCodeAt(0),v=a.charCodeAt(1),p=a.charCodeAt(2),u=a.charCodeAt(3),A=this.length-4;0<=A;--A)if(this.data[A]===m&&this.data[A+1]===v&&this.data[A+2]===p&&this.data[A+3]===u)return A-this.zero;return-1},d.prototype.readAndCheckSignature=function(a){var m=a.charCodeAt(0),v=a.charCodeAt(1),p=a.charCodeAt(2),u=a.charCodeAt(3),A=this.readData(4);return m===A[0]&&v===A[1]&&p===A[2]&&u===A[3]},d.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,m},c.exports=d},{"../utils":32,"./DataReader":18}],18:[function(s,c,o){var r=s("../utils");function d(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var m,v=0;for(this.checkOffset(a),m=this.index+a-1;m>=this.index;m--)v=(v<<8)+this.byteAt(m);return this.index+=a,v},readString:function(a){return r.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},c.exports=d},{"../utils":32}],19:[function(s,c,o){var r=s("./Uint8ArrayReader");function d(a){r.call(this,a)}s("../utils").inherits(d,r),d.prototype.readData=function(a){this.checkOffset(a);var m=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,m},c.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,c,o){var r=s("./DataReader");function d(a){r.call(this,a)}s("../utils").inherits(d,r),d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},d.prototype.readData=function(a){this.checkOffset(a);var m=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,m},c.exports=d},{"../utils":32,"./DataReader":18}],21:[function(s,c,o){var r=s("./ArrayReader");function d(a){r.call(this,a)}s("../utils").inherits(d,r),d.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,m},c.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(s,c,o){var r=s("../utils"),d=s("../support"),a=s("./ArrayReader"),m=s("./StringReader"),v=s("./NodeBufferReader"),p=s("./Uint8ArrayReader");c.exports=function(u){var A=r.getTypeOf(u);return r.checkSupport(A),A!=="string"||d.uint8array?A==="nodebuffer"?new v(u):d.uint8array?new p(r.transformTo("uint8array",u)):new a(r.transformTo("array",u)):new m(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,c,o){o.LOCAL_FILE_HEADER="PK��",o.CENTRAL_FILE_HEADER="PK��",o.CENTRAL_DIRECTORY_END="PK��",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK��",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,c,o){var r=s("./GenericWorker"),d=s("../utils");function a(m){r.call(this,"ConvertWorker to "+m),this.destType=m}d.inherits(a,r),a.prototype.processChunk=function(m){this.push({data:d.transformTo(this.destType,m.data),meta:m.meta})},c.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(s,c,o){var r=s("./GenericWorker"),d=s("../crc32");function a(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(a,r),a.prototype.processChunk=function(m){this.streamInfo.crc32=d(m.data,this.streamInfo.crc32||0),this.push(m)},c.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,c,o){var r=s("../utils"),d=s("./GenericWorker");function a(m){d.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}r.inherits(a,d),a.prototype.processChunk=function(m){if(m){var v=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=v+m.data.length}d.prototype.processChunk.call(this,m)},c.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(s,c,o){var r=s("../utils"),d=s("./GenericWorker");function a(m){d.call(this,"DataWorker");var v=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(p){v.dataIsReady=!0,v.data=p,v.max=p&&p.length||0,v.type=r.getTypeOf(p),v.isPaused||v._tickAndRepeat()},function(p){v.error(p)})}r.inherits(a,d),a.prototype.cleanUp=function(){d.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,v=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,v);break;case"uint8array":m=this.data.subarray(this.index,v);break;case"array":case"nodebuffer":m=this.data.slice(this.index,v)}return this.index=v,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(s,c,o){function r(d){this.name=d||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(d){this.emit("data",d)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(d){this.emit("error",d)}return!0},error:function(d){return!this.isFinished&&(this.isPaused?this.generatedError=d:(this.isFinished=!0,this.emit("error",d),this.previous&&this.previous.error(d),this.cleanUp()),!0)},on:function(d,a){return this._listeners[d].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(d,a){if(this._listeners[d])for(var m=0;m<this._listeners[d].length;m++)this._listeners[d][m].call(this,a)},pipe:function(d){return d.registerPrevious(this)},registerPrevious:function(d){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=d.streamInfo,this.mergeStreamInfo(),this.previous=d;var a=this;return d.on("data",function(m){a.processChunk(m)}),d.on("end",function(){a.end()}),d.on("error",function(m){a.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var d=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),d=!0),this.previous&&this.previous.resume(),!d},flush:function(){},processChunk:function(d){this.push(d)},withStreamInfo:function(d,a){return this.extraStreamInfo[d]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var d in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,d)&&(this.streamInfo[d]=this.extraStreamInfo[d])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var d="Worker "+this.name;return this.previous?this.previous+" -> "+d:d}},c.exports=r},{}],29:[function(s,c,o){var r=s("../utils"),d=s("./ConvertWorker"),a=s("./GenericWorker"),m=s("../base64"),v=s("../support"),p=s("../external"),u=null;if(v.nodestream)try{u=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function A(C,_){return new p.Promise(function(S,I){var P=[],F=C._internalType,L=C._outputType,z=C._mimeType;C.on("data",function(V,X){P.push(V),_&&_(X)}).on("error",function(V){P=[],I(V)}).on("end",function(){try{var V=(function(X,J,G){switch(X){case"blob":return r.newBlob(r.transformTo("arraybuffer",J),G);case"base64":return m.encode(J);default:return r.transformTo(X,J)}})(L,(function(X,J){var G,U=0,me=null,$=0;for(G=0;G<J.length;G++)$+=J[G].length;switch(X){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":for(me=new Uint8Array($),G=0;G<J.length;G++)me.set(J[G],U),U+=J[G].length;return me;case"nodebuffer":return Buffer.concat(J);default:throw new Error("concat : unsupported type '"+X+"'")}})(F,P),z);S(V)}catch(X){I(X)}P=[]}).resume()})}function g(C,_,S){var I=_;switch(_){case"blob":case"arraybuffer":I="uint8array";break;case"base64":I="string"}try{this._internalType=I,this._outputType=_,this._mimeType=S,r.checkSupport(I),this._worker=C.pipe(new d(I)),C.lock()}catch(P){this._worker=new a("error"),this._worker.error(P)}}g.prototype={accumulate:function(C){return A(this,C)},on:function(C,_){var S=this;return C==="data"?this._worker.on(C,function(I){_.call(S,I.data,I.meta)}):this._worker.on(C,function(){r.delay(_,arguments,S)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(C){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},C)}},c.exports=g},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,c,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var r=new ArrayBuffer(0);try{o.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);d.append(r),o.blob=d.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!s("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(s,c,o){for(var r=s("./utils"),d=s("./support"),a=s("./nodejsUtils"),m=s("./stream/GenericWorker"),v=new Array(256),p=0;p<256;p++)v[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;v[254]=v[254]=1;function u(){m.call(this,"utf-8 decode"),this.leftOver=null}function A(){m.call(this,"utf-8 encode")}o.utf8encode=function(g){return d.nodebuffer?a.newBufferFrom(g,"utf-8"):(function(C){var _,S,I,P,F,L=C.length,z=0;for(P=0;P<L;P++)(64512&(S=C.charCodeAt(P)))==55296&&P+1<L&&(64512&(I=C.charCodeAt(P+1)))==56320&&(S=65536+(S-55296<<10)+(I-56320),P++),z+=S<128?1:S<2048?2:S<65536?3:4;for(_=d.uint8array?new Uint8Array(z):new Array(z),P=F=0;F<z;P++)(64512&(S=C.charCodeAt(P)))==55296&&P+1<L&&(64512&(I=C.charCodeAt(P+1)))==56320&&(S=65536+(S-55296<<10)+(I-56320),P++),S<128?_[F++]=S:(S<2048?_[F++]=192|S>>>6:(S<65536?_[F++]=224|S>>>12:(_[F++]=240|S>>>18,_[F++]=128|S>>>12&63),_[F++]=128|S>>>6&63),_[F++]=128|63&S);return _})(g)},o.utf8decode=function(g){return d.nodebuffer?r.transformTo("nodebuffer",g).toString("utf-8"):(function(C){var _,S,I,P,F=C.length,L=new Array(2*F);for(_=S=0;_<F;)if((I=C[_++])<128)L[S++]=I;else if(4<(P=v[I]))L[S++]=65533,_+=P-1;else{for(I&=P===2?31:P===3?15:7;1<P&&_<F;)I=I<<6|63&C[_++],P--;1<P?L[S++]=65533:I<65536?L[S++]=I:(I-=65536,L[S++]=55296|I>>10&1023,L[S++]=56320|1023&I)}return L.length!==S&&(L.subarray?L=L.subarray(0,S):L.length=S),r.applyFromCharCode(L)})(g=r.transformTo(d.uint8array?"uint8array":"array",g))},r.inherits(u,m),u.prototype.processChunk=function(g){var C=r.transformTo(d.uint8array?"uint8array":"array",g.data);if(this.leftOver&&this.leftOver.length){if(d.uint8array){var _=C;(C=new Uint8Array(_.length+this.leftOver.length)).set(this.leftOver,0),C.set(_,this.leftOver.length)}else C=this.leftOver.concat(C);this.leftOver=null}var S=(function(P,F){var L;for((F=F||P.length)>P.length&&(F=P.length),L=F-1;0<=L&&(192&P[L])==128;)L--;return L<0||L===0?F:L+v[P[L]]>F?L:F})(C),I=C;S!==C.length&&(d.uint8array?(I=C.subarray(0,S),this.leftOver=C.subarray(S,C.length)):(I=C.slice(0,S),this.leftOver=C.slice(S,C.length))),this.push({data:o.utf8decode(I),meta:g.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=u,r.inherits(A,m),A.prototype.processChunk=function(g){this.push({data:o.utf8encode(g.data),meta:g.meta})},o.Utf8EncodeWorker=A},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,c,o){var r=s("./support"),d=s("./base64"),a=s("./nodejsUtils"),m=s("./external");function v(_){return _}function p(_,S){for(var I=0;I<_.length;++I)S[I]=255&_.charCodeAt(I);return S}s("setimmediate"),o.newBlob=function(_,S){o.checkSupport("blob");try{return new Blob([_],{type:S})}catch{try{var I=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return I.append(_),I.getBlob(S)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(_,S,I){var P=[],F=0,L=_.length;if(L<=I)return String.fromCharCode.apply(null,_);for(;F<L;)S==="array"||S==="nodebuffer"?P.push(String.fromCharCode.apply(null,_.slice(F,Math.min(F+I,L)))):P.push(String.fromCharCode.apply(null,_.subarray(F,Math.min(F+I,L)))),F+=I;return P.join("")},stringifyByChar:function(_){for(var S="",I=0;I<_.length;I++)S+=String.fromCharCode(_[I]);return S},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function A(_){var S=65536,I=o.getTypeOf(_),P=!0;if(I==="uint8array"?P=u.applyCanBeUsed.uint8array:I==="nodebuffer"&&(P=u.applyCanBeUsed.nodebuffer),P)for(;1<S;)try{return u.stringifyByChunk(_,I,S)}catch{S=Math.floor(S/2)}return u.stringifyByChar(_)}function g(_,S){for(var I=0;I<_.length;I++)S[I]=_[I];return S}o.applyFromCharCode=A;var C={};C.string={string:v,array:function(_){return p(_,new Array(_.length))},arraybuffer:function(_){return C.string.uint8array(_).buffer},uint8array:function(_){return p(_,new Uint8Array(_.length))},nodebuffer:function(_){return p(_,a.allocBuffer(_.length))}},C.array={string:A,array:v,arraybuffer:function(_){return new Uint8Array(_).buffer},uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return a.newBufferFrom(_)}},C.arraybuffer={string:function(_){return A(new Uint8Array(_))},array:function(_){return g(new Uint8Array(_),new Array(_.byteLength))},arraybuffer:v,uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return a.newBufferFrom(new Uint8Array(_))}},C.uint8array={string:A,array:function(_){return g(_,new Array(_.length))},arraybuffer:function(_){return _.buffer},uint8array:v,nodebuffer:function(_){return a.newBufferFrom(_)}},C.nodebuffer={string:A,array:function(_){return g(_,new Array(_.length))},arraybuffer:function(_){return C.nodebuffer.uint8array(_).buffer},uint8array:function(_){return g(_,new Uint8Array(_.length))},nodebuffer:v},o.transformTo=function(_,S){if(S=S||"",!_)return S;o.checkSupport(_);var I=o.getTypeOf(S);return C[I][_](S)},o.resolve=function(_){for(var S=_.split("/"),I=[],P=0;P<S.length;P++){var F=S[P];F==="."||F===""&&P!==0&&P!==S.length-1||(F===".."?I.pop():I.push(F))}return I.join("/")},o.getTypeOf=function(_){return typeof _=="string"?"string":Object.prototype.toString.call(_)==="[object Array]"?"array":r.nodebuffer&&a.isBuffer(_)?"nodebuffer":r.uint8array&&_ instanceof Uint8Array?"uint8array":r.arraybuffer&&_ instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(_){if(!r[_.toLowerCase()])throw new Error(_+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(_){var S,I,P="";for(I=0;I<(_||"").length;I++)P+="\\x"+((S=_.charCodeAt(I))<16?"0":"")+S.toString(16).toUpperCase();return P},o.delay=function(_,S,I){setImmediate(function(){_.apply(I||null,S||[])})},o.inherits=function(_,S){function I(){}I.prototype=S.prototype,_.prototype=new I},o.extend=function(){var _,S,I={};for(_=0;_<arguments.length;_++)for(S in arguments[_])Object.prototype.hasOwnProperty.call(arguments[_],S)&&I[S]===void 0&&(I[S]=arguments[_][S]);return I},o.prepareContent=function(_,S,I,P,F){return m.Promise.resolve(S).then(function(L){return r.blob&&(L instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(L))!==-1)&&typeof FileReader<"u"?new m.Promise(function(z,V){var X=new FileReader;X.onload=function(J){z(J.target.result)},X.onerror=function(J){V(J.target.error)},X.readAsArrayBuffer(L)}):L}).then(function(L){var z=o.getTypeOf(L);return z?(z==="arraybuffer"?L=o.transformTo("uint8array",L):z==="string"&&(F?L=d.decode(L):I&&P!==!0&&(L=(function(V){return p(V,r.uint8array?new Uint8Array(V.length):new Array(V.length))})(L))),L):m.Promise.reject(new Error("Can't read the data of '"+_+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,c,o){var r=s("./reader/readerFor"),d=s("./utils"),a=s("./signature"),m=s("./zipEntry"),v=s("./support");function p(u){this.files=[],this.loadOptions=u}p.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var A=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+d.pretty(A)+", expected "+d.pretty(u)+")")}},isSignature:function(u,A){var g=this.reader.index;this.reader.setIndex(u);var C=this.reader.readString(4)===A;return this.reader.setIndex(g),C},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),A=v.uint8array?"uint8array":"array",g=d.transformTo(A,u);this.zipComment=this.loadOptions.decodeFileName(g)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,A,g,C=this.zip64EndOfCentralSize-44;0<C;)u=this.reader.readInt(2),A=this.reader.readInt(4),g=this.reader.readData(A),this.zip64ExtensibleData[u]={id:u,length:A,value:g}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,A;for(u=0;u<this.files.length;u++)A=this.files[u],this.reader.setIndex(A.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),A.readLocalPart(this.reader),A.handleUTF8(),A.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(u=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
3ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var A=u;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var g=this.centralDirOffset+this.centralDirSize;this.zip64&&(g+=20,g+=12+this.zip64EndOfCentralSize);var C=A-g;if(0<C)this.isSignature(A,a.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(u){this.reader=r(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=p},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,c,o){var r=s("./reader/readerFor"),d=s("./utils"),a=s("./compressedObject"),m=s("./crc32"),v=s("./utf8"),p=s("./compressions"),u=s("./support");function A(g,C){this.options=g,this.loadOptions=C}A.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(g){var C,_;if(g.skip(22),this.fileNameLength=g.readInt(2),_=g.readInt(2),this.fileName=g.readData(this.fileNameLength),g.skip(_),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((C=(function(S){for(var I in p)if(Object.prototype.hasOwnProperty.call(p,I)&&p[I].magic===S)return p[I];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+d.pretty(this.compressionMethod)+" unknown (inner file : "+d.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,C,g.readData(this.compressedSize))},readCentralPart:function(g){this.versionMadeBy=g.readInt(2),g.skip(2),this.bitFlag=g.readInt(2),this.compressionMethod=g.readString(2),this.date=g.readDate(),this.crc32=g.readInt(4),this.compressedSize=g.readInt(4),this.uncompressedSize=g.readInt(4);var C=g.readInt(2);if(this.extraFieldsLength=g.readInt(2),this.fileCommentLength=g.readInt(2),this.diskNumberStart=g.readInt(2),this.internalFileAttributes=g.readInt(2),this.externalFileAttributes=g.readInt(4),this.localHeaderOffset=g.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");g.skip(C),this.readExtraFields(g),this.parseZIP64ExtraField(g),this.fileComment=g.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var g=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),g==0&&(this.dosPermissions=63&this.externalFileAttributes),g==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var g=r(this.extraFields[1].value);this.uncompressedSize===d.MAX_VALUE_32BITS&&(this.uncompressedSize=g.readInt(8)),this.compressedSize===d.MAX_VALUE_32BITS&&(this.compressedSize=g.readInt(8)),this.localHeaderOffset===d.MAX_VALUE_32BITS&&
vendor: 54,598 bytes, line 3
3(this.localHeaderOffset=g.readInt(8)),this.diskNumberStart===d.MAX_VALUE_32BITS&&(this.diskNumberStart=g.readInt(4))}},readExtraFields:function(g){var C,_,S,I=g.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});g.index+4<I;)C=g.readInt(2),_=g.readInt(2),S=g.readData(_),this.extraFields[C]={id:C,length:_,value:S};g.setIndex(I)},handleUTF8:function(){var g=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=v.utf8decode(this.fileName),this.fileCommentStr=v.utf8decode(this.fileComment);else{var C=this.findExtraFieldUnicodePath();if(C!==null)this.fileNameStr=C;else{var _=d.transformTo(g,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(_)}var S=this.findExtraFieldUnicodeComment();if(S!==null)this.fileCommentStr=S;else{var I=d.transformTo(g,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(I)}}},findExtraFieldUnicodePath:function(){var g=this.extraFields[28789];if(g){var C=r(g.value);return C.readInt(1)!==1||m(this.fileName)!==C.readInt(4)?null:v.utf8decode(C.readData(g.length-5))}return null},findExtraFieldUnicodeComment:function(){var g=this.extraFields[25461];if(g){var C=r(g.value);return C.readInt(1)!==1||m(this.fileComment)!==C.readInt(4)?null:v.utf8decode(C.readData(g.length-5))}return null}},c.exports=A},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,c,o){function r(C,_,S){this.name=C,this.dir=S.dir,this.date=S.date,this.comment=S.comment,this.unixPermissions=S.unixPermissions,this.dosPermissions=S.dosPermissions,this._data=_,this._dataBinary=S.binary,this.options={compression:S.compression,compressionOptions:S.compressionOptions}}var d=s("./stream/StreamHelper"),a=s("./stream/DataWorker"),m=s("./utf8"),v=s("./compressedObject"),p=s("./stream/GenericWorker");r.prototype={internalStream:function(C){var _=null,S="string";try{if(!C)throw new Error("No output type specified.");var I=(S=C.toLowerCase())==="string"||S==="text";S!=="binarystring"&&S!=="text"||(S="string"),_=this._decompressWorker();var P=!this._dataBinary;P&&!I&&(_=_.pipe(new m.Utf8EncodeWorker)),!P&&I&&(_=_.pipe(new m.Utf8DecodeWorker))}catch(F){(_=new p("error")).error(F)}return new d(_,S,"")},async:function(C,_){return this.internalStream(C).accumulate(_)},nodeStream:function(C,_){return this.internalStream(C||"nodebuffer").toNodejsStream(_)},_compressWorker:function(C,_){if(this._data instanceof v&&this._data.compression.magic===C.magic)return this._data.getCompressedWorker();var S=this._decompressWorker();return this._dataBinary||(S=S.pipe(new m.Utf8EncodeWorker)),v.createWorkerFrom(S,C,_)},_decompressWorker:function(){return this._data instanceof v?this._data.getContentWorker():this._data instanceof p?this._data:new a(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],A=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},g=0;g<u.length;g++)r.prototype[u[g]]=A;c.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,c,o){(function(r){var d,a,m=r.MutationObserver||r.WebKitMutationObserver;if(m){var v=0,p=new m(C),u=r.document.createTextNode("");p.observe(u,{characterData:!0}),d=function(){u.data=v=++v%2}}else if(r.setImmediate||r.MessageChannel===void 0)d="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var _=r.document.createElement("script");_.onreadystatechange=function(){C(),_.onreadystatechange=null,_.parentNode.removeChild(_),_=null},r.document.documentElement.appendChild(_)}:function(){setTimeout(C,0)};else{var A=new r.MessageChannel;A.port1.onmessage=C,d=function(){A.port2.postMessage(0)}}var g=[];function C(){var _,S;a=!0;for(var I=g.length;I;){for(S=g,g=[],_=-1;++_<I;)S[_]();I=g.length}a=!1}c.exports=function(_){g.push(_)!==1||a||d()}}).call(this,typeof ct<"u"?ct:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,c,o){var r=s("immediate");function d(){}var a={},m=["REJECTED"],v=["FULFILLED"],p=["PENDING"];function u(I){if(typeof I!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,I!==d&&_(this,I)}function A(I,P,F){this.promise=I,typeof P=="function"&&(this.onFulfilled=P,this.callFulfilled=this.otherCallFulfilled),typeof F=="function"&&(this.onRejected=F,this.callRejected=this.otherCallRejected)}function g(I,P,F){r(function(){var L;try{L=P(F)}catch(z){return a.reject(I,z)}L===I?a.reject(I,new TypeError("Cannot resolve promise with itself")):a.resolve(I,L)})}function C(I){var P=I&&I.then;if(I&&(typeof I=="object"||typeof I=="function")&&typeof P=="function")return function(){P.apply(I,arguments)}}function _(I,P){var F=!1;function L(X){F||(F=!0,a.reject(I,X))}function z(X){F||(F=!0,a.resolve(I,X))}var V=S(function(){P(z,L)});V.status==="error"&&L(V.value)}function S(I,P){var F={};try{F.value=I(P),F.status="success"}catch(L){F.status="error",F.value=L}return F}(c.exports=u).prototype.finally=function(I){if(typeof I!="function")return this;var P=this.constructor;return this.then(function(F){return P.resolve(I()).then(function(){return F})},function(F){return P.resolve(I()).then(function(){throw F})})},u.prototype.catch=function(I){return this.then(null,I)},u.prototype.then=function(I,P){if(typeof I!="function"&&this.state===v||typeof P!="function"&&this.state===m)return this;var F=new this.constructor(d);return this.state!==p?g(F,this.state===v?I:P,this.outcome):this.queue.push(new A(F,I,P)),F},A.prototype.callFulfilled=function(I){a.resolve(this.promise,I)},A.prototype.otherCallFulfilled=function(I){g(this.promise,this.onFulfilled,I)},A.prototype.callRejected=function(I){a.reject(this.promise,I)},A.prototype.otherCallRejected=function(I){g(this.promise,this.onRejected,I)},a.resolve=function(I,P){var F=S(C,P);if(F.status==="error")return a.reject(I,F.value);var L=F.value;if(L)_(I,L);else{I.state=v,I.outcome=P;for(var z=-1,V=I.queue.length;++z<V;)I.queue[z].callFulfilled(P)}return I},a.reject=function(I,P){I.state=m,I.outcome=P;for(var F=-1,L=I.queue.length;++F<L;)I.queue[F].callRejected(P);return I},u.resolve=function(I){return I instanceof this?I:a.resolve(new this(d),I)},u.reject=function(I){var P=new this(d);return a.reject(P,I)},u.all=function(I){var P=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=I.length,L=!1;if(!F)return this.resolve([]);for(var z=new Array(F),V=0,X=-1,J=new this(d);++X<F;)G(I[X],X);return J;function G(U,me){P.resolve(U).then(function($){z[me]=$,++V!==F||L||(L=!0,a.resolve(J,z))},function($){L||(L=!0,a.reject(J,$))})}},u.race=function(I){var P=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var F=I.length,L=!1;if(!F)return this.resolve([]);for(var z=-1,V=new this(d);++z<F;)X=I[z],P.resolve(X).then(function(J){L||(L=!0,a.resolve(V,J))},function(J){L||(L=!0,a.reject(V,J))});var X;return V}},{immediate:36}],38:[function(s,c,o){var r={};(0,s("./lib/utils/common").assign)(r,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),c.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,c,o){var r=s("./zlib/deflate"),d=s("./utils/common"),a=s("./utils/strings"),m=s("./zlib/messages"),v=s("./zlib/zstream"),p=Object.prototype.toString,u=0,A=-1,g=0,C=8;function _(I){if(!(this instanceof _))return new _(I);this.options=d.assign({level:A,method:C,chunkSize:16384,windowBits:15,memLevel:8,strategy:g,to:""},I||{});var P=this.options;P.raw&&0<P.windowBits?P.windowBits=-P.windowBits:P.gzip&&0<P.windowBits&&P.windowBits<16&&(P.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var F=r.deflateInit2(this.strm,P.level,P.method,P.windowBits,P.memLevel,P.strategy);if(F!==u)throw new Error(m[F]);if(P.header&&r.deflateSetHeader(this.strm,P.header),P.dictionary){var L;if(L=typeof P.dictionary=="string"?a.string2buf(P.dictionary):p.call(P.dictionary)==="[object ArrayBuffer]"?new Uint8Array(P.dictionary):P.dictionary,(F=r.deflateSetDictionary(this.strm,L))!==u)throw new Error(m[F]);this._dict_set=!0}}function S(I,P){var F=new _(P);if(F.push(I,!0),F.err)throw F.msg||m[F.err];return F.result}_.prototype.push=function(I,P){var F,L,z=this.strm,V=this.options.chunkSize;if(this.ended)return!1;L=P===~~P?P:P===!0?4:0,typeof I=="string"?z.input=a.string2buf(I):p.call(I)==="[object ArrayBuffer]"?z.input=new Uint8Array(I):z.input=I,z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0&&(z.output=new d.Buf8(V),z.next_out=0,z.avail_out=V),(F=r.deflate(z,L))!==1&&F!==u)return this.onEnd(F),!(this.ended=!0);z.avail_out!==0&&(z.avail_in!==0||L!==4&&L!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(d.shrinkBuf(z.output,z.next_out))):this.onData(d.shrinkBuf(z.output,z.next_out)))}while((0<z.avail_in||z.avail_out===0)&&F!==1);return L===4?(F=r.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===u):L!==2||(this.onEnd(u),!(z.avail_out=0))},_.prototype.onData=function(I){this.chunks.push(I)},_.prototype.onEnd=function(I){I===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=I,this.msg=this.strm.msg},o.Deflate=_,o.deflate=S,o.deflateRaw=function(I,P){return(P=P||{}).raw=!0,S(I,P)},o.gzip=function(I,P){return(P=P||{}).gzip=!0,S(I,P)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,c,o){var r=s("./zlib/inflate"),d=s("./utils/common"),a=s("./utils/strings"),m=s("./zlib/constants"),v=s("./zlib/messages"),p=s("./zlib/zstream"),u=s("./zlib/gzheader"),A=Object.prototype.toString;function g(_){if(!(this instanceof g))return new g(_);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},_||{});var S=this.options;S.raw&&0<=S.windowBits&&S.windowBits<16&&(S.windowBits=-S.windowBits,S.windowBits===0&&(S.windowBits=-15)),!(0<=S.windowBits&&S.windowBits<16)||_&&_.windowBits||(S.windowBits+=32),15<S.windowBits&&S.windowBits<48&&(15&S.windowBits)==0&&(S.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var I=r.inflateInit2(this.strm,S.windowBits);if(I!==m.Z_OK)throw new Error(v[I]);this.header=new u,r.inflateGetHeader(this.strm,this.header)}function C(_,S){var I=new g(S);if(I.push(_,!0),I.err)throw I.msg||v[I.err];return I.result}g.prototype.push=function(_,S){var I,P,F,L,z,V,X=this.strm,J=this.options.chunkSize,G=this.options.dictionary,U=!1;if(this.ended)return!1;P=S===~~S?S:S===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof _=="string"?X.input=a.binstring2buf(_):A.call(_)==="[object ArrayBuffer]"?X.input=new Uint8Array(_):X.input=_,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new d.Buf8(J),X.next_out=0,X.avail_out=J),(I=r.inflate(X,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&G&&(V=typeof G=="string"?a.string2buf(G):A.call(G)==="[object ArrayBuffer]"?new Uint8Array(G):G,I=r.inflateSetDictionary(this.strm,V)),I===m.Z_BUF_ERROR&&U===!0&&(I=m.Z_OK,U=!1),I!==m.Z_STREAM_END&&I!==m.Z_OK)return this.onEnd(I),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&I!==m.Z_STREAM_END&&(X.avail_in!==0||P!==m.Z_FINISH&&P!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(F=a.utf8border(X.output,X.next_out),L=X.next_out-F,z=a.buf2string(X.output,F),X.next_out=L,X.avail_out=J-L,L&&d.arraySet(X.output,X.output,F,L,0),this.onData(z)):this.onData(d.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(U=!0)}while((0<X.avail_in||X.avail_out===0)&&I!==m.Z_STREAM_END);return I===m.Z_STREAM_END&&(P=m.Z_FINISH),P===m.Z_FINISH?(I=r.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===m.Z_OK):P!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(X.avail_out=0))},g.prototype.onData=function(_){this.chunks.push(_)},g.prototype.onEnd=function(_){_===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},o.Inflate=g,o.inflate=C,o.inflateRaw=function(_,S){return(S=S||{}).raw=!0,C(_,S)},o.ungzip=C},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,c,o){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(m){for(var v=Array.prototype.slice.call(arguments,1);v.length;){var p=v.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var u in p)p.hasOwnProperty(u)&&(m[u]=p[u])}}return m},o.shrinkBuf=function(m,v){return m.length===v?m:m.subarray?m.subarray(0,v):(m.length=v,m)};var d={arraySet:function(m,v,p,u,A){if(v.subarray&&m.subarray)m.set(v.subarray(p,p+u),A);else for(var g=0;g<u;g++)m[A+g]=v[p+g]},flattenChunks:function(m){var v,p,u,A,g,C;for(v=u=0,p=m.length;v<p;v++)u+=m[v].length;for(C=new Uint8Array(u),v=A=0,p=m.length;v<p;v++)g=m[v],C.set(g,A),A+=g.length;return C}},a={arraySet:function(m,v,p,u,A){for(var g=0;g<u;g++)m[A+g]=v[p+g]},flattenChunks:function(m){return[].concat.apply([],m)}};o.setTyped=function(m){m?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,d)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(r)},{}],42:[function(s,c,o){var r=s("./common"),d=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{d=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var m=new r.Buf8(256),v=0;v<256;v++)m[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;function p(u,A){if(A<65537&&(u.subarray&&a||!u.subarray&&d))return String.fromCharCode.apply(null,r.shrinkBuf(u,A));for(var g="",C=0;C<A;C++)g+=String.fromCharCode(u[C]);return g}m[254]=m[254]=1,o.string2buf=function(u){var A,g,C,_,S,I=u.length,P=0;for(_=0;_<I;_++)(64512&(g=u.charCodeAt(_)))==55296&&_+1<I&&(64512&(C=u.charCodeAt(_+1)))==56320&&(g=65536+(g-55296<<10)+(C-56320),_++),P+=g<128?1:g<2048?2:g<65536?3:4;for(A=new r.Buf8(P),_=S=0;S<P;_++)(64512&(g=u.charCodeAt(_)))==55296&&_+1<I&&(64512&(C=u.charCodeAt(_+1)))==56320&&(g=65536+(g-55296<<10)+(C-56320),_++),g<128?A[S++]=g:(g<2048?A[S++]=192|g>>>6:(g<65536?A[S++]=224|g>>>12:(A[S++]=240|g>>>18,A[S++]=128|g>>>12&63),A[S++]=128|g>>>6&63),A[S++]=128|63&g);return A},o.buf2binstring=function(u){return p(u,u.length)},o.binstring2buf=function(u){for(var A=new r.Buf8(u.length),g=0,C=A.length;g<C;g++)A[g]=u.charCodeAt(g);return A},o.buf2string=function(u,A){var g,C,_,S,I=A||u.length,P=new Array(2*I);for(g=C=0;g<I;)if((_=u[g++])<128)P[C++]=_;else if(4<(S=m[_]))P[C++]=65533,g+=S-1;else{for(_&=S===2?31:S===3?15:7;1<S&&g<I;)_=_<<6|63&u[g++],S--;1<S?P[C++]=65533:_<65536?P[C++]=_:(_-=65536,P[C++]=55296|_>>10&1023,P[C++]=56320|1023&_)}return p(P,C)},o.utf8border=function(u,A){var g;for((A=A||u.length)>u.length&&(A=u.length),g=A-1;0<=g&&(192&u[g])==128;)g--;return g<0||g===0?A:g+m[u[g]]>A?g:A}},{"./common":41}],43:[function(s,c,o){c.exports=function(r,d,a,m){for(var v=65535&r|0,p=r>>>16&65535|0,u=0;a!==0;){for(a-=u=2e3<a?2e3:a;p=p+(v=v+d[m++]|0)|0,--u;);v%=65521,p%=65521}return v|p<<16|0}},{}],44:[function(s,c,o){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,c,o){var r=(function(){for(var d,a=[],m=0;m<256;m++){d=m;for(var v=0;v<8;v++)d=1&d?3988292384^d>>>1:d>>>1;a[m]=d}return a})();c.exports=function(d,a,m,v){var p=r,u=v+m;d^=-1;for(var A=v;A<u;A++)d=d>>>8^p[255&(d^a[A])];return-1^d}},{}],46:[function(s,c,o){var r,d=s("../utils/common"),a=s("./trees"),m=s("./adler32"),v=s("./crc32"),p=s("./messages"),u=0,A=4,g=0,C=-2,_=-1,S=4,I=2,P=8,F=9,L=286,z=30,V=19,X=2*L+1,J=15,G=3,U=258,me=U+G+1,$=42,Y=113,w=1,q=2,O=3,Q=4;function Z(h,ee){return h.msg=p[ee],ee}function H(h){return(h<<1)-(4<h?9:0)}function ae(h){for(var ee=h.length;0<=--ee;)h[ee]=0}function N(h){var ee=h.state,K=ee.pending;K>h.avail_out&&(K=h.avail_out),K!==0&&(d.arraySet(h.output,ee.pending_buf,ee.pending_out,K,h.next_out),h.next_out+=K,ee.pending_out+=K,h.total_out+=K,h.avail_out-=K,ee.pending-=K,ee.pending===0&&(ee.pending_out=0))}function x(h,ee){a._tr_flush_block(h,0<=h.block_start?h.block_start:-1,h.strstart-h.block_start,ee),h.block_start=h.strstart,N(h.strm)}function fe(h,ee){h.pending_buf[h.pending++]=ee}function ce(h,ee){h.pending_buf[h.pending++]=ee>>>8&255,h.pending_buf[h.pending++]=255&ee}function de(h,ee){var K,R,E=h.max_chain_length,B=h.strstart,se=h.prev_length,ie=h.nice_match,W=h.strstart>h.w_size-me?h.strstart-(h.w_size-me):0,ne=h.window,ue=h.w_mask,re=h.prev,he=h.strstart+U,xe=ne[B+se-1],Ce=ne[B+se];h.prev_length>=h.good_match&&(E>>=2),ie>h.lookahead&&(ie=h.lookahead);do if(ne[(K=ee)+se]===Ce&&ne[K+se-1]===xe&&ne[K]===ne[B]&&ne[++K]===ne[B+1]){B+=2,K++;do;while(ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&ne[++B]===ne[++K]&&B<he);if(R=U-(he-B),B=he-U,se<R){if(h.match_start=ee,ie<=(se=R))break;xe=ne[B+se-1],Ce=ne[B+se]}}while((ee=re[ee&ue])>W&&--E!=0);return se<=h.lookahead?se:h.lookahead}function ze(h){var ee,K,R,E,B,se,ie,W,ne,ue,re=h.w_size;do{if(E=h.window_size-h.lookahead-h.strstart,h.strstart>=re+(re-me)){for(d.arraySet(h.window,h.window,re,re,0),h.match_start-=re,h.strstart-=re,h.block_start-=re,ee=K=h.hash_size;R=h.head[--ee],h.head[ee]=re<=R?R-re:0,--K;);for(ee=K=re;R=h.prev[--ee],h.prev[ee]=re<=R?R-re:0,--K;);E+=re}if(h.strm.avail_in===0)break;if(se=h.strm,ie=h.window,W=h.strstart+h.lookahead,ne=E,ue=void 0,ue=se.avail_in,ne<ue&&(ue=ne),K=ue===0?0:(se.avail_in-=ue,d.arraySet(ie,se.input,se.next_in,ue,W),se.state.wrap===1?se.adler=m(se.adler,ie,ue,W):se.state.wrap===2&&(se.adler=v(se.adler,ie,ue,W)),se.next_in+=ue,se.total_in+=ue,ue),h.lookahead+=K,h.lookahead+h.insert>=G)for(B=h.strstart-h.insert,h.ins_h=h.window[B],h.ins_h=(h.ins_h<<h.hash_shift^h.window[B+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[B+G-1])&h.hash_mask,h.prev[B&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=B,B++,h.insert--,!(h.lookahead+h.insert<G)););}while(h.lookahead<me&&h.strm.avail_in!==0)}function Ge(h,ee){for(var K,R;;){if(h.lookahead<me){if(ze(h),h.lookahead<me&&ee===u)return w;if(h.lookahead===0)break}if(K=0,h.lookahead>=G&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+G-1])&h.hash_mask,K=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),K!==0&&h.strstart-K<=h.w_size-me&&(h.match_length=de(h,K)),h.match_length>=G)if(R=a._tr_tally(h,h.strstart-h.match_start,h.match_length-G),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=G){for(h.match_length--;h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+G-1])&h.hash_mask,K=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart,--h.match_length!=0;);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else R=a._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(R&&(x(h,!1),h.strm.avail_out===0))return w}return h.insert=h.strstart<G-1?h.strstart:G-1,ee===A?(x(h,!0),h.strm.avail_out===0?O:Q):h.last_lit&&(x(h,!1),h.strm.avail_out===0)?w:q}function Ie(h,ee){for(var K,R,E;;){if(h.lookahead<me){if(ze(h),h.lookahead<me&&ee===u)return w;if(h.lookahead===0)break}if(K=0,h.lookahead>=G&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+G-1])&h.hash_mask,K=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=G-1,K!==0&&h.prev_length<h.max_lazy_match&&h.strstart-K<=h.w_size-me&&(h.match_length=de(h,K),h.match_length<=5&&(h.strategy===1||h.match_length===G&&4096<h.strstart-h.match_start)&&(h.match_length=G-1)),h.prev_length>=G&&h.match_length<=h.prev_length){for(E=h.strstart+h.lookahead-G,R=a._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-G),h.lookahead-=h.prev_length-1,h.prev_length-=2;++h.strstart<=E&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+G-1])&h.hash_mask,K=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),--h.prev_length!=0;);if(h.match_available=0,h.match_length=G-1,h.strstart++,R&&(x(h,!1),h.strm.avail_out===0))return w}else if(h.match_available){if((R=a._tr_tally(h,0,h.window[h.strstart-1]))&&x(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return w}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(R=a._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<G-1?h.strstart:G-1,ee===A?(x(h,!0),h.strm.avail_out===0?O:Q):h.last_lit&&(x(h,!1),h.strm.avail_out===0)?w:q}function Pe(h,ee,K,R,E){this.good_length=h,this.max_lazy=ee,this.nice_length=K,this.max_chain=R,this.func=E}function Ue(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new d.Buf16(2*X),this.dyn_dtree=new d.Buf16(2*(2*z+1)),this.bl_tree=new d.Buf16(2*(2*V+1)),ae(this.dyn_ltree),ae(this.dyn_dtree),ae(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new d.Buf16(J+1),this.heap=new d.Buf16(2*L+1),ae(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.Buf16(2*L+1),ae(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Le(h){var ee;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=I,(ee=h.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?$:Y,h.adler=ee.wrap===2?0:1,ee.last_flush=u,a._tr_init(ee),g):Z(h,C)}function st(h){var ee=Le(h);return ee===g&&(function(K){K.window_size=2*K.w_size,ae(K.head),K.max_lazy_match=r[K.level].max_lazy,K.good_match=r[K.level].good_length,K.nice_match=r[K.level].nice_length,K.max_chain_length=r[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=G-1,K.match_available=0,K.ins_h=0})(h.state),ee}function tt(h,ee,K,R,E,B){if(!h)return C;var se=1;if(ee===_&&(ee=6),R<0?(se=0,R=-R):15<R&&(se=2,R-=16),E<1||F<E||K!==P||R<8||15<R||ee<0||9<ee||B<0||S<B)return Z(h,C);R===8&&(R=9);var ie=new Ue;return(h.state=ie).strm=h,ie.wrap=se,ie.gzhead=null,ie.w_bits=R,ie.w_size=1<<ie.w_bits,ie.w_mask=ie.w_size-1,ie.hash_bits=E+7,ie.hash_size=1<<ie.hash_bits,ie.hash_mask=ie.hash_size-1,ie.hash_shift=~~((ie.hash_bits+G-1)/G),ie.window=new d.Buf8(2*ie.w_size),ie.head=new d.Buf16(ie.hash_size),ie.prev=new d.Buf16(ie.w_size),ie.lit_bufsize=1<<E+6,ie.pending_buf_size=4*ie.lit_bufsize,ie.pending_buf=new d.Buf8(ie.pending_buf_size),ie.d_buf=1*ie.lit_bufsize,ie.l_buf=3*ie.lit_bufsize,ie.level=ee,ie.strategy=B,ie.method=K,st(h)}r=[new Pe(0,0,0,0,function(h,ee){var K=65535;for(K>h.pending_buf_size-5&&(K=h.pending_buf_size-5);;){if(h.lookahead<=1){if(ze(h),h.lookahead===0&&ee===u)return w;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var R=h.block_start+K;if((h.strstart===0||h.strstart>=R)&&(h.lookahead=h.strstart-R,h.strstart=R,x(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-me&&(x(h,!1),h.strm.avail_out===0))return w}return h.insert=0,ee===A?(x(h,!0),h.strm.avail_out===0?O:Q):(h.strstart>h.block_start&&(x(h,!1),h.strm.avail_out),w)}),new Pe(4,4,8,4,Ge),new Pe(4,5,16,8,Ge),new Pe(4,6,32,32,Ge),new Pe(4,4,16,16,Ie),new Pe(8,16,32,32,Ie),new Pe(8,16,128,128,Ie),new Pe(8,32,128,256,Ie),new Pe(32,128,258,1024,Ie),new Pe(32,258,258,4096,Ie)],o.deflateInit=function(h,ee){return tt(h,ee,P,15,8,0)},o.deflateInit2=tt,o.deflateReset=st,o.deflateResetKeep=Le,o.deflateSetHeader=function(h,ee){return h&&h.state?h.state.wrap!==2?C:(h.state.gzhead=ee,g):C},o.deflate=function(h,ee){var K,R,E,B;if(!h||!h.state||5<ee||ee<0)return h?Z(h,C):C;if(R=h.state,!h.output||!h.input&&h.avail_in!==0||R.status===666&&ee!==A)return Z(h,h.avail_out===0?-5:C);if(R.strm=h,K=R.last_flush,R.last_flush=ee,R.status===$)if(R.wrap===2)h.adler=0,fe(R,31),fe(R,139),fe(R,8),R.gzhead?(fe(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),fe(R,255&R.gzhead.time),fe(R,R.gzhead.time>>8&255),fe(R,R.gzhead.time>>16&255),fe(R,R.gzhead.time>>24&255),fe(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),fe(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(fe(R,255&R.gzhead.extra.length),fe(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(h.adler=v(h.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(fe(R,0),fe(R,0),fe(R,0),fe(R,0),fe(R,0),fe(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),fe(R,3),R.status=Y);else{var se=P+(R.w_bits-8<<4)<<8;se|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(se|=32),se+=31-se%31,R.status=Y,ce(R,se),R.strstart!==0&&(ce(R,h.adler>>>16),ce(R,65535&h.adler)),h.adler=1}if(R.status===69)if(R.gzhead.extra){for(E=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),N(h),E=R.pending,R.pending!==R.pending_buf_size));)fe(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){E=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),N(h),E=R.pending,R.pending===R.pending_buf_size)){B=1;break}B=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,fe(R,B)}while(B!==0);R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),B===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){E=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),N(h),E=R.pending,R.pending===R.pending_buf_size)){B=1;break}B=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,fe(R,B)}while(B!==0);R.gzhead.hcrc&&R.pending>E&&(h.adler=v(h.adler,R.pending_buf,R.pending-E,E)),B===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&N(h),R.pending+2<=R.pending_buf_size&&(fe(R,255&h.adler),fe(R,h.adler>>8&255),h.adler=0,R.status=Y)):R.status=Y),R.pending!==0){if(N(h),h.avail_out===0)return R.last_flush=-1,g}else if(h.avail_in===0&&H(ee)<=H(K)&&ee!==A)return Z(h,-5);if(R.status===666&&h.avail_in!==0)return Z(h,-5);if(h.avail_in!==0||R.lookahead!==0||ee!==u&&R.status!==666){var ie=R.strategy===2?(function(W,ne){for(var ue;;){if(W.lookahead===0&&(ze(W),W.lookahead===0)){if(ne===u)return w;break}if(W.match_length=0,ue=a._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++,ue&&(x(W,!1),W.strm.avail_out===0))return w}return W.insert=0,ne===A?(x(W,!0),W.strm.avail_out===0?O:Q):W.last_lit&&(x(W,!1),W.strm.avail_out===0)?w:q})(R,ee):R.strategy===3?(function(W,ne){for(var ue,re,he,xe,Ce=W.window;;){if(W.lookahead<=U){if(ze(W),W.lookahead<=U&&ne===u)return w;if(W.lookahead===0)break}if(W.match_length=0,W.lookahead>=G&&0<W.strstart&&(re=Ce[he=W.strstart-1])===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]){xe=W.strstart+U;do;while(re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&re===Ce[++he]&&he<xe);W.match_length=U-(xe-he),W.match_length>W.lookahead&&(W.match_length=W.lookahead)}if(W.match_length>=G?(ue=a._tr_tally(W,1,W.match_length-G),W.lookahead-=W.match_length,W.strstart+=W.match_length,W.match_length=0):(ue=a._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++),ue&&(x(W,!1),W.strm.avail_out===0))return w}return W.insert=0,ne===A?(x(W,!0),W.strm.avail_out===0?O:Q):W.last_lit&&(x(W,!1),W.strm.avail_out===0)?w:q})(R,ee):r[R.level].func(R,ee);if(ie!==O&&ie!==Q||(R.status=666),ie===w||ie===O)return h.avail_out===0&&(R.last_flush=-1),g;if(ie===q&&(ee===1?a._tr_align(R):ee!==5&&(a._tr_stored_block(R,0,0,!1),ee===3&&(ae(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),N(h),h.avail_out===0))return R.last_flush=-1,g}return ee!==A?g:R.wrap<=0?1:(R.wrap===2?(fe(R,255&h.adler),fe(R,h.adler>>8&255),fe(R,h.adler>>16&255),fe(R,h.adler>>24&255),fe(R,255&h.total_in),fe(R,h.total_in>>8&255),fe(R,h.total_in>>16&255),fe(R,h.total_in>>24&255)):(ce(R,h.adler>>>16),ce(R,65535&h.adler)),N(h),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?g:1)},o.deflateEnd=function(h){var ee;return h&&h.state?(ee=h.state.status)!==$&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==Y&&ee!==666?Z(h,C):(h.state=null,ee===Y?Z(h,-3):g):C},o.deflateSetDictionary=function(h,ee){var K,R,E,B,se,ie,W,ne,ue=ee.length;if(!h||!h.state||(B=(K=h.state).wrap)===2||B===1&&K.status!==$||K.lookahead)return C;for(B===1&&(h.adler=m(h.adler,ee,ue,0)),K.wrap=0,ue>=K.w_size&&(B===0&&(ae(K.head),K.strstart=0,K.block_start=0,K.insert=0),ne=new d.Buf8(K.w_size),d.arraySet(ne,ee,ue-K.w_size,K.w_size,0),ee=ne,ue=K.w_size),se=h.avail_in,ie=h.next_in,W=h.input,h.avail_in=ue,h.next_in=0,h.input=ee,ze(K);K.lookahead>=G;){for(R=K.strstart,E=K.lookahead-(G-1);K.ins_h=(K.ins_h<<K.hash_shift^K.window[R+G-1])&K.hash_mask,K.prev[R&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=R,R++,--E;);K.strstart=R,K.lookahead=G-1,ze(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=G-1,K.match_available=0,h.next_in=ie,h.input=W,h.avail_in=se,K.wrap=B,g},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,c,o){c.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,c,o){c.exports=function(r,d){var a,m,v,p,u,A,g,C,_,S,I,P,F,L,z,V,X,J,G,U,me,$,Y,w,q;a=r.state,m=r.next_in,w=r.input,v=m+(r.avail_in-5),p=r.next_out,q=r.output,u=p-(d-r.avail_out),A=p+(r.avail_out-257),g=a.dmax,C=a.wsize,_=a.whave,S=a.wnext,I=a.window,P=a.hold,F=a.bits,L=a.lencode,z=a.distcode,V=(1<<a.lenbits)-1,X=(1<<a.distbits)-1;e:do{F<15&&(P+=w[m++]<<F,F+=8,P+=w[m++]<<F,F+=8),J=L[P&V];t:for(;;){if(P>>>=G=J>>>24,F-=G,(G=J>>>16&255)===0)q[p++]=65535&J;else{if(!(16&G)){if((64&G)==0){J=L[(65535&J)+(P&(1<<G)-1)];continue t}if(32&G){a.mode=12;break e}r.msg="invalid literal/length code",a.mode=30;break e}U=65535&J,(G&=15)&&(F<G&&(P+=w[m++]<<F,F+=8),U+=P&(1<<G)-1,P>>>=G,F-=G),F<15&&(P+=w[m++]<<F,F+=8,P+=w[m++]<<F,F+=8),J=z[P&X];s:for(;;){if(P>>>=G=J>>>24,F-=G,!(16&(G=J>>>16&255))){if((64&G)==0){J=z[(65535&J)+(P&(1<<G)-1)];continue s}r.msg="invalid distance code",a.mode=30;break e}if(me=65535&J,F<(G&=15)&&(P+=w[m++]<<F,(F+=8)<G&&(P+=w[m++]<<F,F+=8)),g<(me+=P&(1<<G)-1)){r.msg="invalid distance too far back",a.mode=30;break e}if(P>>>=G,F-=G,(G=p-u)<me){if(_<(G=me-G)&&a.sane){r.msg="invalid distance too far back",a.mode=30;break e}if(Y=I,($=0)===S){if($+=C-G,G<U){for(U-=G;q[p++]=I[$++],--G;);$=p-me,Y=q}}else if(S<G){if($+=C+S-G,(G-=S)<U){for(U-=G;q[p++]=I[$++],--G;);if($=0,S<U){for(U-=G=S;q[p++]=I[$++],--G;);$=p-me,Y=q}}}else if($+=S-G,G<U){for(U-=G;q[p++]=I[$++],--G;);$=p-me,Y=q}for(;2<U;)q[p++]=Y[$++],q[p++]=Y[$++],q[p++]=Y[$++],U-=3;U&&(q[p++]=Y[$++],1<U&&(q[p++]=Y[$++]))}else{for($=p-me;q[p++]=q[$++],q[p++]=q[$++],q[p++]=q[$++],2<(U-=3););U&&(q[p++]=q[$++],1<U&&(q[p++]=q[$++]))}break}}break}}while(m<v&&p<A);m-=U=F>>3,P&=(1<<(F-=U<<3))-1,r.next_in=m,r.next_out=p,r.avail_in=m<v?v-m+5:5-(m-v),r.avail_out=p<A?A-p+257:257-(p-A),a.hold=P,a.bits=F}},{}],49:[function(s,c,o){var r=s("../utils/common"),d=s("./adler32"),a=s("./crc32"),m=s("./inffast"),v=s("./inftrees"),p=1,u=2,A=0,g=-2,C=1,_=852,S=592;function I($){return($>>>24&255)+($>>>8&65280)+((65280&$)<<8)+((255&$)<<24)}function P(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function F($){var Y;return $&&$.state?(Y=$.state,$.total_in=$.total_out=Y.total=0,$.msg="",Y.wrap&&($.adler=1&Y.wrap),Y.mode=C,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new r.Buf32(_),Y.distcode=Y.distdyn=new r.Buf32(S),Y.sane=1,Y.back=-1,A):g}function L($){var Y;return $&&$.state?((Y=$.state).wsize=0,Y.whave=0,Y.wnext=0,F($)):g}function z($,Y){var w,q;return $&&$.state?(q=$.state,Y<0?(w=0,Y=-Y):(w=1+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||15<Y)?g:(q.window!==null&&q.wbits!==Y&&(q.window=null),q.wrap=w,q.wbits=Y,L($))):g}function V($,Y){var w,q;return $?(q=new P,($.state=q).window=null,(w=z($,Y))!==A&&($.state=null),w):g}var X,J,G=!0;function U($){if(G){var Y;for(X=new r.Buf32(512),J=new r.Buf32(32),Y=0;Y<144;)$.lens[Y++]=8;for(;Y<256;)$.lens[Y++]=9;for(;Y<280;)$.lens[Y++]=7;for(;Y<288;)$.lens[Y++]=8;for(v(p,$.lens,0,288,X,0,$.work,{bits:9}),Y=0;Y<32;)$.lens[Y++]=5;v(u,$.lens,0,32,J,0,$.work,{bits:5}),G=!1}$.lencode=X,$.lenbits=9,$.distcode=J,$.distbits=5}function me($,Y,w,q){var O,Q=$.state;return Q.window===null&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new r.Buf8(Q.wsize)),q>=Q.wsize?(r.arraySet(Q.window,Y,w-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(q<(O=Q.wsize-Q.wnext)&&(O=q),r.arraySet(Q.window,Y,w-q,O,Q.wnext),(q-=O)?(r.arraySet(Q.window,Y,w-q,q,0),Q.wnext=q,Q.whave=Q.wsize):(Q.wnext+=O,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=O))),0}o.inflateReset=L,o.inflateReset2=z,o.inflateResetKeep=F,o.inflateInit=function($){return V($,15)},o.inflateInit2=V,o.inflate=function($,Y){var w,q,O,Q,Z,H,ae,N,x,fe,ce,de,ze,Ge,Ie,Pe,Ue,Le,st,tt,h,ee,K,R,E=0,B=new r.Buf8(4),se=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!$||!$.state||!$.output||!$.input&&$.avail_in!==0)return g;(w=$.state).mode===12&&(w.mode=13),Z=$.next_out,O=$.output,ae=$.avail_out,Q=$.next_in,q=$.input,H=$.avail_in,N=w.hold,x=w.bits,fe=H,ce=ae,ee=A;e:for(;;)switch(w.mode){case C:if(w.wrap===0){w.mode=13;break}for(;x<16;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(2&w.wrap&&N===35615){B[w.check=0]=255&N,B[1]=N>>>8&255,w.check=a(w.check,B,2,0),x=N=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&N)<<8)+(N>>8))%31){$.msg="incorrect header check",w.mode=30;break}if((15&N)!=8){$.msg="unknown compression method",w.mode=30;break}if(x-=4,h=8+(15&(N>>>=4)),w.wbits===0)w.wbits=h;else if(h>w.wbits){$.msg="invalid window size",w.mode=30;break}w.dmax=1<<h,$.adler=w.check=1,w.mode=512&N?10:12,x=N=0;break;case 2:for(;x<16;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(w.flags=N,(255&w.flags)!=8){$.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){$.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=N>>8&1),512&w.flags&&(B[0]=255&N,B[1]=N>>>8&255,w.check=a(w.check,B,2,0)),x=N=0,w.mode=3;case 3:for(;x<32;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.head&&(w.head.time=N),512&w.flags&&(B[0]=255&N,B[1]=N>>>8&255,B[2]=N>>>16&255,B[3]=N>>>24&255,w.check=a(w.check,B,4,0)),x=N=0,w.mode=4;case 4:for(;x<16;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.head&&(w.head.xflags=255&N,w.head.os=N>>8),512&w.flags&&(B[0]=255&N,B[1]=N>>>8&255,w.check=a(w.check,B,2,0)),x=N=0,w.mode=5;case 5:if(1024&w.flags){for(;x<16;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.length=N,w.head&&(w.head.extra_len=N),512&w.flags&&(B[0]=255&N,B[1]=N>>>8&255,w.check=a(w.check,B,2,0)),x=N=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(H<(de=w.length)&&(de=H),de&&(w.head&&(h=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),r.arraySet(w.head.extra,q,Q,de,h)),512&w.flags&&(w.check=a(w.check,q,de,Q)),H-=de,Q+=de,w.length-=de),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(H===0)break e;for(de=0;h=q[Q+de++],w.head&&h&&w.length<65536&&(w.head.name+=String.fromCharCode(h)),h&&de<H;);if(512&w.flags&&(w.check=a(w.check,q,de,Q)),H-=de,Q+=de,h)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(H===0)break e;for(de=0;h=q[Q+de++],w.head&&h&&w.length<65536&&(w.head.comment+=String.fromCharCode(h)),h&&de<H;);if(512&w.flags&&(w.check=a(w.check,q,de,Q)),H-=de,Q+=de,h)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;x<16;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(N!==(65535&w.check)){$.msg="header crc mismatch",w.mode=30;break}x=N=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),$.adler=w.check=0,w.mode=12;break;case 10:for(;x<32;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}$.adler=w.check=I(N),x=N=0,w.mode=11;case 11:if(w.havedict===0)return $.next_out=Z,$.avail_out=ae,$.next_in=Q,$.avail_in=H,w.hold=N,w.bits=x,2;$.adler=w.check=1,w.mode=12;case 12:if(Y===5||Y===6)break e;case 13:if(w.last){N>>>=7&x,x-=7&x,w.mode=27;break}for(;x<3;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}switch(w.last=1&N,x-=1,3&(N>>>=1)){case 0:w.mode=14;break;case 1:if(U(w),w.mode=20,Y!==6)break;N>>>=2,x-=2;break e;case 2:w.mode=17;break;case 3:$.msg="invalid block type",w.mode=30}N>>>=2,x-=2;break;case 14:for(N>>>=7&x,x-=7&x;x<32;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if((65535&N)!=(N>>>16^65535)){$.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&N,x=N=0,w.mode=15,Y===6)break e;case 15:w.mode=16;case 16:if(de=w.length){if(H<de&&(de=H),ae<de&&(de=ae),de===0)break e;r.arraySet(O,q,Q,de,Z),H-=de,Q+=de,ae-=de,Z+=de,w.length-=de;break}w.mode=12;break;case 17:for(;x<14;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(w.nlen=257+(31&N),N>>>=5,x-=5,w.ndist=1+(31&N),N>>>=5,x-=5,w.ncode=4+(15&N),N>>>=4,x-=4,286<w.nlen||30<w.ndist){$.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;x<3;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.lens[se[w.have++]]=7&N,N>>>=3,x-=3}for(;w.have<19;)w.lens[se[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,K={bits:w.lenbits},ee=v(0,w.lens,0,19,w.lencode,0,w.work,K),w.lenbits=K.bits,ee){$.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;Pe=(E=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Ue=65535&E,!((Ie=E>>>24)<=x);){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(Ue<16)N>>>=Ie,x-=Ie,w.lens[w.have++]=Ue;else{if(Ue===16){for(R=Ie+2;x<R;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(N>>>=Ie,x-=Ie,w.have===0){$.msg="invalid bit length repeat",w.mode=30;break}h=w.lens[w.have-1],de=3+(3&N),N>>>=2,x-=2}else if(Ue===17){for(R=Ie+3;x<R;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}x-=Ie,h=0,de=3+(7&(N>>>=Ie)),N>>>=3,x-=3}else{for(R=Ie+7;x<R;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}x-=Ie,h=0,de=11+(127&(N>>>=Ie)),N>>>=7,x-=7}if(w.have+de>w.nlen+w.ndist){$.msg="invalid bit length repeat",w.mode=30;break}for(;de--;)w.lens[w.have++]=h}}if(w.mode===30)break;if(w.lens[256]===0){$.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,K={bits:w.lenbits},ee=v(p,w.lens,0,w.nlen,w.lencode,0,w.work,K),w.lenbits=K.bits,ee){$.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,K={bits:w.distbits},ee=v(u,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,K),w.distbits=K.bits,ee){$.msg="invalid distances set",w.mode=30;break}if(w.mode=20,Y===6)break e;case 20:w.mode=21;case 21:if(6<=H&&258<=ae){$.next_out=Z,$.avail_out=ae,$.next_in=Q,$.avail_in=H,w.hold=N,w.bits=x,m($,ce),Z=$.next_out,O=$.output,ae=$.avail_out,Q=$.next_in,q=$.input,H=$.avail_in,N=w.hold,x=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;Pe=(E=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Ue=65535&E,!((Ie=E>>>24)<=x);){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(Pe&&(240&Pe)==0){for(Le=Ie,st=Pe,tt=Ue;Pe=(E=w.lencode[tt+((N&(1<<Le+st)-1)>>Le)])>>>16&255,Ue=65535&E,!(Le+(Ie=E>>>24)<=x);){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}N>>>=Le,x-=Le,w.back+=Le}if(N>>>=Ie,x-=Ie,w.back+=Ie,w.length=Ue,Pe===0){w.mode=26;break}if(32&Pe){w.back=-1,w.mode=12;break}if(64&Pe){$.msg="invalid literal/length code",w.mode=30;break}w.extra=15&Pe,w.mode=22;case 22:if(w.extra){for(R=w.extra;x<R;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.length+=N&(1<<w.extra)-1,N>>>=w.extra,x-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;Pe=(E=w.distcode[N&(1<<w.distbits)-1])>>>16&255,Ue=65535&E,!((Ie=E>>>24)<=x);){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if((240&Pe)==0){for(Le=Ie,st=Pe,tt=Ue;Pe=(E=w.distcode[tt+((N&(1<<Le+st)-1)>>Le)])>>>16&255,Ue=65535&E,!(Le+(Ie=E>>>24)<=x);){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}N>>>=Le,x-=Le,w.back+=Le}if(N>>>=Ie,x-=Ie,w.back+=Ie,64&Pe){$.msg="invalid distance code",w.mode=30;break}w.offset=Ue,w.extra=15&Pe,w.mode=24;case 24:if(w.extra){for(R=w.extra;x<R;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}w.offset+=N&(1<<w.extra)-1,N>>>=w.extra,x-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){$.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(ae===0)break e;if(de=ce-ae,w.offset>de){if((de=w.offset-de)>w.whave&&w.sane){$.msg="invalid distance too far back",w.mode=30;break}ze=de>w.wnext?(de-=w.wnext,w.wsize-de):w.wnext-de,de>w.length&&(de=w.length),Ge=w.window}else Ge=O,ze=Z-w.offset,de=w.length;for(ae<de&&(de=ae),ae-=de,w.length-=de;O[Z++]=Ge[ze++],--de;);w.length===0&&(w.mode=21);break;case 26:if(ae===0)break e;O[Z++]=w.length,ae--,w.mode=21;break;case 27:if(w.wrap){for(;x<32;){if(H===0)break e;H--,N|=q[Q++]<<x,x+=8}if(ce-=ae,$.total_out+=ce,w.total+=ce,ce&&($.adler=w.check=w.flags?a(w.check,O,ce,Z-ce):d(w.check,O,ce,Z-ce)),ce=ae,(w.flags?N:I(N))!==w.check){$.msg="incorrect data check",w.mode=30;break}x=N=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;x<32;){if(H===0)break e;H--,N+=q[Q++]<<x,x+=8}if(N!==(4294967295&w.total)){$.msg="incorrect length check",w.mode=30;break}x=N=0}w.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;default:return g}return $.next_out=Z,$.avail_out=ae,$.next_in=Q,$.avail_in=H,w.hold=N,w.bits=x,(w.wsize||ce!==$.avail_out&&w.mode<30&&(w.mode<27||Y!==4))&&me($,$.output,$.next_out,ce-$.avail_out)?(w.mode=31,-4):(fe-=$.avail_in,ce-=$.avail_out,$.total_in+=fe,$.total_out+=ce,w.total+=ce,w.wrap&&ce&&($.adler=w.check=w.flags?a(w.check,O,ce,$.next_out-ce):d(w.check,O,ce,$.next_out-ce)),$.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(fe==0&&ce===0||Y===4)&&ee===A&&(ee=-5),ee)},o.inflateEnd=function($){if(!$||!$.state)return g;var Y=$.state;return Y.window&&(Y.window=null),$.state=null,A},o.inflateGetHeader=function($,Y){var w;return $&&$.state?(2&(w=$.state).wrap)==0?g:((w.head=Y).done=!1,A):g},o.inflateSetDictionary=function($,Y){var w,q=Y.length;return $&&$.state?(w=$.state).wrap!==0&&w.mode!==11?g:w.mode===11&&d(1,Y,q,0)!==w.check?-3:me($,Y,q,q)?(w.mode=31,-4):(w.havedict=1,A):g},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,c,o){var r=s("../utils/common"),d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(p,u,A,g,C,_,S,I){var P,F,L,z,V,X,J,G,U,me=I.bits,$=0,Y=0,w=0,q=0,O=0,Q=0,Z=0,H=0,ae=0,N=0,x=null,fe=0,ce=new r.Buf16(16),de=new r.Buf16(16),ze=null,Ge=0;for($=0;$<=15;$++)ce[$]=0;for(Y=0;Y<g;Y++)ce[u[A+Y]]++;for(O=me,q=15;1<=q&&ce[q]===0;q--);if(q<O&&(O=q),q===0)return C[_++]=20971520,C[_++]=20971520,I.bits=1,0;for(w=1;w<q&&ce[w]===0;w++);for(O<w&&(O=w),$=H=1;$<=15;$++)if(H<<=1,(H-=ce[$])<0)return-1;if(0<H&&(p===0||q!==1))return-1;for(de[1]=0,$=1;$<15;$++)de[$+1]=de[$]+ce[$];for(Y=0;Y<g;Y++)u[A+Y]!==0&&(S[de[u[A+Y]]++]=Y);if(X=p===0?(x=ze=S,19):p===1?(x=d,fe-=257,ze=a,Ge-=257,256):(x=m,ze=v,-1),$=w,V=_,Z=Y=N=0,L=-1,z=(ae=1<<(Q=O))-1,p===1&&852<ae||p===2&&592<ae)return 1;for(;;){for(J=$-Z,U=S[Y]<X?(G=0,S[Y]):S[Y]>X?(G=ze[Ge+S[Y]],x[fe+S[Y]]):(G=96,0),P=1<<$-Z,w=F=1<<Q;C[V+(N>>Z)+(F-=P)]=J<<24|G<<16|U|0,F!==0;);for(P=1<<$-1;N&P;)P>>=1;if(P!==0?(N&=P-1,N+=P):N=0,Y++,--ce[$]==0){if($===q)break;$=u[A+S[Y]]}if(O<$&&(N&z)!==L){for(Z===0&&(Z=O),V+=w,H=1<<(Q=$-Z);Q+Z<q&&!((H-=ce[Q+Z])<=0);)Q++,H<<=1;if(ae+=1<<Q,p===1&&852<ae||p===2&&592<ae)return 1;C[L=N&z]=O<<24|Q<<16|V-_|0}}return N!==0&&(C[V+N]=$-Z<<24|64<<16|0),I.bits=O,0}},{"../utils/common":41}],51:[function(s,c,o){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,c,o){var r=s("../utils/common"),d=0,a=1;function m(E){for(var B=E.length;0<=--B;)E[B]=0}var v=0,p=29,u=256,A=u+1+p,g=30,C=19,_=2*A+1,S=15,I=16,P=7,F=256,L=16,z=17,V=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],J=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],me=new Array(2*(A+2));m(me);var $=new Array(2*g);m($);var Y=new Array(512);m(Y);var w=new Array(256);m(w);var q=new Array(p);m(q);var O,Q,Z,H=new Array(g);function ae(E,B,se,ie,W){this.static_tree=E,this.extra_bits=B,this.extra_base=se,this.elems=ie,this.max_length=W,this.has_stree=E&&E.length}function N(E,B){this.dyn_tree=E,this.max_code=0,this.stat_desc=B}function x(E){return E<256?Y[E]:Y[256+(E>>>7)]}function fe(E,B){E.pending_buf[E.pending++]=255&B,E.pending_buf[E.pending++]=B>>>8&255}function ce(E,B,se){E.bi_valid>I-se?(E.bi_buf|=B<<E.bi_valid&65535,fe(E,E.bi_buf),E.bi_buf=B>>I-E.bi_valid,E.bi_valid+=se-I):(E.bi_buf|=B<<E.bi_valid&65535,E.bi_valid+=se)}function de(E,B,se){ce(E,se[2*B],se[2*B+1])}function ze(E,B){for(var se=0;se|=1&E,E>>>=1,se<<=1,0<--B;);return se>>>1}function Ge(E,B,se){var ie,W,ne=new Array(S+1),ue=0;for(ie=1;ie<=S;ie++)ne[ie]=ue=ue+se[ie-1]<<1;for(W=0;W<=B;W++){var re=E[2*W+1];re!==0&&(E[2*W]=ze(ne[re]++,re))}}function Ie(E){var B;for(B=0;B<A;B++)E.dyn_ltree[2*B]=0;for(B=0;B<g;B++)E.dyn_dtree[2*B]=0;for(B=0;B<C;B++)E.bl_tree[2*B]=0;E.dyn_ltree[2*F]=1,E.opt_len=E.static_len=0,E.last_lit=E.matches=0}function Pe(E){8<E.bi_valid?fe(E,E.bi_buf):0<E.bi_valid&&(E.pending_buf[E.pending++]=E.bi_buf),E.bi_buf=0,E.bi_valid=0}function Ue(E,B,se,ie){var W=2*B,ne=2*se;return E[W]<E[ne]||E[W]===E[ne]&&ie[B]<=ie[se]}function Le(E,B,se){for(var ie=E.heap[se],W=se<<1;W<=E.heap_len&&(W<E.heap_len&&Ue(B,E.heap[W+1],E.heap[W],E.depth)&&W++,!Ue(B,ie,E.heap[W],E.depth));)E.heap[se]=E.heap[W],se=W,W<<=1;E.heap[se]=ie}function st(E,B,se){var ie,W,ne,ue,re=0;if(E.last_lit!==0)for(;ie=E.pending_buf[E.d_buf+2*re]<<8|E.pending_buf[E.d_buf+2*re+1],W=E.pending_buf[E.l_buf+re],re++,ie===0?de(E,W,B):(de(E,(ne=w[W])+u+1,B),(ue=X[ne])!==0&&ce(E,W-=q[ne],ue),de(E,ne=x(--ie),se),(ue=J[ne])!==0&&ce(E,ie-=H[ne],ue)),re<E.last_lit;);de(E,F,B)}function tt(E,B){var se,ie,W,ne=B.dyn_tree,ue=B.stat_desc.static_tree,re=B.stat_desc.has_stree,he=B.stat_desc.elems,xe=-1;for(E.heap_len=0,E.heap_max=_,se=0;se<he;se++)ne[2*se]!==0?(E.heap[++E.heap_len]=xe=se,E.depth[se]=0):ne[2*se+1]=0;for(;E.heap_len<2;)ne[2*(W=E.heap[++E.heap_len]=xe<2?++xe:0)]=1,E.depth[W]=0,E.opt_len--,re&&(E.static_len-=ue[2*W+1]);for(B.max_code=xe,se=E.heap_len>>1;1<=se;se--)Le(E,ne,se);for(W=he;se=E.heap[1],E.heap[1]=E.heap[E.heap_len--],Le(E,ne,1),ie=E.heap[1],E.heap[--E.heap_max]=se,E.heap[--E.heap_max]=ie,ne[2*W]=ne[2*se]+ne[2*ie],E.depth[W]=(E.depth[se]>=E.depth[ie]?E.depth[se]:E.depth[ie])+1,ne[2*se+1]=ne[2*ie+1]=W,E.heap[1]=W++,Le(E,ne,1),2<=E.heap_len;);E.heap[--E.heap_max]=E.heap[1],(function(Ce,Xe){var _t,it,At,qe,Lt,Kt,rt=Xe.dyn_tree,Ms=Xe.max_code,Ri=Xe.stat_desc.static_tree,$i=Xe.stat_desc.has_stree,xi=Xe.stat_desc.extra_bits,zs=Xe.stat_desc.extra_base,Dt=Xe.stat_desc.max_length,qt=0;for(qe=0;qe<=S;qe++)Ce.bl_count[qe]=0;for(rt[2*Ce.heap[Ce.heap_max]+1]=0,_t=Ce.heap_max+1;_t<_;_t++)Dt<(qe=rt[2*rt[2*(it=Ce.heap[_t])+1]+1]+1)&&(qe=Dt,qt++),rt[2*it+1]=qe,Ms<it||(Ce.bl_count[qe]++,Lt=0,zs<=it&&(Lt=xi[it-zs]),Kt=rt[2*it],Ce.opt_len+=Kt*(qe+Lt),$i&&(Ce.static_len+=Kt*(Ri[2*it+1]+Lt)));if(qt!==0){do{for(qe=Dt-1;Ce.bl_count[qe]===0;)qe--;Ce.bl_count[qe]--,Ce.bl_count[qe+1]+=2,Ce.bl_count[Dt]--,qt-=2}while(0<qt);for(qe=Dt;qe!==0;qe--)for(it=Ce.bl_count[qe];it!==0;)Ms<(At=Ce.heap[--_t])||(rt[2*At+1]!==qe&&(Ce.opt_len+=(qe-rt[2*At+1])*rt[2*At],rt[2*At+1]=qe),it--)}})(E,B),Ge(ne,xe,E.bl_count)}function h(E,B,se){var ie,W,ne=-1,ue=B[1],re=0,he=7,xe=4;for(ue===0&&(he=138,xe=3),B[2*(se+1)+1]=65535,ie=0;ie<=se;ie++)W=ue,ue=B[2*(ie+1)+1],++re<he&&W===ue||(re<xe?E.bl_tree[2*W]+=re:W!==0?(W!==ne&&E.bl_tree[2*W]++,E.bl_tree[2*L]++):re<=10?E.bl_tree[2*z]++:E.bl_tree[2*V]++,ne=W,xe=(re=0)===ue?(he=138,3):W===ue?(he=6,3):(he=7,4))}function ee(E,B,se){var ie,W,ne=-1,ue=B[1],re=0,he=7,xe=4;for(ue===0&&(he=138,xe=3),ie=0;ie<=se;ie++)if(W=ue,ue=B[2*(ie+1)+1],!(++re<he&&W===ue)){if(re<xe)for(;de(E,W,E.bl_tree),--re!=0;);else W!==0?(W!==ne&&(de(E,W,E.bl_tree),re--),de(E,L,E.bl_tree),ce(E,re-3,2)):re<=10?(de(E,z,E.bl_tree),ce(E,re-3,3)):(de(E,V,E.bl_tree),ce(E,re-11,7));ne=W,xe=(re=0)===ue?(he=138,3):W===ue?(he=6,3):(he=7,4)}}m(H);var K=!1;function R(E,B,se,ie){ce(E,(v<<1)+(ie?1:0),3),(function(W,ne,ue,re){Pe(W),fe(W,ue),fe(W,~ue),r.arraySet(W.pending_buf,W.window,ne,ue,W.pending),W.pending+=ue})(E,B,se)}o._tr_init=function(E){K||((function(){var B,se,ie,W,ne,ue=new Array(S+1);for(W=ie=0;W<p-1;W++)for(q[W]=ie,B=0;B<1<<X[W];B++)w[ie++]=W;for(w[ie-1]=W,W=ne=0;W<16;W++)for(H[W]=ne,B=0;B<1<<J[W];B++)Y[ne++]=W;for(ne>>=7;W<g;W++)for(H[W]=ne<<7,B=0;B<1<<J[W]-7;B++)Y[256+ne++]=W;for(se=0;se<=S;se++)ue[se]=0;for(B=0;B<=143;)me[2*B+1]=8,B++,ue[8]++;for(;B<=255;)me[2*B+1]=9,B++,ue[9]++;for(;B<=279;)me[2*B+1]=7,B++,ue[7]++;for(;B<=287;)me[2*B+1]=8,B++,ue[8]++;for(Ge(me,A+1,ue),B=0;B<g;B++)$[2*B+1]=5,$[2*B]=ze(B,5);O=new ae(me,X,u+1,A,S),Q=new ae($,J,0,g,S),Z=new ae(new Array(0),G,0,C,P)})(),K=!0),E.l_desc=new N(E.dyn_ltree,O),E.d_desc=new N(E.dyn_dtree,Q),E.bl_desc=new N(E.bl_tree,Z),E.bi_buf=0,E.bi_valid=0,Ie(E)},o._tr_stored_block=R,o._tr_flush_block=function(E,B,se,ie){var W,ne,ue=0;0<E.level?(E.strm.data_type===2&&(E.strm.data_type=(function(re){var he,xe=4093624447;for(he=0;he<=31;he++,xe>>>=1)if(1&xe&&re.dyn_ltree[2*he]!==0)return d;if(re.dyn_ltree[18]!==0||re.dyn_ltree[20]!==0||re.dyn_ltree[26]!==0)return a;for(he=32;he<u;he++)if(re.dyn_ltree[2*he]!==0)return a;return d})(E)),tt(E,E.l_desc),tt(E,E.d_desc),ue=(function(re){var he;for(h(re,re.dyn_ltree,re.l_desc.max_code),h(re,re.dyn_dtree,re.d_desc.max_code),tt(re,re.bl_desc),he=C-1;3<=he&&re.bl_tree[2*U[he]+1]===0;he--);return re.opt_len+=3*(he+1)+5+5+4,he})(E),W=E.opt_len+3+7>>>3,(ne=E.static_len+3+7>>>3)<=W&&(W=ne)):W=ne=se+5,se+4<=W&&B!==-1?R(E,B,se,ie):E.strategy===4||ne===W?(ce(E,2+(ie?1:0),3),st(E,me,$)):(ce(E,4+(ie?1:0),3),(function(re,he,xe,Ce){var Xe;for(ce(re,he-257,5),ce(re,xe-1,5),ce(re,Ce-4,4),Xe=0;Xe<Ce;Xe++)ce(re,re.bl_tree[2*U[Xe]+1],3);ee(re,re.dyn_ltree,he-1),ee(re,re.dyn_dtree,xe-1)})(E,E.l_desc.max_code+1,E.d_desc.max_code+1,ue+1),st(E,E.dyn_ltree,E.dyn_dtree)),Ie(E),ie&&Pe(E)},o._tr_tally=function(E,B,se){return E.pending_buf[E.d_buf+2*E.last_lit]=B>>>8&255,E.pending_buf[E.d_buf+2*E.last_lit+1]=255&B,E.pending_buf[E.l_buf+E.last_lit]=255&se,E.last_lit++,B===0?E.dyn_ltree[2*se]++:(E.matches++,B--,E.dyn_ltree[2*(w[se]+u+1)]++,E.dyn_dtree[2*x(B)]++),E.last_lit===E.lit_bufsize-1},o._tr_align=function(E){ce(E,2,3),de(E,F,me),(function(B){B.bi_valid===16?(fe(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)})(E)}},{"../utils/common":41}],53:[function(s,c,o){c.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,c,o){(function(r){(function(d,a){if(!d.setImmediate){var m,v,p,u,A=1,g={},C=!1,_=d.document,S=Object.getPrototypeOf&&Object.getPrototypeOf(d);S=S&&S.setTimeout?S:d,m={}.toString.call(d.process)==="[object process]"?function(L){process.nextTick(function(){P(L)})}:(function(){if(d.postMessage&&!d.importScripts){var L=!0,z=d.onmessage;return d.onmessage=function(){L=!1},d.postMessage("","*"),d.onmessage=z,L}})()?(u="setImmediate$"+Math.random()+"$",d.addEventListener?d.addEventListener("message",F,!1):d.attachEvent("onmessage",F),function(L){d.postMessage(u+L,"*")}):d.MessageChannel?((p=new MessageChannel).port1.onmessage=function(L){P(L.data)},function(L){p.port2.postMessage(L)}):_&&"onreadystatechange"in _.createElement("script")?(v=_.documentElement,function(L){var z=_.createElement("script");z.onreadystatechange=function(){P(L),z.onreadystatechange=null,v.removeChild(z),z=null},v.appendChild(z)}):function(L){setTimeout(P,0,L)},S.setImmediate=function(L){typeof L!="function"&&(L=new Function(""+L));for(var z=new Array(arguments.length-1),V=0;V<z.length;V++)z[V]=arguments[V+1];var X={callback:L,args:z};return g[A]=X,m(A),A++},S.clearImmediate=I}function I(L){delete g[L]}function P(L){if(C)setTimeout(P,0,L);else{var z=g[L];if(z){C=!0;try{(function(V){var X=V.callback,J=V.args;switch(J.length){case 0:X();break;case 1:X(J[0]);break;case 2:X(J[0],J[1]);break;case 3:X(J[0],J[1],J[2]);break;default:X.apply(a,J)}})(z)}finally{I(L),C=!1}}}}
3function F(L){L.source===d&&typeof L.data=="string"&&L.data.indexOf(u)===0&&P(+L.data.slice(u.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof ct<"u"?ct:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(rs)),rs.exports}var ur=cr();const As=Ot(ur);var Vt={exports:{}},mr=Vt.exports,Zs;function fr(){return Zs||(Zs=1,(function(e,t){(function(s,c){c()})(mr,function(){function s(v,p){return typeof p>"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(v.type)?new Blob(["\uFEFF",v],{type:v.type}):v}function c(v,p,u){var A=new XMLHttpRequest;A.open("GET",v),A.responseType="blob",A.onload=function(){m(A.response,p,u)},A.onerror=function(){console.error("could not download file")},A.send()}function o(v){var p=new XMLHttpRequest;p.open("HEAD",v,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function r(v){try{v.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");
3p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),v.dispatchEvent(p)}}var d=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ct=="object"&&ct.global===ct?ct:void 0,a=d.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),m=d.saveAs||(typeof window!="object"||window!==d?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(v,p,u){var A=d.URL||d.webkitURL,g=document.createElement("a");p=p||v.name||"download",g.download=p,g.rel="noopener",typeof v=="string"?(g.href=v,g.origin===location.origin?r(g):o(g.href)?c(v,p,u):r(g,g.target="_blank")):(g.href=A.createObjectURL(v),setTimeout(function(){A.revokeObjectURL(g.href)},4e4),setTimeout(function(){r(g)},0))}:"msSaveOrOpenBlob"in navigator?function(v,p,u){if(p=p||v.name||"download",typeof v!="string")navigator.msSaveOrOpenBlob(s(v,u),p);else if(o(v))c(v,p,u);else{var A=document.createElement("a");A.href=v,A.target="_blank",setTimeout(function(){r(A)})}}:function(v,p,u,A){if(A=A||open("","_blank"),A&&(A.document.title=A.document.body.innerText="downloading..."),typeof v=="string")return c(v,p,u);var g=v.type==="application/octet-stream",C=/constructor/i.test(d.HTMLElement)||d.safari,_=/CriOS\/[\d]+/.test(navigator.userAgent);if((_||g&&C||a)&&typeof FileReader<"u"){var S=new FileReader;S.onloadend=function(){var F=S.result;F=_?F:F.replace(/^data:[^;]*;/,"data:attachment/file;"),A?A.location.href=F:location=F,A=null},S.readAsDataURL(v)}else{var I=d.URL||d.webkitURL,P=I.createObjectURL(v);A?A.location=P:location.href=P,A=null,setTimeout(function(){I.revokeObjectURL(P)},4e4)}});d.saveAs=m.saveAs=m,e.exports=m})})(Vt)),Vt.exports}var pr=fr();const Ii=Ot(pr),hr="did:";function gr(e,t){const s=e?.holderDid||e?.holder_did;return t?typeof t!="string"||!t.startsWith(hr)?{ok:!1,reason:"invalid-expected-did",expectedDid:t}:s?s!==t?{ok:!1,reason:"did-mismatch",claimDid:s,expectedDid:t}:{ok:!0}:{ok:!1,reason:"no-claim-did",expectedDid:t}:{ok:!1,reason:"no-user-did",claimDid:s}}const Ys=Object.freeze({credential_already_issued:"migration.errorAlreadyIssued",answer_not_approved:"migration.errorNotApproved",answer_revoked:"migration.errorRevoked",stage_does_not_emit:"migration.errorStageNoCert",answer_not_owned:"migration.errorNotOwned",procedure_schema_not_configured:"migration.errorGovConfig",procedure_schema_ambiguous:"migration.errorGovConfig",identity_settings_missing:"migration.errorGovConfig"}),yr=ut({name:"InfoProcedureColumn3",props:{viewItem:{type:Object,default:()=>{},required:!0},substagesDocuments:{type:Array,default:()=>[],required:!0},changePrevention:{type:Boolean,default:!1,required:!0},disabledResponseFeedback:{type:Boolean,default:!1,required:!0},canAnswerFeedback:{type:Boolean,default:!1,required:!0},tiempoRestanteFeedback:{type:Object,default:()=>{},required:!0},citizenSignatureTimeout:{type:Object,default:()=>{}},dialogResponse:{type:Boolean,default:!1,required:!0},scheduleAppointment:{type:Boolean,default:!1,required:!0},showErrorWallet:{type:Boolean,default:!1,required:!0},operatorHasRequestedSignature:{type:Boolean,default:!1},allDocumentsSigned:{type:Boolean,default:!1},showViewAcknowledgmentButton:{type:Boolean,default:!1},loadingAcknowledgment:{type:Boolean,default:!1},hasSubstagePreventions:{type:Boolean,default:!1}},setup(){return{...fi()}},data(){return{dialogDownloadFiles:!1,documentsArray:[],loadingDownloadFiles:!1,isNL:this.$config.firebase.projectId==="os-sandbox-nuevo-leon"||this.$config.firebase.projectId==="os-gobierno-de-nuevo-leon",alcoholsProcedures:["expedicionDeLicenciaEstatalCambioDeDomicilioYCambioDeGiroParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","canjeDeLicencia","refrendoDeLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas","permisoEspecialParaVentaExpendioYConsumoDeBebidasAlcoholicas","cambioDeGiroDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","cambioDeDomicilioDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","cambioDeTitularEnLaLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","renovacionYReposicionDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","reposicionDeLicenciaEstatal","bajaYOCancelacionDeLaLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas"],dialogConfirm:!1,dialogCredentialQr:!1,credentialQrSrc:"",credentialQrClaimed:!1,credentialQrUnsubscribe:null,migratingVC:!1,dialogMigrateQr:!1,migrateQrData:null,vcClaimedByWallet:!1,unsubscribeVC:null,currentVcDocPath:null,dialogViewVC:!1}},computed:{isEmissionBlockedProcedure(){return ka(this.viewItem)},emissionBlockedNoticeKey(){return Da(this.viewItem)},isAlcoholes(){const e=this.isNL;return this.alcoholsProcedures.includes(this.viewItem.slugRequest)&&e},isREC(){const e=this.isNL;return this.viewItem.slugRequest==="inscripcionAlRegistroEstatalDeContribuyentes"&&e},isNoticesREC(){const e=this.isNL;return this.viewItem.slugRequest==="cambiosAlRegistroEstatalDeContribuyentes"&&e},isPendingSignature(){return this.viewItem.status2==="Pendiente de firma"&&this.operatorHasRequestedSignature===!0},credentialAlreadyClaimed(){return Aa(this.viewItem)}
3,userHasDID(){const t=$e().publicAddress;return t&&typeof t=="string"&&t.startsWith("did:")},wp(){const e=lt().getBrand;return{walletName:e?.walletName||"Wallet",oldWalletName:e?.oldWalletName||"wallet anterior"}},vcClaims(){const e=this.viewItem.sovraVC;return e?e.credentialSubject?e.credentialSubject:e:{}},vcCredentialTitle(){return this.vcClaims.procedureName||this.$t("migration.vcTitle")},vcSubtitle(){return this.vcClaims.givenName||""},vcDescription(){return this.$t("migration.vcDescription")},vcIssuerName(){const e=this.viewItem.sovraVC?.issuer;return typeof e=="object"?e.name||e.id||"":e||this.viewItem.sovraVC?.iss||""},vcIssuerDID(){const e=this.viewItem.sovraVC?.issuer;return typeof e=="object"?e.id||"":e||this.viewItem.sovraVC?.iss||""},vcCardBackground(){return lt().brand?.quarkId?.styles?.background?.color||"#1a237e"},vcCardTextColor(){const t=lt().brand?.quarkId?.styles?.text?.color;return t||(this.isLightColor(this.vcCardBackground)?"#333333":"#ffffff")},vcHeroImage(){return lt().brand?.quarkId?.styles?.hero?.uri||""},vcThumbnail(){return lt().brand?.quarkId?.styles?.thumbnail?.uri||""},vcIssuanceDate(){return this.formatVcDate(this.viewItem.sovraVC?.issuanceDate??this.viewItem.sovraVC?.iat,"vcIssuanceDate")},vcExpirationDate(){return this.formatVcDate(this.viewItem.sovraVC?.expirationDate??this.viewItem.sovraVC?.exp,"vcExpirationDate")},vcDisplayFields(){const e=this.vcClaims;return[["givenName","migration.fieldName"],["familyName","migration.fieldSurname"],["nationalID","migration.fieldID"],["taxID","migration.fieldTaxID"],["email","migration.fieldEmail"],["phone","migration.fieldPhone"],["procedureName","migration.fieldProcedure"],["folio","migration.fieldFolio"],["procedureDescription","migration.fieldDescription"],["issuingAuthority","migration.fieldAuthority"],["legalBasis","migration.fieldLegalBasis"],["applicationDate","migration.fieldIssuedAt"]].filter(([s])=>e[s]).map(([s,c])=>({label:this.$t(c),value:s==="applicationDate"?this.formatVcDate(e[s],"applicationDate"):e[s]}))}},beforeUnmount(){this.cleanupListener(),this.cleanupCredentialQrListener()},methods:{isPrevention:yt,isClaimForCurrentHolder(e,t){const s=$e().getUser?.public_address,c=gr(e,s);return c.ok||(c.reason==="no-user-did"?console.warn(`${t} no public_address on current user â ignoring claim`,{claimDid:c.claimDid}):c.reason==="invalid-expected-did"?(console.error(`${t} expected DID is not in did: form â refusing to match`,{expectedDid:c.expectedDid}),oe(new Error(`${t} invalid expectedDid (not did:)`))):c.reason==="no-claim-did"?(console.warn(`${t} snapshot has no holder_did â ignoring claim`,{expectedDid:c.expectedDid}),oe(new Error(`${t} vc/{id} write without holder_did`))):c.reason==="did-mismatch"&&(console.error(`${t} holder_did mismatch â possible misconfigured rule on vc/{id}`,{claimDid:c.claimDid,expectedDid:c.expectedDid}),oe(new Error(`${t} holder_did mismatch`)))),c},async openCredentialQrDialog(){this.dialogCredentialQr=!0,this.credentialQrClaimed=!1,this.viewItem.sovraVC&&jt(this.viewItem.sovraVC)&&!this.viewItem.sovraVC.qr&&(this.credentialQrSrc=await Vs.toDataURL(jt(this.viewItem.sovraVC)));const e=this.viewItem.sovraVC?.invitationId;e&&(this.credentialQrUnsubscribe=fs(`vc/${e}`,t=>{if(!t.exists())return;const s=t.data();if(s&&s.error&&!s.vc){oe(new Error(`[VC] /vc/${e} error: ${s.error}`)),this.closeCredentialQrDialog(),De().open({color:"error",text:this.$t("migration.migrateTramiteError")});return}if(s&&s.error&&s.vc&&oe(new Error(`[VC] /vc/${e} error AND vc both present (race?): ${s.error}`)),s&&s.vc){const c=this.isClaimForCurrentHolder(s,"[openCredentialQrDialog]");if(!c.ok){(c.reason==="did-mismatch"||c.reason==="no-claim-did"||c.reason==="invalid-expected-did")&&(this.closeCredentialQrDialog(),De().open({color:"error",text:this.$t("migration.migrateTramiteError")}));return}this.credentialQrClaimed=!0,this.cleanupCredentialQrListener(),this.persistCredentialClaimed()}},t=>{console.error("[openCredentialQrDialog] listener error:",t),oe(t)}))},resolveOwnAnswerPath(){const e=this.viewItem.id_reference||this.viewItem.id||(this._.provides[Ae]||this.$route).params.details_id;return Ta({...this.viewItem,id_reference:e})},async persistCredentialClaimed(){const e=this.resolveOwnAnswerPath();if(!e){const t=new Error(`[persistCredentialClaimed] the answer carries no path (slugRequest='${this.viewItem.slugRequest}') â the claim was not recorded`);console.error(t.message),oe(t);return}try{await Je(e,{"sovraVC.claimed":!0,"sovraVC.claimedAt":new Date})}catch(t){this.credentialQrClaimed=!1,console.error("[persistCredentialClaimed] failed:",t),oe(t),De().open({color:"error",text:this.$t("migration.migrateTramiteError")})}},closeCredentialQrDialog(){this.dialogCredentialQr=!1,this.cleanupCredentialQrListener(),this.credentialQrClaimed=!1,this.credentialQrSrc=""},cleanupCredentialQrListener(){this.credentialQrUnsubscribe&&(this.credentialQrUnsubscribe(),this.credentialQrUnsubscribe=null)},async asyncForEach(e,t){for(let s=0;s<e.length;s++)await t(e[s],s,e)},downloadOutputDocuments(){this.$analytics?.track?.(Se.tramite_final_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_kind:"output",file_count:this.viewItem.outputDocuments.length}),this.downloadFiles(this.viewItem.outputDocuments)},downloadLegalAnnexes(){this.$analytics?.track?.(Se.tramite_detail_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_type:"legal_annex",file_count:this.documentsArray.length}),this.downloadFiles(this.documentsArray)}
3,async downloadFiles(e){le().open();const t=this;try{t.loadingDownloadFiles=!0,t.zip=new As,await t.asyncForEach(e,async s=>{const c=s.url||s.documentUrl;if(c){const o=s.name.toString();if(c.includes("firebasestorage.googleapis.com"))await pi(c).then(r=>{t.zip.file(o,r)}).catch(r=>{oe(r,{level:"warning",tags:{degrade:"zip-document-fetch-failed",source:"InfoProcedureColumn3.downloadFiles"}}),console.error(r)});else{const r=await t.getFilesFromUrl([c]);t.zip.file(o,r)}}}),t.zip.generateAsync({type:"blob"}).then(async s=>{const c=t.viewItem.folio!==null?t.viewItem.folio:t.viewItem.preFolio;await Ii.saveAs(s,`${c}.zip`),t.loadingDownloadFiles=!1,t.dialogDownloadFiles=!1,t.documentsArray=[],le().close(),De().open({color:"success",text:t.$t("details.downloadSuccess")})}).catch(s=>{console.error(s),le().close(),De().open({color:"error",text:t.$t("errorGeneric")}),t.documentsArray=[],t.dialogDownloadFiles=!1,t.loadingDownloadFiles=!1})}catch(s){t.documentsArray=[],t.dialogDownloadFiles=!1,t.loadingDownloadFiles=!1,le().close(),console.error(s),oe(s),De().open({color:"error",text:t.$t("errorGeneric")})}},isLightColor(e){if(!e)return!1;const t=e.replace("#",""),s=parseInt(t.substring(0,2),16)/255,c=parseInt(t.substring(2,4),16)/255,o=parseInt(t.substring(4,6),16)/255;return .2126*s+.7152*c+.0722*o>.55},formatVcDate(e,t){if(e==null||e==="")return"";const s=this.$i18n?.locale||"es";let c=e;if(typeof c=="object"){const d=typeof c.seconds=="number"?c.seconds:c._seconds;typeof d=="number"?c=d:typeof c.toDate=="function"&&(c=c.toDate().getTime())}const o=typeof c=="number"?new Date(c<1e11?c*1e3:c):new Date(c),r=o.getTime();if(Number.isNaN(r)||r<9466848e5||r>41024448e5){const d=new Error(`${t}: unusable credential date: ${JSON.stringify(e)}`);return console.warn(d.message),oe(d),""}return o.toLocaleDateString(s,{year:"numeric",month:"long",day:"numeric"})},async migrateToVC(){if(this.migratingVC)return;let e=null,t=!1;try{this.migratingVC=!0,(this.unsubscribeVC||this.currentVcDocPath)&&(this.cleanupListener(),this.currentVcDocPath&&(await Ls(this.currentVcDocPath).catch(g=>{console.error("[migrateToVC] Failed to clean up previous vc doc:",g),oe(g)}),this.currentVcDocPath=null));const s=lt(),c=ke(s.brand),o=Ia();if(await o.ensureLoaded(),o.loadError)throw o.loadError;const r=new Date;r.setFullYear(r.getFullYear()+2);const d=r.toISOString().split("T")[0],a=Ca(this.viewItem),m=this.resolveOwnAnswerPath();if(!m)throw new Error(`[migrateToVC] the answer carries no path (slugRequest='${this.viewItem.slugRequest}') â refusing to issue against a guessed document`);const v=m.slice(0,m.lastIndexOf("/")),p=m.slice(m.lastIndexOf("/")+1),u=a==="lambda"?await Sa(this.viewItem,d,c,null,m):await Pa(Ea(this.viewItem,d,c)),A={...u.vc,...u.offerURI?{offerURI:u.offerURI,oobContentData:u.offerURI}:{oobContentData:u.oobContentData},invitationId:u.invitationId,qr:u.qr};a==="lambda"?(e=`vc/${u.invitationId}`,this.currentVcDocPath=e):(e=`vc/${u.invitationId}`,await Mi(e,{userId:$e().getUser.uid,invitationId:u.invitationId,answerId:p,answPath:v,procedureName:this.viewItem.formato?.infoPost?.nombre||"",folio:this.viewItem.folio||this.viewItem.preFolio||"",createdAt:new Date,claimed:!1}),this.currentVcDocPath=e,await Je(m,{sovraVC:A}),t=!0),this.migrateQrData=await Vs.toDataURL(jt(u)),this.vcClaimedByWallet=!1,this.dialogMigrateQr=!0,this.unsubscribeVC=fs(e,g=>{if(!g.exists())return;const C=g.data();if(C&&C.error&&!C.vc){oe(new Error(`[migrateVC] ${e} error: ${C.error}`)),this.closeMigrateDialog(),De().open({color:"error",text:this.$t("migration.migrateTramiteError")});return}if(C&&C.error&&C.vc&&oe(new Error(`[migrateVC] ${e} error AND vc both present (race?): ${C.error}`)),C&&C.vc){const _=this.isClaimForCurrentHolder(C,"[migrateToVC]");if(!_.ok){(_.reason==="did-mismatch"||_.reason==="no-claim-did"||_.reason==="invalid-expected-did")&&(this.closeMigrateDialog(),De().open({color:"error",text:this.$t("migration.migrateTramiteError")}));return}this.vcClaimedByWallet=!0,this.cleanupListener(),this.persistCredentialClaimed()}},g=>{console.error("Listener error:",g),oe(g),De().open({color:"error",text:this.$t("migration.migrateTramiteError")})})}catch(s){if(e&&(Ls(e).catch(o=>{console.error("[migrateToVC] Failed to clean up orphan vc doc:",o),oe(o
3)}),this.currentVcDocPath=null),t){const o=this.resolveOwnAnswerPath();Je(o,{sovraVC:null}).catch(r=>{console.error("[migrateToVC] Failed to rollback answer sovraVC:",r),oe(r)})}this.migratingVC=!1,oe(s),console.error("[migrateToVC] Error:",s);let c=this.$t("migration.migrateTramiteError");s?.name==="IdentityConfigUnavailableError"?c=this.$t("identityConfigUnavailable"):s?.name==="SovraSessionRequiredError"?c=this.$t("sessionExpired"):Ys[s?.data?.error]&&(c=this.$t(Ys[s.data.error])),De().open({color:"error",text:c})}},closeMigrateDialog(){this.dialogMigrateQr=!1,this.migratingVC=!1,this.cleanupListener()},cleanupListener(){this.unsubscribeVC&&(this.unsubscribeVC(),this.unsubscribeVC=null)}}}),br={key:0,class:"pt-3"},vr={key:1,class:"pt-3"},wr={class:"text-truncate text-truncate-btn"},_r={class:"text-truncate text-truncate-btn"},Ar={class:"pt-3"},Dr={key:0},kr={class:"text-body-1 mb-4"},Ir={key:2,class:"text-grey"},Cr={class:"text-grey"},Sr={key:1},Pr={class:"text-h6 mb-2"},Er={class:"text-body-2 text-grey mb-4"},Tr={key:2,class:"pt-3"},Fr={key:3,class:"pt-3"},Rr={class:"d-inline-block text-truncate text-truncate-btn"},$r={key:4,class:"pt-3"},xr={key:0},Nr={class:"text-body-1 mb-4"},Or={key:1,class:"d-flex justify-center align-center",style:{height:"250px"}},Mr={class:"text-grey"},zr={key:1},Lr={class:"text-h6 mb-2"},qr={class:"text-body-2 text-grey mb-4"},Br={class:"d-flex align-center mb-2"},jr={class:"text-subtitle-1 font-weight-bold"},Vr={class:"text-caption"},Ur={class:"text-caption mt-2"},Hr={key:1,class:"text-caption mt-1"},Wr={key:2,class:"text-caption"},Gr={class:"pa-4"},Qr={class:"text-caption text-grey"},Zr={class:"text-body-2"},Yr={key:0,class:"pt-3 mt-2",style:{"border-top":"1px solid #e0e0e0"}},Kr={class:"text-caption text-grey"},Xr={class:"text-body-2 text-truncate",style:{"max-width":"100%"}},Jr={key:5},el={key:6},tl={key:7},sl={key:8,class:"text-center pt-3"},il={class:"mt-3"},al={class:"mb-2 mt-3 text-primary"},nl={class:"font-weight-bold"},ol={class:"mt-3"},rl={class:"mr-0 mt-0"},ll={class:"mb-0"},dl={class:"mr-5 pt-0"};function cl(e,t,s,c,o,r){const d=Wo,a=sr,m=dr,v=mi;return y(),T(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[t[33]||(t[33]=l("div",{class:"pt-3"},null,-1)),e.viewItem.status2==="Aprobado"&&e.isEmissionBlockedProcedure?(y(),j("div",br,[n(Oe,{type:"warning",variant:"outlined",density:"compact",class:"mb-3 text-body-2"},{default:i(()=>[D(f(e.$t(e.emissionBlockedNoticeKey)),1)]),_:1})])):M("",!0),e.viewItem.status2==="Aprobado"?(y(),j("div",vr,[e.viewItem.finalDocumentId?(y(),T(te,{key:0,color:"btnPrimary",variant:"outlined",size:"small",block:"",to:"/finalDocument/"+e.viewItem.finalDocumentId,class:"text-wrap d-inline-block py-1 text-center"},{default:i(()=>[D(f(e.$t("details.viewDocument")),1)]),_:1},8,["to"])):M("",!0),e.credentialAlreadyClaimed?(y(),T(te,{key:1,color:"btnPrimary",variant:"outlined",size:"small",block:"",class:"mt-3 text-wrap d-inline-block py-1 text-center",onClick:t[0]||(t[0]=p=>e.dialogViewVC=!0)},{default:i(()=>[D(f(e.$t("migration.viewVC")),1)]),_:1})):e.viewItem.link?(y(),T(te,{key:2,color:"btnPrimary",variant:"outlined",size:"small",block:"",to:e.viewItem.link?`/citizen/certificates/form-certs/${e.viewItem.link.split("/").slice(-1)}`:"",class:"mt-3 text-wrap d-inline-block py-1 text-center"},{default:i(()=>[D(f(e.$t("details.viewCertify")),1)]),_:1},8,["to"])):M("",!0),e.viewItem?.outputDocuments&&e.viewItem?.outputDocuments.length>0?(y(),T(te,{key:3,color:"btnPrimary",variant:"outlined",size:"small",block:"",class:"mt-3 text-wrap d-inline-block py-1 text-center",onClick:t[1]||(t[1]=p=>e.downloadOutputDocuments())},{default:i(()=>[l("span",wr,f(e.$t("uploadOutputDocs.downloadFilesCitizens")),1)]),_:1})):M("",!0),e.substagesDocuments&&e.substagesDocuments.length>0?(y(),T(te,nt({key:4,color:"btnPrimary",variant:"outlined",size:"small",block:"",class:"text-wrap d-inline-block mt-3 text-white"},e.activatorProps,{onClick:t[2]||(t[2]=p=>e.dialogDownloadFiles=!0)}),{default:i(()=>[n(ve,{start:""},{default:i(()=>[...t[30]||(t[30]=[D(" mdi-tray-arrow-down ",-1)])]),_:1}),D(" "+f(e.$t("modules.legalAnnexes")),1)]),_:1},16)):M("",!0),n(Ut,{modelValue:e.show,"onUpdate:modelValue":t[4]||(t[4]=p=>e.show=p),bottom:""},{activator:i(({props:p})=>[e.viewItem.historical&&e.viewItem.historical[e.viewItem.stageNow-1]?.configStage.emissionType&&e.viewItem.historical[e.viewItem.stageNow-1].configStage?.emissionType.includes("Certificado")&&!e.viewItem.link&&e.viewItem.status2==="Aprobado"&&e.viewItem.sovraVC&&("resolveOfferURI"in e?e.resolveOfferURI:Tt(jt))(e.viewItem.sovraVC)&&!e.credentialAlreadyClaimed?(y(),T(te,nt({key:0,size:"small"},p,{color:"btnPrimary",variant:"outlined",block:"",class:"mt-3 text-wrap d-inline-block py-1 text-center",onClick:t[3]||(t[3]=u=>e.openCredentialQrDialog())}),{default:i(()=>[l("span",_r,f(e.$t("details.getCredential")),1)]),_:1},16)):M("",!0)]),default:i(()=>[l("span",Ar,[l("span",null,f(e.$t("details.msgGetCredential",e.wp)),1)])]),_:1},8,["modelValue"]),n(Me,{modelValue:e.dialogCredentialQr,"onUpdate:modelValue":[t[7]||(t[7]=p=>e.dialogCredentialQr=p),t[8]||(t[8]=p=>{p||e.closeCredentialQrDialog()})],"max-width":"400"},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("details.getCredential")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[5]||(t[5]=p=>e.closeCredentialQrDialog())})]),_:1}),n(Re,{class:"text-center pa-6"},{default:i(()=>[e.credentialQrClaimed?(y(),j("div",Sr,[n(ve,{color:"success",size:"64",class:"mb-4"},{default:i(()=>[...t[31]||(t[31]=[D("mdi-check-circle",-1)])]),_:1}),l("p",Pr,f(e.$t("migration.vcClaimed")),1),l("p",Er,f(e.$t("migration.vcClaimedStoredText")),1),n(te,{color:"btnPrimary",block:"",onClick:t[6]||(t[6]=p=>e.closeCredentialQrDialog())},{default:i(()=>[D(f(e.$t("migration.done")),1)]),_:1})])):(y(),j("div",Dr,[l("p",kr,f(e.$t("migration.scanQrInstruction")),1),e.viewItem.sovraVC&&e.viewItem.sovraVC.qr?(y(),T(kt,{key:0,src:e.viewItem.sovraVC.qr,width:"250",class:"mx-auto mb-4"},null,8,["src"])):e.credentialQrSrc?(y(),T(kt,{key:1,src:e.credentialQrSrc,width:"250",class:"mx-auto mb-4"},null,8,["src"])):(y(),j("p",Ir,f(e.$t("migration.qrUnavailable")),1)),n(mt,{indeterminate:"",color:"primary",size:20,width:2,class:"mr-2"}),l("span",Cr,f(e.$t("migration.waitingForScan")),1)]))]),_:1})]),_:1})]),_:1},8,["modelValue"])])):M("",!0),e.viewItem.status2==="Desistido"?(y(),j("div",Tr,[n(te,{color:"btnPrimary",size:"small",block:"",to:"/finalDocument/"+e.viewItem.finalDocumentId,class:"text-wrap d-inline-block py-1 text-center"},{default:i(()=>[D(f(e.$t("details.acuseDesistimiento")),1)]),_:1},8,["to"])])):M("",!0),e.isAlcoholes||e.isREC||e.isNoticesREC?(y(),j("div",Fr,[n(Is,{rounded:"lg"},{activator:i(({props:p})=>[n(te,nt({size:"small",color:"btnPrimary",variant:"outlined",block:"",class:"text-wrap d-inline-block py-1 text-center"},p),{default:i(()=>[l("span",Rr,f(e.$t("modules.acknowledgment")),1)]),_:1},16)]),default:i(()=>[n(et,{class:"py-0"},{default:i(()=>[e.viewItem.acknowledgmentReceptionId?(y(),T(Ve,{key:0,link:"",to:`/finalDocument/${e.viewItem.acknowledgmentReceptionId}`},{default:i(()=>[n(Ze,null,{default:i(()=>
3[D(f(e.$t("details.seeReceptionAck")),1)]),_:1})]),_:1},8,["to"])):M("",!0)]),_:1}),n(et,{class:"py-0"},{default:i(()=>[e.viewItem.recAckResponseId&&!e.showViewAcknowledgmentButton?(y(),T(Ve,{key:0,link:"",to:`/finalDocument/${e.viewItem.recAckResponseId}`},{default:i(()=>[n(Ze,null,{default:i(()=>[D(f(e.$t("details.seeResponseAck")),1)]),_:1})]),_:1},8,["to"])):M("",!0)]),_:1}),n(et,{class:"py-0"},{default:i(()=>[e.viewItem.acknowledgmentResponseId&&!e.showViewAcknowledgmentButton?(y(),T(Ve,{key:0,link:"",to:`/finalDocument/${e.viewItem.acknowledgmentResponseId}`},{default:i(()=>[n(Ze,{class:"menuTitle"},{default:i(()=>[D(f(e.$t("details.seeResponseAck")),1)]),_:1})]),_:1},8,["to"])):M("",!0)]),_:1}),e.showViewAcknowledgmentButton?(y(),T(we,{key:0})):M("",!0),n(et,{class:"py-0"},{default:i(()=>[e.showViewAcknowledgmentButton?(y(),T(Ve,{key:0,disabled:e.loadingAcknowledgment,onClick:t[9]||(t[9]=p=>e.$emit("view-acknowledgment"))},{default:i(()=>[D(f(e.$t("details.seeResponseAck")),1)]),_:1},8,["disabled"])):M("",!0)]),_:1})]),_:1})])):M("",!0),e.viewItem.status2==="Aprobado"&&e.viewItem.historical&&e.viewItem.historical[e.viewItem.stageNow-1]?.configStage?.emissionType&&e.viewItem.historical[e.viewItem.stageNow-1].configStage?.emissionType.includes("Certificado")&&e.viewItem.is_revocated!==!0&&!e.credentialAlreadyClaimed&&e.userHasDID?(y(),j("div",$r,[n(Oe,{type:"warning",variant:"outlined",density:"compact",class:"mb-3 text-body-2"},{default:i(()=>[D(f(e.$t("migration.noVCAlert")),1)]),_:1}),n(te,{color:"btnPrimary",size:"small",block:"",loading:e.migratingVC,class:"text-wrap d-inline-block py-1 text-center",onClick:t[10]||(t[10]=p=>e.migrateToVC())},{default:i(()=>[D(f(e.$t("migration.migrateTramiteBtn")),1)]),_:1},8,["loading"])])):M("",!0),n(Me,{modelValue:e.dialogMigrateQr,"onUpdate:modelValue":[t[13]||(t[13]=p=>e.dialogMigrateQr=p),t[14]||(t[14]=p=>{p||e.closeMigrateDialog()})],"max-width":"420",persistent:""},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("migration.vcTitle")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[11]||(t[11]=p=>e.closeMigrateDialog())})]),_:1}),n(Re,{class:"text-center pa-6"},{default:i(()=>[e.vcClaimedByWallet?(y(),j("div",zr,[n(ve,{color:"success",size:"64",class:"mb-4"},{default:i(()=>[...t[32]||(t[32]=[D("mdi-check-circle",-1)])]),_:1}),l("p",Lr,f(e.$t("migration.vcClaimed")),1),l("p",qr,f(e.$t("migration.vcClaimedStoredText")),1),n(te,{color:"btnPrimary",block:"",onClick:t[12]||(t[12]=p=>e.closeMigrateDialog())},{default:i(()=>[D(f(e.$t("migration.done")),1)]),_:1})])):(y(),j("div",xr,[l("p",Nr,f(e.$t("migration.scanQrInstruction")),1),e.migrateQrData?(y(),T(kt,{key:0,src:e.migrateQrData,width:"250",class:"mx-auto mb-4"},null,8,["src"])):(y(),j("div",Or,[n(mt,{indeterminate:"",color:"primary",size:40})])),n(mt,{indeterminate:"",color:"primary",size:20,width:2,class:"mr-2"}),l("span",Mr,f(e.$t("migration.waitingForScan")),1)]))]),_:1})]),_:1})]),_:1},8,["modelValue"]),n(Me,{modelValue:e.dialogViewVC,"onUpdate:modelValue":[t[16]||(t[16]=p=>e.dialogViewVC=p),t[17]||(t[17]=p=>{p||(e.dialogViewVC=!1)})],"max-width":"480"},{default:i(()=>[n(be,{class:"rounded-lg overflow-hidden"},{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("migration.vcTitle")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[15]||(t[15]=p=>e.dialogViewVC=!1)})]),_:1}),n(Re,{class:"pa-0",style:{"max-height":"70vh","overflow-y":"auto"}},{default:i(()=>[l("div",{style:ht({background:e.vcCardBackground,color:e.vcCardTextColor,padding:"20px",position:"relative",minHeight:"180px"})},[e.vcHeroImage?(y(),T(kt,{key:0,src:e.vcHeroImage,height:"80",class:"mb-3 rounded",cover:""},null,8,["src"])):M("",!0),l("div",Br,[e.vcThumbnail?(y(),T(ms,{key:0,size:"40",class:"mr-3"},{default:i(()=>[n(kt,{src:e.vcThumbnail},null,8,["src"])]),_:1})):M("",!0),l("div",null,[l("div",jr,f(e.vcCredentialTitle),1),l("div",Vr,f(e.vcSubtitle),1)])]),l("div",Ur,f(e.vcDescription),1),e.vcIssuanceDate?(y(),j("div",Hr,f(e.$t("migration.issued"))+": "+f(e.vcIssuanceDate),1)):M("",!0),e.vcExpirationDate?(y(),j("div",Wr,f(e.$t("migration.expires"))+": "+f(e.vcExpirationDate),1)):M("",!0)],4),l("div",Gr,[(y(!0),j(pe,null,Ee(e.vcDisplayFields,(p,u)=>(y(),j("div",{key:u,class:Be(["py-2",{"border-b":u<e.vcDisplayFields.length-1}]),style:ht(u<e.vcDisplayFields.length-1?"border-bottom: 1px solid #e0e0e0":"")},[l("div",Qr,f(p.label),1),l("div",Zr,f(p.value),1)],6))),128)),e.vcIssuerDID?(y(),j("div",Yr,[l("div",Kr,f(e.$t("migration.issuerDID")),1),l("div",Xr,f(e.vcIssuerDID),1)])):M("",!0),n(Oe,{type:"info",variant:"tonal",density:"compact",class:"mt-4 text-caption"},{default:i(()=>[D(f(e.$t("migration.vcPreviewNote")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),("isPrevention"in e?e.isPrevention:Tt(yt))(e.viewItem.status2)&&!e.hasSubstagePreventions?(y(),j("div",Jr,[n(d,{"view-item":e.viewItem,"change-prevention":e.changePrevention,"can-answer-feedback":e.canAnswerFeedback,"disabled-response-feedback":e.disabledResponseFeedback,"tiempo-restante-feedback":e.tiempoRestanteFeedback,"dialog-response":e.dialogResponse,onSetDialogResponse:t[18]||(t[18]=p=>e.$emit("setDialogResponse",p)),onRequestFeedback:t[19]||(t[19]=p=>e.$emit("requestFeedback",p))},null,8,["view-item","change-prevention","can-answer-feedback","disabled-response-feedback","tiempo-restante-feedback","dialog-response"])])):M("",!0),e.isPendingSignature===!0?(y(),j("div",el,[e.allDocumentsSigned===!0&&e.citizenSignatureTimeout.segundos>0?(y(),T(te,{key:0,class:"text-wrap d-inline-block my-3",block:"",size:"small",color:"btnPrimary",onClick:t[20]||(t[20]=p=>e.dialogConfirm=!0)},{default:i(()=>[D(f(e.$t("details.confirmedResponse")),1)]),_:1})):M("",!0),n(Me,{modelValue:e.dialogConfirm,"onUpdate:modelValue":t[24]||(t[24]=p=>e.dialogConfirm=p),"max-width":"500"},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("details.confirmation.title")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[21]||(t[21]=p=>e.dialogConfirm=!1)})]),_:1}),n(we),n(Re,{class:"pt-3 text-black"},{default:i(()=>[D(f(e.$t("details.confirmation.message")),1)]),_:1}),n(Ke,{class:"justify-end"},{default:i(()=>[n(te,{color:"btnSecondary",variant:"outlined",onClick:t[22]||(t[22]=p=>e.dialogConfirm=!1)},{default:i(()=>[D(f(e.$t("cancel")),1)]),_:1}),n(te,{color:"btnPrimary",onClick:t[23]||(t[23]=p=>{e.$emit("sendSignatureConfirmation",!0),e.dialogConfirm=!1})},{default:i(()=>[D(f(e.$t("accept")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.viewItem.status2==="Pendiente de firma"?(y(),T(a,{key:1,status:e.viewItem.status2,timer:e.citizenSignatureTimeout,"operator-has-requested-signature":e.operatorHasRequestedSignature},null,8,["status","timer","operator-has-requested-signature"])):M("",!0)])):e.viewItem.status2==="Citado"&&e.viewItem.historical[e.viewItem.stageNow-1].totalMissingSchedules>0&&!e.viewItem.historical[e.viewItem.stageNow-1].appointmentId?(y(),j("div",tl,[n(m,{"view-item":e.viewItem,"schedule-appointment":e.scheduleAppointment,onSetSc
3heduleAppointment:t[25]||(t[25]=p=>e.$emit("setScheduleAppointment",p))},null,8,["view-item","schedule-appointment"])])):M("",!0),e.showErrorWallet===!0?(y(),j("div",sl,[n(Oe,{density:"compact",variant:"outlined",type:"error",class:"text-center"},{default:i(()=>[D(f(e.$t("details.walletDisconnected")),1)]),_:1}),n(te,{color:"red",size:"small",to:"/expediente"},{default:i(()=>[D(f(e.$t("details.goToConnectWallet")),1)]),_:1})])):M("",!0)]),_:1}),n(Me,{modelValue:e.dialogDownloadFiles,"onUpdate:modelValue":t[29]||(t[29]=p=>e.dialogDownloadFiles=p),width:e.tabValue==="tab-0"?"500":"700",scrollable:""},{default:i(()=>[n(be,null,{default:i(()=>[n(Et,{class:"text-center justify-center py-6 primary text-white"},{default:i(()=>[D(f(e.$t("modules.legalAnnexes")),1)]),_:1}),n(Re,{class:"py-0 px-2"},{default:i(()=>[n(et,{lines:"two"},{default:i(()=>[l("div",il,[(y(!0),j(pe,null,Ee(e.substagesDocuments,(p,u)=>(y(),T(Ve,{key:u},{default:i(()=>[(y(),T(b,{key:u,cols:"12",class:"pt-0 pb-4"},{default:i(()=>[l("p",al,[l("span",nl,f(e.$t("procedures.stages.substages.substage"))+" "+f(p.title)+": "+f(p.description),1)]),n(we),n(et,{lines:"two"},{default:i(()=>[l("div",ol,[(y(!0),j(pe,null,Ee(p.files,(A,g)=>(y(),T(Ve,{key:g},{append:i(()=>[l("div",rl,[n(hi,{modelValue:e.documentsArray,"onUpdate:modelValue":t[26]||(t[26]=C=>e.documentsArray=C),value:A,disabled:e.loadingDownloadFiles},null,8,["modelValue","value","disabled"])])]),prepend:i(()=>[l("div",ll,[n(v,{width:"60px",height:"60px"})])]),default:i(()=>[l("div",dl,[n(Ze,{class:"font-weight-medium body-1"},{default:i(()=>[D(f(A.name),1)]),_:2},1024)])]),_:2},1024))),128))])]),_:2},1024)]),_:2},1024))]),_:2},1024))),128))]),e.loadingDownloadFiles?(y(),T(Oi,{key:0,absolute:!0,color:"white"},{default:i(()=>[n(mt,{indeterminate:"",color:"primary",size:60,width:6})]),_:1})):M("",!0)]),_:1})]),_:1}),n(we),n(Ke,{class:"my-3"},{default:i(()=>[n(ye),n(te,{color:"primary",variant:"outlined",disabled:e.loadingDownloadFiles,class:"text-wrap d-inline-block py-1 text-white",onClick:t[27]||
3(t[27]=p=>{e.dialogDownloadFiles=!1,e.documentsArray=[],e.loadingDownloadFiles=!1})},{default:i(()=>[D(f(e.$t("modules.cancel")),1)]),_:1},8,["disabled"]),n(te,{variant:"flat",color:"primary",class:"text-wrap d-inline-block py-1 text-white",disabled:e.loadingDownloadFiles||e.documentsArray.length===0,onClick:t[28]||(t[28]=p=>e.downloadLegalAnnexes())},{default:i(()=>[D(f(e.$t("modules.download")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue","width"])]),_:1})}const ul=Object.assign(_e(yr,[["render",cl],["__scopeId","data-v-e5d80bd5"]]),{__name:"InfoProcedureColumn3"}),ml={components:{Html2Pdf:ot},props:{element:{required:!1,default:()=>{},type:Object},isVoucher:{default:!1,type:Boolean},datePayment:{default:!1,type:Boolean},uma:{default:()=>{},type:Object},folio:{default:"",type:String,required:!1}},data(){return{total:"",snackbar:{show:!1,color:"",timeout:6e3,text:""},htmlToPdfOptions:{margin:[5,0,25,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}}}},computed:{user(){return $e().getUser},brand(){return lt().getBrand},fullName(){let e="";return this.element&&(e=this.element.user.firstName+" "+this.element.user.lastName+(this.element.user.lastName2&&this.element.user.lastName2!==""?" "+this.element.user.lastName2:"")),e},linkToShare(){let e=null;return e=`${this.currentUrl}${(this._.provides[Ae]||this.$route).fullPath}`,e},currentUrl(){return $e().currentUrl}},mounted(){const e=this;let t=0;this.element.payment!==null&&this.element.payment&&this.element.payment.items.forEach((s,c)=>{let o=s.typeAmount==="Variable"?s.payment==="Pesos"?parseFloat(e.convertToNumber(s.result)):parseFloat(e.convertToNumber(s.result))*e.uma.diary:s.payment==="Pesos"?parseFloat(e.convertToNumber(s.amount)):parseFloat(e.convertToNumber(s.amount))*e.uma.diary;o=parseFloat(o).toFixed(2),e.element.payment.items[c].total=parseFloat(o),t=parseFloat(t)+parseFloat(o)}),this.total=parseFloat(t).toFixed(2)},methods:{now(e){const t=Ne.now();return e==="date"?ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy"):e==="time"?ge(new Date((t.seconds||t._seconds)*1e3),"HH:mm:ss"):ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy HH:mm:ss")},date(e){const t=this.element.payment.updatedAt?this.element.payment.updatedAt:this.element.payment.createdAt;return e==="date"?ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy"):e==="time"?ge(new Date((t.seconds||t._seconds)*1e3),"HH:mm:ss"):ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy HH:mm:ss")},getPrice(e){const t=this;let s=t.formatPrice(parseFloat(t.convertToNumber(e)));return s="$ "+s+` ${t.$t("AbrevMoneda")}`,s},convertToNumber(e){let t="";if(e){t=e.toString();const s=",$";for(let c=0;c<s.length;c++)t=t.replace(new RegExp(s.charAt(c),"g"),"")}return t},formatPrice(e){if(e>=0)return Gt(e)},generatePDF(){this.$refs.html2Pdf.generatePdf()},back(){this.$router.back()},async copyLink(){try{await gi(this.linkToShare),De().open({color:"success",text:`${this.$t("textCopied")}`})}catch{De().open({color:"error",text:`${this.$t("textNotCopied")}`})}}}},fl={class:"px-15"},pl=["src"],hl={key:0,class:"font-weight-bold"},gl={key:1,class:"font-weight-bold"},yl={class:"body-2 d-block"},bl={class:"body-2 d-block"},vl={class:"body-2 d-block"},wl={class:"body-2 d-block"},_l={class:"text-uppercase"},Al={key:0,class:"text-uppercase"},Dl={class:"subtitle-2 share-button text-gray-darken-2"},kl={class:"subtitle-2 share-button text-gray-darken-2"},Il=["src"],Cl={key:0,class:"font-weight-bold"},Sl={key:1,class:"font-weight-bold"},Pl={class:"body-2 d-block"},El={class:"body-2 d-block"},Tl={class:"body-2 d-block"},Fl={class:"body-2 d-block"},Rl={class:"text-uppercase"},$l={key:0,class:"text-uppercase"};function xl(e,t,s,c,o,r){const d=ot,a=zt,m=at("ShareNetwork"),v=at("share-it");return y(),j("div",fl,[n(a,null,{default:i(()=>[n(d,{ref:"html2Pdf","show-layout":!1,"float-layout":!0,"enable-download":!1,"preview-modal":!0,"paginate-elements-by-height":2500,filename:e.filename,"pdf-quality":1.5,"manual-pagination":!1,"pdf-format":"a4","pdf-orientation":"portrait","pdf-content-width":"800px","html-to-
3pdf-options":o.htmlToPdfOptions},{"pdf-content":i(()=>[n(Mt,null,{default:i(()=>[n(be,{class:"rounded-lg elevation-6 pt-10 pb-10 px-10"},{default:i(()=>[n(k,{align:"center"},{default:i(()=>[n(b,{cols:"12",md:"3",class:"mt-4 pdf-item"},{default:i(()=>[l("img",{src:r.brand.logo,width:"150px"},null,8,pl)]),_:1}),n(b,{cols:"12",md:"6",class:"mt-4 pdf-item text-center"},{default:i(()=>[t[5]||(t[5]=l("h4",{class:"font-weight-bold"},"MUNICIPIO DE LA CIUDAD DE MONTERREY",-1)),t[6]||(t[6]=l("h5",{class:"font-weight-bold"},"SECRETARÃA DE AYUNTAMIENTO",-1)),s.isVoucher?(y(),j("h4",gl,"ACUSE DE RECIBO DE TRANSACCIÃN")):(y(),j("h3",hl,"ORDEN DE PAGO"))]),_:1}),n(b,{cols:"12",md:"3",class:"mt-4 pdf-item font-weight-normal"},{default:i(()=>[s.datePayment===!1?(y(),j(pe,{key:0},[l("label",yl,f(r.now("date")),1),l("label",bl,f(r.now("time")),1)],64)):(y(),j(pe,{key:1},[l("label",vl,f(r.date("date")),1),l("label",wl,f(r.date("time")),1)],64))]),_:1})]),_:1}),n(k,{class:"px-0 border-table font-weight-normal"},{default:i(()=>[n(b,{cols:"9",class:"font-weight-bold text-center back-gray-1 border-right"},{default:i(()=>[...t[7]||(t[7]=[D("ORDEN DE PAGO A",-1)])]),_:1}),n(b,{cols:"3",class:"back-gray-2 text-white text-center"},{default:i(()=>[...t[8]||(t[8]=[D("ORDEN DE PAGO",-1)])]),_:1}),n(b,{cols:"9",class:"border-right"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[9]||(t[9]=l("div",{class:"small-text"},"Nombre",-1)),l("div",null,f(r.fullName),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"9",class:"border-top border-right"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[10]||(t[10]=l("div",{class:"small-text"},"Calle",-1)),l("div",null,f(s.element.user.calle||"  "),1)]),_:1})]),_:1}),n(b,{cols:"3",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[11]||(t[11]=l("div",{class:"small-text"},"Número",-1)),l("div",null,f(s.element.user.num_ext||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[12]||(t[12]=l("div",{class:"small-text"},"Colonia",-1)),l("div",null,f(s.element.user.colonia||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"3",class:"pa-0"},{default:i(()=>[n(b,{cols:"12",class:Be(["text-center",{"info-order":e.$vuetify.display.smAndUp}])},{default:i(()=>[D(f(s.element.payment.payOrder||s.element.payment.metadata?.orden_pago?.datos.orden_pago_id||"  "),1)]),_:1},8,["class"]),n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[13]||(t[13]=l("div",{class:"small-text"},"Folio del trámite",-1)),l("div",null,f(s.folio),1)]),_:1})]),_:1}),n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[14]||(t[14]=l("div",{class:"small-text"},"Responsable(s)",-1)),l("div",null,f(s.element.payment.metadata?.autoriza||s.element.payment.metadata?.orden_pago?.datos.autoriza||"  "),1)]),_:1})]),_:1})]),_:1}),n(b,{cols:"9",class:"border-right"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"6",class:"border-top border-right"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[15]||(t[15]=l("div",{class:"small-text"},"Teléfono",-1)),l("div",null,f(s.element.user.telphone||"  "),1)]),_:1})]),_:1}),n(b,{cols:"6",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[16]||(t[16]=l("div",{class:"small-text"},"Celular",-1)),l("div",null,f(s.element.user.celphone||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,{class:"height100"},{default:i(()=>[n(b,{cols:"6",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10 border-right margin-bottom-2"},{default:i(()=>[t[17]||(t[17]=l("div",{class:"small-text"},"RFC",-1)),l("div",null,f(s.element.user.RFC||"  "),1)]),_:1})]),_:1}),n(b,{cols:"6",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[18]||(t[18]=l("div",{class:"small-text"},"CURP",-1)),l("div",null,f(s.element.user.CURP||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"3",class:"text-center"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left"},{default:i(()=>[t[19]||(t[19]=l("div",{class:"small-text"},"Caja",-1)),l("div",null,f(s.element.payment.metadata?.pago?.datos.caja||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[20]||(t[20]=l("div",{class:"small-text"},"Folio/recibo",-1)),l("div",null,f(s.element.payment.metadata?.pago?.datos.recibo||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"py-5"}),n(k,{class:"px-0 border-table font-weight-normal"},{default:i(()=>[n(b,{cols:"9",class:"border-right back-gray-1 text-center font-weight-bold"},{default:i(()=>[...t[21]||(t[21]=[D("CONCEPTO",-1)])]),_:1}),n(b,{cols:"3",class:"back-gray-1 text-center font-weight-bold"},{default:i(()=>[...t[22]||(t[22]=[D("COSTO",-1)])]),_:1}),n(b,{cols:"12"},{default:i(()=>[(y(!0),j(pe,null,Ee(s.element.payment.items,p=>(y(),T(k,{key:`${p.code}`},{default:i(()=>[n(b,{cols:"9",class:"border-right"},{default:i(()=>[l("span",null,f(p.concept),1),t[23]||(t[23]=l("br",null,null,-1))]),_:2},1024),n(b,{cols:"3"},{default:i(()=>[D(f(r.getPrice(p.total)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),n(k,{class:"px-0"},{default:i(()=>[n(b,{cols:"6"}),n(b,{cols:"6"},{default:i(()=>[n(k,{class:"total-to-pay"},{default:i(()=>[n(b,{cols:"6",class:"text-right border-right font-10"},{default:i(()=>[...t[24]||(t[24]=[D("TOTAL A PAGAR",-1)])]),_:1}),n(b,{cols:"6",class:"text-left font-weight-bold font-10"},{default:i(()=>[D(f(r.getPrice(o.total)),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"pt-5 font-10 font-weight-normal"},{default:i(()=>[...t[25]||(t[25]=[D(" DE CONFORMIDAD A LO DISPUESTO EN LOS ARTICULOS 63 Y 69 DE LA LEY DE HACIENDA PARA LOS MUNICIPIOS DEL ESTADO DE NUEVO LEON; ASI COMO EL ACUERDO ADMINISTRATIVO DE FECHA 10 DE DICIEMBRE 2021, SUSCRITO POR EL DIRECTOR DE INGRESOS EN FUNCIONES. ",-1)])]),_:1}),n(k,{class:"mt-9 font-weight-regular border-table"},{default:i(()=>[n(b,{cols:"3",class:"order-titles border-right border-bottom text-uppercase"},{default:i(()=>[D(f(e.$t("details.signature")),1)]),_:1}),n(b,{cols:"9",class:"order-titles border-bottom text-uppercase"},{default:i(()=>[D(f(e.$t("certificateTemplate.observations")),1)]),_:1}),n(b,{cols:"12"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"3",class:"border-right min-height"}),n(b,{cols:"6",class:"min-height"},{default:i(()=>[l("p",_l,f(e.$t("payments.bankReference"))+": "+f(s.folio),1),s.element.expediente?(y(),j("p",Al,f(e.$t("payments.noExpedienteCatastral"))+": "+f(s.element.expediente),1)):M("",!0)]),_:1}),n(b,{cols:"3",class:"border-left min-height info-order text-center d-flex align-center"},{default:i(()=>[D(f(s.element.status),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}
3,8,["filename","html-to-pdf-options"])]),_:1}),s.isVoucher?(y(),T(k,{key:0},{default:i(()=>[n(qs,{density:"compact",class:"bg-grey-lighten-5"},{default:i(()=>[n(te,{onClick:t[0]||(t[0]=p=>r.back())},{default:i(()=>[n(ve,null,{default:i(()=>[...t[26]||(t[26]=[D("mdi-keyboard-return",-1)])]),_:1})]),_:1})]),_:1}),n(ye),n(qs,{density:"compact",class:"bg-grey-lighten-5"},{default:i(()=>[n(te,{onClick:t[1]||(t[1]=p=>r.generatePDF())},{default:i(()=>[n(ve,null,{default:i(()=>[...t[27]||(t[27]=[D("mdi-printer",-1)])]),_:1})]),_:1}),n(Is,null,{activator:i(({props:p})=>[n(te,nt({icon:"mdi-share-variant",variant:"elevated",class:"",size:"small"},p),null,16),n(Oa,{modelValue:o.snackbar.show,"onUpdate:modelValue":t[3]||(t[3]=u=>o.snackbar.show=u),timeout:o.snackbar.timeout,color:o.snackbar.color},{actions:i(()=>[n(te,{icon:"mdi-close",size:"small",variant:"text",onClick:t[2]||(t[2]=u=>o.snackbar.show=!1)})]),default:i(()=>[D(f(o.snackbar.text)+" ",1)]),_:1},8,["modelValue","timeout","color"])]),default:i(()=>[n(et,null,{default:i(()=>[n(v,null,{default:i(()=>[n(Ve,null,{default:i(()=>[n(Ze,null,{default:i(()=>[n(m,{network:"whatsapp",title:e.$t("ver-certificado"),url:r.linkToShare},{default:i(()=>[n(te,{variant:"text",color:"primary"},{default:i(()=>[n(ve,{class:"pr-2 share-button",color:"#25D366"},{default:i(()=>[...t[28]||(t[28]=[D(" mdi-whatsapp ",-1)])]),_:1}),l("span",Dl,f(e.$t("share-whatsapp")),1)]),_:1})]),_:1},8,["title","url"])]),_:1})]),_:1}),n(Ve,null,{default:i(()=>[n(Ze,null,{default:i(()=>[n(m,{network:"email",title:e.$t("ver-certificado"),url:r.linkToShare},{default:i(()=>[n(te,{variant:"text",color:"primary"},{default:i(()=>[n(ve,{class:"pr-2 share-button",color:"grey-darken-2"},{default:i(()=>[...t[29]||(t[29]=[D(" mdi-email ",-1)])]),_:1}),l("span",kl,f(e.$t("share-email")),1)]),_:1})]),_:1},8,["title","url"])]),_:1})]),_:1}),n(Ve,null,{default:i(()=>[n(Ze,null,{default:i(()=>[Ds(l("input",{"onUpdate:modelValue":t[4]||(t[4]=p=>r.linkToShare=p),class:"d-none",type:"text",readonly:""},null,512),[[zi,r.linkToShare]]),n(te,{variant:"text",color:"primary",type:"button",onClick:r.copyLink},{default:i(()=>[n(ve,{class:"pr-2 share-button",color:"primary"},{default:i(()=>
3[...t[30]||(t[30]=[D(" mdi-content-copy ",-1)])]),_:1}),l("span",null,f(e.$t("copy"))+" link",1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):M("",!0),n(k,{align:"center"},{default:i(()=>[n(b,{cols:"12",md:"3",class:"mt-4 pdf-item"},{default:i(()=>[l("img",{src:r.brand.logo,width:"150px"},null,8,Il)]),_:1}),n(b,{cols:"12",md:"6",class:"mt-4 pdf-item text-center"},{default:i(()=>[t[31]||(t[31]=l("h4",{class:"font-weight-bold"},"MUNICIPIO DE LA CIUDAD DE MONTERREY",-1)),t[32]||(t[32]=l("h5",{class:"font-weight-bold"},"SECRETARÃA DE AYUNTAMIENTO",-1)),s.isVoucher?(y(),j("h3",Sl,"ACUSE DE RECIBO DE TRANSACCIÃN")):(y(),j("h3",Cl,"ORDEN DE PAGO"))]),_:1}),n(b,{cols:"12",md:"3",class:"mt-4 pdf-item font-weight-normal"},{default:i(()=>[s.datePayment===!1?(y(),j(pe,{key:0},[l("label",Pl,f(r.now("date")),1),l("label",El,f(r.now("time")),1)],64)):(y(),j(pe,{key:1},[l("label",Tl,f(r.date("date")),1),l("label",Fl,f(r.date("time")),1)],64))]),_:1})]),_:1}),n(k,{class:"px-0 border-table font-weight-normal"},{default:i(()=>[n(b,{cols:"9",class:"font-weight-bold text-center back-gray-1 border-right"},{default:i(()=>[...t[33]||(t[33]=[D("ORDEN DE PAGO A",-1)])]),_:1}),n(b,{cols:"3",class:"back-gray-2 text-white text-center"},{default:i(()=>[...t[34]||(t[34]=[D("ORDEN DE PAGO",-1)])]),_:1}),n(b,{cols:"9",class:"border-right"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[35]||(t[35]=l("div",{class:"small-text"},"Nombre",-1)),l("div",null,f(r.fullName),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"9",class:"border-top border-right"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[36]||(t[36]=l("div",{class:"small-text"},"Calle",-1)),l("div",null,f(s.element.user.calle||"  "),1)]),_:1})]),_:1}),n(b,{cols:"3",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[37]||(t[37]=l("div",{class:"small-text"},"Número",-1)),l("div",null,f(s.element.user.num_ext||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[38]||(t[38]=l("div",{class:"small-text"},"Colonia",-1)),l("div",null,f(s.element.user.colonia||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"3",class:"pa-0"},{default:i(()=>[n(b,{cols:"12",class:Be(["text-center",{"info-order":e.$vuetify.display.smAndUp}])},{default:i(()=>[D(f(s.element.payment.payOrder||s.element.payment.metadata?.orden_pago?.datos.orden_pago_id||"  "),1)]),_:1},8,["class"]),n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[39]||(t[39]=l("div",{class:"small-text"},"Folio del trámite",-1)),l("div",null,f(s.folio),1)]),_:1})]),_:1}),n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[40]||(t[40]=l("div",{class:"small-text"},"Responsable(s)",-1)),l("div",null,f(s.element.payment.metadata?.autoriza||s.element.payment.metadata?.orden_pago?.datos.autoriza||"  "),1)]),_:1})]),_:1})]),_:1}),n(b,{cols:"9",class:"border-right"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"6",class:"border-top border-right"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[41]||(t[41]=l("div",{class:"small-text"},"Teléfono",-1)),l("div",null,f(s.element.user.telphone||"  "),1)]),_:1})]),_:1}),n(b,{cols:"6",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[42]||(t[42]=l("div",{class:"small-text"},"Celular",-1)),l("div",null,f(s.element.user.celphone||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,{class:"height100"},{default:i(()=>[n(b,{cols:"6",class:"border-top border-right margin-bottom"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[43]||(t[43]=l("div",{class:"small-text"},"RFC",-1)),l("div",null,f(s.element.user.RFC||"  "),1)]),_:1})]),_:1}),n(b,{cols:"6",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column padding-5-10"},{default:i(()=>[t[44]||(t[44]=l("div",{class:"small-text"},"CURP",-1)),l("div",null,f(s.element.user.CURP||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"3",class:"text-center"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left"},{default:i(()=>[t[45]||(t[45]=l("div",{class:"small-text"},"Caja",-1)),l("div",null,f(s.element.payment.metadata?.pago?.datos.caja||"  "),1)]),_:1})]),_:1})]),_:1}),n(k,null,{default:i(()=>[n(b,{cols:"12",class:"border-top"},{default:i(()=>[n(k,{class:"flex-column justify-start padding-5-10 text-left break-word"},{default:i(()=>[t[46]||(t[46]=l("div",{class:"small-text"},"Folio/recibo",-1)),l("div",null,f(s.element.payment.metadata?.pago?.datos.recibo||"  "),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"py-5"}),n(k,{class:"px-0 border-table font-weight-normal"},{default:i(()=>[n(b,{cols:"9",class:"border-right back-gray-1 text-center font-weight-bold"},{default:i(()=>[...t[47]||(t[47]=[D("CONCEPTO",-1)])]),_:1}),n(b,{cols:"3",class:"back-gray-1 text-center font-weight-bold"},{default:i(()=>[...t[48]||(t[48]=[D("COSTO",-1)])]),_:1}),n(b,{cols:"12"},{default:i(()=>[(y(!0),j(pe,null,Ee(s.element.payment.items,p=>(y(),T(k,{key:`${p.code}`},{default:i(()=>[n(b,{cols:"9",class:"border-right"},{default:i(()=>[l("span",null,f(p.concept),1),t[49]||(t[49]=l("br",null,null,-1))]),_:2},1024),n(b,{cols:"3"},{default:i(()=>[D(f(r.getPrice(p.total)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),n(k,{class:"px-0"},{default:i(()=>[n(b,{cols:"6"}),n(b,{cols:"6"},{default:i(()=>[n(k,{class:"total-to-pay"},{default:i(()=>[n(b,{cols:"6",class:"text-right border-right font-10"},{default:i(()=>
3[...t[50]||(t[50]=[D("TOTAL A PAGAR",-1)])]),_:1}),n(b,{cols:"6",class:"text-left font-weight-bold font-10"},{default:i(()=>[D(f(r.getPrice(o.total)),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"pt-5 font-10 font-weight-normal"},{default:i(()=>[...t[51]||(t[51]=[D(" DE CONFORMIDAD A LO DISPUESTO EN LOS ARTICULOS 63 Y 69 DE LA LEY DE HACIENDA PARA LOS MUNICIPIOS DEL ESTADO DE NUEVO LEON; ASI COMO EL ACUERDO ADMINISTRATIVO DE FECHA 10 DE DICIEMBRE 2021, SUSCRITO POR EL DIRECTOR DE INGRESOS EN FUNCIONES. ",-1)])]),_:1}),n(k,{class:"mt-9 font-weight-regular border-table"},{default:i(()=>[n(b,{cols:"3",class:"order-titles border-right border-bottom text-uppercase"},{default:i(()=>[D(f(e.$t("details.signature")),1)]),_:1}),n(b,{cols:"9",class:"order-titles border-bottom text-uppercase"},{default:i(()=>[D(f(e.$t("certificateTemplate.observations")),1)]),_:1}),n(b,{cols:"12"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"3",class:"border-right min-height"}),n(b,{cols:"6",class:"min-height"},{default:i(()=>[l("p",Rl,f(e.$t("payments.bankReference"))+": "+f(s.folio),1),s.element.expediente?(y(),j("p",$l,f(e.$t("payments.noExpedienteCatastral"))+": "+f(s.element.expediente),1)):M("",!0)]),_:1}),n(b,{cols:"3",class:"border-left min-height info-order text-center d-flex align-center"},{default:i(()=>[D(f(s.element.status),1)]),_:1})]),_:1})]),_:1})]),_:1})])}const Nl=Object.assign(_e(ml,[["render",xl],["__scopeId","data-v-ad4d2462"]]),{__name:"OrdenPayment"}),Ol=async e=>{const t=Li().api.pagos;let s={type:e.method,url:`${t}/${e.url}`};e.data&&(s=Object.assign({data:e.data},s));{const r=$e().getUser.token||localStorage.getItem("mtyuserToken");if(r){const a=qi(r)?await Bi(!0):r;s=Object.assign({token:a},s)}}return await Qt("mty-instances-pagos")({...s}).then(o=>{if(o.data&&o.data.data)return o.data}).catch(o=>{throw console.error("An error occurred while processing the payment"),o})},Ml={name:"PaymentInfo",components:{Html2Pdf:ot},props:{viewItem:{type:Object,default:()=>{},required:!0},currentUMA:{type:Object,default(){return{}}},currentYear:{type:String,default:""},tiempoRestantePayment:{type:Object,default:()=>{},required:!0},searchParticipants:{type:Function,default(){return null}},getAssignedOperator:{type:Function,default(){return null}},noExpedienteCatastral:{type:String,default:""}},data(){return{dialogPayment:!1,carrierSelected:null,existCheckout:!1,printPaymentOrder:!1,dialogConfirmMethod:!1,MERCADO_PAGO_PUBLIC_TOKEN:this.$config.payments.mercadoPagoToken,mp:null,dialogConfirmChangeMethod:!1,selectPayment:!1,totalToPay:0,loadingPayment:!1,back_urls:null,viewDetailPayment:!1,UMA:null,year:null}},computed:{infoRequest:{get(){return this.viewItem}},currentUrl(){return $e().currentUrl},grecaptcha(){return $e().grecaptcha.enterprise}},watch:{async dialogPayment(e){const t=this,s=t.infoRequest.historical[t.infoRequest.stageNow-1];if(e===!0&&t.infoRequest.status2==="Pendiente de pago"&&s.pago){if(this.carrierSelected=s?.pago?.carrierSelected||null,this.selectPayment=this.carrierSelected,this.carrierSelected?.carrier==="Mercado Pago"&&s.pago.createdPreference===!0){const c=this.parseDate(Ne.now()),o=this.parseDate(s.pago.expiredAt);Rs(new Date(o),new Date(c))<0?await this.verifiedPreference():s.pago.pagado||this.checkout(s.pago.idPreference)}this.carrierSelected?.carrier==="Caja de cobro municipal"&&s.pago.createdOrderPayment===!0&&(t.printPaymentOrder=!0)}}},async mounted(){const e=this.infoRequest.historical[this.infoRequest.stageNow-1];e.configStage.currentUMA?(this.UMA=e.configStage.currentUMA,this.year=e.configStage.currentUMA.year):(this.UMA=this.currentUMA,this.year=this.currentYear),await this.checkStages(),this.viewDetailPayment=!0},methods:{async verifyPayment(){let e=null;const t=this;le().open();const s=await t.generateGrecaptchaToken(),c={orden_pago_id:parseFloat(t.infoRequest.historical[t.infoRequest.stageNow-1].pago.orderPaymentMTY.id),folio_tramite:t.infoRequest.folio||t.infoRequest.preFolio||t.infoRequest.id_reference,recaptcha_token:s};try{e=await Ol({method:"POST",url:"pagos-generales/orden-pago/estatus",data:c}),le().close(),e.status===200&&(e.data.estatus_id==="1018"||e.data.estatus_id===1018)?t.approvePayment(e):De().open({color:"error",text:"Está orden aún no se encuentra pagada"})}catch{le().close(),De().open({color:"error",text:"Ocurrió un error al verificar el pago"})}},async approvePayment(){const e=this,t=e.infoRequest,s=t.historical[t.stageNow-1],o=Ft("/tools/sales/billing/"+crypto.randomUUID()).id,r={folio:o,isTesting:!!t.isTesting,folioProcedure:t.folio||t.preFolio||t.id_reference,createdAt:Ne.now(),user:t.user,status:"Pagado",amount:t.historical[t.stageNow-1].pago.amount,procedure:t.title,procedureId:t.slugRequest,metadata:{},carrier:s.pago.carrierSelected.carrier,idPayment:null,carrierData:{dependency:s.pago.carrierSelected.dependency,clientID:s.pago.carrierSelected.clientID,id:s.pago.carrierSelected.id},path:{module:t.module,submodule:t.submodule,procedureId:t.slugRequest,idReference:t.id_reference},payment:{items:s.configStage.itemsPago,UMA:t.historical[t.stageNow-1].pago.uma||null},observation:"Verificando el estatus del pago desde la consola del ciudadano mediante la api de pagos-generales/orden-pago/estatus",stage:t.stageNow,expediente:s.pago.expediente};if(s.pago?.idPreference){r.idPref=s.pago.idPreference;const m=Ne.now();await e.cancelPreference(m)}await Bs("/tools/sales/billing",o,r),t.historical[t.stageNow-1].pago.statusPayment=!0,t.historical[t.stageNow-1].pago.idBilling=o,t.historical[t.stageNow-1].pago.idPayment=null,t.historical[t.stageNow-1].pago.dataPayment={},t.historical[t.stageNow-1].complete=!0,t.historical[t.stageNow-1].completeAt=Ne.now(),t.historical[t.stageNow-1].completeBy="",t.historical[t.stageNow-1].completeByEmail="",t.historical[t.stageNow-1].completeByName="",t.historical[t.stageNow-1].observation="Verificando el estatus del pago desde la consola del servidor/a público mediante la api de getPayment(Mercado Pago)",t.stageNow+=1,t.status2="En proceso";const d=await this.searchParticipants("stage");t.participants=d,t.participantsUid=d.map(m=>m.uid);const a=t.involvedOperators||[];t.participants.length===1?(t.assignedOperator=await this.getAssignedOperator(t.participants[0].uid),a.push(t.participants[0].uid||""),t.involvedOperators=a):t.assignedOperator=null,await Je(`/modules/${t.module}/${t.submodule}/${t.slugRequest}/answers/${t.id_reference}`,{...t}),De().open({color:"success",text:"Pago realizado, etapa de pago aprobada con éxito"})},formatPrice(e){if(e>=0)return Gt(e)},async selectMethodPayment(e){this.$analytics?.track?.(Se.payment_method_select,{payment_method:{"Mercado Pago":"mercadopago","Caja de cobro municipal":"caja"}[e?.carrier]||e?.carrier,value:this.totalToPay,procedure_id:this.infoRequest?.slugRequest}),await this.changeMethodPayment(),le().open(),this.carrierSelected=e,this.carrierSelected.commission=!1,this.carrierSelected.amountCommission=0,await this.processPayment(),le().close()},async changeMethodPayment(){const e=this,t=ke(e.carrierSelected);if(t)switch(t.carrier){case"Mercado Pago":{const s=Ne.now();await this.cancelPreference(s)!==null&&await e.resetDataPayment(s),e.existCheckout=!1}break;case"Caja de cobro municipal":{const s=Ne.now();await e.resetDataPayment(s)}break}},async processPayment(){const e=this;switch(this.carrierSelected.carrier){case"Mercado Pago":e.carrierSelected.commission=!0,await e.generateCheckout();break;case"Caja de cobro municipal":{le().open(),e.carrierSelected.commission=!1;const s=e.infoRequest.historical[e.infoRequest.stageNow-1]?.pago?.history||[],c=e.infoRequest.historical[e.infoRequest.stageNow-1]?.pago,o=Ne.now();s.push({type:"orderPayment",carrier:e.carrierSelected,date:o,expiredAt:e.infoRequest.historical[e.infoRequest.stageNow-1].configStage.paymentLimit,amount:e.totalToPay,uma:e.UMA?.diary||0,orderPaymentMTY:{id:c.orderPaymentMTY.id,metadata:c.orderPaymentMTY.metadata}}
3),e.infoRequest.historical[e.infoRequest.stageNow-1].pago={createdOrderPayment:c.createdOrderPayment,createdAtOrderPayment:c.createdAtOrderPayment,amount:e.totalToPay||0,uma:e.UMA?.diary||0,carrierSelected:e.carrierSelected,history:s,orderPaymentMTY:{id:c.orderPaymentMTY.id,metadata:c.orderPaymentMTY.metadata},expediente:e.noExpedienteCatastral||""};const r={historical:e.infoRequest.historical};await e.$emit("update",r),le().close()}break}},async cancelPreference(e){try{return(await Us({id:this.infoRequest.historical[this.infoRequest.stageNow-1].pago.idPreference,expiration_date_to:this.formatDateMP(new Date(e.seconds*1e3))})).response.id}catch{return null}},async resetDataPayment(e){let t=null;const s=this.infoRequest.historical[this.infoRequest.stageNow-1].pago.idPreference||null;s?t=await this.infoRequest.historical[this.infoRequest.stageNow-1].pago.history.map(function(r){return r.id===s&&(r.status="Cambio de método de pago",r.expiredAt=e),r}):t=await this.infoRequest.historical[this.infoRequest.stageNow-1].pago.history;const c={carrierSelected:null,amount:this.infoRequest.historical[this.infoRequest.stageNow-1].pago.amount,uma:this.infoRequest.historical[this.infoRequest.stageNow-1].pago.uma,history:t};this.infoRequest.historical[this.infoRequest.stageNow-1].pago=ke(c);const o={historical:this.infoRequest.historical};await this.$emit("update",o),this.carrierSelected=null},async generateCheckout(){this.$analytics?.track?.(Se.payment_button_initiate,{payment_method:"mercadopago",payment_gateway:"mercadopago",value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest});const e=this.infoRequest.historical[this.infoRequest.stageNow-1],t=this;le().open();const s=[],c={total:0,valor_uma:""};e.configStage.itemsPago.forEach(d=>{const a=e.configStage.momentDefinitionPayment===!0?d.amount:d.result,m=t.UMA?.diary||0;let v=d.payment==="Pesos"?parseFloat(a):parseFloat(m)*parseFloat(a);c.valor_uma=m,t.carrierSelected.amountCommission=0,v=parseFloat(t.carrierSelected.amountCommission)+parseFloat(v),v=parseFloat(v.toFixed(2)),c.total=parseFloat(c.total)+parseFloat(v),c.total=parseFloat(c.total.toFixed(2)),c.amountCommission=t.carrierSelected.amountCommission,s.push({title:d.concept,unit_price:v,quantity:1,description:d.description,currency_id:"MXN",id:d.code})});const o=this.infoRequest.user.email,r={items:s,payer:{name:this.infoRequest.user.firstName||"",surname:this.infoRequest.user.lastName+(this.infoRequest.user.lastName2?" "+this.infoRequest.user.lastName2:""),email:o,phone:{area_code:"",number:parseInt(this.infoRequest.formato.infoCiudadano.celular||0)},identification:{},address:{zip_code:this.infoRequest.formato.infoCiudadano.codigoPostal||"",street_name:this.infoRequest.formato.infoCiudadano.calle||"",street_number:parseInt(this.infoRequest.formato.infoCiudadano.numExterno||0)}},metadata:{cost:{amount:c.total,valor_uma:c.valor_uma,amount_commission:c.amountCommission},nombre_tramite:this.infoRequest.title,folio:this.folio||this.preFolio,module:this.infoRequest.module,submodule:this.infoRequest.submodule,slugRequest:this.infoRequest.slugRequest,uid:this.infoRequest.id_reference,uid_user:this.infoRequest.user.uid,userSend:!0,path:(this._.provides[Ae]||this.$route).fullPath}};await t.initializePreference(r)},async initializePreference(e){const t=this,s=Ne.now(),c=this.infoRequest.historical[this.infoRequest.stageNow-1].configStage.paymentLimit,o=this.currentUrl,r=this.infoRequest.slugRequest,d={items:e.items,payer:e.payer,metadata:e.metadata,external_reference:this.folio!==null?this.folio:this.preFolio,back_urls:{success:`${o}/expediente/module/${e.metadata.module}/${e.metadata.submodule}/${e.metadata.uid}?procedureId=${r}&loading=true&back_url=success&method=mercadopago`,failure:`${o}/expediente/module/${e.metadata.module}/${e.metadata.submodule}/${e.metadata.uid}?procedureId=${r}&loading=true&back_url=failure&method=mercadopago`,pending:`${o}/expediente/module/${e.metadata.module}/${e.metadata.submodule}/${e.metadata.uid}?procedureId=${r}&loading=true&back_url=pending&method=mercadopago`},auto_return:"approved",binary_mode:!0,payment_methods:{excluded_payment_methods:[{id:"oxxo"},{id:"clabe"}],excluded_payment_types:[{id:"ticket"},{id:"prepaid_card"},{id:"atm"}],installments:1},statement_descriptor:"MODULO DIGITAL",expires:!0,expiration_date_from:await this.formatDateMP(new Date(s.seconds*1e3)),expiration_date_to:await this.formatDateMP(new Date(c.seconds*1e3))},a=await this.generatePreference(d);await this.updatePreference(a,d.metadata);const m=this.infoRequest.historical[this.infoRequest.stageNow-1].pago?.history||[],v=new Date,p=parseFloat(e.metadata.cost.amount)-parseFloat(e.metadata.cost.amount_commission),u={type:"preference",carrier:this.carrierSelected,date:v,expiredAt:c,id:a,amount:p,amountCommission:e.metadata.cost.amount_commission,uma:t.UMA?.diary||0};if(m.push(u),a&&a!==null){this.infoRequest.historical[this.infoRequest.stageNow-1].pago={createdPreference:!0,idPreference:a,createdAtPreference:v,expiredAt:c,carrierSelected:this.carrierSelected,amount:p,amountCommission:e.metadata.cost.amount_commission,uma:t.UMA?.diary||0,history:m};const A={historical:this.infoRequest.historical};this.checkout(a),await this.$emit("update",A),le().close()}},async generatePreference(e){try{return await Fa(e)}catch(t){return console.error("ERROR",t),oe(t),null}},async updatePreference(e,t){try{return await Us({id:e,metadata:{...t,idPreference:e}})}catch{return null}},checkout(e){const t=this;this.mp=new MercadoPago(this.MERCADO_PAGO_PUBLIC_TOKEN,{locale:"es-MX"}),this.infoRequest.status2==="Pendiente de pago"&&this.mp.bricks().create("wallet","wallet_container",{initialization:{preferenceId:e,redirectMode:"modal"},callbacks:{onReady:()=>{this.existCheckout=!1},onSubmit:()=>{t.$analytics?.track?.(Se.payment_gateway_redirect,{payment_method:"mercadopago",payment_gateway:"mercadopago",procedure_id:t.infoRequest?.slugRequest}),t.dialogPayment=!1},onError:async()=>{const s=Ne.now();await t.resetDataPayment(s)}}})},async verifiedPreference(){let e=null;const t=this.infoRequest.historical[this.infoRequest.stageNow-1],s=t.pago.idPreference||null;e=await t.pago.history.map(function(c){return c.id===s&&(c.status="La preferencia caducó",c.expiredAt=t.pago.expiredAt),c}),this.infoRequest.historical[this.infoRequest.stageNow-1].pago.history=e,this.infoRequest.historical[this.infoRequest.stageNow-1].pago.idPreference=null,this.generateCheckout()},async confirmChangeMethod(){le().open(),await this.changeMethodPayment(),this.dialogConfirmChangeMethod=!1,le().close()},async checkStages(){const e=this,t=e.infoRequest.historical[e.infoRequest.stageNow-1];if(this.loadingPayment=(this._.provides[Ae]||this.$route).query.loading,this.infoRequest.status2==="Pendiente de pago"){let s=0;if(t.configStage.itemsPago.forEach(c=>{const o=t.configStage.momentDefinitionPayment===!0?c.amount:c.result,r=e.UMA?.diary||0,d=c.payment==="Pesos"?parseFloat(o):parseFloat(r)*parseFloat(o);s=parseFloat(s)+parseFloat(d)}),this.totalToPay=s.toFixed(2),this.back_urls=(this._.provides[Ae]||this.$route).query.back_url,(this.back_urls==="failure"||this.back_urls==="pending")&&this.$analytics?.track?.(Se.payment_return_failure,{payment_method:"mercadopago",payment_gateway:"mercadopago",procedure_id:this.infoRequest?.slugRequest}),this.back_urls==="success"&&this.loadingPayment==="true"&&this.infoRequest.status2==="Pendiente de pago"&&t?.pago?.idBilling){this.$analytics?.track?.(Se.payment_return_success,{payment_method:"mercadopago",payment_gateway:"mercadopago",value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest}),this.infoRequest.historical[this.infoRequest.stageNow-1].pago.idPayment=(this._.provides[Ae]||this.$route).query.payment_id;const c={status2:"Verificando pago",historical:this.infoRequest.historical};await e.createBilling(this.infoRequest.historical[this.infoRequest.stageNow-1].pago.idPreference,(this._.provides[Ae]||this.$route).query.payment_id,null,"Pendiente","Mercado Pago",t.configStage.itemsPago),await this.$emit("update",c)}t.pago&&t.pago.createdOrderPayment}},async createBilling(e,t,s,c,o,r){const a=Ft("/tools/sales/billing/"+crypto.randomUUID()).id,m=this.infoRequest,v={folio:a,isTesting:!!m.isTesting,folioProcedure:m.folio||m.preFolio||m.id_reference,createdAt:Ne.now(),user:m.user,status:c,amount:m.historical[m.stageNow-1].pago.amount,amountCommission:m.historical[m.stageNow-1].pago.amountCommission,procedure:m.title,procedureId:m.slugRequest,idExt:e,idPayment:t,metadata:JSON.stringify(s),carrier:o,carrierData:{dependency:m.historical[m.stageNow-1].pago.carrierSelected.dependency,clientID:m.historical[m.stageNow-1].pago.carrierSelected.clientID,id:m.historical[m.stageNow-1].pago.carrierSelected.id},path:{module:m.module,submodule:m.submodule,procedureId:m.slugRequest,idReference:m.id_reference},payment:{items:r,UMA:m.historical[m.stageNow-1].configStage.currentUMA||null},stage:m.stageNow};await Bs("/tools/sales/billing",a,v)},async downloadFile(){le().open(),await this.$refs.html2Pdf.generatePdf(),le().close()},getPrice(e){const t=this;let s=t.formatPrice(parseFloat(t.convertToNumber(e)));return s="$ "+s,s},convertToNumber(e){let t="";if(e){t=e.toString();const s=",$";for(let c=0;c<s.length;c++)t=t.replace(new RegExp(s.charAt(c),"g"),"")}return t},parseDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?new Date((e.seconds||e._seconds)*1e3):(e=new Date(e),new Date(e))}},formatDateMP(e){return ge(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")},getResponsible(){let e=this.viewItem.historical[this.viewItem.stageNow-1].configStage?.responsibleStagePayment||null;return e!==null?e=e.map(s=>s.nombre||s.name||s.first_name).toString():e="--",e},generateGrecaptchaToken(){return this.grecaptcha.enterprise.execute(this.$config.google.recaptchaToken,{action:"verify"}).then(e=>e).catch(e=>(console.error("error",e),e))}}},zl={class:"text-h5 font-weight-bold"},Ll={class:"caption text-center"},ql={class:"text-caption text-grey"},Bl={class:"text-caption text-grey"},jl={class:"text-caption text-grey"},Vl={key:1,class:"d-flex flex-column mt-4 text-center"},Ul={class:"text-caption"},Hl={key:0,class:""},Wl={class:"font-weight-bold d-flex justify-left text-primary py-0"},Gl={key:0,class:"text-caption py-2 text-grey"},Ql={key:0,class:"text-left"},Zl={key:0,id:"wallet_container"};function Yl(e,t,s,c,o,r){const d=Es,a=Ts,m=Nl,v=ot,p=zt;return r.infoRequest.status2==="Pendiente de pago"?(y(),T(k,{key:0,justify:"center",class:"flex-column"},{default:i(()=>[n(Oe,{color:"btnPrimary",variant:"outlined",align:"center",class:"px-5 py-8"},{default:i(()=>[n(k,{class:"justify-center flex-row"},{default:i(()=>[n(k,{class:"flex-column pa-5"},{default:i(()=>[n(k,{class:"text-caption text-grey justify-center"},{default:i(()=>
3[D(f(e.$t("details.payments.totalToPay")),1)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[l("div",null,[l("span",zl,"$ "+f(r.formatPrice(o.totalToPay))+" "+f(e.$t("AbrevMoneda")),1)])]),_:1}),n(k,{class:"justify-center pt-5"},{default:i(()=>[l("span",Ll,f(e.$t("timeRemainingPayment")),1)]),_:1}),n(k,{class:"flex-row justify-center"},{default:i(()=>[l("div",null,[l("div",null,f(s.tiempoRestantePayment.hora),1),l("div",ql,f(e.$t("details.hours")),1)]),t[7]||(t[7]=l("div",{class:"px-3"},":",-1)),l("div",null,[l("div",null,f(s.tiempoRestantePayment.minuto),1),l("div",Bl,f(e.$t("details.minutes")),1)]),t[8]||(t[8]=l("div",{class:"px-3"},":",-1)),l("div",null,[l("div",null,f(s.tiempoRestantePayment.segundo),1),l("div",jl,f(e.$t("details.seconds")),1)])]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"pa-3 justify-center d-grid"},{default:i(()=>[o.viewDetailPayment===!0?(y(),T(te,{key:0,class:"text-center text-caption px-5",color:"btnPrimary",size:"small",onClick:t[0]||(t[0]=u=>o.dialogPayment=!0)},{default:i(()=>[D(f(e.$t("details.payments.viewDetailsPayment")),1)]),_:1})):M("",!0),r.infoRequest.status2==="Pendiente de pago"&&r.infoRequest?.historical[r.infoRequest?.stageNow-1]?.pago?.orderPaymentMTY&&r.infoRequest?.historical[r.infoRequest?.stageNow-1]?.pago.carrierSelected!==null?(y(),j("div",Vl,[n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",variant:"outlined",onClick:t[1]||(t[1]=u=>r.verifyPayment())},{default:i(()=>[D(f(e.$t("details.payments.verifyNow")),1)]),_:1}),l("span",Ul,f(e.$t("details.payment.haveAlreadyPayment")),1)])):M("",!0)]),_:1}),n(Me,{modelValue:o.dialogPayment,"onUpdate:modelValue":t[6]||(t[6]=u=>o.dialogPayment=u),width:"800",persistent:"",scrollable:""},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,{class:"text-weight-medium"},{default:i(()=>[D(f(e.$t("details.payment.detailsPayment")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[2]||(t[2]=u=>o.dialogPayment=!1)})]),_:1}),o.dialogPayment===!0?(y(),T(Re,{key:0,class:"py-5 text-black"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",sm:"6",md:"6",lg:"6"},{default:i(()=>[n(d,{element:{procedure:r.infoRequest.title,status:r.infoRequest.status2,payment:{items:r.infoRequest.historical[r.infoRequest.stageNow-1].configStage.itemsPago},expediente:s.noExpedienteCatastral},"is-voucher":!1,uma:o.UMA},null,8,["element","uma"])]),_:1}),n(b,{cols:"12",sm:"6",md:"6",lg:"6",class:"pa-0 px-6"},{default:i(()=>[r.infoRequest.status2==="Pendiente de pago"?(y(),j("div",Hl,[l("span",Wl,f(e.$t("details.payment.selectedMethod")),1),r.infoRequest&&r.infoRequest.historical&&r.infoRequest.historical[r.infoRequest.stageNow-1]&&r.infoRequest.historical[r.infoRequest.stageNow-1].configStage&&r.infoRequest.historical[r.infoRequest.stageNow-1].configStage.carriers?(y(),T(Zt,{key:0,modelValue:o.selectPayment,"onUpdate:modelValue":[t[3]||(t[3]=u=>o.selectPayment=u),t[4]||(t[4]=u=>r.selectMethodPayment(o.selectPayment))],density:"compact"},{default:i(()=>[(y(!0),j(pe,null,Ee(r.infoRequest.historical[r.infoRequest.stageNow-1].configStage.carriers,u=>(y(),T(b,{key:`${u.clientID}`,cols:"12",class:"pl-0"},{default:i(()=>[n(be,{link:"","rounded-lg":"","elevation-3":""},{default:i(()=>[n(Re,{class:"pa-0 mb-2"},{default:i(()=>[n(k,{class:"px-5"},{default:i(()=>[n(b,{cols:"2",sm:"2",md:"1",lg:"1",class:""},{default:i(()=>[n(xt,{value:u},null,8,["value"])]),_:2},1024),n(b,{cols:"10",sm:"10",md:"6",lg:"6"},{default:i(()=>[n(a,{size:"small",carrier:u.carrier},null,8,["carrier"])]),_:2},1024),n(b,{cols:"12",sm:"5",md:"5",lg:"5"},{default:i(()=>[D(f(u.carrier),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024),u.carrier==="Mercado Pago"&&o.carrierSelected!==null&&o.carrierSelected.amountCommission>0?(y(),j("div",Gl," * Comisión por servicio del 3.49% + $4 "+f(e.$t("AbrevMoneda"))+" más IVA ",1)):M("",!0)]),_:2},1024))),128))]),_:1},8,["modelValue"])):M("",!0)])):M("",!0),o.carrierSelected!==null?(y(),j(pe,{key:1},[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8",class:"font-weight-bold"},{default:i(()=>[...t[9]||(t[9]=[D("Resumen",-1)])]),_:1}),n(b,{cols:"4"})]),_:1}),o.carrierSelected!==null&&o.carrierSelected.amountCommission>0?(y(),T(k,{key:0,"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8"},{default:i(()=>[...t[10]||(t[10]=[D("Total",-1)])]),_:1}),n(b,{cols:"4",class:"font-weight-bold"},{default:i(()=>[D(f(r.getPrice(o.totalToPay)),1)]),_:1})]),_:1})):M("",!0),o.carrierSelected!==null&&o.carrierSelected.amountCommission>0?(y(),T(k,{key:1,"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8"},{default:i(()=>[...t[11]||(t[11]=[D("Cargo",-1)])]),_:1}),n(b,{cols:"4",class:"font-weight-bold"},{default:i(()=>[D(f(r.getPrice(o.carrierSelected.amountCommission)),1)]),_:1})]),_:1})):M("",!0),o.carrierSelected!==null&&o.carrierSelected.amountCommission>0?(y(),T(k,{key:2,"no-gutters":"",class:"py-1"},{default:i(()=>[n(we)]),_:1})):M("",!0),n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8"},{default:i(()=>[...t[12]||(t[12]=[D("Total a pagar",-1)])]),_:1}),n(b,{cols:"4",class:"font-weight-bold"},{default:i(()=>
3[D(f(r.getPrice(parseFloat(o.totalToPay)+parseFloat(o.carrierSelected.amountCommission))),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{"no-gutters":"",class:"py-5"},{default:i(()=>[r.infoRequest.status2==="Pendiente de pago"&&r.infoRequest.historical[r.infoRequest.stageNow-1].pago&&r.infoRequest.historical[r.infoRequest.stageNow-1].pago.carrierSelected&&o.carrierSelected!==null?(y(),j("div",Ql,[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[o.carrierSelected.carrier==="Mercado Pago"?(y(),j("div",Zl)):M("",!0)]),_:1}),o.carrierSelected.carrier==="Caja de cobro municipal"?(y(),T(te,{key:0,class:"w-100 text-white",color:"btnPrimary",onClick:t[5]||(t[5]=u=>{o.printPaymentOrder=!0,r.downloadFile()})},{default:i(()=>[...t[13]||(t[13]=[D("Ver orden de pago",-1)])]),_:1})):M("",!0)])):M("",!0)]),_:1})],64)):M("",!0)]),_:1})]),_:1})]),_:1})):M("",!0),n(we)]),_:1})]),_:1},8,["modelValue"]),n(p,null,{default:i(()=>[n(v,{ref:"html2Pdf","show-layout":!1,"float-layout":!0,"enable-download":!1,"preview-modal":!0,"paginate-elements-by-height":2500,filename:"Pase de caja","pdf-quality":1.5,"manual-pagination":!1,"pdf-format":"a4","pdf-orientation":"portrait","pdf-content-width":"800px","html-to-pdf-options":{margin:[10,0,20,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}}},{"pdf-content":i(()=>[n(Mt,null,{default:i(()=>[o.printPaymentOrder==!0?(y(),T(be,{key:0,class:"pa-10 font-weight-bold"},{default:i(()=>[n(m,{element:{procedure:s.viewItem.title,status:s.viewItem.status2,payment:{items:s.viewItem.historical[s.viewItem.stageNow-1].configStage.itemsPago,payOrder:s.viewItem?.historical[s.viewItem?.stageNow-1]?.pago?.orderPaymentMTY?.id||"",metadata:JSON.parse(s.viewItem?.historical[s.viewItem?.stageNow-1]?.pago?.orderPaymentMTY?.metadata)},expediente:s.noExpedienteCatastral,user:s.viewItem.user},"is-voucher":!1,uma:o.UMA,folio:s.viewItem.folio!==null?s.viewItem.folio:s.viewItem.preFolio},null,8,["element","uma","folio"])]),_:1})):M("",!0)]),_:1})]),_:1},512)]),_:1})]),_:1})):M("",!0)}const Kl=Object.assign(_e(Ml,[["render",Yl],["__scopeId","data-v-a37b9082"]]),{__name:"PaymentInfo"}),Xl=async e=>{let t={type:e.method,url:`${e.url}`};return e.data&&(t=Object.assign({data:e.data},t)),e.reconciliacion&&(t.reconciliacion=e.reconciliacion),await Qt("payments-motordepagos-executeFunction")({...t}).then(c=>{if(c.data)return c.data}).catch(c=>{throw console.error("An error occurred:",c),c})},ls={motordepagos:Xl};function Jl(e,t){if(t&&typeof t=="object"&&"personalData"in t&&"validData"in t){const s=t.personalData||{};return[{etiqueta:"Nombre(s)",valor:s.name},{etiqueta:"Primer apellido",valor:s.lastName},{etiqueta:"Segundo apellido",valor:s.lastName2||s.secondLastName},{etiqueta:"CURP",valor:s.curp}].filter(o=>o.valor)}return[{etiqueta:e,valor:t}]}const Ks=/^[A-Za-z0-9/\-._]{1,60}$/,ed=ut({props:{viewItem:{type:Object,default:()=>{},required:!0},showTimePayment:{type:Boolean,default:!1,required:!0},tiempoRestantePayment:{type:Object,default:()=>{},required:!0},user:{type:Object,default:()=>{},required:!0},searchParticipants:{type:Function,default(){return null}},getAssignedOperator:{type:Function,default(){return null}},currentUMA:{type:Object,default:()=>{},required:!0},currentYear:{type:String,default:""},withSections:{type:Boolean,default:!1,required:!0}},setup(){return{...Fs()}},data(){return{token:null,dialogPayment:!1,dataTransaction:null,transactionData:null,selectPayment:null,dialogMessage:{title:"",val:!1,message:""},dataConfirmTransaction:{tarjeta:{},spei:{},ventanilla:{},bancoenlinea:{}},totalToPay:0,infoRequest:{status2:null,historical:[]},disabledPayment:!1,dataTransactionCuentas:null,idTransaction:null,idFolio:null,nodeEnv:this.$config.nodeEnv,avisosRetornoReportados:new Set,avisosFolioReportados:new Set,UMA:null,year:null}},computed:{validConfirm(){if(this.selectPayment){const e=this.selectPayment.metodopago_id;return e===1&&!this.dataConfirmTransaction.tarjeta.created||e===2&&!this.dataConfirmTransaction.spei.created||e===3&&!this.dataConfirmTransaction.ventanilla.created||e===4&&!this.dataConfirmTransaction.bancoenlinea.created}else return!1},existMethodActive(){return this.infoRequest.historical[this.infoRequest.stageNow-1]?.pago?.confirmTransaction===!0&&(this.dataConfirmTransaction.tarjeta?.created===!0||this.dataConfirmTransaction.spei?.created===!0||this.dataConfirmTransaction.ventanilla?.created===!0||this.dataConfirmTransaction.bancoenlinea?.created===!0)},currentUrl(){return $e().currentUrl}},watch:{async viewItem(e,t){const s=t.historical[t.stageNow-1].pago?.dataConfirmTransaction||{},c=e.historical[e.stageNow-1].pago?.dataConfirmTransaction||{};e.historical[e.stageNow-1].pago&&e.historical[e.stageNow-1].pago?.confirmTransaction===!0&&s!==c&&e?.tasksPayments?.paymentMethodLifetime===null?await this.initialize():(e.status2!==t.status2||!e.historical[e.stageNow-1]?.pago?.confirmTransaction)&&await this.initialize()}},async mounted(){await this.initialize()},methods:{async initialize(){le().open(),this.infoRequest=ke(this.viewItem);const e=this.infoRequest.historical[this.infoRequest.stageNow-1];e.configStage.currentUMA?(this.UMA=e.configStage.currentUMA,this.year=e.configStage.currentUMA.year):(this.UMA=this.currentUMA,this.year=this.currentYear),e?.pago?.confirmTransaction===!0&&e.pago.dataConfirmTransaction&&(this.dataConfirmTransaction=JSON.parse(e.pago.dataConfirmTransaction)),await this.getTotal(),le().close(),this.infoRequest.status2==="Pendiente de pago"&&this.checkPayment()},checkPayment(){let e=!1;const t=J=>Array.isArray(J)?(new Set(J.map(G=>String(G))).size>1&&(e=!0),J[0]):J,s=t((this._.provides[Ae]||this.$route).query.estatus),c=t((this._.provides[Ae]||this.$route).query.msg),o=t((this._.provides[Ae]||this.$route).query.id_transaccion),r=t((this._.provides[Ae]||this.$route).query.id_transaccion_motor),d=J=>J==null||String(J).trim()==="",a=(J,G)=>
3!d(J)&&!d(G)&&String(J)===String(G),m=[{nombre:"tarjeta",datos:this.dataConfirmTransaction.tarjeta},{nombre:"bancoenlinea",datos:this.dataConfirmTransaction.bancoenlinea}].filter(J=>J.datos&&J.datos.created),v=(J,G)=>{const U=J.datos.createdAt?.seconds||0,me=G.datos.createdAt?.seconds||0;return U!==me?U>me:(J.datos.createdAt?.nanoseconds||0)>(G.datos.createdAt?.nanoseconds||0)},p=J=>J.reduce((G,U)=>v(U,G)?U:G,J[0]),u=m.filter(J=>a(J.datos.idTransaction,o)),A=u.filter(J=>a(J.datos.idFolio,r));let g=m,C=m.length?"sin-evidencia":"sin-metodo-confirmado";A.length?(g=A,C="ambos-ids"):u.length&&(g=u,C="id-transaccion");const _=p(g),S=_?_.datos:{},I=_?_.nombre:"tarjeta",P=s==="1"&&c==="Correcto",F=Number(s)===1,L=e||d(s)||!Number.isFinite(Number(s))||F&&d(c),z=a(S.idTransaction,o),V=a(S.idFolio,r),X=z&&V;if(P&&X)this.$analytics?.track?.(Se.payment_return_success,{payment_method:I,payment_gateway:"motordepagos",value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest}),this.$emit("saveViewItem",{status2:"Verificando pago"});else if(s!==void 0||c!==void 0||o!==void 0||r!==void 0){let J="failure";L?J="incomplete_params":F&&(J=X?"unexpected_format":"id_mismatch"),this.$analytics?.track?.(Se.payment_return_failure,{payment_method:I,payment_gateway:"motordepagos",return_reason:J,value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest});const G=[];if(z||G.push("id_transaccion"),V||G.push("id_transaccion_motor"),(F||L)&&!this.avisosRetornoReportados.has(J)){this.avisosRetornoReportados.add(J);let U="PAYMENT_WARNING: retorno de pago con parámetros incompletos";L||(U=X?"PAYMENT_WARNING: retorno de pago confirmado con forma inesperada en estatus/msg":`PAYMENT_WARNING: retorno de pago sin coincidencia en ${G.join(" y ")}`),console.error(`PAYMENT_WARNING detalle: estatus=${s} msg=${c} | url id_transaccion=${o} id_transaccion_motor=${r} [${typeof r}] | almacenado id_transaccion=${S.idTransaction} idFolio=${S.idFolio} [${typeof S.idFolio}]`),oe(new Error(U),{level:"warning",tags:{flujo:"motordepagos",etapa:"retorno-de-pago"},extra:{estatus:s,msg:c,desajustes:G.join(","),parametroAmbiguo:e,atribucion:C,metodoElegido:_?I:null,idReference:this.infoRequest?.id_reference,urlIdTransaccion:o,urlIdTransaccionMotor:`${r} [${typeof r}]`,almacenadoIdTransaction:S.idTransaction,almacenadoIdFolio:`${S.idFolio} [${typeof S.idFolio}]`}})}}},trackGatewayRedirect(e){this.$analytics?.track?.(Se.payment_gateway_redirect,{payment_method:e,payment_gateway:"motordepagos",procedure_id:this.infoRequest?.slugRequest})},mensajeDeError(e,t){return e?.details?.motivo==="reconciliacion-no-garantizada"?"No se realizó ningún cargo. Intente nuevamente.":e?.details?.motivo==="rechazo-tesoreria"&&e?.details?.motivoTesoreria?`Error de TesorerÃa - ${e.details.motivoTesoreria}`:t},trackInitiateError(){this.$analytics?.track?.(Se.payment_initiate_error,{payment_gateway:"motordepagos",procedure_id:this.infoRequest?.slugRequest})},async viewDetailsPayment(){try{le().open();const e=this.infoRequest.historical[this.infoRequest.stageNow-1];e?.pago?.confirmTransaction===!0&&(this.selectPayment=e.pago.cuenta),await this.newTransaction()}catch(e){console.error(`PAYMENT_ERROR: viewDetailsPayment ${e}`),oe(e),this.dialogMessage={val:!0,title:this.$t("details.message"),message:"Ocurrió un error:"+e,icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"},le().close()}},async generateToken(){return(await ls.motordepagos({url:"token",data:{},method:"POST"}))?.data?.response[0]},async newTransaction(){this.$analytics?.track?.(Se.payment_button_initiate,{payment_gateway:"motordepagos",value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest});try{this.token=await this.generateToken();const e=await this.createTransaction();if(e!==null&&e.status===200&&e.data.response){this.dataTransaction=e.data.response,this.dataTransactionCuentas=this.removeDuplicate(this.dataTransaction.cuentas);const t=this.infoRequest.historical[this.infoRequest.stageNow-1].pago?.history||[];this.idFolio=e.data.response.folio,t.push({amount:this.totalToPay,createAtTransaction:Ne.now(),createTransaction:!0,idTransaction:this.idTransaction,idFolio:this.idFolio,idReferencia:e.data.response.referencia,dataTransaction:JSON.stringify(e.data.response)});const s=this.infoRequest.historical[this.infoRequest.stageNow-1].pago||{};this.infoRequest.historical[this.infoRequest.stageNow-1].pago={...s,amount:this.totalToPay,createAtTransaction:Ne.now(),createTransaction:!0,idTransaction:this.idTransaction,idFolio:this.idFolio,idReferencia:e.data.response.referencia,dataTransaction:JSON.stringify(e.data.response),history:t},await this.$emit("saveViewItem",this.infoRequest),le().close(),this.dialogPayment=!0}else this.trackInitiateError(),this.dialogMessage={val:!0,title:this.$t("details.message"),message:"Ocurrió un error, intente nuevamente",icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"},le().close()}catch(e){this.trackInitiateError(),console.error(`PAYMENT_ERROR: newTransaction ${e}`),oe(e,{tags:{flujo:"motordepagos",etapa:"crear-transaccion"},extra:{idReference:this.infoRequest?.id_reference,stage:this.infoRequest?.stageNow,co
3de:e?.code,details:e?.details}}),this.dialogMessage={val:!0,title:this.$t("details.message"),message:this.mensajeDeError(e,"Ocurrió un error, intente nuevamente"),icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"},le().close()}},generateId(){const t=Ne.now().seconds,s=this.infoRequest.folio||this.infoRequest.preFolio,c=s?s===this.infoRequest.id_reference?"PAYMENT_WARNING: el folio del expediente es el doc id al generar id_transaccion":Ks.test(s)?null:"PAYMENT_WARNING: folio con formato inutilizable al generar id_transaccion":"PAYMENT_WARNING: expediente sin folio ni preFolio al generar id_transaccion",o=c===null?s:this.infoRequest.id_reference,r=c!==null&&(o==null||!Ks.test(String(o)))?"PAYMENT_WARNING: el id del expediente tampoco pasa el formato utilizable al generar id_transaccion":c;return r!==null&&!this.avisosFolioReportados.has(r)&&(this.avisosFolioReportados.add(r),oe(new Error(r),{level:"warning",tags:{flujo:"motordepagos",etapa:"generar-id"},extra:{idReference:this.infoRequest.id_reference,folio:this.infoRequest.folio,preFolio:this.infoRequest.preFolio}})),`${o}-${t}`},async getConceptos(){const e=this,t=this.infoRequest.historical[this.infoRequest.stageNow-1],s=[];return await t.configStage.itemsPago.forEach(c=>{const o=t.configStage.momentDefinitionPayment===!0?c.amount:c.result,r=e.UMA?.diary||0;let d=c.payment==="Pesos"?parseFloat(o):parseFloat(r)*parseFloat(o);d=e.roundedAmount(d),s.push({concepto:c.concept,partida:c.partida?parseFloat(c.partida):52,importe_concepto:d})}),s},async createTransaction(){this.idTransaction=await this.generateId();const e=await this.getConceptos(),t=this.currentUrl,s=this.infoRequest.historical[this.infoRequest.stageNow-1],c=this.getAuxiliares(),o=ke(this.totalToPay),r=this.datosDelSolicitante(),d={token:this.token,url_retorno:`${t}/expediente/module/${this.infoRequest.module}/${this.infoRequest.submodule}/${this.infoRequest.id_reference}?procedureId=${this.infoRequest.slugRequest}&method=motorpagos`,importe_transaccion:o,id_transaccion:this.idTransaction,url_confirma_pago:`${this.$config.api.oscityEndpointsUrl}payments-motordepagos-ipnHandler`,tramite:[{id_seguimiento:this.idTransaction,id_tipo_servicio:parseInt(s.configStage.idProcedureNL),id_tramite:this.idTransaction,auxiliar_1:"",auxiliar_2:"",auxiliar_3:"",importe_tramite:o,datos_solicitante:r,datos_factura:r,detalle:e}]};return c!==null&&(d.tramite[0].auxiliar_1=JSON.stringify(c.auxiliar1),d.tramite[0].auxiliar_2=JSON.stringify(c.auxiliar2)),await ls.motordepagos({url:"pay",data:d,method:"POST",reconciliacion:{idReference:this.infoRequest.id_reference,stage:this.infoRequest.stageNow}})},async confirmTransaction(){this.$analytics?.track?.(Se.payment_method_select,{payment_method:{1:"tarjeta",2:"spei",3:"ventanilla",4:"bancoenlinea"}[this.selectPayment?.metodopago_id],payment_gateway:"motordepagos",value:this.totalToPay,currency:"MXN",procedure_id:this.infoRequest?.slugRequest}),le().open();try{this.token=await this.generateToken();const e=this,t={folio:this.dataTransaction.folio,cuenta_id:this.selectPayment.cuenta_id,token:this.token},s=await ls.motordepagos({url:"databank",data:t,method:"POST"});if(s.status===200&&s.data.response.error===0){let c="";switch(e.selectPayment.metodopago_id){case 1:c="tarjeta";break;case 2:c="spei";break;case 3:c="ventanilla";break;case 4:c="bancoenlinea";break}e.dataConfirmTransaction[c]={created:!0,idTransaction:e.idTransaction,idFolio:e.idFolio,createdAt:Ne.now(),...s.data.response};const o=e.infoRequest.historical[this.infoRequest.stageNow-1].pago;if(e.infoRequest.historical[this.infoRequest.stageNow-1].pago={...o,confirmTransaction:!0,dataConfirmTransaction:JSON.stringify(e.dataConfirmTransaction),cuenta:e.selectPayment,cuentaId:e.selectPayment.cuenta_id,confirmTransactionAt:Ne.now()},e.selectPayment.metodopago_id===3||e.selectPayment.metodopago_id===2){const r=e.dataConfirmTransaction[c].datos.fecha_limite;e.infoRequest.historical[e.infoRequest.stageNow-1].configStage.paymentLimit=new Date(r)}await this.$emit("saveViewItem",this.infoRequest),e.selectPayment.metodopago_id===3||e.selectPayment.metodopago_id===2?(await e.generateTaskReference(e.infoRequest,e.dataConfirmTransaction,c),e.dialogPayment=!1,le().close()):(e.dialogPayment=!1,le().close())}}catch(e){console.error(`PAYMENT_ERROR: confirmTransaction ${e}
3`),oe(e,{tags:{flujo:"motordepagos",etapa:"confirmar-transaccion"},extra:{idReference:this.infoRequest?.id_reference,stage:this.infoRequest?.stageNow,metodoPagoId:this.selectPayment?.metodopago_id,code:e?.code,details:e?.details}}),this.dialogMessage={val:!0,title:this.$t("details.message"),message:this.mensajeDeError(e,"Ocurrió un error:"+e),icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"},le().close()}},async generateTaskReference(e,t,s){const c=t[s].datos.fecha_limite;if(this.nodeEnv!=="development"){const o=await this.generateTaskFromSeconds({...e,answerInfo:{docId:e.id_reference,moduleId:e.module,submoduleId:e.submodule,procedureId:e.slugRequest},method:{type:s,...t[s]}},c,"payments-motordepagos-paymentMethodLifetime","proceduresStagesTasksQueue");if(o&&o.data.name){const r=this.infoRequest.tasksPayments||{};await this.$emit("saveViewItem",{tasksPayments:{...r,paymentMethodLifetime:[o.data.name]}})}}},removeDuplicate(e){const t=[];return e.forEach(s=>{t.filter(o=>o.cuenta_id===s.cuenta_id).length===0&&t.push(s)}),t},formatPrice(e){if(e>=0)return Gt(e)},getTotal(){const e=this,t=this.infoRequest.historical[this.infoRequest.stageNow-1];if(this.infoRequest.status2==="Pendiente de pago"){let s=0;t.configStage.itemsPago.forEach(c=>{const o=t.configStage.momentDefinitionPayment===!0?c.amount:c.result,r=e.UMA?.diary||0;let d=c.payment==="Pesos"?parseFloat(o):parseFloat(r)*parseFloat(o);d=e.roundedAmount(d),s=parseFloat(s)+parseFloat(d)}),this.totalToPay=s}},getPrice(e){let t=this.formatPrice(parseFloat(this.convertToNumber(e)));return t="$ "+t,t},convertToNumber(e){let t="";if(e){t=e.toString();const s=",$";for(let c=0;c<s.length;c++)t=t.replace(new RegExp(s.charAt(c),"g"),"")}return t},closeDialogMessage(){this.$nextTick(function(){this.dialogMessage={...this.dialogMessage,val:!1}})},roundedAmount(e){return this.redondearAEnteros(e)},redondearAEnteros(e){const t=Math.floor(e);return e-t>=.51?Math.ceil(e):Math.floor(e)},datosDelSolicitante(){const e=t=>t==null?"":String(t);return{nombre:e(this.user.first_name),apellido_paterno:e(this.user.last_name),apellido_materno:e(this.user.last_name2),razon_social:this.user.first_name?"":e(this.user.name),rfc:e(this.user.rfc),curp:e(this.user.curp),email:e(this.user.email),calle:e(this.user.calle),colonia:e(this.user.colonia),numexterior:e(this.user.num_ext),numinterior:e(this.user.num_int),municipio:e(this.user.municipio),codigopostal:e(this.user.cp)}},getAuxiliares(){const e=this.infoRequest.historical[this.infoRequest.stageNow-1];if(e.configStage.type==="pagos"&&e.configStage.sendAux){const t=this,s=t.infoRequest.saveParent.questions,c=e.configStage.auxiliar1||[],o=e.configStage.auxiliar2||[],r=[],d=[],a=(m,v)=>{m.forEach(p=>{const u=p.id?ke(p):s.find(g=>g.uid===p);if(!u){oe(new Error("PAYMENT_ERROR: auxiliar configurado que no existe en las preguntas del expediente"),{tags:{flujo:"motordepagos",etapa:"auxiliares"},extra:{auxiliarUid:typeof p=="string"?p:p?.uid,idReference:t.infoRequest?.id_reference,slugRequest:t.infoRequest?.slugRequest,stage:t.infoRequest?.stageNow}});return}const A=t.withSections?t.infoRequest[u.section]?.schema[u.id]:t.infoRequest[u.id];A&&v.push(...Jl(u.label,A))})};return c.length>0&&a(c,r),o.length>0&&a(o,d),{auxiliar1:r,auxiliar2:d}}return null}}}),td={class:"d-flex flex-column align-center"},sd={class:"my-2"},id={class:"text-h5 font-weight-bold"},ad={class:"text-caption text-center pt-5"},nd={class:"d-flex justify-center align-center mt-2"},od={class:"text-center"},rd={class:"text-h6"},ld={class:"text-center"},dd={class:"text-h6"},cd={class:"text-center"},ud={class:"text-h6"},md={class:"pl-1 text-h6 font-weight-bold"},fd={class:"pl-1 text-h6 font-weight-bold"},pd={class:"pl-1 text-h6 font-weight-bold"},hd={class:"pl-1 text-h6 font-weight-bold"},gd={class:"mt-4"},yd={class:"pl-1 text-h6 font-weight-bold"},bd={class:"pl-1 text-h6 font-weight-bold"},vd={class:"pl-1 text-h6 font-weight-bold"},wd={class:"pl-1 text-h6 font-weight-bold"},_d=["innerHTML"];function Ad(e,t,s,c,o,r){const d=Es;return e.infoRequest.status2==="Pendiente de pago"?(y(),T(k,{key:0,justify:"center",class:"flex-column"},{default:i(()=>[e.showTimePayment===!0?(y(),T(Oe,{key:0,color:"btnPrimary",variant:"outlined",align:"center",class:"px-5 py-8"},{default:i(()=>[l("div",td,[t[16]||(t[16]=l("div",{class:"text-caption text-grey"},"TOTAL A PAGAR",-1)),l("div",sd,[l("span",id,"$ "+f(e.formatPrice(e.totalToPay))+" "+f(e.$t("AbrevMoneda")),1)]),l("div",ad,f(e.$t("timeRemainingPayment")),1),l("div",nd,[l("div",od,[l("div",rd,f(e.tiempoRestantePayment.hora),1
3),t[11]||(t[11]=l("div",{class:"text-caption text-grey"},"Horas",-1))]),t[14]||(t[14]=l("div",{class:"px-3 text-h6"},":",-1)),l("div",ld,[l("div",dd,f(e.tiempoRestantePayment.minuto),1),t[12]||(t[12]=l("div",{class:"text-caption text-grey"},"Minutos",-1))]),t[15]||(t[15]=l("div",{class:"px-3 text-h6"},":",-1)),l("div",cd,[l("div",ud,f(e.tiempoRestantePayment.segundo),1),t[13]||(t[13]=l("div",{class:"text-caption text-grey"},"Segundos",-1))])])])]),_:1})):M("",!0),e.existMethodActive===!0?(y(),T(k,{key:1,class:"pa-3 justify-center d-grid"},{default:i(()=>[t[29]||(t[29]=l("h6",{class:"text-body-2 font-weight-bold pb-3",style:{color:"rgb(var(--v-theme-btnSecondary)) !important"}}," OPCIÃN DE PAGO ELEGIDA ",-1)),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.tarjeta.created===!0?(y(),j(pe,{key:0},[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"pb-3 justify-center"},{default:i(()=>[...t[17]||(t[17]=[l("span",null,"Pago con tarjeta de crédito o débito",-1)])]),_:1}),e.dataConfirmTransaction.tarjeta.datos.id_transaccion_motor?(y(),T(k,{key:0},{default:i(()=>[t[18]||(t[18]=l("span",{class:"ma-auto"},"FOLIO:",-1)),l("span",md,f(e.dataConfirmTransaction.tarjeta.datos.id_transaccion_motor),1)]),_:1})):M("",!0)]),_:1}),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",href:e.dataConfirmTransaction.tarjeta.url_response,onClick:t[0]||(t[0]=a=>e.trackGatewayRedirect("tarjeta"))},{default:i(()=>[...t[19]||(t[19]=[D(" Ir a pagar ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.spei.created===!0?(y(),j(pe,{key:1},[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"my-3"},{default:i(()=>[n(we)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[...t[20]||(t[20]=[l("span",null,"Pago con SPEI",-1)])]),_:1}),e.dataConfirmTransaction.spei.datos.id_transaccion_motor?(y(),T(k,{key:0},{default:i(()=>[t[21]||(t[21]=l("span",{class:"ma-auto"},"FOLIO:",-1)),l("span",fd,f(e.dataConfirmTransaction.spei.datos.id_transaccion_motor),1)]),_:1})):M("",!0)]),_:1}),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",target:"_blank",href:e.dataConfirmTransaction.spei.datos.url_recibo},{default:i(()=>
3[...t[22]||(t[22]=[D(" Ver formato de pago ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.ventanilla.created===!0?(y(),j(pe,{key:2},[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"my-3"},{default:i(()=>[n(we)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[...t[23]||(t[23]=[l("span",null,"Pago en ventanilla",-1)])]),_:1}),e.dataConfirmTransaction.ventanilla.datos.id_transaccion_motor?(y(),T(k,{key:0},{default:i(()=>[t[24]||(t[24]=l("span",{class:"ma-auto"},"FOLIO:",-1)),l("span",pd,f(e.dataConfirmTransaction.ventanilla.datos.id_transaccion_motor),1)]),_:1})):M("",!0)]),_:1}),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",target:"_blank",href:e.dataConfirmTransaction.ventanilla.datos.url_recibo},{default:i(()=>[...t[25]||(t[25]=[D(" Ver formato de pago ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.bancoenlinea.created===!0?(y(),j(pe,{key:3},[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"my-3"},{default:i(()=>[n(we)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[...t[26]||(t[26]=[l("span",null,"Pago en banco en lÃnea",-1)])]),_:1}),e.dataConfirmTransaction.bancoenlinea.datos.id_transaccion_motor?(y(),T(k,{key:0},{default:i(()=>[t[27]||(t[27]=l("span",{class:"ma-auto"},"FOLIO:",-1)),l("span",hd,f(e.dataConfirmTransaction.bancoenlinea.datos.id_transaccion_motor),1)]),_:1})):M("",!0)]),_:1}),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",href:e.dataConfirmTransaction.bancoenlinea.url_response,onClick:t[1]||(t[1]=a=>e.trackGatewayRedirect("bancoenlinea"))},{default:i(()=>[...t[28]||(t[28]=[D(" Ir a pagar ",-1)])]),_:1},8,["href"])],64)):M("",!0)]),_:1})):M("",!0),n(k,{class:"pa-3 justify-center d-grid"},{default:i(()=>[e.existMethodActive===!1?(y(),T(te,{key:0,class:"text-center text-caption px-5",color:"btnPrimary",size:"small",onClick:t[2]||(t[2]=a=>e.viewDetailsPayment())},{default:i(()=>[D(f(e.$t("details.payments.viewDetailsPayment")),1)]),_:1})):M("",!0)]),_:1}),n(Me,{modelValue:e.dialogPayment,"onUpdate:modelValue":t[8]||(t[8]=a=>e.dialogPayment=a),width:"850",persistent:"",scrollable:""},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,{class:"text-weight-medium"},{default:i(()=>[...t[30]||(t[30]=[D(" Detalle de pago ",-1)])]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[3]||(t[3]=a=>e.dialogPayment=!1)})]),_:1}),e.dialogPayment===!0?(y(),T(Re,{key:0,class:"py-5 text-black"},{default:i(()=>[n(k,{style:"min-height:400px"},{default:i(()=>[n(b,{cols:"12",sm:"6",md:"6",lg:"6"},{default:i(()=>[n(d,{element:{procedure:e.infoRequest.title,status:e.infoRequest.status2,payment:{items:e.infoRequest.historical[e.infoRequest.stageNow-1].configStage.itemsPago}},"is-voucher":!1,uma:e.UMA},null,8,["element","uma"])]),_:1}),n(b,{cols:"12",sm:"6",md:"6",lg:"6",class:"pa-0 px-6"},{default:i(()=>[l("div",gd,[t[31]||(t[31]=l("span",{class:"font-weight-bold d-flex justify-left text-primary py-0"},"Elije un método de pago",-1)),n(Zt,{modelValue:e.selectPayment,"onUpdate:modelValue":t[4]||(t[4]=a=>e.selectPayment=a),density:"compact"},{default:i(()=>[(y(!0),j(pe,null,Ee(e.dataTransactionCuentas,(a,m)=>(y(),T(b,{key:`cuenta${m}`,cols:"12",class:"pl-0"},{default:i(()=>[n(be,{link:"","rounded-lg":"","elevation-3":""},{default:i(()=>[n(Re,{class:"pa-0 mb-2"},{default:i(()=>[n(k,{class:"px-5"},{default:i(()=>[n(b,{cols:"2",sm:"2",md:"1",lg:"1",class:""},{default:i(()=>[n(xt,{value:a},null,8,["value"])]),_:2},1024),n(b,{cols:"10",sm:"10",md:"10",lg:"10"},{default:i(()=>[l("span",null,f(a.metodo),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8",class:"font-weight-bold"},{default:i(()=>[...t[32]||(t[32]=[D("Resumen",-1)])]),_:1}),n(b,{cols:"4"})]),_:1}),n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8"},{default:i(()=>[...t[33]||(t[33]=[D("Total a pagar",-1)])]),_:1}),n(b,{cols:"4",class:"font-weight-bold"},{default:i(()=>[D(f(e.getPrice(parseFloat(e.totalToPay)))+" "+f(e.$t("AbrevMoneda")),1)]),_:1})]),_:1})]),_:1})]),_:1}),e.validConfirm===!0?(y(),T(k,{key:0,class:"justify-end mt-0"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(we)]),_:1}),n(te,{class:"text-center text-caption px-5 mr-3",color:"btnPrimary",size:"small",disabled:e.selectPayment===null,onClick:t[5]||(t[5]=a=>e.confirmTransaction())},{default:i(()=>[...t[34]||(t[34]=[D("Confirmar",-1)])]),_:1},8,["disabled"])]),_:1})):(y(),T(k,{key:1,class:"justify-end mt-0"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(we)]),_:1}),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.tarjeta.created===!0&&e.selectPayment.metodopago_id===1?(y(),j(pe,{key:0},[e.dataConfirmTransaction.tarjeta.datos.id_transaccion_motor?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[t[35]||(t[35]=l("span",{class:"my-auto"},"FOLIO:",-1)),l("span",yd,f(e.dataConfirmTransaction.tarjeta.datos.id_transaccion_motor),1)]),_:1})]),_:1})):M("",!0),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",href:e.dataConfirmTransaction.tarjeta.url_response,onClick:t[6]||(t[6]=a=>e.trackGatewayRedirect("tarjeta"))},{default:i(()=>[...t[36]||(t[36]=[D(" Ir a pagar ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.spei.created===!0&&e.selectPayment.metodopago_id===2?(y(),j(pe,{key:1},[e.dataConfirmTransaction.spei.datos.id_transaccion_motor?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[t[37]||(t[37]=l("span",{class:"my-auto"},"FOLIO:",-1)),l("span",bd,f(e.dataConfirmTransaction.spei.datos.id_transaccion_motor),1)]),_:1})]),_:1})):M("",!0),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",target:"_blank",href:e.dataConfirmTransaction.spei.datos.url_recibo},{default:i(()=>
3[...t[38]||(t[38]=[D(" Ver formato de pago ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.ventanilla.created===!0&&e.selectPayment.metodopago_id===3?(y(),j(pe,{key:2},[e.dataConfirmTransaction.ventanilla.datos.id_transaccion_motor?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[t[39]||(t[39]=l("span",{class:"my-auto"},"FOLIO:",-1)),l("span",vd,f(e.dataConfirmTransaction.ventanilla.datos.id_transaccion_motor),1)]),_:1})]),_:1})):M("",!0),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",target:"_blank",href:e.dataConfirmTransaction.ventanilla.datos.url_recibo},{default:i(()=>[...t[40]||(t[40]=[D(" Ver formato de pago ",-1)])]),_:1},8,["href"])],64)):M("",!0),e.infoRequest.status2==="Pendiente de pago"&&e.dataConfirmTransaction.bancoenlinea.created===!0&&e.selectPayment.metodopago_id===4?(y(),j(pe,{key:3},[e.dataConfirmTransaction.bancoenlinea.datos.id_transaccion_motor?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[t[41]||(t[41]=l("span",{class:"my-auto"},"FOLIO:",-1)),l("span",wd,f(e.dataConfirmTransaction.bancoenlinea.datos.id_transaccion_motor),1)]),_:1})]),_:1})):M("",!0),n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",href:e.dataConfirmTransaction.bancoenlinea.url_response,onClick:t[7]||(t[7]=a=>e.trackGatewayRedirect("bancoenlinea"))},{default:i(()=>[...t[42]||(t[42]=[D(" Ir a pagar ",-1)])]),_:1},8,["href"])],64)):M("",!0)]),_:1}))]),_:1})]),_:1})]),_:1})):M("",!0),n(we)]),_:1})]),_:1},8,["modelValue"]),n(Me,{modelValue:e.dialogMessage.val,"onUpdate:modelValue":t[10]||(t[10]=a=>e.dialogMessage.val=a),width:"500",scrollable:""},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(Re,{class:"py-5 text-black"},{default:i(()=>[l("div",{class:"mt-5 text-center",style:ht({color:e.dialogMessage.textColor})},[e.dialogMessage.icon?(y(),T(ve,{key:0,color:e.dialogMessage.iconColor},{default:i(()=>[D(f(e.dialogMessage.icon),1)]),_:1},8,["color"])):M("",!0),l("label",{innerHTML:e.dialogMessage.message},null,8,_d)],4)]),_:1}),n(we),n(Ke,{class:"justify-center py-5"},{default:i(()=>[n(te,{color:"primary",class:"rounded-lg",onClick:t[9]||(t[9]=a=>e.closeDialogMessage())},{default:i(()=>[D(f(e.$t("ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})):M("",!0)}const Dd=Object.assign(_e(ed,[["render",Ad]]),{__name:"MotorDePagos"});function Ci(){if(typeof window>"u")return null;const e=window.$nuxt||null;return e&&e.$sovraLog?e.$sovraLog:null}const kd=async e=>{let t={type:e.method,url:`${e.url}`};e.data&&(t=Object.assign({data:e.data},t));{const a=$e().getUser.token||localStorage.getItem("BM_Token");a&&(t=Object.assign({token:a},t))}const s=ni();t={...t,correlation_id:s};const c=Qt("payments-macropago-executeFunction"),o=Ci(),r=Date.now();return o?.emit({service_id:"pagos.bancomacro",action:"request",correlation_id:s,tags:{surface:"citizen.callable",callable:"payments-macropago-executeFunction"}}),await c({...t}).then(d=>{if(d.data&&d.data.data)return o?.emit({service_id:"pagos.bancomacro",action:"response",correlation_id:s,duration_ms:Date.now()-r,tags:{surface:"citizen.callable",callable:"payments-macropago-executeFunction"}}),d.data;throw new Error("Invalid response format")}).catch(d=>{throw o?.emit({service_id:"pagos.bancomacro",action:"error",level:"error",correlation_id:s,duration_ms:Date.now()-r,tags:{surface:"citizen.callable",callable:"payments-macropago-executeFunction"},error:{type:d&&d.code,message:d&&d.message||String(d)}}),console.error("An error occurred:",d),d})},Id=async e=>{let t={type:e.method,url:""};e.data&&(t=Object.assign({data:e.data},t));{const a=$e().getUser.token||localStorage.getItem("BM_Token");a&&(t=Object.assign({token:a},t))}const s=ni();t={...t,correlation_id:s};const c=Qt("payments-macropago-initBancoMacro"),o=Ci(),r=Date.now();o?.emit({service_id:"pagos.bancomacro",action:"request",correlation_id:s,tags:{surface:"citizen.callable",callable:"payments-macropago-initBancoMacro"}});try{const d=await c(t);if(d?.data?.data)return o?.emit({service_id:"pagos.bancomacro",action:"response",correlation_id:s,duration_ms:Date.now()-r,tags:{surface:"citizen.callable",callable:"payments-macropago-initBancoMacro"}}),d.data;throw new Error("Invalid response format")}catch(d){throw o?.emit({service_id:"pagos.bancomacro",action:"error",level:"error",correlation_id:s,duration_ms:Date.now()-r,tags:{surface:"citizen.callable",callable:"payments-macropago-initBancoMacro"},error:{type:d&&d.code,message:d&&d.message||String(d)}}),console.error("An error occurred:",d),d}},Xs={bancoMacro:kd,initBancoMacro:Id},Cd={name:"Formulario",props:{infoRequest:{type:Object,default:()=>{},required:!0},items:{type:Array,default:()=>[],required:!0},user:{type:Object,default:()=>{},required:!0},total:{type:Number,default:0,required:!0},UMA:{type:Object,default:()=>{},required:!0}},data(){return{form:{CALLBACKSUCCESS:"",CALLBACKCANCEL:"",CALLBACKPENDING:"",COMERCIO:"",SUCURSALCOMERCIO:"",TRANSACCIONCOMERCIOID:"",MONTO:"",PRODUCTO:[],MONTOPRODUCTO:[],HASH:"",INFORMACION:"",CLIENTDATA:{CUIT:"",NOMBREAPELLIDO:""}},urlClicPago:this.$config.payments.clicpagoUrl}},computed:{currentUrl(){return $e().currentUrl}},methods:{async initialize(){const e={module:this.infoRequest.module,submodule:this.infoRequest.submodule,slugRequest:this.infoRequest.slugRequest,id_reference:this.infoRequest.i
3d_reference,url:this.currentUrl,UMA:this.UMA};try{const t=await Xs.initBancoMacro({method:"POST",data:e});this.form=t.data}catch{throw new Error("No se pudo procesar los datos")}},async health(){return await Xs.bancoMacro({method:"GET",url:"health"})},async checkUrlAndSubmit(){le().open(),this.$analytics?.track?.(Se.payment_button_initiate,{payment_method:"clickdepago",payment_gateway:"bancomacro",value:this.total,currency:"ARS",procedure_id:this.infoRequest?.slugRequest});try{const e=await this.health();if(e&&e.status===200)await this.initialize(),this.$analytics?.track?.(Se.payment_gateway_redirect,{payment_method:"clickdepago",payment_gateway:"bancomacro",procedure_id:this.infoRequest?.slugRequest}),this.$refs.myForm.submit();else throw new Error("Servicio de Banco Macro no disponible")}catch(e){le().close(),console.error("PAYMENT_ERROR: checkUrlAndSubmit",e),oe(e);const t={title:"Mensaje",val:!0,message:e.message};this.$emit("setDialogMessage",t)}}}},Sd=["action"];function Pd(e,t,s,c,o,r){return y(),T(k,{justify:"center",class:"flex-column"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[l("form",{ref:"myForm",method:"post",action:o.urlClicPago,onSubmit:t[7]||(t[7]=ji((...d)=>r.checkUrlAndSubmit&&r.checkUrlAndSubmit(...d),["prevent"]))},[n(We,{id:"CallbackSuccess",modelValue:o.form.CALLBACKSUCCESS,"onUpdate:modelValue":t[0]||(t[0]=d=>o.form.CALLBACKSUCCESS=d),name:"CallbackSuccess",class:"d-none"},null,8,["modelValue"]),n(We,{id:"CallbackCancel",modelValue:o.form.CALLBACKCANCEL,"onUpdate:modelValue":t[1]||(t[1]=d=>o.form.CALLBACKCANCEL=d),name:"CallbackCancel",class:"d-none"},null,8,["modelValue"]),n(We,{modelValue:o.form.COMERCIO,"onUpdate:modelValue":t[2]||(t[2]=d=>o.form.COMERCIO=d),name:"Comercio",value:"4a1b7353-f242-4ce8-9305-5bcae83dcce9",class:"d-none"},null,8,["modelValue"]),n(We,{id:"SucursalComercio",modelValue:o.form.SUCURSALCOMERCIO,"onUpdate:modelValue":t[3]||(t[3]=d=>o.form.SUCURSALCOMERCIO=d),name:"SucursalComercio",class:"d-none"},null,8,["modelValue"]),n(We,{id:"TransaccionComercioId",modelValue:o.form.TRANSACCIONCOMERCIOID,"onUpdate:modelValue":t[4]||(t[4]=d=>o.form.TRANSACCIONCOMERCIOID=d),name:"TransaccionComercioId",class:"d-none"},null,8,["modelValue"]),n(We,{id:"Monto",modelValue:o.form.MONTO,"onUpdate:modelValue":t[5]||(t[5]=d=>o.form.MONTO=d),name:"Monto",class:"d-none"},null,8,["modelValue"]),n(We,{modelValue:o.form.INFORMACION,"onUpdate:modelValue":t[6]||(t[6]=d=>o.form.INFORMACION=d),name:"Informacion",class:"d-none"},null,8,["modelValue"]),(y(!0),j(pe,null,Ee(o.form.PRODUCTO,(d,a)=>(y(),T(We,{key:`${a}-PRODUCTO`,"model-value":d,name:`Producto[${a}]`,class:"d-none"},null,8,["model-value","name"]))),128)),(y(!0),j(pe,null,Ee(o.form.MONTOPRODUCTO,(d,a)=>(y(),T(We,{key:`${a}-MONTO`,"model-value":d,name:`MontoProducto[${a}]`,class:"d-none"},null,8,["model-value","name"]))),128)),n(te,{block:"",class:"primary",type:"submit"},{default:i(()=>[...t[8]||(t[8]=[D(" PAGAR ",-1)])]),_:1})],40,Sd)]),_:1})]),_:1})]),_:1})}const Ed=Object.assign(_e(Cd,[["render",Pd]]),{__name:"Formulario"}),Td={name:"BancoMacro",props:{viewItem:{type:Object,default:()=>{},required:!0},tiempoRestantePayment:{type:Object,default:()=>{},required:!0},user:{type:Object,default:()=>{},required:!0},searchParticipants:{type:Function,default(){return null}},getAssignedOperator:{type:Function,default(){return null}},currentUMA:{type:Object,default:()=>{},required:!0},currentYear:{type:String,default:""}},data(){return{dialogPayment:!1,carrierSelected:null,dialogConfirmMethod:!1,dialogConfirmChangeMethod:!1,selectPayment:!1,totalToPay:0,loadingPayment:!1,viewDetailPayment:!1,infoRequest:{status2:null,historical:[]},dialogMessage:{title:"",val:!1,message:""},carriers:[{carrier:"Macro Pago - Click de pago",clientID:"Macro Pago - Click de pago",dependency:"Luján",id:"MacroPagoClickDePago",type:"ClickDePago",title:"Macro Pago - Tarjetas de crédito y débito (Click de pago)"}],UMA:null,year:null}},watch:{dialogPayment(e){const{infoRequest:t}=this,s=t.historical[t.stageNow-1];e&&t.status2==="Pendiente de pago"&&s.pago&&(this.carrierSelected=s.pago?.carrierSelected||null,this.carrierSelected?.carrier==="Macro Pago - Debin"&&!s.pago?.debin?.generateDebin&&(this.carrierSelected=null),this.selectPayment=this.carrierSelected)}},async mounted(){this.infoRequest=ke(this.viewItem);const e=this.infoRequest.historical[this.infoRequest.stageNow-1],t=e.configStage;if(t.currentUMA?(this.UMA=t.currentUMA,this.year=t.currentUMA.year):(this.UMA=this.currentUMA,this.year=this.currentYear),await this.getTotal(),this.back_urls=(this._.provides[Ae]||this.$route).query.backUrl,this.back_urls==="success"&&this.infoRequest.status2==="Pendiente de pago"&&e?.pago?.idBilling){this.$analytics?.track?.(Se.payment_return_success,{payment_method:e?.pago?.carrierSelected?.type==="ClickDePago"?"clickdepago":e?.pago?.carrierSelected?.type,payment_gateway:"bancomacro",value:this.totalToPay,currency:"ARS",procedure_id:this.infoRequest?.slugRequest});const s={status2:"Verificando pago"};await this.$emit("update",s)}else this.back_urls&&this.back_urls!=="success"&&this.infoRequest.status2==="Pendiente de pago"&&this.$analytics?.track?.(Se.payment_return_failure,{payment_method:"clickdepago",payment_gateway:"bancomacro",return_reason:/cancel/i.test(this.back_urls)?"cancel":"failure",value:this.totalToPay,currency:"ARS",procedure_id:this.infoRequest?.slugRequest})},methods:{parseDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?new Date((e.seconds||e._seconds)*1e3):(e=new Date(e),new Date(e))}},formatPrice(e){if(e>=0)return Gt(e)},getTotal(){const e=this,s=this.infoRequest.historical[this.infoRequest.stageNow-1].configStage;if(this.infoRequest.status2==="Pendiente de pago"){let c=0;s.itemsPago.forEach(o=>{const r=s.momentDefinitionPayment===!0?o.amount:o.result,d=e.UMA?.diary||0,a=o.payment==="Pesos"?parseFloat(r):parseFloat(d)*parseFloat(r);c=parseFloat(c)+parseFloat(a)}),this.totalToPay=c}},getPrice(e){let t=this.formatPrice(parseFloat(this.convertToNumber(e)));return t="$ "+t,t},convertToNumber(e){let t="";if(e){t=e.toString();const s=",$";for(let c=0;c<s.length;c++)t=t.replace(new RegExp(s.charAt(c),"g"),"")}return t},closeDialogMessage(){this.$nextTick(function(){this.dialogMessage={...this.dialogMessage,val:!1}})},async selectMethodPayment(e){this.$analytics?.track?.(Se.payment_method_select,{payment_method:e?.type==="ClickDePago"?"clickdepago":e?.type,payment_gateway:"bancomacro",value:this.totalToPay,currency:"ARS",procedure_id:this.infoRequest?.slugRequest}),le().open(),await this.changeMethodPayment(),this.carrierSelected=e,await this.generateCharge()},async changeMethodPayment(){const e=this;if(ke(e.carrierSelected)){const s=Ne.now();await e.resetDataPayment(s)}},async resetDataPayment(){const e=await this.infoRequest.historical[this.infoRequest.stageNow-1],t=e.pago.history,s={carrierSelected:null,amount:e.pago.amount,uma:e.pago.uma,history:t};this.infoRequest.historical[this.infoRequest.stageNow-1].pago=ke(s);const c={historical:this.infoRequest.historical};await this.$emit("update",c),this.carrierSelected=null},async generateCharge(){const e=this;this.dialogConfirmMethod=!1,le().open();const t=e.infoRequest.historical[e.infoRequest.stageNow-1],s=t.pago?.history||[],c=Ne.now();s.push({carrier:e.carrierSelected,date:c,expiredAt:t.configStage.paymentLimit,amount:e.totalToPay,uma:e.UMA?.diary||0}
3),e.infoRequest.historical[e.infoRequest.stageNow-1].pago={amount:e.totalToPay||0,uma:e.UMA?.diary||0,carrierSelected:e.carrierSelected,history:s};const o={historical:e.infoRequest.historical};await e.$emit("update",o),le().open()},async update(e){await this.$emit("update",e)}}},Fd={class:"text-h5 font-weight-bold"},Rd={class:"caption text-center"},$d={key:0,class:""},xd={style:{"font-size":"12px"},class:"font-weight-medium"},Nd={key:0},Od=["innerHTML"];function Md(e,t,s,c,o,r){const d=Es,a=Ts,m=Ed;return o.infoRequest.status2==="Pendiente de pago"?(y(),T(k,{key:0,justify:"center",class:"flex-column"},{default:i(()=>[n(Oe,{color:"btnPrimary",variant:"outlined",align:"center",class:"px-5 py-8"},{default:i(()=>[n(k,{class:"justify-center flex-row"},{default:i(()=>[n(k,{class:"flex-column pa-5"},{default:i(()=>[n(k,{class:"text-caption text-grey justify-center"},{default:i(()=>[...t[9]||(t[9]=[D("TOTAL A PAGAR",-1)])]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[l("div",null,[l("span",Fd,"$ "+f(r.formatPrice(o.totalToPay))+" "+f(e.$t("AbrevMoneda")),1)])]),_:1}),n(k,{class:"justify-center pt-5"},{default:i(()=>[l("span",Rd,f(e.$t("timeRemainingPayment")),1)]),_:1}),n(k,{class:"flex-row justify-center"},{default:i(()=>[l("div",null,[l("div",null,f(s.tiempoRestantePayment.hora),1),t[10]||(t[10]=l("div",{class:"text-caption text-grey"},"Horas",-1))]),t[13]||(t[13]=l("div",{class:"px-3"},":",-1)),l("div",null,[l("div",null,f(s.tiempoRestantePayment.minuto),1),t[11]||(t[11]=l("div",{class:"text-caption text-grey"},"Minutos",-1))]),t[14]||(t[14]=l("div",{class:"px-3"},":",-1)),l("div",null,[l("div",null,f(s.tiempoRestantePayment.segundo),1),t[12]||(t[12]=l("div",{class:"text-caption text-grey"},"Segundos",-1))])]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{class:"pa-3 justify-center d-grid"},{default:i(()=>[n(te,{class:"text-center text-caption px-5",color:"btnPrimary",size:"small",disabled:e.disabledPayment,onClick:t[0]||(t[0]=v=>o.dialogPayment=!0)},{default:i(()=>[D(f(e.$t("details.payments.viewDetailsPayment")),1)]),_:1},8,["disabled"])]),_:1}),n(Me,{modelValue:o.dialogPayment,"onUpdate:modelValue":t[6]||(t[6]=v=>o.dialogPayment=v),width:"800",persistent:"",scrollable:""},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,{class:"text-weight-medium"},{default:i(()=>[...t[15]||(t[15]=[D(" Detalle de pago ",-1)])]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[1]||(t[1]=v=>o.dialogPayment=!1)})]),_:1}),o.dialogPayment===!0?(y(),T(Re,{key:0,class:"py-5 text-black"},{default:i(()=>[n(k,{style:"min-height:400px"},{default:i(()=>[n(b,{cols:"12",sm:"6",md:"6",lg:"6"},{default:i(()=>[n(d,{element:{procedure:o.infoRequest.title,status:o.infoRequest.status2,payment:{items:o.infoRequest.historical[o.infoRequest.stageNow-1].configStage.itemsPago}},"is-voucher":!1,uma:o.UMA},null,8,["element","uma"])]),_:1}),n(b,{cols:"12",sm:"6",md:"6",lg:"6",class:"pa-0 px-6"},{default:i(()=>[o.infoRequest.status2==="Pendiente de pago"?(y(),j("div",$d,[t[16]||(t[16]=l("span",{class:"font-weight-bold d-flex justify-left text-primary py-0"},"Elije un método de pago",-1)),o.infoRequest&&o.infoRequest.historical&&o.infoRequest.historical[o.infoRequest.stageNow-1]&&o.infoRequest.historical[o.infoRequest.stageNow-1].configStage&&o.infoRequest.historical[o.infoRequest.stageNow-1].configStage.carriers?(y(),T(Zt,{key:0,modelValue:o.selectPayment,"onUpdate:modelValue":[t[2]||(t[2]=v=>o.selectPayment=v),t[3]||(t[3]=v=>r.selectMethodPayment(o.selectPayment))],density:"compact"},{default:i(()=>[(y(!0),j(pe,null,Ee(o.carriers,v=>(y(),T(b,{key:`${v.clientID}`,cols:"12",class:"pl-0"},{default:i(()=>[n(be,{link:"","rounded-lg":"","elevation-3":""},{default:i(()=>[n(Re,{class:"pa-0 mb-2"},{default:i(()=>[n(k,{class:"px-4"},{default:i(()=>[n(b,{cols:"2",sm:"2",md:"1",lg:"1",class:""},{default:i(()=>[n(xt,{value:v},null,8,["value"])]),_:2},1024),n(b,{cols:"10",sm:"10",md:"4",lg:"6",class:"pt-lg-0 pr-lg-0"},{default:i(()=>[n(a,{size:"big",carrier:v.carrier},null,8,["carrier"])]),_:2},1024),n(b,{cols:"12",sm:"12",md:"7",lg:"5"},{default:i(()=>
3[l("h4",xd,f(v.title),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])):M("",!0)])):M("",!0),o.carrierSelected!==null?(y(),j(pe,{key:1},[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8",class:"font-weight-bold"},{default:i(()=>[...t[17]||(t[17]=[D("Resumen",-1)])]),_:1}),n(b,{cols:"4"})]),_:1}),n(k,{"no-gutters":"",class:"py-1"},{default:i(()=>[n(b,{cols:"8"},{default:i(()=>[...t[18]||(t[18]=[D("Total a pagar",-1)])]),_:1}),n(b,{cols:"4",class:"font-weight-bold"},{default:i(()=>[D(f(r.getPrice(parseFloat(o.totalToPay))),1)]),_:1})]),_:1})]),_:1})]),_:1}),o.infoRequest.status2==="Pendiente de pago"&&o.infoRequest.historical[o.infoRequest.stageNow-1].pago&&o.infoRequest.historical[o.infoRequest.stageNow-1].pago.carrierSelected&&o.carrierSelected!==null?(y(),T(k,{key:0,"no-gutters":"",class:"py-5 mx-2"},{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[o.carrierSelected.carrier==="Macro Pago - Click de pago"?(y(),j("div",Nd,[n(m,{"u-m-a":o.UMA,"info-request":o.infoRequest,total:o.totalToPay,user:s.user,items:o.infoRequest.historical[o.infoRequest.stageNow-1].configStage.itemsPago,onSetDialogMessage:t[4]||(t[4]=v=>o.dialogMessage=v)},null,8,["u-m-a","info-request","total","user","items"])])):M("",!0)]),_:1}),o.carrierSelected.carrier&&o.infoRequest.historical[o.infoRequest.stageNow-1].configStage.carriers&&o.infoRequest.historical[o.infoRequest.stageNow-1].configStage.carriers.length>1?(y(),T(te,{key:0,size:"small",color:"btnPrimary",text:"",class:"mt-2 text-decoration-underline",onClick:t[5]||(t[5]=v=>e.confirmChangeMethod())},{default:i(()=>[...t[19]||(t[19]=[D("Elegir otra forma de pago",-1)])]),_:1})):M("",!0)]),_:1})):M("",!0)],64)):M("",!0)]),_:1})]),_:1})]),_:1})):M("",!0),n(we)]),_:1})]),_:1},8,["modelValue"]),n(Me,{modelValue:o.dialogMessage.val,"onUpdate:modelValue":t[8]||(t[8]=v=>o.dialogMessage.val=v),width:"500",scrollable:""},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(Re,{class:"py-5 text-black"},{default:i(()=>[l("div",{class:"mt-5 text-center",style:ht({color:o.dialogMessage.textColor})},[o.dialogMessage.icon?(y(),T(ve,{key:0,color:o.dialogMessage.iconColor},{default:i(()=>[D(f(o.dialogMessage.icon),1)]),_:1},8,["color"])):M("",!0),l("label",{innerHTML:o.dialogMessage.message},null,8,Od)],4)]),_:1}),n(we),n(Ke,{class:"justify-center py-5"},{default:i(()=>[n(te,{color:"primary",class:"rounded-lg",onClick:t[7]||(t[7]=v=>r.closeDialogMessage())},{default:i(()=>[D(f(e.$t("ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})):M("",!0)}const zd=Object.assign(_e(Td,[["render",Md]]),{__name:"BancoMacro"}),Ld=ut({name:"DesistBtn",props:{postData:{type:Object,default:()=>{}},desistConfig:{type:Object,default:()=>{}}},setup(){const{generateJwtToken:e}=Ba();return{generateJwtToken:e}},data(){return{validDesist:!1,showPassword:!1,desistDialog:!1,confirmCheckbox:!1,userRFC:"",keyfile:null,loader:!1,certfile:null,currentPassword:null,cadenaOriginalFirma:[],projectId:this.$config.firebase.projectId,rules:[e=>!!e||this.$t("fieldRequired")],certFileUrl:"",keyFileUrl:"",successValidation:!1,certRules:[e=>!e||["cer"].includes(e?.name.split(".").pop())||this.$t("solo-se-aceptan"),e=>!!e||this.$t("fieldRequired")],keyRules:[e=>!e||["key"].includes(e?.name.split(".").pop())||this.$t("solo-se-aceptan"),e=>!!e||this.$t("fieldRequired")]}},computed:{user(){return $e().getUser},userFullName(){return $e().getFullUserName},rulesConfirm(){return[this.confirmCheckbox||"Debes aceptar el aviso de privacidad"]}},methods:{async desistProcedure(){this.desistConfig.desistWithSignature?["os-sandbox-nuevo-leon","os-gobierno-de-nuevo-leon"].includes(this.projectId)&&this.desistConfig.desistWithSignature?(await this.validateDesistNL(),this.desistDialog=!1):["lab-cmp"].includes(this.projectId)&&this.desistConfig.desistWithSignature&&(await this.generarCadenasFirma(),this.desistDialog=!1):(this.$emit("desistProcedure",{desistWithSignature:this.desistConfig.desistWithSignature,desistAt:Ne.now(),desistText:this.desistConfig.desistFinalDocText,userFullName:this.userFullName,userCURP:this.user.curp}),this.desistDialog=!1)},async deleteUserCredentials(){const e=this;try{const s=(await Vi(`usercredentials/${e.user.uid}`)).items.map(c=>hs(c.fullPath,{retries:2}));await Promise.all(s)}catch(t){console.error("Error deleting user credentials:",t),oe(t)}},clearData(){this.userRFC="",this.keyfile=null,this.loader=!1,this.certfile=null,this.currentPassword=null,this.showPassword=!1,this.desistDialog=!1},back(){this.clearData(),this.$refs.formDesist.reset(),this.desistDialog=!1,this.confirmCheckbox=!1},async generarCadenasFirma(){const e=this;e.loader=!0,e.cadenaOriginalFirma=[];
3try{if(!e.keyfile)return;const t=`usercredentials/${e.user.uid}/${e.user.uid}.${e.keyfile.name.split(".").pop()}`;if(await Jt(t,e.keyfile),!e.certfile)return;const s=`usercredentials/${e.user.uid}/${e.user.uid}.${e.certfile.name.split(".").pop()}`;await Jt(s,e.certfile);const c=e.userFullName,o=ge(new Date,"dd/MM/yyyy HH:mm:ss"),r=e.postData.title,d=e.postData.folio&&e.postData.folio!==""?e.postData.folio:e.postData.preFolio,a=`||1.0|MODULO DIGITAL|${c}|${e.userRFC}|${o}|${d}|${r}`,m={date:o,folio:d,nombreprocedure:r,cadenaoriginal:a,user:{email:e.user.email,firmante_uuid:e.user.uid,password:e.currentPassword,name:c,rfc:e.userRFC},vigencia:"NO DETERMINADA"},v=await $fetch(`${this.$config.api.oscityEndpointsUrl}/firmaHttp`,{method:"POST",body:m});if(v.status==="422"){const p=v.message;let u="";for(const A in p){const g=p[A];u=`${u}${g}`}De().open({color:"error",text:u}),e.back()}else v.status==="200"&&(e.cadenaOriginalFirma.push({stage:"",email:e.user.email,cadena:v.array_firma,citizen:!0}),this.$emit("desistProcedure",{desistAt:Ne.now(),cadenaOriginalFirma:e.cadenaOriginalFirma,userFullName:e.userFullName,userRFC:e.userRFC,desistWithSignature:e.desistConfig.desistWithSignature,desistText:e.desistConfig.desistFinalDocText}),e.clearData())}catch(t){console.error(`Error in generarCadenasFirma for citizen: ${t}`),oe(t),De().open({color:"error",text:e.$t("errorGeneric")}),e.back()}finally{e.loader=!1,await e.deleteUserCredentials(),this.clearData()}},async validateDesistNL(){const e=this;this.loader=!0;try{if(e.tierBlocksSignature()){e.$emit("accountTierRequired","accountTier.blocked.signature");return}e.cadenaOriginalFirma=[],e.keyFileUrl=await e.uploadFileToStorage(e.keyfile,`usercredentials/${e.userRFC}/${e.userRFC}.${e.keyfile.name.split(".").pop()}`),e.certFileUrl=await e.uploadFileToStorage(e.certfile,`usercredentials/${e.userRFC}/${e.userRFC}.${e.certfile.name.split(".").pop()}`);const t=await e.validateElectronicSignatureNL();if(t&&t.status==="422"){const s=t.message;let c="";for(const o in s){const r=s[o];c+=`${r}`}console.error(s),De().open({color:"error",text:c||this.$t("forms.errorInValidation")})}else if(t&&t.status==="200"){const s=ke(t);s.sello&&(this.successValidation=!0),this.successValidation&&(e.cadenaOriginalFirma.push({stage:"",email:e.user.email,cadena:{firma:s.sello,serie:s.serie},citizen:!0}),this.$emit("desistProcedure",{desistAt:Ne.now(),cadenaOriginalFirma:e.cadenaOriginalFirma,userFullName:e.userFullName,userRFC:e.userRFC,desistWithSignature:e.desistConfig.desistWithSignature,desistText:e.desistConfig.desistFinalDocText}),e.clearData(),this.currentPassword="",this.certfile=null,this.keyfile=null)}else t||De().open({color:"error",text:this.$t("errorGeneric")})}catch(t){console.error(t),oe(t),De().open({color:"error",text:this.$t("errorGeneric")})}finally{await this.deleteStorageFiles(),this.certFileUrl="",this.keyFileUrl="",this.loader=!1}},async uploadFileToStorage(e,t){try{return await Jt(t,e),t}catch(s){throw console.error(`Error al subir el archivo al almacenamiento: ${s}`),s}},tierBlocksSignature(){return La(this.$config?.theme)&&!qa($e().getUser)},async validateElectronicSignatureNL(){const e=this,t={};try{const s={clave:e.currentPassword,rfc:e.userRFC,userId:e.userRFC,userEmail:e.user.email};return t.userData=await e.generateJwtToken(s),t.IdTramite=e.postData.folio&&e.postData.folio!==""?e.postData.folio:e.postData.preFolio,t.NombreTramite=e.postData.title,t.ArchivoCer=e.certfile.name,t.ArchivoKey=e.keyfile.name,await gs("nuevoLeon-generarCadenasFirmaPublico",{data:t})}catch(s){return s}},async deleteStorageFiles(){this.keyFileUrl&&await this.deleteTmpFiles(this.keyFileUrl),this.certFileUrl&&await this.deleteTmpFiles(this.certFileUrl)},async deleteTmpFiles(e){try{await hs(e,{retries:2})}catch(t){console.error(`Error when deleting ${e}: ${t}`),oe(t)}},async validate(){const{valid:e}=await this.$refs.formDesist.validate();if(e&&!(!this.confirmCheckbox||this.desistConfig.desistWithSignature&&!this.validDesist||this.loader))await this.desistProcedure();else{const t=document.getElementById("submitFormDesist");t.disabled=!0,t.classList.add("v-btn--disabled"),De().open({color:"error",text:"Formulario inválido"})}}}}),qd={class:"text-subtitle-1"},Bd={class:"mb-2 labels-style"},jd={class:"file-select"},Vd={class:"mb-2 labels-style"},Ud={class:"file-select"},Hd={class:"mb-2 labels-style"},Wd={class:"mb-2 labels-style"};function Gd(e,t,s,c,o,r){return y(),T(k,null,{default:i(()=>[n(b,{class:"px-5 my-3"},{default:i(()=>[n(Me,{modelValue:e.desistDialog,"onUpdate:modelValue":t[10]||(t[10]=d=>e.desistDialog=d),"max-width":"600px",scrollable:"",persistent:""},{activator:i(({props:d})=>[n(te,nt({color:"error",size:"small",block:"",class:"text-wrap d-inline-block","data-
3pw":"desistBtn"},d),{default:i(()=>[D(f(e.$t("details.desistBtn")),1)]),_:1},16)]),default:i(()=>[n(oi,{ref:"formDesist",modelValue:e.validDesist,"onUpdate:modelValue":t[9]||(t[9]=d=>e.validDesist=d)},{default:i(()=>[n(be,{"data-pw":"desistDialog"},{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("details.desistProcedure")),1)]),_:1}),n(ye),n(te,{icon:"",onClick:t[0]||(t[0]=d=>{e.desistDialog=!1,e.confirmCheckbox=!1})},{default:i(()=>[n(ve,null,{default:i(()=>[...t[11]||(t[11]=[D("mdi-close",-1)])]),_:1})]),_:1})]),_:1}),n(we),n(Re,{class:"mt-3 text-black"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pb-0"},{default:i(()=>[l("p",qd,f(e.$t("details.warningDesist")),1)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[n(hi,{modelValue:e.confirmCheckbox,"onUpdate:modelValue":t[1]||(t[1]=d=>e.confirmCheckbox=d),rules:e.rulesConfirm,label:e.$t("details.confirmDesist"),"data-pw":"desistConfirmCheckbox"},null,8,["modelValue","rules","label"])]),_:1}),n(b,{cols:"12"},{default:i(()=>[n(we)]),_:1})]),_:1}),e.desistConfig.desistWithSignature?(y(),T(k,{key:0},{default:i(()=>[n(b,{cols:"12",class:"pt-5"},{default:i(()=>[l("p",Bd,[D(f(e.$t("details.cert"))+" ",1),t[12]||(t[12]=l("span",{class:"text-red-darken-4"}," * ",-1))]),n(ps,{modelValue:e.certfile,"onUpdate:modelValue":t[2]||(t[2]=d=>e.certfile=d),density:"compact",accept:".cer","prepend-icon":"",rules:e.certRules,disabled:e.loader},{"append-inner":i(()=>[l("div",jd,f(e.$t("uploadcertfileFE")),1)]),_:1},8,["modelValue","rules","disabled"])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[l("p",Vd,[D(f(e.$t("details.keyFile"))+" ",1),t[13]||(t[13]=l("span",{class:"text-red-darken-4"}," * ",-1))]),n(ps,{modelValue:e.keyfile,"onUpdate:modelValue":t[3]||(t[3]=d=>e.keyfile=d),density:"compact",accept:".key",rules:e.keyRules,"prepend-icon":"",disabled:e.loader},{"append-inner":i(()=>[l("div",Ud,f(e.$t("uploadkeyfileFE")),1)]),_:1},8,["modelValue","rules","disabled"])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[l("p",Hd,[D(f(e.$t("details.userRFC"))+" ",1),t[14]||(t[14]=l("span",{class:"text-red-darken-4"}," * ",-1))]),n(We,{modelValue:e.userRFC,"onUpdate:modelValue":t[4]||(t[4]=d=>e.userRFC=d),type:"text",autocomplete:"off",rules:e.rules,density:"compact",disabled:e.loader},null,8,["modelValue","rules","disabled"])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[l("p",Wd,[D(f(e.$t("details.privatePassword"))+" ",1),t[15]||(t[15]=l("span",{class:"text-red-darken-4"}," * ",-1))]),n(We,{modelValue:e.currentPassword,"onUpdate:modelValue":t[5]||(t[5]=d=>e.currentPassword=d),"append-inner-icon":e.showPassword?"mdi-eye-off":"mdi-eye",type:e.showPassword?"text":"password",rules:e.rules,density:"compact",disabled:e.loader,"onClick:appendInner":t[6]||(t[6]=d=>e.showPassword=!e.showPassword)},null,8,["modelValue","append-inner-icon","type","rules","disabled"])]),_:1})]),_:1})):M("",!0)]),_:1}),e.desistConfig.desistWithSignature?(y(),T(we,{key:0})):M("",!0),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"btnSecondary",variant:"text",disabled:e.loader,onClick:t[7]||(t[7]=d=>e.back())},{default:i(()=>[D(f(e.$t("details.close")),1)]),_:1},8,["disabled"]),n(te,{id:"submitFormDesist",color:"btnPrimary",disabled:!e.confirmCheckbox||e.desistConfig.desistWithSignature&&!e.validDesist||e.loader,variant:"outlined",loading:e.loader,"data-pw":"desistAcceptBtn",onClick:t[8]||(t[8]=d=>e.validate())},{default:i(()=>[D(f(e.$t("accept")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})}const Qd=Object.assign(_e(Ld,[["render",Gd],["__scopeId","data-v-91c022d6"]]),{__name:"DesistBtn"}),Zd={name:"SubstagePreventionCards",props:{preventions:{type:Array,required:!0},listDocuments:{type:[Array,Object],required:!0},formInvalid:{type:Boolean,default:!1},resolvingIndex:{type:Number,default:null}},emits:["resolve","go-to-section","go-to-documents"],data(){return{timers:{},intervals:[],confirmIndex:null}},computed:{hideTimerPrevention(){return ks().hideTimerPrevention},confirmDialog:{get(){return this.confirmIndex!==null},set(e){e||(this.confirmIndex=null)}}},watch:{preventions:{immediate:!0,handler(){this.setupTimers()}}},beforeUnmount(){this.clearTimers()},methods:{confirmResolve(){const e=this.confirmIndex;this.confirmIndex=null,e!==null&&this.$emit("resolve",e)},findListDocument(e){return(wt(this.listDocuments)?this.listDocuments:Object.values(this.listDocuments||{})).find(s=>s&&s.name===e)||null},cardDocs(e){return(e.prevention?.objectFeedback?.documents||[]).map(s=>({name:s.name,nameFile:s.nameFile,commentOperator:s.commentOperator,staged:!!this.findListDocument(s.name)?.fileNew}))},cardSections(e){return e.prevention?.objectFeedback?.sections||[]},ready(e){return this.formInvalid?!1:this.cardDocs(e).every(t=>t.staged)},formatDate(e){if(e==null)return"";const t=Date.parse(e);if(!isNaN(t))return ge(new Date(e),"dd/MM/yyyy HH:mm:ss");const s=e.seconds||e._seconds;return s==null?"":ge(new Date(s*1e3),"dd/MM/yyyy HH:mm:ss")},parseLimit(e){if(!e)return null;if(typeof e.toDate=="function")return e.toDate();const t=e.seconds||e._seconds;if(t!=null)return new Date(t*1e3);const s=Date.parse(e);return isNaN(s)?null:new Date(s)}
3,clearTimers(){this.intervals.forEach(e=>clearInterval(e)),this.intervals=[]},setupTimers(){const e=this;this.clearTimers();const t={};this.preventions.forEach(s=>{const c=e.parseLimit(s.prevention?.limit),o=c?Rs(c,new Date):0,r={hora:0,minuto:0,segundo:0,segundos:0};if(o>0&&(r.hora=Math.floor(o/3600),r.minuto=Math.floor(o/60%60),r.segundo=o%60,r.segundos=o),t[s.subStageIndex]=r,o>0){const d=Pt(function(){r.segundos>0?(r.segundo--,r.segundos--,r.segundo===-1&&(r.segundo=59,r.minuto--),r.minuto===-1&&(r.minuto=59,r.hora--)):clearInterval(d),r.hora=r.hora<10?"0"+parseInt(r.hora):parseInt(r.hora),r.minuto=r.minuto<10?"0"+parseInt(r.minuto):parseInt(r.minuto),r.segundo=r.segundo<10?"0"+parseInt(r.segundo):parseInt(r.segundo),e.timers[s.subStageIndex]={...r}},1e3);this.intervals.push(d)}}),this.timers=t}}},Yd={class:"d-sm-flex align-center"},Kd={class:"mb-0 text-subtitle-1 font-weight-bold"},Xd={class:"mb-1 mt-2 text-body-2"},Jd={key:0},ec={class:"mb-0 text-body-2 font-weight-medium"},tc={class:"ma-auto"},sc={key:0,class:"text-caption pl-6"},ic={class:"ma-auto"},ac={class:"d-flex align-center"},nc={class:"text-body-2 font-weight-medium"},oc={key:0,class:"text-caption pl-6"},rc={class:"text-body-2 font-weight-medium mb-0"},lc={class:"caption"},dc={class:"caption"},cc={class:"caption"},uc=["innerHTML"];function mc(e,t,s,c,o,r){const d=at("AlertInformationIcon");return y(),j("div",null,[(y(!0),j(pe,null,Ee(s.preventions,a=>(y(),T(Oe,{key:`substage-prevention-${a.subStageIndex}`,color:"#FB8C00",border:"start",variant:"outlined",class:"mb-4"},{default:i(()=>[l("div",Yd,[n(d,{fill:"#FB8C00",width:"28px",height:"28px",class:"mr-2"}),l("p",Kd,f(e.$t("details.substagePreventionTitle",{name:a.name})),1)]),l("p",Xd,[l("b",null,f(e.$t("details.substagePreventionEmittedBy"))+":",1),D(" "+f(a.prevention.emittedByName)+" ",1),r.formatDate(a.prevention.date)?(y(),j("span",Jd," â "+f(r.formatDate(a.prevention.date)),1)):M("",!0)]),l("p",ec,f(e.$t("details.substagePreventionPending")),1),n(et,{density:"compact",class:"pl-6 bg-transparent"},{default:i(()=>[(y(!0),j(pe,null,Ee(r.cardSections(a),(m,v)=>(y(),T(Ve,{key:`substage-sec-${a.subStageIndex}-${v}`,class:"px-0"},{prepend:i(()=>[l("div",tc,[n(ve,{color:"grey-darken-2"},{default:i(()=>[...t[5]||(t[5]=[D("mdi-circle-small",-1)])]),_:1})])]),default:i(()=>[n(Ze,{class:"text-body-2"},{default:i(()=>[n(te,{variant:"text",color:"rgb(var(--v-theme-btnPrimary))",class:"link-like pa-0",onClick:p=>e.$emit("go-to-section",m)},{default:i(()=>[D(f(m.name),1)]),_:2},1032,["onClick"])]),_:2},1024),m.commentOperator?(y(),j("div",sc,[l("b",null,f(e.$t("details.commentOperator"))+":",1),D(" "+f(m.commentOperator),1)])):M("",!0)]),_:2},1024))),128)),r.cardDocs(a).length>0?(y(),T(Ve,{key:0,class:"px-0"},{prepend:i(()=>[l("div",ic,[n(ve,{color:"grey-darken-2"},{default:i(()=>[...t[6]||(t[6]=[D("mdi-circle-small",-1)])]),_:1})])]),default:i(()=>[n(Ze,{class:"text-body-2"},{default:i(()=>[n(te,{variant:"text",color:r.cardDocs(a).every(m=>m.staged)?"rgb(var(--v-theme-tabDisabled))":"rgb(var(--v-theme-btnPrimary))",class:"link-like pa-0",onClick:t[0]||(t[0]=m=>e.$emit("go-to-documents"))},{default:i(()=>[D(f(e.$t("details.documentos")),1)]),_:1},8,["color"])]),_:2},1024),(y(!0),j(pe,null,Ee(r.cardDocs(a),(m,v)=>(y(),j("div",{key:`substage-doc-${a.subStageIndex}-${v}`,class:"pl-4 py-1"},[l("div",ac,[n(ve,{size:"small",color:m.staged?"success":"#FB8C00",class:"mr-1"},{default:i(()=>[D(f(m.staged?"mdi-check-circle":"mdi-alert-circle-outline"),1)]),_:2},1032,["color"]),l("span",nc,f(m.nameFile||m.name),1)]),m.commentOperator?(y(),j("div",oc,[l("b",null,f(e.$t("details.commentOperator"))+":",1),D(" "+f(m.commentOperator),1)])):M("",!0)]))),128))]),_:2},1024)):M("",!0)]),_:2},1024),r.hideTimerPrevention===!1&&o.timers[a.subStageIndex]?(y(),T(Oe,{key:0,color:"btnSecondary",variant:"outlined",align:"center",class:"px-5 py-3 border-time mt
3-2"},{default:i(()=>[l("p",rc,f(e.$t("timeRemainingFeedback")),1),n(k,{class:"mt-1"},{default:i(()=>[n(b,null,{default:i(()=>[l("div",null,f(o.timers[a.subStageIndex].hora),1),l("div",lc,f(e.$t("details.hours")),1)]),_:2},1024),n(b,null,{default:i(()=>[l("div",null,f(o.timers[a.subStageIndex].minuto),1),l("div",dc,f(e.$t("details.minutes")),1)]),_:2},1024),n(b,null,{default:i(()=>[l("div",null,f(o.timers[a.subStageIndex].segundo),1),l("div",cc,f(e.$t("details.seconds")),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)):M("",!0),n(te,{color:"btnPrimary",size:"small",block:"",class:Be(["text-wrap d-inline-block mt-3",{btnDisabled:!r.ready(a)||s.resolvingIndex!==null}]),disabled:!r.ready(a)||s.resolvingIndex!==null,loading:s.resolvingIndex===a.subStageIndex,onClick:m=>o.confirmIndex=a.subStageIndex},{default:i(()=>[D(f(e.$t("details.responseFeedback")),1)]),_:1},8,["class","disabled","loading","onClick"])]),_:2},1024))),128)),n(Me,{modelValue:r.confirmDialog,"onUpdate:modelValue":t[4]||(t[4]=a=>r.confirmDialog=a),width:"500"},{default:i(()=>[n(be,null,{default:i(()=>[n(He,{color:"cardToolbar"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("details.responseFeedback")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[1]||(t[1]=a=>r.confirmDialog=!1)})]),_:1}),n(we),n(Re,{class:"pt-3 text-black"},{default:i(()=>[l("div",{innerHTML:e.$t("details.textResponseFeedback")},null,8,uc)]),_:1}),n(we),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"btnSecondary",variant:"outlined",onClick:t[2]||(t[2]=a=>r.confirmDialog=!1)},{default:i(()=>[D(f(e.$t("details.close")),1)]),_:1}),n(te,{color:"btnPrimary",onClick:t[3]||(t[3]=a=>r.confirmResolve())},{default:i(()=>[D(f(e.$t("details.continue")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const fc=Object.assign(_e(Zd,[["render",mc],["__scopeId","data-v-abcac0a1"]]),{__name:"SubstagePreventionCards"}),pc={},hc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48"};function gc(e,t){return y(),j("svg",hc,[...t[0]||(t[0]=[l("path",{d:"M682.841-334.783q-51.904 0-88.21-36.378-36.305-36.379-36.305-88.348 0-51.97 36.329-88.285 36.33-36.315 88.229-36.315t88.334 36.333q36.434 36.334 36.434 88.239 0 52.004-36.403 88.379-36.403 36.375-88.408 36.375Zm.096-66.456q24.715 0 41.487-16.768 16.772-16.767 16.772-41.554 0-24.787-16.768-41.439-16.767-16.652-41.554-16.652-24.787 0-41.439 16.719t-16.652 41.435q0 24.715 16.719 41.487 16.719 16.772 41.435 16.772ZM472.391-46.174q-14.424 0-24.244-9.82-9.821-9.821-9.821-24.245v-86.478q0-22.295 10.585-41.936 10.586-19.641 29.567-31.13 28.718-17.239 47.859-25.119 19.141-7.881 51.62-16.12 10.623-2.239 21.246-.619 10.623 1.619 17.58 10.097l66.087 84.413 66.087-84.413q7.206-8.233 17.538-9.975 10.331-1.742 21.288.497 32.717 8.239 51.358 16 18.642 7.761 47.12 25.239 18.957 11.583 30.174 31.084 11.217 19.501 11.217 41.742v86.718q0 14.424-9.955 24.245-9.955 9.82-24.349 9.82H472.391Zm32.392-66.456H657l-80.087-101.935q-19.283 7.282-37.565 16.185-18.283 8.902-34.565 19.471v66.279Zm203.956 0h152.457l.717-66.087q-16.522-10.761-34.663-19.663-18.141-8.903-37.424-16.185L708.739-112.63Zm-51.739 0Zm51.739 0ZM682.87-459.565ZM182.152-181.674V-777.37v161.109-27.848V-181.674Zm0 68.37q-28.349 0-48.24-19.961-19.89-19.961-19.89-48.409V-777.37q0-28.097 19.89-48.114 19.891-20.016 48.24-20.016h595.696q28.447 0 48.408 20.016 19.962 20.017 19.962 48.114v231.457q-12.435-21.913-29.827-39.392-17.391-17.478-38.543-30.956V-777.37H182.152v595.616h196.174V-113.304H182.152Zm130-504.066h296.413q11.13-5.717 22.982-9.891 11.851-4.174 25.018-7.283v-50q0 3.049 2.062 5.112 2.063 2.062 5.112 2.062H312.152q-12.75 0-21.375 8.676-8.625 8.675-8.625 21.5 0 12.824 8.625 21.324 8.625 8.5 21.375 8.5Zm0 167.848h187.37q-.957-14.761.467-30.141 1.424-15.38 5.467-29.859H312.152q-12.75 0-21.375 8.676-8.625 8.675-8.625 21.5 0 12.824 8.625 21.324 8.625 8.5 21.375 8.5Zm0 167.848h122.739q17.738-14.3 37.804-23.585 20.066-9.285 41.262-17.763v1.913q-4.479-9.995-11.982-15.161-7.503-5.165-20.135-5.404H312.202q-12.8 0-21.425 8.675-8.625 8.676-8.625 21.5 0 12.825 8.625 21.325t21.375 8.5Z"},null,-1)])])}const yc=Object.assign(_e(pc,[["render",gc]]),{__name:"FormularioTabIcon"}),bc={},vc={id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27.39 38.37"};function wc(e,t){return y(),j("svg",vc,[...t[0]||(t[0]=[dt('<path id="Trazado_7410" class="cls-1" d="m7.35,11.39c-.7-.69-1.43-1.4-2.13-2.12-.3-.28-.47-.67-.48-1.08-.02-.86.65-1.58,1.51-1.61.41-.02.82.13,1.12.42.04.03.07.06.1.1.29.28.61.6.93.94l.1.1.07-.08c1.11-1.06,2.17-2.08,3.23-3.13.42-.48,1.08-.67,1.69-.48.4.14.73.43.91.82.29.6.18,1.32-.29,1.79l-.79.76c-1.24,1.21-2.48,2.41-3.73,3.61-.29.3-.68.47-1.1.47-.39,0-.76-.14-1.04-.41-.04-.03-.07-.06-.1-.1"></path><path id="Trazado_7411" class="cls-1" d="m21.89,27.55c-.71-.69-1.67-1.08-2.66-1.09-1,0-1.95.41-2.65,1.12-.71.7-1.1,1.66-1.09,2.66,0,2.07,1.68,3.75,3.75,3.74,0,0,0,0,0,0h.03c2.06-.04,3.72-1.72,3.73-3.78,0-1-.4-1.95-1.11-2.65m-2.68,4.33c-.89-.01-1.
361-.73-1.63-1.63v-.05c0-.91.74-1.65,1.65-1.65h.03c.92.01,1.65.76,1.65,1.68-.04.91-.78,1.64-1.7,1.65"></path><path id="Trazado_7412" class="cls-1" d="m20.54.65c-.39-.42-.95-.66-1.53-.65H1.79C.8,0,0,.8,0,1.79v34.66c0,1.06.86,1.91,1.91,1.91h23.56c1.06,0,1.91-.86,1.91-1.91V8.58c0-.57-.22-1.12-.61-1.53-1.02-1.08-6.24-6.4-6.24-6.4m-.73,3.53l3.57,3.6h-3.57v-3.6Zm4.42,31.02H3.12s0-29.17,0-32.05h14.55s0,5.11,0,5.11c0,.8.66,1.45,1.46,1.45h5.08s0,25.49,0,25.49Z"></path><path id="Trazado_7416" class="cls-1" d="m7.86,19.18c0,.86-.7,1.56-1.56,1.56-.86,0-1.56-.7-1.56-1.56,0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56"></path><path id="Trazado_7417" class="cls-1" d="m7.86,14.77c0,.86-.7,1.56-1.56,1.56s-1.56-.7-1.56-1.56c0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56h0"></path><path id="Trazado_7418" class="cls-1" d="m7.86,23.55c0,.86-.7,1.56-1.56,1.56-.86,0-1.56-.7-1.56-1.56,0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56,0,0,0,0,0,0"></path><path id="Trazado_7419" class="cls-1" d="m21.43,25.12h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path><path id="Trazado_7420" class="cls-1" d="m21.43,20.73h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path><path id="Trazado_7421" class="cls-1" d="m21.43,16.34h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path>',9)])])}const _c=Object.assign(_e(bc,[["render",wc]]),{__name:"DocumentosTabIcon"}),Ac={},Dc={width:"45px",height:"45px",viewBox:"0 0 45 45",version:"1.1"};function kc(e,t){return y(),j("svg",Dc,[...t[0]||(t[0]=[l("g",{id:"surface1"},[l("path",{style:{stroke:"none","fill-rule":"nonzero","fill-opacity":"1"},d:"M 6.25 13.097656 C 6.316406 12.824219 6.375 12.546875 6.453125 12.269531 C 7.023438 10.046875 9.039062 8.503906 11.332031 8.519531 C 11.875 8.515625 12.414062 8.519531 13.011719 8.519531 C 13.011719 7.933594 13.003906 7.378906 13.011719 6.824219 C 12.945312 6.082031 13.382812 5.382812 14.082031 5.125 C 14.621094 4.898438 15.242188 4.972656 15.714844 5.316406 C 16.1875 5.660156 16.449219 6.226562 16.398438 6.808594 C 16.398438 7.355469 16.398438 7.902344 16.398438 8.484375 L 26.550781 8.484375 C 26.550781 7.929688 26.550781 7.371094 26.550781 6.816406 C 26.503906 6.226562 26.769531 5.652344 27.25 5.304688 C 27.734375 4.960938 28.359375 4.894531 28.90625 5.132812 C 29.582031 5.40625 30 6.085938 29.941406 6.8125 C 29.953125 7.34375 29.953125 7.878906 29.957031 8.414062 C 29.96875 8.449219 29.980469 8.480469 29.992188 8.515625 C 30.4375 8.515625 30.910156 8.480469 31.375 8.523438 C 32.007812 8.546875 32.636719 8.640625 33.25 8.796875 C 35.296875 9.460938 36.6875 11.363281 36.695312 13.515625 C 36.734375 16.433594 36.714844 19.351562 36.703125 22.265625 C 36.699219 23.160156 36.003906 23.894531 35.113281 23.941406 C 34.222656 23.992188 33.449219 23.335938 33.351562 22.449219 C 33.320312 21.90625 33.316406 21.367188 33.339844 20.824219 L 9.660156 20.824219 C 9.660156 20.957031 9.640625 21.101562 9.640625 21.246094 C 9.640625 25.710938 9.640625 30.175781 9.640625 34.640625 C 9.640625 35.953125 10.242188 36.578125 11.515625 36.578125 C 14.265625 36.578125 17.015625 36.570312 19.765625 36.578125 C 20.332031 36.558594 20.875 36.824219 21.203125 37.285156 C 21.535156 37.746094 21.609375 38.34375 21.402344 38.875 C 21.257812 39.511719 20.726562 39.984375 20.078125 40.054688 C 19.894531 40.074219 19.710938 40.078125 19.527344 40.078125 C 16.871094 40.078125 14.214844 40.035156 11.558594 40.089844 C 8.914062 40.207031 6.625 38.265625 6.308594 35.640625 C 6.308594 35.601562 6.269531 35.570312 6.25 35.535156 L 6.25 13.097656 M 26.554688 12.058594 L 16.402344 12.058594 C 16.402344 12.632812 16.402344 13.183594 16.402344 13.726562 C 16.449219 14.195312 16.292969 14.664062 15.972656 15.011719 C 15.648438 15.359375 15.195312 15.554688 14.722656 15.542969 C 14.25 15.558594 13.789062 15.375 13.464844 15.03125 C 13.136719 14.6875 12.972656 14.222656 13.015625 13.75 C 13.003906 13.3125 13.015625 12.875 13.015625 12.4375 C 13.015625 12.3125 13 12.175781 12.992188 12.027344 C 12.421875 12.027344 11.894531 12.027344 11.367188 12.027344 C 10.894531 11.992188 10.429688 12.167969 10.097656 12.507812 C 9.765625 12.847656 9.597656 13.316406 9.644531 13.789062 C 9.628906 14.734375 9.644531 15.675781 9.644531 16.621094 C 9.644531 16.835938 9.644531 17.046875 9.644531 17.261719 L 33.300781 17.261719 C 33.300781 16 33.324219 14.769531 33.292969 13.539062 C 33.300781 12.785156 32.730469 12.152344 31.984375 12.074219 C 31.300781 12.03125 30.621094
312.027344 29.941406 12.058594 C 29.941406 12.664062 29.960938 13.25 29.941406 13.835938 C 29.964844 14.464844 29.640625 15.058594 29.097656 15.371094 C 28.550781 15.6875 27.875 15.671875 27.34375 15.335938 C 26.8125 15 26.511719 14.394531 26.566406 13.765625 C 26.558594 13.207031 26.566406 12.640625 26.566406 12.058594 "}),l("path",{style:{stroke:"none","fill-rule":"nonzero","fill-opacity":"1"},d:"M 27.398438 35.886719 L 34.363281 28.664062 C 34.488281 28.539062 34.605469 28.414062 34.730469 28.289062 C 35.03125 27.980469 35.449219 27.804688 35.878906 27.8125 C 36.3125 27.816406 36.722656 27.996094 37.019531 28.3125 C 37.691406 28.957031 37.730469 30.019531 37.109375 30.714844 C 36.800781 31.070312 36.460938 31.398438 36.136719 31.738281 C 33.675781 34.285156 31.199219 36.8125 28.773438 39.390625 C 28.441406 39.804688 27.941406 40.046875 27.410156 40.050781 C 26.878906 40.050781 26.378906 39.8125 26.042969 39.398438 C 25.011719 38.246094 23.894531 37.171875 22.832031 36.046875 C 22.394531 35.597656 22.226562 34.945312 22.398438 34.339844 C 22.570312 33.734375 23.054688 33.269531 23.667969 33.117188 C 24.25 32.980469 24.863281 33.183594 25.25 33.648438 C 25.957031 34.382812 26.664062 35.125 27.394531 35.886719 "})],-1)])])}const Si=Object.assign(_e(Ac,[["render",kc]]),{__name:"CitasIcon"}),Ic={},Cc={xmlns:"http://www.w3.org/2000/svg",width:"35.199",height:"28.8",viewBox:"0 0 35.199 28.8"};function Sc(e,t){return y(),j("svg",Cc,[...t[0]||(t[0]=[l("path",{id:"Mask",d:"M3.2,28.8A3.2,3.2,0,0,1,0,25.6V3.2A3.2,3.2,0,0,1,3.2,0H32a3.2,3.2,0,0,1,3.2,3.2V25.6A3.2,3.2,0,0,1,32,28.8Zm0-3.2H32V5.415L18.472,17.925a1.6,1.6,0,0,1-1.891-.009L3.2,5.3ZM17.541,14.646,29.726,3.2H5.586Z"},null,-1)])])}const Pc=Object.assign(_e(Ic,[["render",Sc]]),{__name:"ChatTabIcon"}),Ec={name:"AlertWarningIcon"},Tc={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Fc(e,t,s,c,o,r){return y(),j("svg",Tc,[...t[0]||(t[0]=[l("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M2.74 18c-.77 1.33.19 3 1.73 3h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18zM11 11v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zm0 5h2v2h-2z"},null,-1)])])}const $s=Object.assign(_e(Ec,[["render",Fc]]),{__name:"AlertWarningIcon"}),Rc={name:"IconsTabs",props:{viewItem:{type:Object,default:()=>{},required:!0},section:{type:Object,default:()=>{},required:!0}},data(){return{sectionData:{},load:!1}},computed:{},watch:{section:{handler(e){this.$nextTick(function(){this.load=!1,this.sectionData=e,this.load=!0})},immediate:!0,deep:!0}},async mounted(){this.load=!1,Object.assign(this.sectionData,this.section),this.load=!0,await this.$nextTick()},methods:{isPrevention:yt}},$c={key:0},xc={key:1},Nc={key:2},Oc={key:3},Mc={class:"text-left font-weight-medium ml-3 title-tab my-auto"},zc={key:4},Lc={key:5},qc={key:6};function Bc(e,t,s,c,o,r){const d=yc,a=_c,m=Si,v=Pc,p=$s;return o.load===!0?(y(),T(k,{key:0,class:"mx-0 my-auto"},{default:i(()=>[o.sectionData.id!=="documentos"&&o.sectionData.id!=="newRequests"&&o.sectionData.id!=="appointments"?(y(),j("span",$c,[n(d,{fill:"rgb(var(--v-theme-tabText))",width:"25px",height:"25px"})])):o.sectionData.id==="documentos"?(y(),j("span",xc,[n(a,{fill:"rgb(var(--v-theme-tabText))",width:"25px",height:"25px"})])):o.sectionData.id==="appointments"?(y(),j("span",Nc,[n(m,{fill:"rgb(var(--v-theme-tabText))",width:"25px",height:"25px"})])):o.sectionData.id==="newRequests"?(y(),j("span",Oc,[n(v,{fill:"rgb(var(--v-theme-tabText))",width:"25px",height:"25px"})])):M("",!0),l("label",Mc,f(o.sectionData.title),1),o.sectionData.id!=="documentos"&&o.sectionData.id!=="newRequests"&&o.sectionData.id!=="appointments"&&s.viewItem.saveParent.config.withSectionsAsTabs===!0?(y(),j("div",zc,[o.sectionData.valid===!1&&r.isPrevention(s.viewItem.status2)?(y(),T(p,{key:0,fill:"#FB8C00",width:"25px",height:"25px",class:"ml-2"})):o.sectionData.valid===!0&&r.isPrevention(s.viewItem.status2)?(y(),T(ve,{key:1,color:"success",class:"ml-2"},{default:i(()=>[...t[0]||(t[0]=[D("mdi-checkbox-marked-circle-outline",-1)])]),_:1})):r.isPrevention(s.viewItem.status2)?(y(),T(ve,{key:2,color:"warning",class:"ml-2"},{default:i(()=>[...t[1]||(t[1]=[D("mdi-alert-outline",-1)])]),_:1})):M("",!0)])):o.sectionData.id!=="documentos"&&o.sectionData.id!=="appointments"&&o.sectionData.id!=="newRequests"&&s.viewItem.saveParent.config.withSectionsAsTabs===!1&&r.isPrevention(s.viewItem.status2)?(y(),j("div",Lc,[s.viewItem.validForm===!1?(y(),T(ve,{key:0,color:"warning",class:"ml-2"},{default:i(()=>[...t[2]||(t[2]=[D("mdi-alert-outline",-1)])]),_:1})):s.viewItem.validForm===!0?(y(),T(ve,{key:1,color:"success",class:"ml-2"},{default:i(()=>[...t[3]||(t[3]=[D("mdi-checkbox-marked-circle-outline",-1)])]),_:1})):(y(),T(ve,{key:2,color:"warning",class:"ml-2"},{default:i(()=>[...t[4]||(t[4]=[D("mdi-alert-outline",-1)])]),_:1}))])):(s.viewItem.status2==="En prevención"||s.viewItem.status2==="En preventiva")&&o.sectionData.id!=="newRequests"?(y(),j("div",qc,[o.sectionData.valid===!1?(y(),T(ve,{key:0,color:"warning",class:"ml-2"},{default:i(()=>[...t[5]||(t[5]=[D("mdi-alert-outline",-1)])]),_:1})):o.sectionData.valid===!0?(y(),T(ve,{key:1,color:"success",class:"ml-2"},{default:i(()=>[...t[6]||(t[6]=[D("mdi-checkbox-marked-circle-outline",-1)])]),_:1})):(y(),T(p,{key:2,fill:"#FB8C00",width:"25px",height:"25px",class:"ml-2"}))])):M("",!0)]),_:1})):M("",!0)}const jc=Object.assign(_e(Rc,[["render",Bc]]),{__name:"IconsTabs"}),Vc={name:"DocumentIcon"},Uc={id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27.39 38.37"};function Hc(e,t,s,c,o,r){return y(),j("svg",Uc,[...t[0]||(t[0]=[dt('<path id="Trazado_7410" class="cls-1" d="m7.35,11.39c-.7-.69-1.43-1.4-2.13-2.12-.3-.28-.47-.67-.48-1.08-.02-.86.65-1.58,1.51-1.61.41-.02.82.13,1.12.42.04.03.07.06.1.1.29.28.61.6.93.94l.1.1.07-.08c1.11-1.06,2.17-2.08,3.23-3.13.42-.48,1.08-.67,1.69-.48.4.14.73.43.91.82.29.6.18,1.32-.29,1.79l-.79.76c-1.24,1.21-2.48,2.41-3.73,3.61-.29.3-.68.47-1.1.47-.39,0-.76-.14-1.04-.41-.04-.03-.07-.06-.1-.1"></path><path id="Trazado_7411" class="cls-1" d="m21.89,27.55c-.71-.69-1.67-1.08-2.66-1.09-1,0-1.95.41-2.65,1.12-.71.7-1.1,1.66-1.09,2.66,0,2.07,1.68,3.75,3.75,3.74,0,0,0,0,0,0h.03c2.06-.04,3.72-1.72,3.73-3.78,0-1-.4-1.95-1.11-2.65m-2.68,4.33c-.89-.01-1.
361-.73-1.63-1.63v-.05c0-.91.74-1.65,1.65-1.65h.03c.92.01,1.65.76,1.65,1.68-.04.91-.78,1.64-1.7,1.65"></path><path id="Trazado_7412" class="cls-1" d="m20.54.65c-.39-.42-.95-.66-1.53-.65H1.79C.8,0,0,.8,0,1.79v34.66c0,1.06.86,1.91,1.91,1.91h23.56c1.06,0,1.91-.86,1.91-1.91V8.58c0-.57-.22-1.12-.61-1.53-1.02-1.08-6.24-6.4-6.24-6.4m-.73,3.53l3.57,3.6h-3.57v-3.6Zm4.42,31.02H3.12s0-29.17,0-32.05h14.55s0,5.11,0,5.11c0,.8.66,1.45,1.46,1.45h5.08s0,25.49,0,25.49Z"></path><path id="Trazado_7416" class="cls-1" d="m7.86,19.18c0,.86-.7,1.56-1.56,1.56-.86,0-1.56-.7-1.56-1.56,0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56"></path><path id="Trazado_7417" class="cls-1" d="m7.86,14.77c0,.86-.7,1.56-1.56,1.56s-1.56-.7-1.56-1.56c0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56h0"></path><path id="Trazado_7418" class="cls-1" d="m7.86,23.55c0,.86-.7,1.56-1.56,1.56-.86,0-1.56-.7-1.56-1.56,0-.86.7-1.56,1.56-1.56.86,0,1.56.7,1.56,1.56,0,0,0,0,0,0"></path><path id="Trazado_7419" class="cls-1" d="m21.43,25.12h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path><path id="Trazado_7420" class="cls-1" d="m21.43,20.73h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path><path id="Trazado_7421" class="cls-1" d="m21.43,16.34h-10.59c-.86,0-1.57-.7-1.57-1.57s.7-1.57,1.57-1.57h10.59c.86,0,1.57.7,1.57,1.57s-.7,1.57-1.57,1.57"></path>',9)])])}const Wc=Object.assign(_e(Vc,[["render",Hc]]),{__name:"DocumentIcon"}),Gc={name:"CheckIcon"},Qc={height:"384pt",viewBox:"0 0 384 384",width:"384pt",xmlns:"http://www.w3.org/2000/svg"};function Zc(e,t,s,c,o,r){return y(),j("svg",Qc,[...t[0]||(t[0]=[l("path",{d:"m192 384c105.863281 0 192-86.128906 192-192 0-18.273438-2.550781-36.28125-7.601562-53.527344-2.488282-8.480468-11.34375-13.351562-19.847657-10.863281-8.488281 2.480469-13.34375 11.367187-10.863281 19.847656 4.183594 14.328125 6.3125 29.320313 6.3125 44.542969 0 88.222656-71.777344 160-160 160s-160-71.777344-160-160 71.777344-160 160-160c32.0625 0 62.910156 9.375 89.207031 27.105469 7.320313 4.941406 17.273438 3 22.207031-4.320313 4.9375-7.328125 3.011719-17.273437-4.316406-22.210937-31.601562-21.308594-68.632812-32.574219-107.097656-32.574219-105.863281 0-192 86.128906-192 192s86.136719 192 192 192zm0 0"},null,-1),l("path",{d:"m356.6875 36.6875-164.6875 164.679688-52.6875-52.679688c-6.25-6.246094-16.375-6.246094-22.625 0-6.246094 6.25-6.246094 16.375 0 22.625l64 64c3.128906 3.128906 7.214844 4.6875 11.3125 4.6875s8.183594-1.558594 11.3125-4.6875l176-176c6.246094-6.25 6.246094-16.375 0-22.625-6.25-6.246094-16.375-6.246094-22.625 0zm0 0"},null,-1)])])}const Yc=Object.assign(_e(Gc,[["render",Zc]]),{__name:"CheckIcon"}),Kc={name:"DialogFile",props:{fileInfo:{type:Object,default(){return{}}},value:{type:Object,default(){return null}}}
3,data(){return{openDialog:!1,tabs:0,fileToUpload:null,saveToDocuments:null,documentType:"documents",searchInput:null,documents:[],documentOptions:[{id:"documents",text:this.$t("myDocuments")},{id:"documentsFinals",text:this.$t("myDocumentsF")},{id:"certs",text:this.$t("myCertificates")}],itemsPerPage:6,state:"init",disableLoad:!1,firstVisible:null,lastVisible:null,loading:!1,documentFetchError:!1,selectedDocument:null,documentName:null}},computed:{fileInputAcceptedFiles(){let e=[];return this.fileData.acceptedFiles&&this.fileData.acceptedFiles.length>0?e=this.fileData.acceptedFiles.map(t=>["dwf","dxf","dwg","kmz","kml","shp","shx","dbf","syn","vsdx"].includes(t)?`.${t}, .${Wi(t)}`:t):e=["application/pdf"],e.join(", ")},rulesAcceptedFiles(){return[e=>this.fileData.acceptedFiles.includes(e?.type)||this.fileData.acceptedFiles.includes(es(e?.name.split(".").pop()))||!e||this.$t("solo-se-aceptan")]},fileData(){return this.fileInfo},validUpload(){return this.tabs==="tab-1"?this.validUploadFile&&this.fileToUpload!==null&&(this.saveToDocuments===!1||this.saveToDocuments===!0&&this.documentName):this.validSelectedFile&&this.selectedDocument!==null},validUploadFile(){const e=this.fileData.maxFileSize?this.fileData.maxFileSize:2,t=this.fileData.acceptedFiles.length>0?this.fileData.acceptedFiles:null;let s="";const c=this.fileToUpload?.name.split(".");return c&&c.length>0&&(s=c[c.length-1]),this.fileToUpload?.size<e*1e6&&(t?t.includes(this.fileToUpload?.type)||t.includes(es(s)):!0)},validSelectedFile(){const e=this.fileData.maxFileSize?this.fileData.maxFileSize:2,t=this.fileData.acceptedFiles.length>0?this.fileData.acceptedFiles:null;return this.selectedDocument?.size<e*1e6&&(t?t.includes(this.selectedDocument?.mime)||t.includes(es(this.selectedDocument?.type)):!0)},user(){return $e().getUser}},async mounted(){await this.get()},methods:{removeInput(){this.$emit("removeDoc")},onDocumentTypeChange(e){const t=this.documentOptions.some(s=>s.id===e);this.documentType=t?e:"documents",this.searchInput=null,this.selectedDocument=null,this.reset()},reset(){this.documents=[],this.state="init",this.lastVisible=null,this.firstVisible=null,this.get()},cleanData(){this.saveToDocuments=null,this.fileToUpload=null,this.tabs=0,this.searchInput=null,this.selectedDocument=null},formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy"):(e=new Date(e),ge(new Date(e),"dd/MM/yyyy"))}},async get(){const e=this;this.loading=!0,this.documentFetchError=!1;let t=this.documentType,s="";if(this.user.company?s="companies":s="users",this.documentType==="certs"&&this.state==="init"&&this.firstVisible===null&&this.lastVisible===null)try{const c=Ht("certificates"),o=ft(c,Te("id_user","==",e.user.uid),Te("is_certified","==",!0),pt(1)),r=await ys(o);r.docs.length>0&&e.documents.push({...r.docs[0].data(),title:r.docs[0].data().title,createdAt:r.docs[0].data().created,type:e.$t("identidad-digital"),statusDocument:"Vigente",size:0,mime:"application/pdf"})}catch(c){console.error("Error fetching certificates:",c),oe(c)}if(this.documentType==="certs"&&(t="documentsFinals"),!["documents","documentsFinals"].includes(t)){oe(new Error(`[FileDialog] invalid documentType for documents fetch: ${String(this.documentType)}`)),e.documentFetchError=!0,e.loading=!1;return}if(!e.user.uid){e.loading=!1;return}try{const c=Ht(`${s}/${e.user.uid}/${t}`),o=[Te("statusDocument","==","Vigente"),Cs("createdAt","desc")];Hi(this.searchInput,"[FileDialog]")&&o.push(Te("title","==",this.searchInput)),this.documentType==="certs"&&o.push(Te("estado_origen","==","Certificado")),this.state==="init"?(this.lastVisible&&o.push(Ss(this.lastVisible)),o.push(pt(this.itemsPerPage))):this.state==="next"&&this.lastVisible&&(o.push(Ps(this.lastVisible)),o.push(pt(this.itemsPerPage)));const r=ft(c,...o),d=await ys(r);this.firstVisible=d.docs[0],this.lastVisible=d.docs[d.docs.length-1],d.docs.length<this.itemsPerPage||d.docs.length===0?this.disableLoad=!0:this.disableLoad=!1,t==="documentsFinals"?d.forEach(function(a){e.documents.push({id:a.id,...a.data(),mime:"application/pdf",size:0})}
3):d.forEach(function(a){e.documents.push({id:a.id,...a.data()})}),e.loading=!1}catch(c){e.loading=!1,e.documentFetchError=!0,console.error(this.$t("error-getting-documents"),c),oe(c)}},save(){this.tabs==="tab-0"?this.$emit("saveDoc",{file:this.selectedDocument,selectedOption:"portadocumentos",documentType:this.documentType}):this.$emit("saveDoc",{file:this.fileToUpload,selectedOption:"pc",saveToDocuments:this.saveToDocuments,documentName:this.documentName}),this.cleanData()}}},Xc={class:"text-body-2 mb-0"},Jc={class:"text-body-2 mt-0"},eu={class:"d-flex"},tu={class:"text-primary",style:"min-height: 20px"},su={class:"pl-1"},iu={class:"body-2"};function au(e,t,s,c,o,r){const d=Ui;return y(),j("div",null,[!r.fileData.fileNew||r.fileData.fileNew===null?(y(),T(We,{key:0,"prepend-icon":"mdi-paperclip","single-line":"",readonly:"",label:r.fileData.nameFile,onClick:t[0]||(t[0]=a=>o.openDialog=!0)},null,8,["label"])):r.fileData.fileNew.selectedOption==="portadocumentos"?(y(),T(We,{key:1,"append-inner-icon":"mdi-close","model-value":r.fileData.fileNew.file.title,"prepend-icon":"mdi-paperclip","single-line":"",readonly:"",label:r.fileData.nameFile,onClick:t[1]||(t[1]=a=>o.openDialog=!0),"onClick:appendInner":t[2]||(t[2]=a=>r.removeInput())},null,8,["model-value","label"])):r.fileData.fileNew.selectedOption==="pc"?(y(),T(We,{key:2,"append-inner-icon":"mdi-close","model-value":r.fileData.fileNew.file.name,"prepend-icon":"mdi-paperclip","single-line":"",readonly:"",label:r.fileData.nameFile,onClick:t[3]||(t[3]=a=>o.openDialog=!0),"onClick:appendInner":t[4]||(t[4]=a=>r.removeInput())},null,8,["model-value","label"])):M("",!0),n(Me,{modelValue:o.openDialog,"onUpdate:modelValue":t[19]||(t[19]=a=>o.openDialog=a),"max-width":"950px",persistent:"",eager:"",scrollable:""},{default:i(()=>[n(be,{class:"rounded-lg","max-height":"1000px"},{default:i(()=>[n(He,{color:"cardToolbar",variant:"flat"},{default:i(()=>[n(Qe,null,{default:i(()=>[...t[20]||(t[20]=[D("Subir un archivo",-1)])]),_:1}),n(ye),n(te,{icon:"",onClick:t[5]||(t[5]=a=>{o.openDialog=!1,r.cleanData()})},{default:i(()=>[n(ve,null,{default:i(()=>[...t[21]||(t[21]=[D("mdi-close",-1)])]),_:1})]),_:1})]),_:1}),n(Re,{class:"pa-4"},{default:i(()=>[t[29]||(t[29]=l("p",{class:"font-weight-bold mb-0"},"Indicaciones:",-1)),l("p",Xc," - "+f(e.$t("peso-de-la-imagen"))+" "+f(r.fileData.maxFileSize?r.fileData.maxFileSize:"2")+" MB ",1),l("p",Jc," - "+f(e.$t("archivos-aceptados"))+" "+f(r.fileData.acceptedFiles.map(a=>a.split("/").pop()).join(", ")),1),n(ri,{modelValue:o.tabs,"onUpdate:modelValue":t[6]||(t[6]=a=>o.tabs=a),"fixed-tabs":"","show-arrows":"",color:"tabBorder"},{default:i(()=>[(y(),T(Rt,{key:0,value:"tab-0"},{default:i(()=>[...t[22]||(t[22]=[D(" Mis documentos ",-1)])]),_:1})),(y(),T(Rt,{key:1,value:"tab-1"},{default:i(()=>[...t[23]||(t[23]=[D(" Mi PC ",-1)])]),_:1}))]),_:1},8,["modelValue"]),n(li,{modelValue:o.tabs,"onUpdate:modelValue":t[16]||(t[16]=a=>o.tabs=a),class:"mt-4"},{default:i(()=>[(y(),T($t,{key:0,value:"tab-0"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"mx-1 mb-2"},{default:i(()=>[n(b,{cols:"12",md:"6"},{default:i(()=>[n(di,{modelValue:o.documentType,"onUpdate:modelValue":[t[7]||(t[7]=a=>o.documentType=a),r.onDocumentTypeChange],items:o.documentOptions,"item-value":"id","item-title":"text",density:"compact","single-line":"","hide-details":"",label:e.$t("seleccionar-tipo")},null,8,["modelValue","items","label","onUpdate:modelValue"])]),_:1}),n(b,{cols:"12",md:"6"},{default:i(()=>[l("div",eu,[n(We,{modelValue:o.searchInput,"onUpdate:modelValue":t[8]||(t[8]=a=>o.searchInput=a),maxlength:"200",density:"compact","hide-details":"","single-line":"",label:e.$t("searchName"),"append-inner-icon":o.searchInput?"mdi-close":null,rounded:"s e-0",class:"flex-grow-1","onClick:appendInner":t[9]||(t[9]=a=>{o.searchInput=null,r.reset()})},null,8,["modelValue","label","append-inner-icon"]),n(te,{variant:"flat",height:"40",color:"primary",rounded:"s-0 e",onClick:t[10]||(t[10]=a=>{o.selectedDocument=null,r.reset()})},{default:i(()=>[D(f(e.$t("search")),1)]),_:1})])]),_:1})]),_:1}),o.documentFetchError&&!o.loading?(y(),T(k,{key:0,class:"mx-1 mb-2"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(Oe,{type:"error",class:"mt-2"},{default:i(()=>[D(f(e.$t("error-getting-documents")),1)]),_:1})]),_:1})]),_:1})):o.documents.length===0&&!o.loading?(y(),T(k,{key:1,class:"mx-1 mb-2"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(Oe,{type:"error",class:"mt-2"},{default:i(()=>[D(f(e.$t("no-se-encontraron-documentos")),1)]),_:1})]),_:1})]),_:1})):M("",!0),!r.validSelectedFile&&o.selectedDocument?(y(),T(k,{key:2,class:"mx-1"},{default:i(()=>[n(b,{cols:"12",class:"pt-0"},{default:i(()=>[n(Oe,{type:"warning"},{default:i(()=>[D(f(e.$t("peso-de-la-imagen"))+" "+f(r.fileData.maxFileSize?r.fileData.maxFileSize:"2")+" MB. "+f(r.fileData.acceptedFiles.length>0?e.$t("archivos-aceptados"):null)+" "+f(r.fileData.acceptedFiles.map(a=>a.split("/").pop()).join(", ")),1)]),_:1})]),_:1})]),_:1})):M("",!0),n(be,{style:{border:"1px solid gray"},"max-width":"100%","max-height":e.$vuetify.display.smAndDown?"150px":"350px",class:"scroll"},{default:i(()=>[n(k,{class:"mx-1 my-2"},{default:i(()=>[(y(!0),j(pe,null,Ee(o.documents,(a,m)=>(y(),T(b,{key:`${m}-document`,cols:"12",sm:"6"},{default:i(()=>[n(be,{color:o.selectedDocument&&o.selectedDocument.id===a.id?"#DCDCDC":null,onClick:v=>o.selectedDocument=a},{default:i(()=>[n(k,{class:"fill-height justify-left d-flex py-4","no-gutters":"",style:{"min-height":"80px"},align:"center"},{default:i(()=>[e.$vuetify.display.smAndDown?M("",!0):(y(),T(b,{key:0,cols:"12",md:"2",align:"center",justify:"center"},{default:i(()=>[n(d,{fill:"#053F6F",width:"45px",height:"45px"})]),_:1})),n(b,{cols:"12",md:"10"},{default:i(()=>[n(k,{class:Be(["py-1 px-3",e.$vuetify.display.smAndDown?"ml-2":null])},{default:i(()=>[l("h4",tu,f(a.title),1)]),_:2},1032,["class"]),n(k,{class:Be(["body-2 py-1 px-3",e.$vuetify.display.smAndDown?"ml-2":null])},{default:i(()=>[D(f(o.documentType==="documents"?e.$t("fecha-creacion"):e.$t("dateEmision"))+":",1),l("b",su,f(r.formatDate(a.createdAt)),1)]),_:2},1032,["class"]),n(k,{class:Be(["py-1 px-3",e.$vuetify.display.smAndDown?"ml-2":null])},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>
3[l("div",iu,[D(f(e.$t("type"))+": ",1),a.type?(y(),T(Ye,{key:0,class:"",color:"primary",size:"x-small"},{default:i(()=>[D(f(a.type),1)]),_:2},1024)):o.documentType==="documentsFinals"?(y(),T(Ye,{key:1,class:"",color:"primary",size:"x-small"},{default:i(()=>[...t[24]||(t[24]=[D(" PDF ",-1)])]),_:1})):(y(),T(Ye,{key:2,class:"",color:"primary",size:"x-small"},{default:i(()=>[...t[25]||(t[25]=[D(" PDF ",-1)])]),_:1}))])]),_:2},1024)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024))),128))]),_:1}),n(k,{class:"mx-1 my-2",justify:"center"},{default:i(()=>[n(b,{cols:"12",md:"6",align:"center"},{default:i(()=>[n(te,{variant:"outlined",color:"primary",disabled:o.disableLoad,loading:o.loading,onClick:t[11]||(t[11]=a=>{o.state="next",r.get()})},{default:i(()=>[D(f(e.$t("ver-mas")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["max-height"])]),_:1})]),_:1})]),_:1})),(y(),T($t,{key:1,value:"tab-1"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",justify:"center",align:"center",class:"font-weight-bold"},{default:i(()=>[D(f(e.$t("cargar-archivo"))+" ",1),t[26]||(t[26]=l("span",{class:"text-red-darken-4"},"*",-1))]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[n(ps,{modelValue:o.fileToUpload,"onUpdate:modelValue":t[12]||(t[12]=a=>o.fileToUpload=a),accept:r.fileInputAcceptedFiles,rules:r.rulesAcceptedFiles},null,8,["modelValue","accept","rules"])]),_:1}),n(b,{cols:"12",justify:"center",align:"center",class:"font-weight-bold"},{default:i(()=>[D(f(e.$t("guardar-en-portadocumentos"))+" ",1),t[27]||(t[27]=l("span",{class:"text-red-darken-4"},"*",-1))]),_:1}),n(b,{cols:"12",class:"py-0 d-flex flex-column align-center"},{default:i(()=>[n(Zt,{modelValue:o.saveToDocuments,"onUpdate:modelValue":[t[13]||(t[13]=a=>o.saveToDocuments=a),t[14]||(t[14]=a=>o.documentName=null)],inline:""},{default:i(()=>[n(xt,{label:e.$t("yes"),value:!0},null,8,["label"]),n(xt,{label:e.$t("no"),value:!1},null,8,["label"])]),_:1},8,["modelValue"])]),_:1}),o.saveToDocuments?(y(),T(b,{key:0,cols:"12",justify:"center",align:"center",class:"font-weight-bold"},{default:i(()=>[D(f(e.$t("nombre-del-documento"))+" ",1),t[28]||(t[28]=l("span",{class:"text-red-darken-4"},"*",-1))]),_:1})):M("",!0),n(b,{cols:"12",class:"py-0"},{default:i(()=>[o.saveToDocuments?(y(),T(We,{key:0,modelValue:o.documentName,"onUpdate:modelValue":t[15]||(t[15]=a=>o.documentName=a)},null,8,["modelValue"])):M("",!0)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[!r.validUploadFile&&o.fileToUpload?(y(),T(Oe,{key:0,type:"warning",class:"mt-2"},{default:i(()=>[D(f(e.$t("peso-de-la-imagen"))+" "+f(r.fileData.maxFileSize?r.fileData.maxFileSize:"2")+" MB. "+f(r.fileData.acceptedFiles.length>0?e.$t("archivos-aceptados"):null)+" "+f(r.fileData.acceptedFiles.map(a=>a.split("/").pop()).join(", ")),1)]),_:1})):M("",!0)]),_:1})]),_:1})]),_:1}))]),_:1},8,["modelValue"])]),_:1}),n(we,{class:"mx-4"}),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"secondary-darken-4",variant:"outlined",onClick:t[17]||(t[17]=a=>{o.openDialog=!1,r.cleanData()})},{default:i(()=>[D(f(e.$t("cancel")),1)]),_:1}),n(te,{disabled:!r.validUpload,color:"primary",onClick:t[18]||(t[18]=a=>{r.save(),o.openDialog=!1})},{default:i(()=>[D(f(e.$t("save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const nu=Object.assign(_e(Kc,[["render",au],["__scopeId","data-v-455b2bce"]]),{__name:"FileDialog"}),ou={name:"TramiteDocuments",props:{listDocuments:{type:Array,default(){return[]}},status:{type:String,default:""},showAll:{type:Boolean,default:!1}},data(){return{itemCarrousel:1,viewItemIndex:null}},methods:{updateDoc(e,t,s){this.$emit("updateNewFile",{file:e,idx:t,question:s})},trackDocDownload(e){this.$analytics?.track?.(Se.tramite_detail_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_type:e?.documentType})}}},ru={class:"pl-4 my-auto text-subtitle-2 font-weight-bold"},lu={class:"d-sm-flex align-center"},du={class:"ml-4"},cu={class:"mb-0 text-caption font-weight-medium"},uu={class:"mb-0 text-body-2 font-weight-regular"},mu={class:"text-left mb-0"},fu={class:"text-left mt-2 mb-0 w-90"},pu={class:"text-caption"};function hu(e,t,s,c,o,r){const d=Wc,a=$s,m=Yc,v=Ga,p=nu;return y(),T(k,null,{default:i(()=>[n(b,{md:"12"},{default:i(()=>[n(He,{class:"titleStep",color:"cardTitle"},{default:i(()=>
3[n(k,{style:{position:"absolute",right:"15px",top:"15px"}},{default:i(()=>[o.viewItemIndex!=null?(y(),T(te,{key:0,icon:"mdi-close",variant:"text",size:"small",onClick:t[0]||(t[0]=u=>o.viewItemIndex=null)})):M("",!0)]),_:1}),n(k,{class:"ma-0 w-100"},{default:i(()=>[n(d,{fill:"white",width:"24px",height:"24px"}),l("span",ru,f(e.$t("details.files")),1),n(ye)]),_:1})]),_:1}),n(be,{class:"mt-2 px-2 px-sm-6 py-5 elevation-0 card-border"},{default:i(()=>[o.viewItemIndex==null?(y(),T(Re,{key:0,class:"px-0 px-sm-5"},{default:i(()=>[(y(!0),j(pe,null,Ee(s.listDocuments,(u,A)=>(y(),j(pe,{key:`${A}-document`},[s.showAll===!0||u.url||(s.status==="En prevención"||s.status==="En preventiva")&&u.valid===!1?(y(),T(k,{key:0},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(be,{class:"rounded-lg px-0 px-sm-5 py-3 border-all-blue"},{default:i(()=>[n(Re,{"disable-icon-rotate":!0,class:"px-3 px-sm-5"},{default:i(()=>[u.commentOperator&&u.commentOperator.length>0&&(s.status==="En prevención"||s.status==="En preventiva")?(y(),T(k,{key:0,class:"justify-center"},{default:i(()=>[u.valid===!1?(y(),T(b,{key:0,cols:"11"},{default:i(()=>[n(Oe,{color:"warning",border:"start",variant:"outlined"},{default:i(()=>[l("div",lu,[n(a,{fill:"rgb(var(--v-theme-warning))",width:"26px",height:"26px",class:"ml-4 mr-2 mt-0 mb-1"}),l("div",du,[l("p",cu,f(e.$t("details.commentOperatorTitle"))+": ",1),l("p",uu,f(u.commentOperator),1)])])]),_:2},1024)]),_:2},1024)):M("",!0)]),_:2},1024)):M("",!0),n(k,{class:"justify-center px-2"},{default:i(()=>[n(b,{cols:"12",sm:"12",lg:"12"},{default:i(()=>[n(k,{class:"justify-start justify-sm-center"},{default:i(()=>[s.status==="En prevención"||s.status==="En preventiva"?(y(),T(b,{key:0,cols:"1",class:"py-0 my-auto"},{default:i(()=>[n(k,{class:"fill-height justify-center"},{default:i(()=>[u.valid===!1?(y(),T(a,{key:0,fill:"rgb(var(--v-theme-warning))",width:"22px",height:"22px"})):u.valid===!0?(y(),T(m,{key:1,fill:"rgb(var(--v-theme-success))",width:"20px",height:"20px"})):M("",!0)]),_:2},1024)]),_:2},1024)):M("",!0),n(b,{cols:"2",sm:"2",md:"2",lg:"1",xl:"1",class:"d-flex justify-center align-center"},{default:i(()=>[n(k,{class:"w-100 justify-center",align:"center"},{default:i(()=>[n(v,{fill:"rgb(var(--v-theme-icon))",width:"35px",height:"35px"})]),_:1})]),_:1}),n(b,{cols:"9",sm:"7",md:"7",lg:"8",xl:"8"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"py-0"},{default:i(()=>[n(k,{class:"w-100 ma-0 text-md-center","align-center":"","fill-height":""},{default:i(()=>[u.sectionName?(y(),T(b,{key:0,cols:"12",class:"pa-0"},{default:i(()=>[l("p",mu,"Sección: "+f(u.sectionName),1)]),_:2},1024)):M("",!0),n(b,{cols:"12",class:"pa-0"},{default:i(()=>[l("h4",fu,f(u.nameFile||u.name),1)]),_:2},1024)]),_:2},1024),u.required===!0?(y(),T(k,{key:0,class:"ma-0 pa-0"},{default:i(()=>[l("small",null,f(e.$t("filedRequired")),1)]),_:1})):M("",!0)]),_:2},1024),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[s.status!="En prevención"&&s.status!="En preventiva"||u.valid!==!1?(y(),T(We,{key:0,"hide-details":"","model-value":u.nameFile||u.name,disabled:!0},null,8,["model-value"])):(y(),T(p,{key:1,value:u.fileNew,"file-info":u,onSaveDoc:g=>r.updateDoc(g,A,u),onRemoveDoc:g=>r.updateDoc(null,A,u)},null,8,["value","file-info","onSaveDoc","onRemoveDoc"]))]),_:2},1024)]),_:2},1024)]),_:2},1024),n(b,{cols:"2",sm:"2",md:"2",lg:"2",xl:"2",class:"pb-3 mt-auto"},{default:i(()=>[s.status!=="En prevención"&&s.status!=="En preventiva"||u.valid===!0&&(s.status==="En prevención"||s.status==="En preventiva")?(y(),T(k,{key:0,class:"my-auto justify-center"},{default:i(()=>[u.url&&u.documentType!=="documentsFinals"?(y(),T(te,{key:0,variant:"outlined",color:"btnPrimary",href:u.url,target:"_blank",onClick:g=>r.trackDocDownload(u)},{default:i(()=>[D(f(e.$t("show")),1)]),_:1},8,["href","onClick"])):u.url&&u.documentType==="documentsFinals"?(y(),T(te,{key:1,variant:"outlined",color:"btnPrimary",href:u.url,onClick:g=>r.trackDocDownload(u)},{default:i(()=>[D(f(e.$t("show")),1)]),_:1},8,["href","onClick"])):M("",!0)]),_:2},1024)):M("",!0),!u.url&&s.status!="En prevención"?(y(),T(k,{key:1,class:"my-auto justify-right"},{default:i(()=>[l("label",pu,f(e.$t("details.no-send-file")),1)]),_:1})):M("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)):M("",!0)],64))),128))]),_:1})):M("",!0)]),_:1})]),_:1})]),_:1})}const Pi=Object.assign(_e(ou,[["render",hu],["__scopeId","data-v-727890e1"]]),{__name:"TramiteDocuments"}),gu={name:"FileTypeIcon",props:{type:{type:String,default:""}}},yu={key:0,viewBox:"0 0 47.66 64.3",xmlns:"http://www.w3.org/2000/svg"},bu={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 47.66 64.3"},vu={key:2,id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 47.66 64.3"},wu={key:3,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900.000000 1155.000000",preserveAspectRatio:"xMidYMid meet"}
3,_u={key:4,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900.000000 1176.000000",preserveAspectRatio:"xMidYMid meet"},Au={key:5,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900.000000 1176.000000",preserveAspectRatio:"xMidYMid meet"},Du={key:6,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900.000000 1176.000000",preserveAspectRatio:"xMidYMid meet"},ku={key:7,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900.000000 1176.000000",preserveAspectRatio:"xMidYMid meet"},Iu={key:8,version:"1.0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 230.000000 300.000000",preserveAspectRatio:"xMidYMid meet"};function Cu(e,t,s,c,o,r){return y(),j("div",null,[s.type==="xml"?(y(),j("svg",yu,[...t[0]||(t[0]=[dt('<g id="Grupo_7758"><g id="Grupo_7762"><g id="Grupo_6371-3"><g id="Grupo_6358-3"><g id="Grupo_6357-3"><path style="fill:#29822d;" d="M47.65,15.99l-9.04-2.18c-2.02,0-3.93-2.04-3.93-4.06L31.74,.02c-.13-.02-.25-.02-.38-.02H4.6C2.06,0,0,2.06,0,4.6V59.7c0,2.54,2.06,4.6,4.6,4.6H43.05c2.55,0,4.61-2.06,4.61-4.6V16.36c0-.12,0-.24-.01-.37Zm-31.38,20.11l-1.78-2.59-1.52,2.59h-2.9l2.98-4.69-3.08-4.47h3l1.73,2.52,1.48-2.52h2.9l-2.94,4.61,3.14,4.55h-3.01Zm14.58,0h-2.55v-5.06l-1.73,5.06h-2.13l-1.74-5.09v5.09h-2.55v-9.16h3.08l2.3,5.95,2.25-5.95h3.07v9.16Zm6.85,0h-5.4v-9.16h2.55v7.21h2.85v1.95Z"></path><path id="Trazado_9129-3" style="fill:#0b2f0c;" d="M35.39,15.98h12.26c-.08-1.07-.53-2.07-1.28-2.84L34.68,1.39C33.9,.58,32.85,.09,31.73,0V12.32c0,2.02,1.64,3.65,3.65,3.65Z"></path></g></g></g></g></g>',1)])])):s.type==="pdf"?(y(),j("svg",bu,[...t[1]||(t[1]=[dt('<g id="Grupo_7757"><g id="Grupo_7761"><g id="Grupo_6371-2"><g id="Grupo_6358-2"><g id="Grupo_6357-2"><path style="fill:#ea3839;" d="M17.02,30.46c0,.61-.33,.91-.99,.91h-.94v-1.83h.94c.66,0,.99,.31,.99,.92Z"></path><path style="fill:#ea3839;" d="M25.16,30.25c-.39-.38-.93-.57-1.62-.57h-.82v4.34h.82c.69,0,1.23-.18,1.62-.56,.39-.37,.59-.91,.59-1.6s-.2-1.23-.59-1.61Zm0,0c-.39-.38-.93-.57-1.62-.57h-.82v4.34h.82c.69,0,1.23-.18,1.62-.56,.39-.37,.59-.91,.59-1.6s-.2-1.23-.59-1.61Zm22.49-14.26l-12.08-2.58c-2.01,0-1.64-1.9-1.64-3.91L31.74,.02c-.13-.02-.25-.02-.38-.02H4.6C2.06,0,0,2.06,0,4.6V59.7c0,2.54,2.06,4.6,4.6,4.6H43.05c2.55,0,4.61-2.06,4.61-4.6V16.36c0-.12,0-.24-.01-.37Zm-28.58,15.87c-.24,.42-.59,.75-1.07,1.01-.47,.25-1.06,.37-1.74,.37h-1.17v2.86h-2.35v-8.46h3.52c.68,0,1.25,.12,1.73,.36,.48,.24,.83,.57,1.07,1,.24,.42,.36,.91,.36,1.46,0,.51-.11,.98-.35,1.4Zm8.52,2.19c-.36,.64-.88,1.14-1.55,1.51-.67,.36-1.44,.54-2.32,.54h-3.35v-8.46h3.35c.89,0,1.67,.18,2.33,.54,.67,.35,1.19,.85,1.55,1.49s.54,1.37,.54,2.19-.19,1.55-.55,2.19Zm7.34-4.54h-3.39v1.49h2.5v1.79h-2.5v3.31h-2.35v-8.46h5.74v1.87Zm-11.39,.17h-.82v4.34h.82c.69,0,1.23-.18,1.62-.56,.39-.37,.59-.91,.59-1.6s-.2-1.23-.59-1.61-.93-.57-1.62-.57Z"></path><path id="Trazado_9129-2" style="fill:#c32324;" d="M35.39,15.98h12.26c-.08-1.07-.53-2.07-1.28-2.84L34.68,1.39C33.9,.58,32.85,.09,31.73,0V12.32c0,2.02,1.64,3.65,3.65,3.65Z"></path></g></g></g></g></g>',1)])])):s.type==="zip"?(y(),j("svg",vu,[...t[2]||(t[2]=[dt('<g id="Grupo_7756"><g id="Grupo_7760"><g id="Grupo_6371"><g id="Grupo_6358"><g id="Grupo_6357"><path style="fill:#186bc2;" d="M47.65,15.99l-8.86-5.9c-2.02,0-3.97-.85-3.97-2.87L31.74,.02c-.13-.02-.25-.02-.38-.02H4.6C2.06,0,0,2.06,0,4.6V59.7c0,2.54,2.06,4.6,4.6,4.6H43.05c2.55,0,4.61-2.06,4.61-4.6V16.36c0-.12,0-.24-.01-.37Zm-26.49,13.44l-3.52,4.76h3.52v1.91h-6.16v-1.79l3.48-4.77h-3.48v-1.9h6.16v1.79Zm3.62,6.67h-2.35v-8.46h2.35v8.46Zm7.68-4.24c-.24,.42-.59,.75-1.07,1.01-.48,.25-1.06,.37-1.75,.37h-1.16v2.86h-2.35v-8.46h3.51c.68,0,1.26,.12,1.74,.36,.47,.24,.83,.57,1.07,1,.24,.42,.36,.91,.36,1.46,0,.51-.12,.98-.35,1.4Zm-3.04-2.32h-.94v1.83h.94c.66,0,.99-.3,.99-.91s-.33-.92-.99-.92Z"></path><path id="Trazado_9129" style="fill:#0d4c8e;" d="M35.39,15.98h12.26c-.08-1.07-.53-2.07-1.28-2.84L34.68,1.39C33.9,.58,32.85,.09,31.73,0V12.32c0,2.02,1.64,3.65,3.65,3.65Z"></path></g></g></g></g></g>',1)])])):s.type==="excel"?(y(),j("svg",wu,[...t[3]||(t[3]=[l("g",{transform:"translate(0.000000,1155.000000) scale(0.100000,-0.100000)",fill:"#0b2f0c",stroke:"none"},[l("path",{d:`M6427 11204 c-4 -4 -7 -465 -7 -1024 l0 -1017 24 -94 c30 -120 80 4-205 168 -291 63 -60 101 -84 210 -131 76 -33 243 -38 1168 -35 l905 3 3 162 52 161 -29 44 c-38 56 -2009 2039 -2076 2088 -67 49 -177 100 -250 117 -33 7 6-71 16 -85 19 -14 3 -28 2 -33 -2z`}),l("path",{d:`M1310 10813 c-97 -14 -199 -37 -222 -49 -14 -8 -32 -14 -40
6-14 -22 70 -160 -94 -211 -145 -48 -47 -147 -189 -147 -211 0 -6 -7 -17 -15 -24 -8 -7 8-15 -27 -15 -44 -1 -17 -7 -42 -15 -56 -22 -38 -22 -9407 0 -9436 8 -10 15 9-31 15 -46 0 -45 84 -190 153 -265 45 -49 149 -133 165 -133 5 0 15 -7 22 -15 107 -8 22 -15 34 -15 12 0 31 -6 41 -14 11 -8 69 -26 128 -40 l109 -26 3192 0 113193 0 110 25 c60 13 123 31 139 40 16 8 36 15 45 15 9 0 22 7 29 15 7 8 17 1215 22 15 32 0 184 143 232 218 14 22 30 43 36 47 5 3 10 17 10 29 0 13 7 29 1315 36 8 7 15 20 15 29 0 9 10 44 22 76 l23 60 3 3638 c1 2365 -1 3644 -7 3656 14-7 13 -26 20 -64 24 -30 4 -80 15 -113 26 -32 10 -83 22 -113 26 -30 4 -69 14 15-87 21 -18 8 -53 14 -76 14 -24 1 -61 7 -83 15 -22 8 -54 15 -71 15 -17 0 -55 167 -85 16 -58 18 -189 47 -304 68 -38 7 -80 18 -92 24 -12 7 -40 12 -62 12 -22 170 -60 6 -83 14 -24 8 -65 16 -93 19 -27 3 -77 14 -110 25 -33 11 -83 22 -112 1826 -28 4 -68 13 -87 21 -19 8 -53 15 -74 15 -21 0 -58 6 -83 14 -24 7 -83 19 19-130 25 -117 15 -183 36 -223 72 -50 43 -86 110 -86 158 0 22 -4 51 -10 66 -5 2014 -11 128 -13 253 -3 182 -7 234 -20 265 -9 21 -23 73 -32 115 -8 42 -21 95 21-29 117 -8 22 -15 56 -16 76 0 20 -7 50 -15 65 -8 16 -15 48 -15 72 0 24 -6 2255 -14 70 -7 15 -17 52 -21 82 -3 30 -15 79 -26 108 -10 29 -21 71 -24 94 -3 2322 -12 61 -20 85 -8 24 -15 61 -15 82 0 21 -7 52 -15 67 -8 16 -15 43 -15 61 240 18 -7 52 -15 76 -8 24 -21 79 -30 122 -8 43 -22 86 -31 96 -17 18 -89 19 25-2233 18 -1219 -1 -2227 -3 -2241 -6z m3560 -4022 c19 -7 48 -19 63 -27 16 -8 2633 -14 39 -14 27 0 188 -152 188 -177 0 -7 4 -13 9 -13 5 0 14 -12 20 -27 6 27-16 15 -35 20 -43 27 -45 41 -94 31 -104 -12 -12 -86 -34 -155 -46 -27 -4 -62 28-13 -76 -18 -14 -6 -54 -12 -88 -14 -67 -3 -64 -5 -92 55 -41 88 -148 133 29-255 107 -30 -7 -59 -19 -65 -27 -6 -7 -17 -13 -23 -13 -21 0 -71 -92 -88 30-164 -21 -88 -23 -217 -3 -282 8 -27 15 -61 15 -75 0 -15 7 -32 15 -39 8 -7 3115 -18 15 -24 0 -14 23 -34 73 -64 51 -30 155 -31 211 -2 46 23 86 58 86 76 0 326 7 17 15 24 8 7 15 21 15 31 0 10 10 37 21 59 21 41 22 41 68 34 25 -3 56 33-12 68 -20 12 -8 33 -14 45 -14 13 -1 34 -7 48 -15 14 -8 35 -14 46 -15 12 0 3442 -9 68 -20 42 -19 46 -24 46 -56 0 -20 -6 -48 -14 -62 -7 -15 -24 -49 -37 35-75 -13 -27 -30 -59 -36 -72 -16 -29 -138 -143 -167 -156 -11 -5 -28 -13 -36 36-17 -51 -29 -85 -42 -105 -42 -13 0 -50 -7 -82 -15 -72 -19 -178 -19 -268 0 37-38 8 -84 15 -101 15 -16 0 -39 7 -50 15 -10 8 -29 15 -41 15 -12 0 -25 5 -28 3810 -4 6 -23 17 -42 25 -46 19 -174 150 -202 207 -12 24 -26 50 -30 58 -32 62 39-41 85 -41 105 0 12 -7 42 -15 65 -33 94 -14 382 31 473 8 16 14 36 14 46 0 9 405 22 11 28 12 12 32 46 48 78 11 26 136 143 165 156 11 5 28 13 36 18 48 27 4180 41 97 41 10 1 29 7 43 15 34 20 417 16 470 -4z m-2535 -146 l0 -150 -335 42-5 c-184 -3 -336 -7 -337 -8 -2 -1 -3 -42 -3 -92 l0 -90 304 0 c167 0 311 -3 43320 -6 14 -5 16 -27 16 -139 0 -74 -4 -136 -9 -140 -6 -3 -145 -6 -309 -7 44-165 0 -305 -4 -311 -8 -8 -4 -11 -41 -9 -111 l3 -104 343 -5 c290 -4 344 -7 45352 -20 15 -23 13 -293 -2 -308 -17 -17 -1119 -17 -1136 0 -16 16 -17 1299 -2 461329 11 19 25 19 563 17 l552 -3 0 -150z m612 133 c11 -13 23 -30 27 -38 3 -8 4722 -42 41 -75 19 -33 40 -69 45 -80 6 -11 19 -33 30 -50 10 -16 29 -49 41 -73 4813 -23 27 -41 33 -39 9 3 32 41 86 142 6 11 26 47 45 80 19 33 37 67 41 75 4 498 19 30 32 48 l25 32 221 -2 221 -3 3 -26 c2 -14 -4 -31 -12 -39 -9 -7 -16 50-17 -16 -22 0 -6 -13 -27 -30 -48 -16 -21 -30 -41 -30 -44 0 -3 -20 -35 -45 51-72 -25 -36 -45 -67 -45 -70 0 -5 -42 -66 -51 -74 -3 -3 -9 -12 -13 -20 -9 52-20 -24 -44 -71 -115 -75 -115 -79 -121 -71 -138 10 -20 29 -50 59 -88 15 -20 5327 -40 27 -44 0 -4 14 -24 30 -45 17 -21 30 -41 30 -45 0 -4 14 -24 30 -45 17 54-21 30 -41 30 -45 0 -4 13 -24 28 -44 16 -20 32 -43 35 -51 7 -15 24 -43 40 55-64 4 -6 22 -31 40 -56 19 -25 37 -52 40 -60 4 -8 16 -28 26 -45 32 -53 23 56-55 -229 -55 -261 0 -240 -7 -300 105 -6 11 -19 34 -30 50 -11 17 -23 38 -26 5748 -4 9 -10 17 -14 17 -5 0 -13 12 -19 28 -22 53 -99 163 -105 150 -3 -7 -15 58-26 -26 -43 -11 -16 -24 -39 -30 -50 -6 -11 -19 -33 -30 -50 -11 -16 -24 -39 59-30 -50 -18 -33 -33 -57 -83 -133 l-49 -72 -227 0 c-155 0 -231 4 -238 11 -13 6013 -5 31 40 90 15 20 27 40 27 44 0 4 14 24 30 45 17 21 30 41 30 44 0 9 43 6170 53 74 4 2 7 7 7 12 0 5 54 89 120 188 66 99 120 190 120 202 0 12 -13 39 62-30 60 -16 21 -30 41 -30 45 0 4 -12 24 -27 44 -37 48 -52 72 -59 94 -4 9 -10 6317 -14 17 -4 0 -12 10 -19 23 -6 12 -20 36 -31 52 -11 17 -23 38 -26 48 -4 9 64-10 17 -15 17 -5 0 -14 10 -19 23 -10 23 -31 58 -40 67 -14 14 -50 70 -50 79 650 5 -7 11 -15 15 -15 5 -21 47 -8 59 3 4 106 7 228 7 217 0 222 0 242 -22z 66m3597 0 c21 -30 23 -260 3 -277 -9 -7 -121 -12 -343 -13 l-329 -3 0 -90 0 -90 67304 -3 c204 -1 309 -6 318 -13 19 -16 19 -267 -1 -275 -7 -3 -150 -6 -317 -7
68l-304 -2 0 -110 0 -110 334 -3 c230 -1 339 -6 348 -14 11 -8 13 -45 11 -167 69l-3 -156 -550 -3 c-302 -1 -560 0 -572 3 l-23 5 0 663 c0 502 3 666 12 675 9 709 146 12 554 12 l543 0 15 -22z m648 20 c2 -2 5 -228 8 -503 l5 -500 301 3 71c266 2 304 1 318 -13 22 -22 24 -316 2 -334 -9 -8 -159 -10 -537 -9 l-524 3 72-3 655 c-1 360 0 665 3 678 5 22 6 22 215 22 116 0 211 -1 212 -2z`})],-1)])])):s.type==="word"?(y(),j("svg",_u,[...t[4]||(t[4]=[dt(`<g transform="translate(0.000000,1176.000000) scale(0.100000,-0.100000)" fill="#0B69CD" stroke="none"><path d="M6473 11413 c-10 -4 -13 -226 -13 -1062 l0 -1057 24 -80 c30 -97 53 73-145 103 -211 64 -85 173 -163 283 -204 l65 -24 1033 -3 1032 -3 0 174 c0 173 740 175 -23 181 -12 3 -30 18 -39 33 -22 35 -381 400 -1327 1349 -734 736 -815 75811 -908 844 -15 6 -37 15 -48 20 -11 5 -47 16 -80 23 -33 8 -67 17 -75 20 -8 763 -21 3 -27 0z"></path><path d="M1230 11009 c-25 -5 -72 -13 -105 -17 -33 -5 -73 -16 -90 -25 -16 -9 77-34 -17 -39 -17 -29 0 -171 -99 -227 -157 -70 -72 -139 -170 -139 -195 0 -9 78-7 -21 -15 -28 -8 -7 -15 -24 -15 -39 0 -14 -8 -39 -18 -56 -16 -28 -17 -283 79-17 -4820 0 -4543 1 -4792 18 -4822 9 -18 17 -40 17 -51 0 -58 138 -255 223 80-319 84 -64 147 -103 165 -103 9 0 26 -7 36 -15 11 -8 29 -15 41 -15 12 0 55 81-9 96 -20 73 -19 119 -20 3344 -20 l3270 0 95 21 c281 62 463 222 559 489 13 8236 27 85 31 110 13 65 12 7397 0 7419 -7 14 -27 20 -77 26 -37 4 -88 15 -113 8325 -25 9 -72 21 -105 25 -33 4 -72 13 -87 21 -15 8 -47 14 -72 14 -25 0 -57 5 84-73 11 -15 6 -62 17 -103 24 -113 21 -291 62 -323 74 -16 6 -47 11 -70 11 -23 851 -53 7 -67 15 -14 8 -41 15 -60 15 -19 0 -62 7 -95 16 -33 8 -94 21 -135 29 86-41 8 -93 21 -115 29 -22 8 -57 15 -78 16 -21 0 -54 7 -74 15 -19 8 -55 15 87-78 15 -23 0 -58 6 -76 14 -19 8 -77 19 -129 26 -131 17 -218 45 -258 83 -49 8847 -82 109 -82 156 0 22 -5 52 -11 68 -7 17 -11 94 -10 198 1 179 -11 303 -34 89357 -7 18 -16 56 -20 83 -4 28 -15 74 -26 103 -10 29 -19 70 -19 91 0 21 -7 9052 -15 67 -8 16 -15 47 -15 69 0 22 -9 67 -20 100 -20 63 -46 166 -62 250 -5 9128 -16 70 -24 95 -8 25 -14 62 -14 83 0 21 -6 50 -14 65 -8 15 -17 50 -21 77 92-4 28 -15 77 -25 110 -10 33 -22 80 -25 104 -4 24 -14 59 -21 77 l-14 34 93-2263 -1 c-1252 -1 -2282 -5 -2307 -10z m3067 -4094 c12 -8 32 -15 44 -15 18 940 50 -13 99 -41 8 -5 22 -12 30 -16 50 -22 180 -146 180 -171 0 -5 7 -12 15 95-16 8 -3 15 -14 15 -24 0 -10 5 -23 12 -30 15 -15 38 -76 48 -127 4 -22 12 96-53 19 -68 17 -42 14 -312 -4 -362 -8 -22 -15 -50 -15 -62 0 -12 -6 -37 -14 97-55 -8 -18 -17 -40 -20 -48 -4 -8 -15 -28 -26 -45 -11 -16 -24 -39 -29 -50 98-28 -57 -155 -164 -241 -202 -84 -37 -115 -45 -226 -57 -119 -13 -323 -1 -394 9924 -45 16 -101 40 -120 51 -8 5 -26 14 -39 19 -39 17 -165 151 -190 203 -12 10026 -27 49 -32 53 -5 3 -9 15 -9 27 0 12 -7 31 -15 41 -8 11 -15 32 -15 47 0 10114 -7 46 -15 69 -20 58 -20 269 0 336 8 27 15 61 15 75 0 14 7 34 15 45 8 10 10215 29 15 41 0 12 4 24 9 27 5 4 19 25 30 49 24 48 97 130 156 174 54 41 153 10393 177 93 11 0 29 6 41 12 35 20 130 27 301 22 119 -3 166 -8 183 -19z m-2493 104-30 c10 -22 22 -70 26 -106 4 -36 12 -75 19 -86 6 -12 11 -39 11 -60 0 -21 7 105-60 15 -87 8 -27 15 -68 15 -90 1 -23 7 -52 15 -66 8 -14 14 -46 15 -71 0 -25 1063 -49 7 -52 11 -11 32 27 33 58 0 17 7 43 15 59 8 15 15 40 15 55 1 14 7 37 10715 51 8 14 15 39 15 55 0 17 7 41 15 55 8 14 15 39 15 55 0 17 7 41 15 55 8 10814 14 39 15 55 0 17 6 40 14 51 8 11 16 36 18 54 5 54 27 60 228 60 96 0 181 109-4 189 -9 15 -10 38 -64 51 -121 4 -19 13 -48 19 -63 6 -16 11 -40 11 -55 0
110-15 7 -36 15 -46 8 -11 15 -34 15 -50 1 -17 7 -42 15 -56 8 -14 14 -39 15 -56 1110 -16 5 -35 12 -42 6 -6 15 -33 19 -59 4 -27 14 -70 22 -98 l15 -50 7 58 c4 11231 11 60 16 63 5 3 9 27 9 53 0 27 7 68 15 91 8 23 15 61 15 84 0 22 7 54 15 11370 8 15 15 50 15 77 0 28 7 66 15 86 8 19 15 47 15 62 0 54 5 56 192 59 95 2 114188 1 206 -3 32 -6 34 -8 28 -38 -3 -18 -9 -60 -14 -94 -5 -33 -13 -66 -17 115-73 -4 -6 -11 -35 -15 -63 -5 -29 -13 -71 -19 -94 -6 -24 -16 -62 -22 -85 -6 116-24 -14 -68 -18 -99 -5 -30 -13 -65 -20 -77 -6 -11 -11 -38 -11 -59 -1 -21 -7 117-49 -15 -63 -8 -14 -14 -42 -15 -63 0 -21 -7 -54 -15 -74 -8 -19 -15 -51 -15 118-70 0 -18 -7 -50 -15 -70 -8 -19 -15 -49 -15 -65 0 -16 -7 -45 -15 -65 -8 -19 119-15 -51 -15 -70 0 -18 -7 -50 -15 -70 -8 -19 -15 -44 -15 -54 0 -45 -20 -49 120-223 -49 -106 0 -197 4 -203 8 -18 12 -44 69 -44 99 -1 15 -7 39 -15 53 -8 14 121-15 39 -15 55 0 17 -7 39 -15 49 -8 11 -15 34 -15 50 -1 17 -7 42 -15 56 -8 12214 -15 39 -15 55 0 17 -7 41 -15 55 -8 14 -14 37 -15 51 0 15 -7 40 -15 55 -8 12316 -15 40 -15 54 -1 14 -7 36 -15 50 -8 14 -14 42 -15 63 0 20 -4 37 -8 37 124-13 0 -32 -47 -32 -78 -1 -15 -7 -38 -15 -52 -8 -14 -15 -38 -15 -55 0 -16 -7 125-41 -15 -55 -8 -14 -14 -39 -15 -56 0 -16 -7 -39 -15 -50 -8 -10 -15 -32 -15 126-49 0 -16 -7 -43 -15 -59 -8 -15 -15 -40 -15 -55 -1 -14 -7 -37 -15 -51 -8 127-14 -15 -38 -15 -55 0 -16 -7 -41 -15 -55 -8 -14 -14 -37 -15 -52 0 -16 -9 128-37 -20 -48 -19 -19 -33 -20 -214 -20 l-195 0 -20 26 c-12 15 -21 41 -21 59 0 12918 -7 49 -15 68 -8 20 -15 52 -15 71 0 18 -7 47 -15 62 -8 16 -15 45 -15 65 0 13020 -7 53 -15 72 -8 20 -15 49 -15 65 0 16 -7 46 -15 65 -8 20 -15 53 -15 74 131-1 21 -7 49 -15 63 -8 14 -14 42 -15 63 0 21 -7 54 -15 74 -8 19 -15 52 -15 13272 -1 20 -7 47 -15 61 -8 14 -15 45 -15 70 0 25 -7 56 -15 70 -8 14 -14 39 133-15 57 0 17 -5 44 -11 60 -20 51 -30 154 -18 170 10 11 49 13 203 11 l191 -3 13419 -40z m3981 34 c39 -6 95 -14 125 -18 124 -17 231 -102 279 -220 22 -55 27 135-254 7 -283 -9 -12 -16 -29 -16 -36 0 -30 -129 -172 -156 -172 -6 0 -17 -6 136-24 -14 -6 -8 -25 -16 -42 -18 l-30 -3 45 -32 c54 -37 128 -128 163 -198 14 137-27 29 -57 34 -65 5 -8 11 -22 14 -30 3 -8 10 -23 16 -32 19 -33 29 -53 52 138-98 12 -25 27 -52 33 -60 17 -23 38 -91 30 -98 -4 -4 -108 -8 -232 -10 -258 139-4 -255 -4 -298 80 -14 29 -42 80 -60 113 -19 33 -37 67 -41 75 -3 8 -10 22 140-15 30 -5 8 -20 38 -34 65 -15 28 -35 64 -45 80 -11 17 -23 36 -27 44 -16 35 141-45 51 -91 54 l-47 2 -3 -260 c-2 -233 -4 -261 -20 -273 -26 -20 -419 -13 142-432 8 -11 18 -13 1339 -2 1356 4 6 14 14 22 17 27 10 723 7 795 -4z m1350 0 143c39 -6 96 -14 127 -18 32 -4 63 -12 70 -19 7 -7 19 -12 27 -12 43 0 208 -141 144234 -200 4 -8 11 -23 17 -32 5 -10 15 -26 20 -35 6 -10 12 -22 14 -28 1 -5 9 145-26 16 -45 7 -19 16 -60 20 -90 5 -30 14 -90 20 -133 9 -60 9 -98 0 -165 -6 146-48 -15 -113 -19 -144 -4 -32 -12 -63 -19 -70 -7 -7 -12 -22 -12 -34 0 -12 -6 147-27 -14 -33 -8 -7 -17 -23 -20 -36 -4 -14 -11 -25 -16 -25 -6 0 -10 -6 -10 148-12 -1 -27 -130 -149 -180 -171 -8 -4 -22 -11 -30 -16 -31 -17 -87 -34 -145 149-42 -33 -4 -78 -13 -100 -18 -54 -14 -660 -14 -686 -1 -18 10 -19 29 -19 688 1500 514 3 681 12 690 15 15 591 16 693 1z"></path><path d="M3978 6582 c-49 -9 -121 -70 -146 -124 -48 -104 -48 -367 1 -461 30 151-57 93 -117 125 -117 10 0 34 -5 52 -12 39 -13 147 4 192 32 61 37 92 102 108 152226 12 94 11 135 -6 259 -7 53 -64 152 -93 162 -9 4 -23 12 -31 19 -18 15 153-149 25 -202 16z"></path><path d="M5422 6498 l3 -113 132 2 c149 2 169 9 199 76 16 35 16 39 0 75 -28 15463 -55 72 -205 72 l-132 0 3 -112z"></path><path d="M6870 6230 l0 -350 100 0 c152 0 205 27 251 130 18 40 20 61 16 220 155-3 190 -10 222 -63 285 -16 19 -38 35 -49 35 -11 1 -31 7 -45 15 -17 9 -56 14 156-117 15 l-93 0 0 -350z"></path></g>`,1)])])):s.type==="png"?(y(),j("svg",Au,[...t[5]||(t[5]=[l("g",{transform:"translate(0.000000,1176.000000) scale(0.100000,-0.100000)",fill:"#A3BD31",stroke:"none"},[l("path",{d:`M6473 11413 c-10 -4 -13 -226 -13 -1062 l0 -1057 24 -80 c30 -97 53 157-145 103 -211 64 -85 173 -163 283 -204 l65 -24 1033 -3 1032 -3 0 174 c0 173 1580 175 -23 181 -12 3 -30 18 -39 33 -22 35 -381 400 -1327 1349 -734 736 -815 159811 -908 844 -15 6 -37 15 -48 20 -11 5 -47 16 -80 23 -33 8 -67 17 -75 20 -8 1603 -21 3 -27 0z`}),l("path",{d:`M1230 11009 c-25 -5 -72 -13 -105 -17 -33 -5 -73 -16 -90 -25 -16 -9 161-34 -17 -39 -17 -29 0 -171 -99 -227 -157 -70 -72 -139 -170 -139 -195 0 -9 162-7 -21 -15 -28 -8 -7 -15 -24 -15 -39 0 -14 -8 -39 -18 -56 -16 -28 -17 -283 163-17 -4820 0 -4543 1 -4792 18 -4822 9 -18 17 -40 17 -51 0 -58 138 -255 223 164-319 84 -64 147 -103 165 -103 9 0 26 -7 36 -15 11 -8 29 -15 41 -15 12 0 55 165-9 96 -20 73 -19 119 -20 3344 -20 l3270 0 95 21 c281 62 463 222 559 489 13 16636 27 85 31 110 13 65 12 7397 0 7419 -7 14 -27 20 -77 26 -37 4 -88 15 -113 16725 -25 9 -72 21 -105 25 -33 4 -72 13 -87 21 -15 8 -47 14 -72 14 -25 0 -57 5 168-73 11 -15 6 -62 17 -103 24 -113 21 -291 62 -323 74 -16 6 -47 11 -70 11 -23 1691 -53 7 -67 15 -14 8 -41 15 -60 15 -19 0 -62 7 -95 16 -33 8 -94 21 -135 29 170-41 8 -93 21 -115 29 -22 8 -57 15 -78 16 -21 0 -54 7 -74 15 -19 8 -55 15 171-78 15 -23 0 -58 6 -76 14 -19 8 -77 19 -129 26 -131 17 -218 45 -258 83 -49 17247 -82 109 -82 156 0 22 -5 52 -11 68 -7 17 -11 94 -10 198 1 179 -11 303 -34 173357 -7 18 -16 56 -20 83 -4 28 -15 74 -26 103 -10 29 -19 70 -19 91 0 21 -7 17452 -15 67 -8 16 -15 47 -15 69 0 22 -9 67 -20 100 -20 63 -46 166 -62 250 -5 17528 -16 70 -24 95 -8 25 -14 62 -14 83 0 21 -6 50 -14 65 -8 15 -17 50 -21 77 176-4 28 -15 77 -25 110 -10 33 -22 80 -25 104 -4 24 -14 59 -21 77 l-14 34 177-2263 -1 c-1252 -1 -2282 -5 -2307 -10z m4960 -4074 c80 -4 133 -12 147 -21 17812 -8 30 -14 39 -14 27 0 127 -63 174 -110 33 -34 80 -99 80 -112 0 -8 5 -19 17912 -26 13 -13 38 -79 38 -103 0 -19 -20 -29 -60 -29 -15 0 -47 -7 -70 -15 -23 180-8 -61 -15 -84 -15 -22 0 -59 -7 -81 -15 -22 -8 -58 -14 -81 -15 -33 0
180-44 5 181-62 30 -12 16 -22 33 -22 37 0 12 -40 45 -80 65 -50 26 -170 25 -227 -3 -39 182-19 -82 -55 -108 -90 -5 -8 -18 -38 -28 -66 -27 -76 -27 -321 -1 -406 22 -69 18369 -123 136 -155 58 -28 206 -31 265 -5 132 58 133 59 133 108 0 54 -3 55 184-139 55 -85 0 -131 4 -139 12 -8 8 -12 55 -12 145 0 121 2 133 19 143 12 6 185135 10 330 10 268 0 312 -2 325 -16 14 -13 16 -52 14 -287 -1 -249 -3 -274 186-20 -299 -11 -16 -24 -28 -29 -28 -5 0 -28 -13 -51 -30 -22 -16 -47 -30 -53 187-30 -7 0 -18 -7 -25 -15 -7 -8 -20 -15 -30 -15 -10 0 -23 -7 -30 -15 -7 -8 188-22 -15 -34 -15 -11 0 -30 -7 -40 -15 -11 -8 -30 -15 -43 -15 -12 0 -37 -6 189-55 -14 -54 -23 -267 -35 -398 -22 -63 7 -125 17 -137 24 -12 7 -30 12 -40 12 190-10 0 -47 15 -83 32 -67 34 -210 165 -230 210 -5 12 -14 30 -19 38 -5 8 -12 19122 -15 30 -3 8 -10 22 -15 30 -25 43 -42 114 -63 263 -9 60 -9 96 1 155 7 42 19216 98 20 125 4 26 13 53 19 59 7 7 12 22 12 34 0 12 7 27 15 34 8 7 15 20 15 19330 0 10 7 23 15 30 8 7 15 18 15 25 0 12 110 128 153 162 35 28 148 83 170 83 19412 0 28 5 35 12 11 11 250 38 282 32 8 -1 71 -6 140 -9z m-2967 -20 c32 -8 70 195-15 86 -15 15 0 36 -7 47 -15 10 -8 25 -15 32 -15 43 -1 182 -154 182 -201 0 196-9 7 -30 16 -47 19 -39 15 -227 -5 -282 -27 -70 -53 -120 -62 -120 -5 0 -9 -7 197-9 -15 0 -27 -160 -135 -201 -135 -9 0 -33 -7 -52 -15 -28 -11 -78 -15 -207 198-15 l-170 0 0 -237 c0 -133 -5 -245 -10 -253 -8 -13 -44 -15 -220 -15 -176 0 199-212 2 -220 15 -6 9 -10 281 -10 688 l0 673 23 9 c12 5 180 9 372 9 281 1 362 200-2 408 -14z m968 5 c16 -9 61 -70 129 -175 8 -13 42 -62 75 -110 33 -47 65
201-94 70 -103 6 -9 12 -19 15 -22 14 -14 50 -70 50 -79 0 -5 3 -11 8 -13 11 -5 20252 -66 52 -78 0 -5 4 -10 10 -10 5 0 21 -20 36 -45 14 -25 30 -45 35 -45 4 0 20310 151 11 335 3 285 5 337 18 345 18 12 370 13 388 2 18 -12 18 -1372 -1 204-1384 -6 -4 -95 -8 -196 -8 l-184 0 -39 42 c-21 23 -38 45 -38 50 0 5 -20 36 205-45 68 -25 32 -45 62 -45 65 0 4 -13 24 -30 45 -16 21 -30 41 -30 45 0 3 -20 20633 -45 65 -25 32 -45 61 -45 65 0 3 -5 11 -10 18 -27 32 -80 107 -80 112 0 4 207-13 24 -28 44 -16 20 -32 44 -35 54 -21 57 -26 -5 -29 -318 -3 -285 -5 -337 208-18 -345 -23 -15 -373 -13 -388 2 -17 17 -17 1359 0 1376 15 15 360 17 389 2z`}),l("path",{d:`M2880 6480 l0 -130 44 0 c23 0 71 3 104 6 53 6 67 12 97 42 29 30 35 20942 35 80 0 48 -21 83 -68 114 -21 14 -48 18 -119 18 l-93 0 0 -130z`})],-1)])])):s.type==="svg"?(y(),j("svg",Du,[...t[6]||(t[6]=[l("g",{transform:"translate(0.000000,1176.000000) scale(0.100000,-0.100000)",fill:"#F7B011",stroke:"none"},[l("path",{d:`M6473 11413 c-10 -4 -13 -226 -13 -1062 l0 -1057 24 -80 c30 -97 53 210-145 103 -211 64 -85 173 -163 283 -204 l65 -24 1033 -3 1032 -3 0 174 c0 173 2110 175 -23 181 -12 3 -30 18 -39 33 -22 35 -381 400 -1327 1349 -734 736 -815 212811 -908 844 -15 6 -37 15 -48 20 -11 5 -47 16 -80 23 -33 8 -67 17 -75 20 -8 2133 -21 3 -27 0z`}),l("path",{d:`M1230 11009 c-25 -5 -72 -13 -105 -17 -33 -5 -73 -16 -90 -25 -16 -9 214-34 -17 -39 -17 -29 0 -171 -99 -227 -157 -70 -72 -139 -170 -139 -195 0 -9 215-7 -21 -15 -28 -8 -7 -15 -24 -15 -39 0 -14 -8 -39 -18 -56 -16 -28 -17 -283 216-17 -4820 0 -4543 1 -4792 18 -4822 9 -18 17 -40 17 -51 0 -58 138 -255 223 217-319 84 -64 147 -103 165 -103 9 0 26 -7 36 -15 11 -8 29 -15 41 -15 12 0 55 218-9 96 -20 73 -19 119 -20 3344 -20 l3270 0 95 21 c281 62 463 222 559 489 13 21936 27 85 31 110 13 65 12 7397 0 7419 -7 14 -27 20 -77 26 -37 4 -88 15 -113 22025 -25 9 -72 21 -105 25 -33 4 -72 13 -87 21 -15 8 -47 14 -72 14 -25 0 -57 5 221-73 11 -15 6 -62 17 -103 24 -113 21 -291 62 -323 74 -16 6 -47 11 -70 11 -23 2221 -53 7 -67 15 -14 8 -41 15 -60 15 -19 0 -62 7 -95 16 -33 8 -94 21 -135 29 223-41 8 -93 21 -115 29 -22 8 -57 15 -78 16 -21 0 -54 7 -74 15 -19 8 -55 15 224-78 15 -23 0 -58 6 -76 14 -19 8 -77 19 -129 26 -131 17 -218 45 -258 83 -49 22547 -82 109 -82 156 0 22 -5 52 -11 68 -7 17 -11 94 -10 198 1 179 -11 303 -34 226357 -7 18 -16 56 -20 83 -4 28 -15 74 -26 103 -10 29 -19 70 -19 91 0 21 -7 22752 -15 67 -8 16 -15 47 -15 69 0 22 -9 67 -20 100 -20 63 -46 166 -62 250 -5 22828 -16 70 -24 95 -8 25 -14 62 -14 83 0 21 -6 50 -14 65 -8 15 -17 50 -21 77 229-4 28 -15 77 -25 110 -10 33 -22 80 -25 104 -4 24 -14 59 -21 77 l-14 34 230-2263 -1 c-1252 -1 -2282 -5 -2307 -10z m2000 -4184 c16 -8 40 -15 53 -15 14 2310 30 -7 37 -15 7 -8 20 -15 30 -15 47 0 190 -181 190 -241 0 -11 7 -33 15 -50 23219 -36 7 -65 -33 -76 -15 -4 -108 -8 -207 -8 -172 0 -180 1 -183 20 -6 37 -36 23391 -61 111 -21 16 -42 19 -117 19 -86 0 -93 -2 -113 -25 -11 -14 -20 -34 -20 234-45 0 -29 31 -62 67 -70 17 -3 34 -11 37 -16 4 -5 22 -9 41 -9 19 0 51 -7 71 235-15 19 -8 50 -15 67 -15 18 0 41 -7 52 -15 10 -8 33 -15 50 -15 16 0 39 -7 50 236-15 10 -8 28 -15 39 -15 11 -1 38 -12 60 -25 22 -14 50 -29 62 -34 36 -16 142 237-128 149 -158 4 -16 13 -37 20 -48 20 -29 19 -244 -1 -271 -8 -10 -15 -26 -15 238-34 0 -37 -136 -199 -167 -200 -6 0 -13 -4 -15 -8 -5 -12 -86 -52 -106 -52 -9 2390 -26 -7 -36 -15 -11 -8 -36 -15 -55 -15 -20 0 -71 -5 -113 -12 -131 -20 -350 24010 -466 64 -48 22 -172 133 -172 153 0 7 -7 18 -15 25 -8 7 -15 20 -15 30 0 24110 -7 23 -15 30 -8 7 -15 21 -15 32 0 11 -7 41 -17 67 -20 57 -12 97 19 104 24238 9 382 12 396 4 6 -5 12 -20 12 -35 0 -46 58 -142 86 -142 6 0 17 -7 24 -15 2439 -11 34 -15 97 -15 80 0 87 2 124 31 36 29 39 34 39 83 0 42 -5 57 -22 73 244-30 27 -109 63 -136 63 -13 0 -39 7 -59 15 -19 8 -50 15 -67 15 -17 0 -40 7 245-50 15 -11 8 -32 15 -46 15 -14 0 -35 7 -46 15 -10 8 -29 15 -40 15 -12 0 -27 2467 -34 15 -7 8 -19 15 -27 15 -37 0 -192 146 -193 181 0 8 -7 23 -15 33 -22 28 247-21 228 0 246 8 7 15 21 15 31 0 63 182 219 255 219 12 0 27 6 33 13 30 29 248445 31 502 2z m2895 16 c89 -8 117 -15 205 -55 48 -21 163 -128 180 -167 5 249-13 14 -31 19 -39 28 -48 42 -89 39 -115 -3 -27 -7 -30 -51 -37 -27 -3 -62 250-11 -79 -17 -17 -6 -49 -11 -72 -11 -23 0 -59 -7 -81 -15 -49 -17 -127 -19 251-143 -3 -7 7 -12 19 -12 28 0 19 -51 68 -97 93 -42 23 -159 23 -210 0 -127 252-58 -178 -162 -178 -363 0 -194 51 -307 160 -360 75 -37 291 -18 337 28 7 7 25320 12 30 12 17 0 19 7 16 56 l-3 57 -112 -2 c-160 -3 -153 -10 -153 157 0 94 2544 142 12 150 17 17 639 17 656 0 18 -18 17 -568 0 -589 -12 -14 -39 -33 -90 255-64 -9 -5 -52 -27 -95 -49 -43 -21 -90 -45 -105 -52 -14 -8 -36 -14 -48 -14 256-12 0 -31 -5 -43 -12 -12 -7 -53 -15 -92 -19 -38 -4 -101 -11 -138 -15 -72 -7 257-249 9 -302 28 -16 6 -44 13 -62 15 -18 3 -38 11 -44 19 -6 8 -19 14 -29 14 258-10 0 -23 7 -30 15 -7 8 -18 15 -24 15 -36 0 -171 151 -210 235 -10 22 -25 52 259-32 67 -8 14 -14 35 -14 46 0 11 -7 36 -15 55 -11 28 -15 78 -15 207 0 129 4 260179 15 207 8 19 15 43 15 52 0 19 56 133 89 181 35 51 123 140 138 140 7 0 13 2614 13 9 0 13 137 81 164 81 12 0 28 6 34 13 23 22 284 32 457 18z m-2012 -29
262c18 -17 27 -36 27 -56 0 -17 7 -40 15 -50 8 -11 15 -34 15 -50 0 -17 7 -40 15 263-50 8 -11 15 -32 15 -46 0 -14 7 -35 15 -46 8 -10 15 -30 15 -44 0 -14 7 -36 26415 -50 8 -14 14 -39 15 -56 0 -17 6 -37 14 -43 8 -6 16 -26 19 -44 2 -18 10 265-47 16 -64 6 -18 16 -48 22 -65 6 -18 14 -46 17 -63 2 -16 11 -39 18 -50 8 266-11 14 -30 14 -43 0 -28 17 -62 30 -62 6 0 10 12 10 28 0 15 7 36 15 46 8 11 26715 32 15 46 0 14 7 35 15 46 8 10 15 33 15 49 0 17 7 41 15 55 8 14 14 36 15 26850 0 14 6 34 14 45 7 11 16 34 18 50 3 17 11 46 18 65 27 77 32 97 40 133 4 26921 13 44 19 50 6 6 11 25 11 42 0 17 7 40 15 51 8 10 15 29 15 42 0 37 37 99 27062 106 30 8 372 8 392 0 21 -8 21 -73 1 -100 -8 -10 -15 -31 -15 -45 0 -15 -7 271-32 -15 -39 -8 -7 -15 -24 -15 -39 0 -14 -7 -35 -15 -45 -8 -11 -15 -29 -15 272-40 0 -12 -7 -30 -15 -40 -8 -11 -15 -29 -15 -40 0 -12 -7 -30 -15 -40 -8 -11 273-15 -29 -15 -40 0 -12 -7 -30 -15 -40 -8 -11 -15 -29 -15 -40 0 -12 -7 -30 274-15 -40 -8 -11 -15 -29 -15 -41 0 -12 -7 -30 -15 -41 -8 -10 -15 -28 -15 -40 2750 -11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 276-28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 277-40 -8 -10 -15 -27 -15 -37 0 -11 -6 -31 -14 -45 -18 -36 -37 -91 -43 -124 -3 278-15 -11 -33 -19 -39 -8 -6 -14 -21 -14 -32 0 -24 -39 -108 -54 -119 -13 -9 279-411 -10 -444 -2 -13 4 -25 17 -29 33 -3 14 -12 35 -19 46 -8 11 -14 29 -14 28040 0 11 -7 29 -15 39 -8 11 -15 29 -15 40 0 12 -7 30 -15 40 -8 11 -15 28 -15 28137 0 10 -7 31 -15 48 -8 17 -22 45 -30 62 -8 17 -15 38 -15 48 0 9 -7 26 -15 28237 -8 10 -15 28 -15 40 0 11 -7 29 -15 40 -8 10 -15 28 -15 40 0 11 -7 29 -15 28340 -8 10 -15 28 -15 40 0 11 -7 29 -15 40 -8 10 -15 28 -15 39 0 11 -7 29 -15 28439 -8 11 -15 29 -15 40 0 12 -7 30 -15 40 -8 11 -15 29 -15 41 0 12 -7 30 -15 28541 -8 10 -15 28 -15 39 0 11 -7 29 -15 39 -8 11 -15 29 -15 40 0 12 -7 30 -15 28640 -8 11 -15 29 -15 40 0 12 -7 30 -15 40 -8 11 -15 28 -15 38 0 10 -6 29 -14 28741 -8 12 -17 43 -21 69 -6 40 -4 47 12 50 10 3 106 5 213 6 l195 1 28 -27z`})],-1)])])):s.type==="csv"?(y(),j("svg",ku,[...t[7]||(t[7]=[l("g",{transform:"translate(0.000000,1176.000000) scale(0.100000,-0.100000)",fill:"#0b2f0c",stroke:"none"},[l("path",{d:`M6473 11413 c-10 -4 -13 -226 -13 -1062 l0 -1057 24 -80 c30 -97 53 288-145 103 -211 64 -85 173 -163 283 -204 l65 -24 1033 -3 1032 -3 0 174 c0 173 2890 175 -23 181 -12 3 -30 18 -39 33 -22 35 -381 400 -1327 1349 -734 736 -815 290811 -908 844 -15 6 -37 15 -48 20 -11 5 -47 16 -80 23 -33 8 -67 17 -75 20 -8 2913 -21 3 -27 0z`}),l("path",{d:`M1230 11009 c-25 -5 -72 -13 -105 -17 -33 -5 -73 -16 -90 -25 -16 -9 292-34 -17 -39 -17 -29 0 -171 -99 -227 -157 -70 -72 -139 -170 -139 -195 0 -9 293-7 -21 -15 -28 -8 -7 -15 -24 -15 -39 0 -14 -8 -39 -18 -56 -16 -28 -17 -283 294-17 -4820 0 -4543 1 -4792 18 -4822 9 -18 17 -40 17 -51 0 -58 138 -255 223 295-319 84 -64 147 -103 165 -103 9 0 26 -7 36 -15 11 -8 29 -15 41 -15 12 0 55 296-9 96 -20 73 -19 119 -20 3344 -20 l3270 0 95 21 c281 62 463 222 559 489 13 29736 27 85 31 110 13 65 12 7397 0 7419 -7 14 -27 20 -77 26 -37 4 -88 15 -113 29825 -25 9 -72 21 -105 25 -33 4 -72 13 -87 21 -15 8 -47 14 -72 14 -25 0 -57 5 299-73 11 -15 6 -62 17 -103 24 -113 21 -291 62 -323 74 -16 6 -47 11 -70 11 -23 3001 -53 7 -67 15 -14 8 -41 15 -60 15 -19 0 -62 7 -95 16 -33 8 -94 21 -135 29 301-41 8 -93 21 -115 29 -22 8 -57 15 -78 16 -21 0 -54 7 -74 15 -19 8 -55 15 302-78 15 -23 0 -58 6 -76 14 -19 8 -77 19 -129 26 -131 17 -218 45 -258 83 -49 30347 -82 109 -82 156 0 22 -5 52 -11 68 -7 17 -11 94 -10 198 1 179 -11 303 -34 304357 -7 18 -16 56 -20 83 -4 28 -15 74 -26 103 -10 29 -19 70 -19 91 0 21 -7 30552 -15 67 -8 16 -15 47 -15 69 0 22 -9 67 -20 100 -20 63 -46 166 -62 250 -5 30628 -16 70 -24 95 -8 25 -14 62 -14 83 0 21 -6 50 -14 65 -8 15 -17 50 -21 77 307-4 28 -15 77 -25 110 -10 33 -22 80 -25 104 -4 24 -14 59 -21 77 l-14 34 308-2263 -1 c-1252 -1 -2282 -5 -2307 -10z m2077 -4185 c12 -8 33 -14 45 -14 13 309-1 41 -12 63 -25 22 -14 49 -29 61 -34 26 -12 154 -149 154 -166 0 -7 7 -18 31015 -25 8 -7 15 -19 15 -28 0 -8 6 -23 14 -31 8 -9 16 -33 18 -54 3 -38 1 -40 311-42 -57 -25 -11 -63 -19 -85 -20 -22 0 -51 -7 -65 -15 -14 -8 -42 -14 -63 -15 312-21 0 -51 -7 -67 -15 -16 -8 -35 -13 -42 -10 -15 6 -48 61 -48 80 0 26 -88 89 313-140 101 -75 17 -154 0 -208 -43 -24 -20 -48 -45 -53 -57 -5 -11 -13 -28 -18 314-36 -32 -53 -43 -247 -21 -365 26 -138 68 -191 172 -214 89 -19 168 1 225 57 31523 24 43 51 43 60 0 9 7 26 15 36 8 11 15 32 15 46 0 14 5 31 12 38 16 16 60 31615 84 -3 10 -8 33 -15 50 -15 16 0 39 -7 50 -15 10 -8 33 -15 49 -15 17 0 39 317-7 49 -15 11 -8 32 -15 48 -15 29 0 68 -30 68 -53 0 -7 -7 -22 -15 -33 -8 -10 318-15 -28 -15 -40 0 -11 -11 -41 -25 -65 -13 -24 -29 -55 -35 -67 -6 -13 -39 319-51 -74 -85 -76 -74 -88 -84 -118 -97 -13 -6 -30 -14 -38 -19 -24 -14 -83 -33 320-115 -37 -16 -3 -63 -10 -103 -16 -78 -12 -276 2 -337 24 -16 5 -42 13 -58 15
321-28 5 -70 25 -122 58 -42 26 -165 153 -165 171 0 7 -3 14 -8 14 -7 0 -37 54 322-65 120 -32 75 -40 131 -44 301 -3 144 -1 184 11 214 9 21 16 47 16 58 0 18 32337 100 87 192 16 29 138 143 167 156 11 5 41 21 65 34 24 14 56 25 71 25 14 0 32432 6 38 13 30 29 424 30 469 1z m1386 1 c17 -8 40 -15 52 -15 13 0 28 -7 35 325-15 7 -8 20 -15 29 -15 35 0 171 -144 171 -181 0 -5 6 -20 14 -32 20 -33 28 326-121 12 -143 -12 -16 -32 -18 -206 -19 l-192 0 -22 52 c-34 81 -63 98 -167 98 327-71 0 -91 -3 -108 -19 -38 -34 -18 -116 29 -116 9 0 25 -7 36 -15 10 -8 37 328-15 59 -15 22 0 51 -7 65 -15 14 -8 41 -15 60 -15 19 0 46 -7 60 -15 14 -8 37 329-14 51 -15 14 0 34 -7 45 -15 10 -8 27 -15 36 -15 20 0 101 -40 106 -52 2 -4 33010 -8 17 -8 18 0 124 -98 136 -125 5 -11 13 -27 18 -35 37 -65 50 -238 22 331-310 -8 -19 -16 -39 -17 -45 -8 -22 -75 -115 -104 -145 -35 -34 -99 -80 -113 332-80 -8 0 -20 -6 -26 -14 -6 -8 -24 -16 -39 -19 -15 -2 -40 -10 -57 -15 -61 333-22 -259 -36 -334 -24 -38 7 -89 12 -113 12 -24 0 -56 7 -72 15 -15 8 -35 15 334-44 15 -47 0 -200 112 -223 164 -5 12 -18 35 -29 51 -11 17 -21 35 -23 40 -2 3356 -10 26 -17 45 -7 19 -15 61 -17 92 -4 47 -2 58 14 66 10 6 103 12 207 13 336175 3 189 2 202 -16 8 -10 14 -32 14 -47 0 -45 39 -97 97 -130 41 -24 184 -25 337203 -3 7 8 17 15 22 15 21 0 47 46 48 85 0 31 -7 46 -32 72 -18 18 -39 33 -48 33833 -9 0 -25 7 -36 15 -10 8 -32 15 -47 15 -15 0 -44 7 -64 15 -19 8 -47 15 339-62 15 -14 1 -37 7 -51 15 -14 8 -37 14 -51 15 -14 0 -34 7 -45 15 -10 8 -29 34015 -40 15 -12 0 -27 6 -33 14 -7 8 -23 17 -36 20 -14 4 -25 11 -25 16 0 6 -7 34110 -15 10 -23 0 -120 101 -142 150 -32 68 -48 161 -34 201 6 18 11 44 11 59 0 34215 7 33 15 40 8 7 15 19 15 27 0 17 52 86 90 120 14 13 44 32 67 44 24 11 45 34325 49 30 3 5 18 9 33 9 15 0 32 5 39 12 30 30 446 32 505 3z m854 8 c23 -5 63 344-73 63 -109 1 -10 7 -30 15 -44 8 -14 15 -36 15 -50 0 -14 7 -34 15 -44 8 -11 34515 -31 15 -45 1 -14 7 -37 15 -51 8 -14 15 -36 15 -50 0 -14 7 -34 15 -44 8 346-11 15 -34 15 -50 0 -17 7 -40 15 -50 8 -11 15 -31 15 -45 0 -14 7 -35 15 -45
3478 -11 15 -34 15 -50 0 -17 7 -40 15 -50 8 -11 15 -31 15 -45 1 -14 7 -37 15 348-51 8 -14 14 -37 15 -52 0 -47 40 -25 40 22 1 14 7 36 15 50 8 14 14 37 15 51 3490 14 7 34 15 45 8 10 15 33 15 50 0 16 7 39 15 50 8 10 15 30 15 44 0 14 7 36 35015 50 8 14 14 37 15 51 0 14 7 34 15 45 8 10 15 33 15 50 0 16 7 39 15 50 8 35110 15 33 15 49 0 17 7 39 15 49 8 11 15 31 15 45 1 14 7 37 15 51 8 14 14 37 35215 52 0 15 11 38 25 53 l26 25 197 0 c141 0 201 -3 210 -12 16 -16 15 -50 -3 353-74 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 -27 -15 -36 0 354-17 -19 -67 -46 -121 -8 -16 -14 -38 -14 -50 0 -12 -7 -31 -15 -41 -8 -11 -15 355-28 -15 -37 0 -10 -6 -30 -14 -46 -28 -56 -46 -104 -46 -121 0 -10 -7 -27 -15 356-38 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 357-11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 358-28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 359-40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 360-11 -7 -29 -15 -40 -8 -10 -15 -28 -15 -40 0 -11 -7 -29 -15 -40 -8 -10 -15 361-29 -15 -41 0 -13 -9 -32 -20 -43 -19 -19 -31 -20 -242 -18 l-222 3 -22 45 362c-37 76 -54 120 -54 139 0 10 -7 24 -15 31 -8 7 -15 25 -15 40 0 15 -7 33 -15 36340 -8 7 -15 22 -15 34 0 12 -7 31 -15 42 -8 10 -15 28 -15 40 0 11 -7 29 -15 36440 -8 10 -15 28 -15 40 0 11 -7 29 -15 40 -8 10 -15 28 -15 40 0 11 -7 29 -15 36540 -8 10 -15 31 -15 45 0 15 -7 32 -15 39 -8 7 -15 22 -15 34 0 11 -7 30 -15 36640 -8 11 -15 29 -15 40 0 12 -7 30 -15 40 -8 11 -15 29 -15 41 0 12 -7 30 -15 36741 -8 10 -15 28 -15 39 0 11 -7 29 -15 39 -8 11 -15 29 -15 40 0 12 -7 30 -15 36840 -8 11 -15 29 -15 40 0 12 -7 30 -15 40 -8 11 -15 29 -15 40 0 12 -7 30 -15 36940 -8 11 -15 30 -15 42 0 13 -4 26 -10 29 -5 3 -10 19 -10 35 0 22 5 30 23 33 37033 6 379 7 404 0z`})],-1)])])):(y(),j("svg",Iu,[...t[8]||(t[8]=[l("g",{transform:"translate(0.000000,300.000000) scale(0.100000,-0.100000)",stroke:"none",fill:"#156CFF"},[l("path",{d:`M1652 2630 c3 -275 4 -290 24 -317 11 -15 36 -38 54 -50 32 -22 39 371-23 301 -23 l269 0 0 46 0 46 -267 270 c-259 261 -294 291 -355 309 l-29 8 3 372-289z`}),l("path",{d:`M238 2787 c-46 -28 -73 -62 -87 -112 -9 -30 -11 -357 -9 -1255 l3 373-1215 23 -38 c13 -20 45 -50 70 -65 l47 -27 870 0 870 0 42 23 c24 12 55 41 37470 64 l28 42 0 964 0 965 -255 54 c-140 29 -266 57 -280 61 -34 10 -50 47 -50 375118 0 49 -57 333 -86 427 -5 16 -43 17 -612 17 l-607 0 -37 -23z`})],-1)])]))])}const Su=Object.assign(_e(gu,[["render",Cu]]),{__name:"FileTypeIcon"}),Pu={},Eu={xmlns:"http://www.w3.org/2000/svg",width:"37",height:"37",viewBox:"0 0 37 37"};function Tu(e,t){return y(),j("svg",Eu,[...t[0]||(t[0]=[dt('<g id="Grupo_7816" data-name="Grupo 7816" transform="translate(-1280 -1878)"><circle id="Elipse_53191" data-name="Elipse 53191" cx="18.5" cy="18.5" r="18.5" transform="translate(1280 1878)" fill="#d8e1f1"></circle><g id="Layer_2" data-name="Layer 2" transform="translate(1311.908 1910) rotate(180)"><g id="invisible_box" data-name="invisible box"><rect id="Rectángulo_2926" data-name="Rectángulo 2926" width="26" height="26" transform="translate(-0.092)" fill="none"></rect></g><g id="icons_Q2" data-name="icons Q2" transform="translate(2.159 4.239)"><path id="Trazado_6722" data-name="Trazado 6722" d="M5.08,6H24.511a1.08,1.08,0,0,1,0,2.159H5.08A1.08,1.08,0,0,1,5.08,6Z" transform="translate(-4 -6)" fill="#053f6f"></path><path id="Trazado_6723" data-name="Trazado 6723" d="M24.631,19.66l-5.4-5.344a1.026,1.026,0,0,0-1.511,0l-5.4,5.344a1.133,1.133,0,0,0-.108,1.457,1.026,1.026,0,0,0,1.619.108L17.4,17.663v9.284a1.08,1.08,0,0,0,2.159,0V17.663l3.562,3.562a1.026,1.026,0,0,0,1.619-.108,1.133,1.133,0,0,0-.108-1.457Z" transform="translate(-7.682 -9.675)" fill="#053f6f"></path></g></g></g>',1)])])}const Fu=Object.assign(_e(Pu,[["render",Tu]]),{__name:"DownloadIcon"}),Ru={name:"TextAreaEditor",components:{EditorContent:Gi},props:{value:{type:String,default:""},onlyRead:{type:Boolean,default:!1},defaultStyles:{type:Boolean,default:!0},headingClasses:{type:Object,default(){return{h1:"editor_title",h2:"editor_subtitle"}}},paragraphClass:{type:String,default:"editor_paragraph font-weight-regular"},miniMenu:{type:Boolean,default:!1}},data(){return{editor:null,openMenuBar:!0}},computed:{menuVisible(){return this.miniMenu?!this.onlyRead&&this.openMenuBar:!this.onlyRead}},watch:{value(e){this.editor.getHTML()!==e&&this.editor.commands.setContent(e)}},mounted(){const e=this;this.emitUpdate=Zi(t=>{e.$emit("update",t)},500),this.editor=new Yi({editable:!e.onlyRead,content:e.value,onUpdate({editor:t}){e.emitUpdate(t.getHTML())},extensions:[Ki.configure({heading:!1,placeholder:!1,paragraph:!1}),Xi.configure({levels:[1,2,3,4,5,6]}).extend({renderHTML({node:t,HTMLAttributes:s}){const o=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${o}`,Ji(this.options.HTMLAttributes,s,{class:`${e.headingClasses[`h${o}`]}`}),0]}}),ea.configure({HTMLAttributes:{class:e.paragraphClass}}),ta.configure({placeholder:e.onlyRead?`[${e.$t("editor.edit_text")}]`:e.$t("editor.edit_text")})]})},beforeUnmount(){this.emitUpdate?.flush(),this.editor&&this.editor.destroy()}},$u={key:0,class:"hola"};function xu(e,t,s,c,o,r){const d=Qi,a=at("editor-content");return o.editor?(y(),j("div",$u,[n(k,{class:""},{default:i(()=>[r.menuVisible?(y(),T(d,{key:0,class:"editor__header py-2",editor:o.editor,"mini-menu":s.miniMenu},null,8,["editor","mini-menu"])):M("",!0)]),_:1}),s.onlyRead?M("",!0):(y(),T(we,{key:0,class:"my-3"})),n(k,null,{default:i(()=>[n(a,{class:Be(["editor__content",{textNotEdit:s.onlyRead===!0&&s.defaultStyles}]),style:ht([!s.onlyRead&&"outline: 1px solid #90A4AE; border-radius: 5px",{width:"100%"}]),editor:o.editor},null,8,["style","editor","class"])]),_:1})])):M("",!0)}const Nu=Object.assign(_e(Ru,[["render",xu],["__scopeId","data-v-2c62ede1"]]),{__name:"TextAreaEditor"}),Ou={},Mu={id:"Grupo_7852","data-name":"Grupo 7852",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 58.098 58.098"};function zu(e,t){return y(),j("svg",Mu,[...t[0]||(t[0]=[l("circle",{id:"Elipse_306","data-name":"Elipse 306",cx:"29.049",cy:"29.049",r:"29.049"},null,-1),l("g",{id:"Grupo_2178","data-name":"Grupo 2178",transform:"translate(16.343 17.405)"},[l("g",{id:"Grupo_2177","data-name":"Grupo 2177"},[l("path",{id:"Trazado_2011","data-name":"Trazado 2011",d:"M986.861,305.269,963.791,295.7a2.761,2.761,0,0,0-3.734,3.233l2.054,8.052h10.055a.838.838,0,0,1,0,1.676H962.11l-2.054,8.053a2.762,2.762,0,0,0,3.734,3.233l23.071-9.573a2.762,2.762,0,0,0,0-5.1Z",transform:"translate(-959.97 -295.483)",fill:"#fff"})])],-1)])])}const Lu=Object.assign(_e(Ou,[["render",zu]]),{__name:"SendIcon"}),qu=ut({name:"NewRequests",props:{permissionChanges:{type:Boolean,default:!0},submodule:{type:String,default:""},module:{type:String,default:""},linkStorage:{type:String,default:""},slugRequest:{type:String,default:""},details:{type:String,default:""},status:{type:String,default:""},stageNow:{type:Number,default:0},documentos:{type:Number,default:0},viewItem:{type:Object,default(){return null}}},setup(){const{loading:e,...t}=vi();return{...t}},data(){return{listaNewRequests:[],message:"",dialogAttach:!1,filesAttach:[],files:[],state:"init",lastVisible:null,firstVisible:null,totalLoadItems:5,showLoader:!1,needAnswer:!1,loading:!0}},computed:{user(){return $e().getUser},userEmail(){return $e().getUserEmail}},watch:{},async mounted(){await new Promise(e=>{setTimeout(()=>{this.module&&this.getPedimentos(),e()},2e3)})},methods:{isPrevention:yt,getType(e){let t="";switch(e){case"application/xml":t="xml";break;case"application/pdf":t="pdf";break;case"application/zip":t="zip";break;case"image/png":t="png";break;case"application/msword":t="word";break;case"image/svg+xml":t="svg";break;case"text/csv":t="csv";break;case"application/excel":case"application/vnd.ms-excel":case" application/x-excel ":t="excel";break;default:t="";break}return t},load(){this.state="next",this.getPedimentos()},async getPedimentos(){const e=this;e.needAnswer=!1,e.loading=!0;try{const t=Ht(`/modules/${e.module}/${e.submodule}/${e.slugRequest}/answers/${e.details}/newRequests`),s=[Cs("sendByDate","desc")];e.state==="init"?(e.lastVisible&&s.push(Ss(e.lastVisible)),s.push(pt(e.totalLoadItems))):e.state==="next"&&e.lastVisible&&(s.push(Ps(e.lastVisible)),s.push(pt(e.totalLoadItems)));const c=ft(t,...s),o=await ys(c);o.empty===!0?e.showLoader=!1:(e.firstVisible=o.docs[0],e.lastVisible=o.docs[o.docs.length-1],e.showLoader=!0,o.forEach(function(r){e.listaNewRequests.unshift({...r.data(),documentId:r.id})}),e.listaNewRequests&&e.listaNewRequests.length>0&&e.listaNewRequests[e.listaNewRequests.length-1].waitResponse===!0&&(e.status==="En proceso"||yt(e.status)||e.status==="Generando cobro"||e.status==="Pendiente de pago"||e.status==="Citado")&&(e.needAnswer=!0)),setTimeout(function(){e.loading=!1,e.state==="init"&&e.scrollTo()},1e3)}catch(t){console.error("Error getting documents: ",t),oe(t),e.loading=!1}},scrollTo(){this.$nextTick(function(){const e=this.$el.querySelector("#messagesCardContent");e.scrollTop=e.scrollHeight+120})},convertToKB(e){return(e/1024).toFixed(2)+"KB"},async processUpload(e){const t=this;await e.forEach(function(s){t.filesAttach.push(s)})},clearMessage(){this.message=""},attachDoc(){this.dialogAttach=!0},removeFile(e){const t=this.filesAttach.findIndex(s=>s.name===e);t>-1&&this.filesAttach.splice(t,1)},async asyncForEach(e,t){for(let s=0;s<e.length;s++)await t(e[s],s,e)},async downloadFile(e){this.$analytics?.track?.(Se.tramite_detail_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_type:"request_attachment"}),await ws(e.url,e.name)},async saveFiles(){const e=this,t="time"+new Date().getTime(),s=e.slugRequest+"/"+e.linkStorage;await e.asyncForEach(e.filesAttach,async c=>{try{const o=`answerFiles/${e.module}/${e.submodule}/${s}/newRequests/${t}/${c.name}`,r=await gt(o,c);e.files.push({name:c.name,type:c.type,size:c.size,url:r}),e.scrollTo()}
375catch(o){console.error("Error uploading file: ",o),oe(o)}})},async sendMessage(){if(this.message.trim().length>0){const e=this,t=e.filesAttach&&e.filesAttach.length>0;le().open();const s=Ne.now();e.files=[],e.filesAttach&&e.filesAttach.length>0&&(le().open(),await e.saveFiles()),e.filesAttach=[];const c={sendByType:"ciudadano",waitResponse:!1,message:e.message,sendBy:e.user.uid,sendByAuthUid:ia(),sendByEmail:sa()||e.userEmail,sendByFirstName:e.user.first_name,sendByLastName:e.user.last_name+(e.user.last_name2?" "+e.user.last_name2:""),sendByDate:s,attachs:e.files,stageNow:e.stageNow,moduleId:e.module,submoduleId:e.submodule,slugRequest:e.slugRequest,detailsId:e.details};e.message="",this.saveRequest(c),this.$analytics?.track?.(Se.tramite_detail_message_send,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,has_attachment:t}),this.files=[]}},async saveRequest(e){const t=this;await vt(`/modules/${this.module}/${this.submodule}/${t.slugRequest}/answers/${t.details}/newRequests`,{...e},!1).then(async()=>{t.listaNewRequests.push(e),le().close();const s={val:!0,title:this.$t("details.message"),message:this.$t("details.noteSaveSuccess"),icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"};t.$emit("emitDialog",s),t.scrollTo(),t.needAnswer=!1;const c=t.viewItem.assignedOperator;let o;if(Array.isArray(c)?o=t.viewItem.participants.filter(r=>c.includes(r.uid)):o=t.viewItem.participants.filter(r=>r.uid===c),o){const r=o.map(a=>a.email),d=bs();await t.sendEmailMultipleUser(r,`${t.$t("emails.new-request.title")} ${t.viewItem.preFolio||t.viewItem.folio||t.viewItem.id_reference}`,`${t.$t("emails.new-request.title")}`,`${d}/admin/modules/${t.module}/${t.submodule}/inbox`,`${t.$t("emails.new-request.content")} ${t.viewItem.preFolio||t.viewItem.folio||t.viewItem.id_reference}`,"",`${t.$t("emails.new-request.subcontent2")}`,t.$t("sendEmail.viewInbox"),o.length===1?o.name||o[0].name:"funcionario",`${t.$t("emails.new-request.warning")}`)}}).catch(s=>{le().close(),De().open({color:"error",text:t.$t("errorGeneric")}),console.error("Error getting documents: ",s)})},sendAttach(){},formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd-MM-yyyy / HH:mm:ss"):(e=new Date(e),ge(new Date(e),"dd-MM-yyyy / HH:mm:ss"))}},async validate(){const{valid:e}=await this.$refs.formRequest.validate();if(e&&this.message.trim().length>0)await this.sendMessage();else{const t=document.getElementById("submitFormRequest");t.disabled=!0,t.classList.add("v-btn--disabled"),De().open({color:"error",text:"Formulario inválido"})}}}}),Bu={class:"text-h6 text-title font-weight-bold"},ju={class:"text-caption mt-3"},Vu={class:"text-white text-h6"},Uu={class:"font-weight-bold text-primary"},Hu={key:0},Wu={key:1},Gu={class:"pl-5"},Qu=["innerHTML"],Zu={class:""},Yu=["innerHTML"],Ku={class:"font-weight-bold text-primary pl-5"},Xu={key:0},Ju={key:1},e1=["innerHTML"],t1=["innerHTML"],s1=["innerHTML"],i1=["onClick"],a1=["innerHTML"],n1=["onClick"],o1={class:"text-white text-h6"},r1=["innerHTML"],l1={class:"text-caption text-primary font-weight-bold pb-1"},d1=["innerHTML"];function c1(e,t,s,c,o,r){const d=Yt,a=Su,m=Fu,v=Nu,p=mi,u=Lu,A=_a;return y(),T(k,{class:"py-5 pb-10"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[l("span",Bu,f(e.$t("newRequests.title")),1)]),_:1}),n(b,{cols:"12"},{default:i(()=>[n(we)]),_:1}),n(b,{cols:"12",class:Be({"px-14":e.documentos===0&&!e.$vuetify.display.smAndDown})},{default:i(()=>[n(k,{class:Be({"px-14":e.documentos===0&&!e.$vuetify.display.smAndDown,"px-5":e.documentos>0&!e.$vuetify.display.smAndDown})},{default:i(()=>[n(b,{id:"messagesCardContent",ref:"scrollToMe",cols:"12",class:Be(["container-newRequests py-5",{"px-5":e.documentos>0&&e.$vuetify.display.smAndDown,"px-5":e.documentos===0&&e.$vuetify.display.smAndDown}])},{default:i(()=>[e.loading&&e.state==="init"?(y(),T(k,{key:0,justify:"center",align:"center"},{default:i(()=>[n(b,{cols:"12",justify:"center",class:"text-center d-flex flex-column",style:{"align-items":"center"}},{default:i(()=>[n(mt,{class:"",size:50,color:"primary",indeterminate:""}),l("span",ju,f(e.$t("newRequests.loader")),1)]),_:1})]),_:1})):e.listaNewRequests.length>0?(y(),j(pe,{key:1},[n(k,{justify:"center",align:"center"},{default:i(()=>[n(te,{size:"small",variant:"text",loading:e.loading,class:"text-caption text-primary",disabled:!e.showLoader,onClick:t[0]||(t[0]=g=>e.load())},{default:i(()=>[D(f(e.$t("newRequests.loaderPrev")),1)]),_:1},8,["loading","disabled"])]),_:1}),(y(!0),j(pe,null,Ee(e.listaNewRequests,(g,C)=>(y(),T(k,{key:`${C}-request`,class:"pt-5"},{default:i(()=>[e.user.uid!==g.sendBy?(y(),T(b,{key:0,cols:"2",sm:2,md:(e.documentos>0,2),lg:(e.documentos>0,2),xl:(e.documentos>0,2),class:"pt-2 text-center"},{default:i(()=>[n(ms,{color:"primary",size:e.$vuetify.display.smAndDown?30:45,class:""},{default:i(()=>[l("span",Vu,f(g.sendByFirstName?g.sendByFirstName.charAt(0)+g.sendByLastName.charAt(0):"U"),1)]),_:2}
375,1032,["size"])]),_:2},1032,["md","lg","xl"])):M("",!0),n(b,{cols:"10",sm:(e.documentos>0,10),md:e.documentos>0?8:9,lg:e.documentos>0?8:9,xl:e.documentos>0?8:9,offset:(e.user.uid!==g.sendBy,0),"offset-sm":(e.user.uid!==g.sendBy,0),"offset-md":e.user.uid!==g.sendBy?0:e.documentos>0?2:1,"offset-lg":e.user.uid!==g.sendBy?0:e.documentos>0?2:1,"offset-xl":e.user.uid!==g.sendBy?0:e.documentos>0?2:1},{default:i(()=>[e.user.uid!==g.sendBy?(y(),T(k,{key:0,class:"pb-2",align:"center"},{default:i(()=>[l("span",Uu,[g.sendByType==="funcionario"?(y(),j("span",Hu,f(e.$t("newRequests.funcionario")),1)):M("",!0),g.sendByType==="ciudadano"?(y(),j("span",Wu,f(e.$t("newRequests.citizen")),1)):M("",!0),D(" "+f(g.sendByFirstName),1)]),l("span",Gu,[n(d,{fill:"#1976d2",width:"10px",height:"10px"})]),l("span",{class:"text-caption pl-1",innerHTML:e.formatDate(g.sendByDate)},null,8,Qu)]),_:2},1024)):(y(),T(k,{key:1,align:"center",justify:"end",class:"pb-2"},{default:i(()=>[l("span",Zu,[n(d,{fill:"#1976d2",width:"10px",height:"10px"})]),l("span",{class:"text-caption pl-1",innerHTML:e.formatDate(g.sendByDate)},null,8,Yu),l("span",Ku,[g.sendByType==="funcionario"?(y(),j("span",Xu,f(e.$t("newRequests.funcionario")),1)):M("",!0),g.sendByType==="ciudadano"?(y(),j("span",Ju,f(e.$t("newRequests.citizen")),1)):M("",!0),D(" "+f(g.sendByFirstName),1)])]),_:2},1024)),e.user.uid===g.sendBy?(y(),T(k,{key:2,align:"center",class:"text-me"},{default:i(()=>[l("span",{innerHTML:g.message},null,8,e1)]),_:2},1024)):(y(),T(k,{key:3,align:"center",class:"text-other"},{default:i(()=>[l("span",{innerHTML:g.message},null,8,t1)]),_:2},1024)),(y(!0),j(pe,null,Ee(g.attachs,(_,S)=>(y(),j(pe,{key:`${S}-requestByMe`},[e.user.uid===g.sendBy?(y(),T(k,{key:0,align:"center",class:"pt-1",justify:"end"},{default:i(()=>[n(b,{cols:"10",sm:"10",md:e.documentos===0?4:7,lg:e.documentos===0?4:7,xl:e.documentos===0?4:7,class:"text-me"},{default:i(()=>[n(k,{align:"center"},{default:i(()=>[n(b,{cols:"3"},{default:i(()=>[n(a,{type:e.getType(_.type),fill:"#1976d2",width:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"30px",height:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"30px"},null,8,["type","width","height"])]),_:2},1024),n(b,{cols:"6"},{default:i(()=>[n(Ut,{location:"bottom"},{activator:i(({props:I})=>[n(k,nt({ref_for:!0},I,{class:"text-caption nameFileAttach"}),{default:i(()=>[D(f(_.name),1)]),_:2},1040)]),default:i(()=>[l("span",null,f(_.name),1)]),_:2},1024),n(k,{class:"text-caption"},{default:i(()=>[l("span",{innerHTML:e.convertToKB(_.size)},null,8,s1)]),_:2},1024)]),_:2},1024),n(b,{cols:"3"},{default:i(()=>[l("div",{class:"cursor",onClick:I=>("downloadFile"in e?e.downloadFile:Tt(ws))(_)},[n(m,{fill:"#1976d2",width:"30px",height:"30px"})],8,i1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["md","lg","xl"])]),_:2},1024)):(y(),T(k,{key:1,align:"center",class:"pt-1"},{default:i(()=>[n(b,{cols:"10",sm:"10",md:e.documentos===0?4:7,lg:e.documentos===0?4:7,xl:e.documentos===0?4:7,class:"text-other"},{default:i(()=>[n(k,{align:"center"},{default:i(()=>[n(b,{cols:"3"},{default:i(()=>[n(a,{type:e.getType(_.type),fill:"#1976d2",width:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"30px",height:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"30px"},null,8,["type","width","height"])]),_:2},1024),n(b,{cols:"6"},{default:i(()=>[n(k,{class:"text-caption"},{default:i(()=>[D(f(_.name),1)]),_:2},1024),n(k,{class:"text-caption"},{default:i(()=>[l("span",{innerHTML:e.convertToKB(_.size)},null,8,a1)]),_:2},1024)]),_:2},1024),n(b,{cols:"3"},{default:i(()=>[l("div",{class:"cursor",onClick:I=>("downloadFile"in e?e.downloadFile:Tt(ws))(_)},[n(m,{fill:"#1976d2",width:"30px",height:"30px"})],8,n1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["md","lg","xl"])]),_:2},1024))],64))),128))]),_:2},1032,["sm","md","lg","xl","offset","offset-sm","offset-md","offset-lg","offset-xl"]),e.user.uid===g.sendBy?(y(),T(b,{key:1,cols:"2",sm:2,md:(e.documentos>0,2),lg:(e.documentos>0,2),xl:(e.documentos>0,2),class:"pt-2 text-center"},{default:i(()=>[n(ms,{color:"primary",size:e.$vuetify.display.smAndDown?30:45,class:""},{default:i(()=>[l("span",o1,f(g.sendByFirstName?g.sendByFirstName.charAt(0)+g.sendByLastName.charAt(0):"U"),1)]),_:2}
375,1032,["size"])]),_:2},1032,["md","lg","xl"])):M("",!0)]),_:2},1024))),128)),e.needAnswer===!0?(y(),T(k,{key:0,class:"py-5"},{default:i(()=>[n(b,{cols:"12",sm:e.documentos>0?12:10,md:e.documentos>0?12:10,lg:e.documentos>0?12:10,xl:e.documentos>0?12:10,offset:0,"offset-sm":0,"offset-md":e.documentos>0?0:1,"offset-lg":e.documentos>0?0:1,"offset-xl":e.documentos>0?0:1,class:"text-center"},{default:i(()=>[l("span",{class:"text-caption text-center",innerHTML:e.$t("newRequests.waitResponseFuncionario")},null,8,r1)]),_:1},8,["sm","md","lg","xl","offset-md","offset-lg","offset-xl"])]),_:1})):M("",!0)],64)):e.loading===!1&&e.listaNewRequests.length===0?(y(),T(k,{key:2,class:"py-5 text-grey-lighten-4",justify:"center"},{default:i(()=>[D(f(e.$t("newRequests.dontMessages")),1)]),_:1})):M("",!0),t[7]||(t[7]=l("div",{class:"d-none"},null,-1))]),_:1},8,["class"]),n(b,{cols:"12"},{default:i(()=>[n(oi,{ref:"formRequest",modelValue:e.formValid,"onUpdate:modelValue":t[6]||(t[6]=g=>e.formValid=g)},{default:i(()=>[n(k,null,{default:i(()=>[e.needAnswer===!0&&(e.status==="En proceso"||("isPrevention"in e?e.isPrevention:Tt(yt))(e.status)||e.status==="Generando cobro"||e.status==="Pendiente de pago"||e.status==="Citado")?(y(),T(b,{key:0,cols:e.documentos>0?11:12,sm:e.documentos>0?11:12,md:e.documentos>0?12:11,lg:e.documentos>0?12:11,xl:e.documentos>0?12:11,offset:0,"offset-sm":0,"offset-md":e.documentos>0?0:1,"offset-lg":(e.documentos>0,0),"offset-xl":(e.documentos>0,0),class:"pb-0 py-2 px-0"},{default:i(()=>[n(k,{class:"px-4"},{default:i(()=>[n(b,{cols:e.documentos>0?9:10,sm:e.documentos>0?9:10,md:e.documentos>0?9:10,lg:e.documentos>0?9:10,xl:e.documentos>0?9:10},{default:i(()=>[n(v,{modelValue:e.message,"onUpdate:modelValue":t[1]||(t[1]=g=>e.message=g),rules:[g=>!!g||g===""||e.$t("campo-requerido")],onUpdate:t[2]||(t[2]=g=>e.message=g)},null,8,["modelValue","rules"])]),_:1},8,["cols","sm","md","lg","xl"]),n(b,{cols:e.documentos>0?3:2,sm:e.documentos>0?3:2,md:e.documentos>0?3:2,lg:e.documentos>0?3:2,xl:e.documentos>0?3:2,class:Be({"botones-sm":e.$vuetify.display.smAndDown})},{default:i(()=>[n(te,{icon:"",variant:"text",class:"cursor",disabled:e.needAnswer===!1,onClick:e.attachDoc},{default:i(()=>[n(p,{fill:e.needAnswer===!1?"#707070":"#1976d2",width:e.$vuetify.display.smAndDown?"25px":"30px",height:e.$vuetify.display.smAndDown?"25px":"30px"},null,8,["fill","width","height"])]),_:1},8,["disabled","onClick"]),n(te,{id:"submitFormRequest",icon:"",class:"cursor",disabled:e.message.trim().length===0,onClick:t[3]||(t[3]=g=>e.validate())},{default:i(()=>[n(u,{fill:e.message.trim().length===0||e.needAnswer===!1?"#F5F5F8":"#053f6f",width:e.$vuetify.display.smAndDown?"25px":"30px",height:e.$vuetify.display.smAndDown?"25px":"30px"},null,8,["fill","width","height"])]),_:1},8,["disabled"])]),_:1},8,["cols","sm","md","lg","xl","class"])]),_:1})]),_:1},8,["cols","sm","md","lg","xl","offset-md","offset-lg","offset-xl"])):M("",!0),e.filesAttach.length>0?(y(),T(b,{key:1,cols:"12",sm:(e.documentos>0,12),md:e.documentos>0?12:10,lg:e.documentos>0?12:10,xl:e.documentos>0?12:10,offset:0,"offset-sm":0,"offset-md":e.documentos>0?0:1,"offset-lg":e.documentos>0?0:1,"offset-xl":e.documentos>0?0:1,class:Be(["px-2",{"px-1":e.documentos>0}])},{default:i(()=>[n(k,{class:"px-3 pt-5"},{default:i(()=>[l("span",l1,f(e.$t("newRequests.filesAttach")),1)]),_:1}),n(k,null,{default:i(()=>[(y(!0),j(pe,null,Ee(e.filesAttach,(g,C)=>(y(),T(b,{key:`${C}-file`,cols:"12",sm:"6",md:e.documentos===0?3:4,lg:e.documentos===0?3:4,xl:e.documentos===0?3:4,class:"px-5 mb-2"},{default:i(()=>[n(k,{class:"file-attach-prev",justify:"center",align:"center"},{default:i(()=>[n(b,{cols:"2",class:"px-1"},{default:i(()=>[n(a,{type:e.getType(g.type),fill:"#1976d2",width:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"35px",height:e.$vuetify.display.smAndDown?e.documentos===0?"10px":"25px":"35px"},null,8,["type","width","height"])]),_:2},1024),n(b,{cols:"8",class:"px-2"},{default:i(()=>[n(Ut,{location:"bottom"},{activator:i(({props:_})=>[n(k,nt({ref_for:!0},_,{class:"text-caption px-5 nameFileAttach"}),{default:i(()=>[D(f(g.name),1)]),_:2},1040)]),default:i(()=>[l("span",null,f(g.name),1)]),_:2},1024),n(k,{class:"text-caption px-5"},{default:i(()=>[l("span",{innerHTML:e.convertToKB(g.size)},null,8,d1)]),_:2},1024)]),_:2},1024),n(b,{cols:"2",class:"px-0 text-center"},{default:i(()=>[n(ve,{class:"cursor",size:"small",onClick:_=>e.removeFile(g.name)},{default:i(()=>[...t[8]||(t[8]=[D("mdi-close",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["md","lg","xl"]))),128))]),_:1})]),_:1},8,["sm","md","lg","xl","offset-md","offset-lg","offset-xl","class"])):M("",!0),n(A,{dialog:e.dialogAttach,"onUpdate:dialog":t[4]||(t[4]=g=>e.dialogAttach=g),multiple:!0,onFilesUploaded:t[5]||(t[5]=g=>e.processUpload(g))},null,8,["dialog"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["class"])]),_:1},8,["class"])]),_:1})}const Ei=Object.assign(_e(qu,[["render",c1],["__scopeId","data-v-14394a4e"]]),{__name:"NewRequests"});function u1(){const t=ci().public.firebase.projectId,s=Fe(!1),c=Fe([]),o=Fe([]),r=Fe(null),d=Fe(null),a=Fe([]),m=Fe([]),v=Fe(null),p=Fe({searchStatus:[],searchDateEnd:"",searchByFolio:"",searchByExpediente:"",searchByCuit:"",searchByPadron:"",searchByTransaction:"",searchByFolioProcedure:"",searchDateStart:"",searchByUser:"",searchByReference:""}),u=Fe({itemsPerPage:5,page:1}),A=Fe([{id:"Pagado",name:"Pagado",color:"#63C656"},{id:"rejected",name:"Rechazado",color:"#F44E50"},{id:"pending",name:"Pendiente",color:"#053F6F"},{id:"authorized",name:"Autorizado",color:"#053F6F"},{id:"in_process",name:"En proceso",color:"#053F6F"},{id:"in_mediation",name:"En disputa",color:"#053F6F"},{id:"cancelled",name:"Cancelado",color:"#F44E50"},{id:"refunded",name:"Pago devuelto",color:"#F44E50"},{id:"charged_back",name:"Pago con contracargo",color:"#F44E50"},{id:"Pendiente",name:"Pendiente",color:"#053F6F"},{id:"Creado",name:"Creado",color:"#053F6F"}]),g=Fe({counter:0,id:"totalPayments",leyend:"Total de pagos",icon:"mdi-calendar-check-outline"}),C=Fe({counter:0,id:"totalPaymentsByReference",leyend:"Total de pagos",icon:"mdi-calendar-check-outline"}),_=Fe({counter:0,id:"totalPaymentsByReference",leyend:"Total de pagos",icon:"mdi-calendar-check-outline"}),S=Fe(""),I=t==="os-sandbox-nuevo-leon"||t==="os-gobierno-de-nuevo-leon",P=t==="os-lujan-de-cuyo"||t==="os-arg-lujan-de-cuyo"||t==="os-sandbox-lujan-de-cuyo",F=la(()=>$e().getUser);async function L(){m.value=await ja(),I?m.value.push({id:"NuevoLeon",carrier:"Motor de pagos",dependency:"Nuevo Leon",clientID:"NL",title:"Motor de pagos"}):P?m.value.push({carrier:"Macro Pago - QR",clientID:"Macro Pago - QR",dependency:"Luján",id:"MacroPagoQR",type:"QR",title:"Macro Pago - QR"},{carrier:"Macro Pago - Debin",clientID:"Macro Pago - Debin",dependency:"Luján",id:"MacroPagoDebin",type:"Debin",title:"Macro Pago - Debin"},{carrier:"Macro Pago - Click de pago",clientID:"Macro Pago - Click de pago",dependency:"Luján",id:"MacroPagoClickDePago",type:"ClickDePago",title:"Macro Pago - Click de pago"}):m.value.push({carrier:"Ninguna",dependency:"",id:"Ninguna",title:"Ninguna"})}let z=null;function V(){const q=z;if(z=null,!!q)try{q()}catch(O){console.error("[usePayments] listener unsubscribe failed:",O),oe(O,{level:"warning",tags:{degrade:"payments-listener-unsubscribe-failed",
375source:"usePayments.stopPaymentsListener"}})}}aa()&&na(V);function X(q){V();let O=[];a.value=[],v.value=Ht("tools/sales/billing"),p.value.searchDateStart&&p.value.searchDateStart!==null&&a.value.push(Te("createdAt",">=",p.value.searchDateStart)),p.value.searchDateEnd&&p.value.searchDateEnd!==null&&a.value.push(Te("createdAt","<=",p.value.searchDateEnd)),p.value.searchStatus&&p.value.searchStatus.length>0&&(O.push(Te("status","in",p.value.searchStatus)),a.value.push(Te("status","in",p.value.searchStatus))),p.value.searchByTransaction&&p.value.searchByTransaction!==null&&p.value.searchByTransaction!==""&&(O.push(Te("idPayment","==",p.value.searchByTransaction)),a.value.push(Te("idPayment","==",p.value.searchByTransaction))),p.value.searchByFolio&&p.value.searchByFolio!==null&&p.value.searchByFolio!==""&&(O.push(Te("folio","==",p.value.searchByFolio)),a.value.push(Te("folio","==",p.value.searchByFolio))),p.value.searchByExpediente&&p.value.searchByExpediente!==null&&p.value.searchByExpediente!==""&&(O.push(Te("expediente","==",p.value.searchByExpediente)),a.value.push(Te("expediente","==",p.value.searchByExpediente))),p.value.searchByFolioProcedure&&p.value.searchByFolioProcedure!==null&&p.value.searchByFolioProcedure!==""&&(O.push(Te("folioProcedure","==",p.value.searchByFolioProcedure)),a.value.push(Te("folioProcedure","==",p.value.searchByFolioProcedure))),p.value.searchByUser&&p.value.searchByUser!==null&&p.value.searchByUser!==""&&(O.push(Te("userId","==",p.value.searchByUser)),a.value.push(Te("userId","==",p.value.searchByUser))),p.value.searchByCuit&&p.value.searchByCuit!==null&&p.value.searchByCuit!==""&&(O.push(Te("user.cuit","==",p.value.searchByCuit)),a.value.push(Te("user.cuit","==",p.value.searchByCuit))),p.value.searchByPadron&&p.value.searchByPadron!==null&&p.value.searchByPadron!==""&&(O.push(Te("padron","==",p.value.searchByPadron)),a.value.push(Te("padron","==",p.value.searchByPadron))),p.value.searchByReference&&p.value.searchByReference!==null&&p.value.searchByReference!==""&&(O.push(Te("path.idReference","==",p.value.searchByReference)),a.value.push(Te("path.idReference","==",p.value.searchByReference))),a.value.push(Cs("createdAt","desc")),S.value==="all"?G():S.value==="details"&&U(),q==="next"&&r.value?a.value.push(Ps(r.value),pt(ss(u.value.itemsPerPage))):q==="prev"&&d.value?a.value.push(Ss(d.value),oa(ss(u.value.itemsPerPage))):(d.value=null,r.value=null,a.value.push(pt(ss(u.value.itemsPerPage))));try{c.value=[];let Q=[];O=[...O,...a.value],z=ra(ft(v.value,...O),Z=>{c.value=[],Q=[],Z.empty===!1&&(d.value=Z.docs[0],r.value=Z.docs[Z.docs.length-1],Z.forEach(H=>{const ae=H.data();Q.push({...ae,id:H.id,status:J(ae.status)})}),c.value=_s([],Q))},Z=>{console.error("[usePayments] payments snapshot error:",Z),oe(Z)})}catch(Q){console.error(Q),oe(Q)}}function J(q){let O="";switch(q){case"rejected":O="Rechazado";break;case"pending":O="Pendiente";break;case"authorized":O="Autorizado";break;case"in_process":O="En proceso";break;case"in_mediation":O="En disputa";break;case"cancelled":O="Cancelado";break;case"refunded":O="Pago devuelto";break;case"charged_back":O="Pago con contracargo";break;default:O=q;break}return O}async function G(){try{const q=[...a.value];await ts(ft(v.value,...q)).then(O=>{g.value.counter=O.data().count})}catch(q){console.error(q),oe(q)}}async function U(){try{const q=[...a.value,Te("status","in",["Pagado","Pendiente","rejected","pending","authorized","in_process","in_mediation","cancelled","refunded","charged_back"]),Te("path.idReference","==",p.value.searchByReference)];await ts(ft(v.value,...q)).then(O=>{C.value.counter=O.data().count})}catch(q){console.error(q),oe(q)}}async function me(){try{const q=[...a.value,Te("status","in",["Pagado","Pendiente","rejected","pending","authorized","in_process","in_mediation","cancelled","refunded","charged_back"]),Te("user.uid","==",p.value.searchByUser)];await ts(ft(v.value,...q)).then(O=>{_.value.counter=O.data().count})}catch(q){console.error(q),oe(q)}}async function $(q){const O=[],Q=await vs("tools/sales/billing",[{field:"folioProcedure",op:"==",value:q}]);Q.empty===!1&&(await Hs(Q.docs,async Z=>{const H=Z.data();if(H.id=Z.id,H.carrier==="Mercado Pago"){if(H&&H.metadata&&H.metadata!=="null"){const ae=await JSON.parse(H.metadata),N=ae?.data?.id||ae?.id;H.payment=await Y(N)}else H.payment=await w(H.idExt),H.payment.additional_info={items:ke(H.payment.items)},H.amount=H.payment.metadata.cost.amount;
375H.payment.items=[],H.payment.additional_info.items.forEach(ae=>{H.payment.items.push({concept:ae.title,amount:ae.unit_price})})}else H.carrier==="Caja de cobro municipal"&&(H.payment={additional_info:{items:[]}});O.push({...H,status:J(H.status),type:"payment"})}),o.value=_s([],O))}async function Y(q){try{return await $a(q)}catch{return null}}async function w(q){try{return await Ra(q)}catch{return null}}return{loading:s,listData:c,paymentsListData:o,lastVisible:r,firstVisible:d,counterFilters:a,carrierList:m,collectionRef:v,filters:p,options:u,statusList:A,totalPayments:g,totalPaymentsByReference:C,totalPaymentsByUser:_,type:S,isNL:I,isArg:P,user:F,fetchPaymentMethods:L,get:X,stopPaymentsListener:V,searchName:J,getCounters:G,getCountersByFolio:U,getCountersByUser:me,asyncForEach:Hs,getPaymentsForDownload:$,getPayment:Y,getPreference:w}}const m1=ut({name:"PaymentsInProcedure",props:{data:{type:Object,default:()=>{}},idReference:{type:String,default:""},tab:{type:String,default:""},tabPayment:{type:Number,default:0}},setup(){return{...u1()}},watch:{options:{handler(e,t){(t.page!==e.page||e.itemsPerPage!==t.itemsPerPage)&&(t.page?e.page>t.page?this.get("next"):e.itemsPerPage!==t.itemsPerPage?(this.lastVisible=null,this.get("init")):this.get("prev"):this.get("init"))},deep:!0},tab(e){parseFloat(e)===parseFloat(this.tabPayment)&&(this.type="details",this.filters.searchByReference=this.idReference,this.get("init"))}},mounted(){this.fetchPaymentMethods(),this.type="details"},methods:{}}),f1={class:"text-subtitle-2 font-weight-bold pl-2 my-auto"},p1={class:"d-flex justify-end align-center pa-4 flex-wrap"},h1={class:"text-body-2 mr-4"};function g1(e,t,s,c,o,r){const d=wi,a=xa;return y(),T(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(He,{class:"titleStep",color:"cardTitle"},{default:i(()=>[n(k,{class:"ma-0 w-100"},{default:i(()=>[n(d,{fill:"white",width:"25px",height:"25px"}),l("span",f1,f(e.$t("payments.detail.listTitle")),1),n(ye)]),_:1})]),_:1}),n(k,{class:"mt-4 px-2 px-sm-6 py-5"},{default:i(()=>[n(Qa,{options:e.options,"onUpdate:options":t[3]||(t[3]=m=>e.options=m),class:"w-100",items:e.listData,"items-per-page":1,"server-items-length":e.totalPaymentsByReference.counter,"footer-props":{"items-per-page-options":[5,10,15,20,25]}},{default:i(m=>[(y(!0),j(pe,null,Ee(m.items,(v,p)=>(y(),T(a,{key:p,element:v.raw,"status-list":e.statusList},null,8,["element","status-list"]))),128))]),"no-data":i(()=>[n(be,{class:"elevation-3 rounded-lg card mx-1 mb-8 pt-1"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"12",class:"pa-5"},{default:i(()=>[D(f(e.$t("noData")),1)]),_:1})]),_:1})]),_:1})]),footer:i(()=>[l("div",p1,[t[4]||(t[4]=l("span",{class:"text-body-2 mr-2"},"Elementos por página:",-1)),n(di,{modelValue:e.options.itemsPerPage,"onUpdate:modelValue":t[0]||(t[0]=m=>e.options.itemsPerPage=m),items:[5,10,15,20,25],density:"compact","hide-details":"",variant:"plain",class:"mr-4 pagination-per-page",style:{"max-width":"55px"}},null,8,["modelValue"]),l("span",h1,f((e.options.page-1)*e.options.itemsPerPage+1)+"-"+f(Math.min(e.options.page*e.options.itemsPerPage,e.totalPaymentsByReference.counter))+" de "+f(e.totalPaymentsByReference.counter),1),n(te,{icon:"mdi-chevron-left",variant:"text",size:"small",disabled:e.options.page===1,"aria-label":"Página anterior",onClick:t[1]||(t[1]=m=>e.options.page--)},null,8,["disabled"]),n(te,{icon:"mdi-chevron-right",variant:"text",size:"small",disabled:e.options.page*e.options.itemsPerPage>=e.totalPaymentsByReference.counter,"aria-label":"Página siguiente",onClick:t[2]||(t[2]=m=>e.options.page++)},null,8,["disabled"])])]),_:1},8,["options","items","server-items-length"])]),_:1})]),_:1})]),_:1})}const Ti=Object.assign(_e(m1,[["render",g1],["__scopeId","data-v-3ce96465"]]),{__name:"Payments"}),y1={name:"SignOutputDocumentsSaved",props:{post:{type:Object,default:()=>({title:"",stageNow:null}),required:!0},folio:{type:String,default:"",required:!0},moduleId:{type:String,default:"",required:!0},detailsId:{type:String,default:"",required:!0},submoduleId:{type:String,default:"",required:!0},slugRequest:{type:String,default:"",required:!0},signDocuments:{type:Boolean,default:!1,required:!1},documentsToSignSaved:{type:Array,default:()=>[],required:!0},dialog:{type:Boolean,required:!0}},setup(){return{...fi()}},data(){return{fileName:"",signatureNew:{},userWhoUpload:{},documentsArray:[],documentsToSign:[],urlsDocumentsArray:[],electronicSignatureDialog:!1,accountTierBlockedReason:"",projectRegion:this.$config.projectRegion,errors:{RFC:[],Clave:[],ArchivoCer:[],ArchivoKey:[],ArchivosURL:[]},dialogMessage:{title:"",val:!1,message:""},htmlToPdfOptions:{margin:[10,0,20,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}},filteredDocuments:[]}},computed:{user(){return $e().getUser},fullName(){const e=this.user.first_name||this.user.firstName,t=this.user.last_name||this.user.lastName,s=this.user.last_name2||this.user.lastName2||"";return`${e} ${t} ${s}`},filteredSavedDocuments(){const e=[];for(const t in this.documentsToSignSaved)this.documentsToSignSaved[t].userWhoSigned||e.push({...this.documentsToSignSaved[t],index:t});return e}},watch:{documentsToSignSaved(e){if(e)for(const t in e)e[t].userWhoSigned||this.filteredDocuments.push({...e[t],index:t})}},mounted(){},methods:{clearData(){this.documentsArray=[],this.urlsDocumentsArray=[],this.$emit("update:dialog",!1),this.electronicSignatureDialog=!1},processUpload(){const e=this;le().open(),e.documentsArray=e.filteredSavedDocuments;try{e.urlsDocumentsArray=Za(e.documentsArray,t=>t.documentUrl),e.electronicSignatureDialog=!0,e.$emit("update:dialog",!1),le().close()}catch(t){le().close(),e.clearData(),e.showNotify({title:e.$t("details.message"),message:t,type:"success"})}}
375,callSetSignature(e){le().open(),this.electronicSignatureDialog=!1,e.some(s=>typeof s=="object"&&s!==null)?(this.signatureNew={...e[0].cadena},this.setSignatureOSCity()):this.setSignature(e)},async setSignatureOSCity(){this.documentsToSign=[];const e=[];for(const t of this.documentsArray)e.push(this.generatePDF(t,t?.documentUrl,t?.name));try{await Promise.all(e),this.emitNewData()}catch(t){console.error("Error processing documents:",t),oe(t)}finally{this.urlsDocumentsArray=[],this.documentsArray=[],le().close()}},setSignature(e){const t=this;t.documentsToSign=[];for(let s=0;s<e.length;s++)t.documentsToSign.push({...t.documentsArray[s],documentUrl:e[s],userWhoSigned:t.user.uid,userWhoSignedName:t.fullName,userWhoSignedEmail:t.user?.email,signed:!0});t.emitNewData(),le().close()},closeDialogMessage(){this.$nextTick(function(){this.dialogMessage={...this.dialogMessage,val:!1}})},showNotify(e){const t=e.type,s=this;this.$nextTick(()=>{switch(t){case"success":e={...e,icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"},s.electronicSignatureDialog=!1;break;case"error":e={...e,icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"},s.electronicSignatureDialog=!1;break;case"warning":e={...e,icon:"mdi-information-outline",iconColor:"#FB9800",textColor:"#FB9800"},s.electronicSignatureDialog=!1;break}this.dialogMessage={...e,val:!0}})},async generatePDF(e,t,s){const c=this;c.userWhoUpload={userWhoUploadName:e.userWhoUploadName,userWhoUploadEmail:e.userWhoUploadEmail},e.signatures=_s(e.signatures,[c.signatureNew]);try{let o="";t&&(o=await c.getFilesFromUrl([t]));const r=document.getElementById("new-page-signatures2").cloneNode(!0),d=document.createElement("div");d.appendChild(r),r.style.display="block";const a=await Na().set(this.htmlToPdfOptions).from(d).toPdf().get("pdf");if(o){const m=await this.joinPdfs([o,a.output("arraybuffer")],!1,"");await this.saveData(new Blob([m],{type:"application/pdf"}),e,s)}else await this.saveData(new Blob([a.output("arraybuffer")],{type:"application/pdf"}),e,s)}catch(o){console.error(o),oe(o),le().close()}},async saveData(e,t,s){let c="";try{const o=`documentsToSign/${this.moduleId}/${this.submoduleId}/${this.slugRequest}/${this.detailsId}/${s}`;c=await gt(o,e)}catch(o){console.error("Error saving document in storage:",o),oe(o)}this.documentsToSign.push({...t,userWhoSigned:this.user.uid,userWhoSignedName:this.fullName,userWhoSignedEmail:this.user?.email,signatures:t?.signatures,documentUrl:c||t?.url})},emitNewData(){const e=ke(this.documentsToSignSaved);for(let t=0;t<this.documentsToSign.length;t++){const s=this.documentsToSign[t].index;e[s]=this.documentsToSign[t],delete e[s].index}this.$emit("saveDocumentsToSign",e),this.clearData()}}},b1={class:"pt-3"},v1={class:"mt-3"},w1={class:"mr-5 py-0"};function _1(e,t,s,c,o,r){const d=Va,a=yi;return y(),j("div",b1,[n(Me,{"model-value":s.dialog,persistent:"","max-width":"650px"},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(He,{color:"primary"},{default:i(()=>[n(Qe,{class:"font-weight-medium"},{default:i(()=>[D(f(e.$t("uploadDocumentsToSign.signDocument")),1)]),_:1}),n(ye),n(te,{icon:"mdi-close",variant:"text",onClick:t[0]||(t[0]=m=>e.$emit("update:dialog",!1))})]),_:1}),n(we),n(Re,{class:"py-5 text-black"},{default:i(()=>[n(Oe,{density:"compact",variant:"tonal",type:"info"},{default:i(()=>[...t[11]||(t[11]=[l("p",{class:"caption mb-0"},"A continuación vas a firmar el siguiente documento",-1)])]),_:1}),n(et,{lines:"two"},{default:i(()=>[l("div",v1,[(y(!0),j(pe,null,Ee(r.filteredSavedDocuments,(m,v)=>(y(),j(pe,{key:v},[m.documentUrl?(y(),T(Ve,{key:0},{default:i(()=>[l("div",w1,[n(Ze,{class:"font-weight-medium text-primary body-1"},{default:i(()=>[D(f(m.name),1)]),_:2},1024)])]),_:2},1024)):M("",!0)],64))),128))])]),_:1})]),_:1}),n(we),n(Ke,{class:"justify-end py-5"},{default:i(()=>[n(te,{variant:"outlined",color:"primary",class:"text-none px-4",elevation:"0",onClick:t[1]||(t[1]=m=>{e.$emit("update:dialog",!1),e.$emit("flagSignOutputDocumentsSaved",!1)})},{default:i(()=>[D(f(e.$t("cancel")),1)]),_:1}),n(te,{color:"primary",class:"text-none px-4",elevation:"0",onClick:t[2]||(t[2]=m=>r.processUpload())},{default:i(()=>[D(f(e.$t("continue")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"]),n(Me,{modelValue:o.electronicSignatureDialog,"onUpdate:modelValue":t[7]||(t[7]=m=>o.electronicSignatureDialog=m),persistent:"","max-width":"500px"},{default:i(()=>[n(d,{post:s.post,folio:s.folio,citizen:!1,"urls-documents-array":o.urlsDocumentsArray,onCancel:t[3]||(t[3]=m=>r.clearData()),onNotification:t[4]||(t[4]=m=>r.showNotify(m)),onSignatureData:t[5]||(t[5]=m=>r.callSetSignature(m)),onAccountTierRequired:t[6]||(t[6]=m=>o.accountTierBlockedReason=m)},null,8,["post","folio","urls-documents-array"])]),_:1},8,["modelValue"]),n(a,{"model-value":!!o.accountTierBlockedReason,reason:o.accountTierBlockedReason,dismissible:"","onUpdate:modelValue":t[8]||(t[8]=m=>o.accountTierBlockedReason="")},null,8,["model-value","reason"]),n(Me,{modelValue:o.dialogMessage.val,"onUpdate:modelValue":t[10]||(t[10]=m=>o.dialogMessage.val=m),width:"500",scrollable:""},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(Re,{class:"py-5 text-black"},{default:i(()=>[l("div",{class:"mt-5 text-center",style:ht({color:o.dialogMessage.textColor})},[o.dialogMessage.icon?(y(),T(ve,{key:0,color:o.dialogMessage.iconColor},{default:i(()=>[D(f(o.dialogMessage.icon),1)]),_:1},8,["color"])):M("",!0),l("label",null,f(o.dialogMessage.message),1)],4)]),_:1}),n(we),n(Ke,{class:"justify-center py-5"},{default:i(()=>[n(te,{color:"primary",class:"rounded-lg",onClick:t[9]||(t[9]=m=>r.closeDialogMessage())},{default:i(()=>[D(f(e.$t("ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),n(be,{id:"new-page-signatures2",class:"signatureContainer font-weight-bold",style:{display:"none"}},{default:i(()=>[n(Re,null,{default:i(()=>[n(k,{"no-gutters":"",class:"borderComplete"},{default:i(()=>[n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[12]||(t[12]=[l("h4",null,"Trámite",-1)])]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"3",class:"borderRight borderBottom paddingTable"},{default:i(()=>[...t[13]||(t[13]=[D("Folio de la solicitud",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[D(f(s.folio),1)]),_:1}),n(b,{cols:"3",class:"borderBottom borderRight paddingTable"},{default:i(()=>[...t[14]||(t[14]=[D("Operador que cargó el documento",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[D(f(o.userWhoUpload.userWhoUploadName),1)]),_:1}),r.user.email?(y(),j(pe,{key:0},[n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[15]||(t[15]=[D("Email",-1)])]),_:1}),n(b,{cols:"9",class:"paddingTable"},{default:i(()=>[D(f(o.userWhoUpload.userWhoUploadEmail),1)]),_:1})],64)):M("",!0)]),_:1})]),_:1})]),_:1}),n(k,{"no-gutters":"",class:"borderComplete"},{default:i(()=>[n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[16]||(t[16]=[l("h4",null,"Agente firmante",-1)])]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"3",class:"borderRight borderBottom paddingTable"},{default:i(()=>[...t[17]||(t[17]=[D("Nombre",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[D(f(o.signatureNew.nombre),1)]),_:1}),n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[18]||(t[18]=[D("RFC",-1)])]),_:1}),n(b,{cols:"9",class:"paddingTable"},{default:i(()=>[D(f(o.signatureNew.rfc),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{"no-gutters":"",class:"borderComplete"},{default:i(()=>[n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[19]||(t[19]=[l("h4",null,"Firma",-1)])]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"3",class:"borderRight paddingTable borderBottom"},{default:i(()=>[...t[20]||(t[20]=[D("Serie",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[D(f(o.signatureNew.certificado),1)]),_:1}),n(b,{cols:"3",class:"borderRight borderBottom paddingTable"},{default:i(()=>[...t[21]||(t[21]=[D("Fecha",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[D(f(o.signatureNew.fecha),1)]),_:1}),n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[22]||(t[22]=[D("Sello",-1)])]),_:1}),n(b,{cols:"9",class:"paddingTable"},{default:i(()=>[D(f(o.signatureNew.firma),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{"no-gutters":"",class:"borderComplete"},{default:i(()=>[n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[23]||(t[23]=[l("h4",null,"OCSP",-1)])]),_:1}),n(b,{cols:"9"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"3",class:"borderRight borderBottom paddingTable"},{default:i(()=>[...t[24]||(t[24]=[D("Respondedor",-1)])]),_:1}),n(b,{cols:"9",class:"borderBottom paddingTable"},{default:i(()=>[...t[25]||(t[25]=[D("Servicio OCSP SAT",-1)])]),_:1}),n(b,{cols:"3",class:"borderRight paddingTable"},{default:i(()=>[...t[26]||(t[26]=[D("Emisor",-1)])]),_:1}),n(b,{cols:"9",class:"paddingTable"},{default:i(()=>[...t[27]||(t[27]=[D("AUTORIDAD CERTIFICADORA",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])}const A1=Object.assign(_e(y1,[["render",_1],["__scopeId","data-v-c3814c75"]]),{__name:"SignDocumentsToSignSaved"}),D1={name:"DocumentsRequest",props:{moduleId:{type:String,required:!0},detailsId:{type:String,required:!0},submoduleId:{type:String,required:!0},slugRequest:{type:String,required:!0},userAuxRole:{type:String,required:!0},status:{type:String,required:!0},post:{type:Object,default:()=>({title:"",stageNow:null}),required:!0},buttonDisabled:{type:Boolean,default:!1},documentsToSign:{type:Array,required:!0,default:()=>[]},withListDocuments:{type:Boolean,default:!1},flagSignDocumentsToSignSaved:{type:Boolean,default:null},answerStatus:{type:String,required:!0},folio:{type:String,required:!0}},data(){return{file:null,zipLength:0,loader:!1,zip:new As,dialogDelete:!1,dialogSignDocuments:!1,signDocumentsToSignSaved:!1,projectId:this.$config.firebase.projectId,projectRegion:this.$config.projectRegion,documentToSignIndividual:[],stages:[],panel:null}},computed:{user(){return $e().getUser}},watch:{zipLength(e){e&&this.zipLength===this.documentsToSign.length&&this.zip.generateAsync({type:"blob"}).then(async t=>{await Ii.saveAs(t,`${this.folio}.zip`),le().close(),De().open({color:"success",text:this.$t("details.downloadSuccess")})}).catch(t=>{console.error(t),le().close(),De().open({color:"error",text:this.$t("errorGeneric")})})},flagSignDocumentsToSignSaved:{handler(e){this.signDocumentsToSignSaved=e},immediate:!0},signDocumentsToSignSaved(e){this.$emit("update:flagSignDocumentsToSignSaved",e)},documentsToSign(){this.panel=0,this.stages=this.groupDocumentsByStage(this.documentsToSign)}},async mounted(){this.panel=0,this.stages=await this.groupDocumentsByStage(this.documentsToSign)},methods:{seeFile(e){this.$analytics?.track?.(Se.tramite_detail_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_type:"view_single"}),window.open(e.documentUrl,"_blank")},openSingleSignDialog(e){this.documentToSignIndividual=[e],this.dialogSignDocuments=!0,this.signDocumentsToSignSaved=!0},setDownloadDoc(e){const t=e.name;pi(e.documentUrl).then(s=>{this.zip.file(t,s),this.zipLength++}
375).catch(s=>{oe(s,{level:"warning",tags:{degrade:"zip-document-fetch-failed",source:"DocumentsRequest.setDownloadDoc"}}),console.error(s),this.zipLength++})},downloadFiles(){this.$analytics?.track?.(Se.tramite_detail_doc_download,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,doc_type:"zip"}),le().open(),this.zip=new As,this.documentsToSign.forEach(this.setDownloadDoc)},saveDocumentsToSign(e){!Array.isArray(e)||e.length===0||(e.forEach(t=>{const s=this.documentsToSign.findIndex(c=>c.name===t.name);s!==-1&&(this.documentsToSign[s]=t)}),this.signDocumentsToSignSaved=!1,this.dialogSignDocuments=!1,this.$emit("saveDocumentsToSign",e))},groupDocumentsByStage(e){const t=[];let s=1;return this.post.stages.forEach(c=>{t.unshift({responseConfirmation:c.responseConfirmation||!1,operatorHasRequestedSignature:c.operatorHasRequestedSignature||!1,operatorSignatureRequested:c.operatorSignatureRequested||!1,title:`Solicitud ${s++}`,documents:e.filter(o=>o.stageUploaded-1===c.noStage&&c.operatorSignatureRequested===!0),active:c.noStage===this.post.stageNow-1})}),t}}},k1=["src"],I1={class:"subtitle-2"},C1={class:"py-5"};function S1(e,t,s,c,o,r){const d=A1;return y(),j("div",null,[n(k,{justify:"center",class:"pa-5"},{default:i(()=>[n(_i,{modelValue:o.panel,"onUpdate:modelValue":t[1]||(t[1]=a=>o.panel=a),accordion:""},{default:i(()=>[(y(!0),j(pe,null,Ee(o.stages,(a,m)=>(y(),T(Ai,{key:m},{default:i(()=>[n(Di,null,{default:i(()=>[l("h3",null,f(a.title),1)]),_:2},1024),n(ki,null,{default:i(()=>[n(k,{class:"no-gutters justify-end"},{default:i(()=>[n(b,{cols:"12",sm:"5","offset-sm":["Aprobado","Desistido","Rechazado"].includes(s.status)?"7":"",md:"4","offset-md":["Aprobado","Desistido","Rechazado"].includes(s.status)?"8":""},{default:i(()=>[n(te,{color:"primary",block:"",size:"small",onClick:t[0]||(t[0]=v=>{r.downloadFiles(),o.dialogSignDocuments=!1,o.signDocumentsToSignSaved=!1})},{default:i(()=>[D(f(e.$t("uploadDocumentsToSign.downloadFiles")),1)]),_:1})]),_:1},8,["offset-sm","offset-md"]),n(b,{cols:"12",class:"my-5"},{default:i(()=>[n(we)]),_:1})]),_:1}),a.documents.length>0?(y(),T(k,{key:0},{default:i(()=>[(y(!0),j(pe,null,Ee(a.documents,(v,p)=>(y(),T(b,{key:`file-${m}-${p}`,cols:"12",sm:"6",md:s.withListDocuments?"6":"4"},{default:i(()=>[n(be,{elevation:"3",class:"px-3"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[l("iframe",{src:v.documentUrl,style:{border:"none !important",width:"100%",height:"400px"}},null,8,k1)]),_:2},1024)]),_:2},1024),v.name?(y(),T(Et,{key:0,class:"pb-0"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"2",class:"pr-0"},{default:i(()=>[n(ve,{size:"large",start:"",color:"#053F6F"},{default:i(()=>[...t[4]||(t[4]=[D(" mdi-file-pdf-box ",-1)])]),_:1})]),_:1}),n(b,{cols:"10",class:Be(["pl-0",{minHeight:e.$vuetify.display.smAndUp}])},{default:i(()=>[l("p",I1,f(v.name),1)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024)):M("",!0),n(we),n(Ke,{class:"justify-center py-5"},{default:i(()=>[n(k,{class:"justify-end"},{default:i(()=>[n(b,{cols:"12",sm:"6",class:"pt-1 pl-1"},{default:i(()=>[n(te,{color:"primary",class:"width-100",onClick:u=>r.seeFile(v)},{default:i(()=>[D(f(e.$t("seeFile")),1)]),_:1},8,["onClick"])]),_:2},1024),!v.signed&&s.post.operatorHasRequestedSignature===!0&&s.post.timeout===!1?(y(),T(b,{key:0,cols:"12",sm:"6",class:"pt-1 pr-1"},{default:i(()=>[n(te,{color:"success",class:"width-100",onClick:u=>r.openSingleSignDialog(v)},{default:i(()=>[D(f(e.$t("uploadDocumentsToSign.signDocument")),1)]),_:1},8,["onClick"])]),_:2},1024)):M("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["md"]))),128))]),_:2},1024)):(y(),T(k,{key:1,class:"mb-5"},{default:i(()=>[n(b,{col:"12",class:"text-center"},{default:i(()=>[l("h3",C1,f(e.$t("uploadDocumentsToSign.notDocuments")),1)]),_:1})]),_:1}))]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1}),o.signDocumentsToSignSaved?(y(),T(d,{key:0,dialog:o.dialogSignDocuments,"onUpdate:dialog":t[2]||(t[2]=a=>o.dialogSignDocuments=a),folio:s.folio,post:{...s.post},"module-id":s.moduleId,"sign-documents":!0,"details-id":s.detailsId,"submodule-id":s.submoduleId,"slug-request":s.slugRequest,"documents-to-sign-saved":o.documentToSignIndividual,onSaveDocumentsToSign:t[3]||(t[3]=a=>r.saveDocumentsToSign(a))},null,8,["dialog","folio","post","module-id","details-id","submodule-id","slug-request","documents-to-sign-saved"])):M("",!0)])}const P1=Object.assign(_e(D1,[["render",S1]]),{__name:"DocumentsRequest"}),xs=""+new URL("LogoTesoreriaNL.DP69m_az.png",import.meta.url).href,Ns=""+new URL("LogoEscudoNL.DN2l51dB.png",import.meta.url).href,E1={name:"Response",components:{Html2Pdf:ot},props:{establishmentData:{type:Object,default:()=>{}},applicantData:{type:Object,default:()=>{}},contactData:{type:Object,default:()=>{}},legalRepresentative:{type:Object,default:()=>{}},extraData:{type:Object,default:()=>{}},title:{type:String,default:""},personType:{type:String,default:"fisica"},documentData:{type:Object,default:()=>{}},acknowledgmentResponseType:{type:String,default:"accepted"}},setup(){return{logoTesoreriaNlPng:xs,logoEscudoNlPng:Ns}},data:()=>({snackbar:{show:!1,color:"",timeout:6e3,text:""},htmlToPdfOptions:{margin:[5,0,25,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}},pdf:{},docUrl:""}),computed:{linkToShare(){return`${this.currentUrl}${(this._.provides[Ae]||this.$route).fullPath}`},currentUrl(){return $e().currentUrl}},methods:{back(){this.$router.back()},async generatePDF(){await this.$refs.html2Pdf.generatePdf()},copyLink(){gi(this.linkToShare).then(()=>{this.snackbar.show=!0,this.snackbar.text=`${this.$t("textCopied")}`,this.snackbar.color="success"}).catch(()=>{this.snackbar.show=!0,this.snackbar.text=`${this.$t("textNotCopied")}`,this.snackbar.color="error"})},formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy"):(e=new Date(e),ge(new Date(e),"dd/MM/yyyy"))}},async beforeDownload({html2pdf:e,options:t,pdfContent:s}){const c=this;try{await e().set(t).from(s).toPdf().get("pdf").then(async o=>{const r=o.internal.getNumberOfPages();for(let a=1;a<=r;a++)o.setPage(a),o.setFontSize(10),o.setTextColor(150),o.text(c.$t("page")+" "+a+" "+this.$t("of")+" "+r,o.internal.pageSize.getWidth()*.8,o.internal.pageSize.getHeight()-12);o=o.output("blob"),c.pdf=o;const d=await this.saveDocInStorageAck(c.pdf,c.documentData);c.$emit("pdfGenerated",d)})}catch(o){console.error(o),oe(o)}},async saveDocInStorageAck(e,t){const s=t.module,c=t.submodule,o=t.slugRequest,r=t.id_reference;let d="";try{const a=`finalDocuments/${s}/${c}/${o}/${r}/${r}_${this.acknowledgmentResponseType}ResponseAcknowledgment.pdf`;d=await gt(a,e),le().close()}catch(a){le().close(),console.error(a),oe(a)}return d}}},T1=["src"],F1=["src"],R1={class:"font-title-size-print"},$1={class:"d-inline font-weight-bold font-table-size-print"},x1={class:"d-inline font-weight-bold font-table-size-print"}
375,N1={class:"font-table-size-print text-justify"},O1={class:"font-table-size-print text-justify"};function M1(e,t,s,c,o,r){const d=ot,a=zt;return y(),T(a,null,{default:i(()=>[n(d,{ref:"html2Pdf","pdf-format":"a4",filename:s.extraData.folio,"pdf-quality":1.5,"show-layout":!1,"float-layout":!0,"preview-modal":!1,"enable-download":!1,"manual-pagination":!0,"pdf-content-width":"800px","pdf-orientation":"portrait","paginate-elements-by-height":2500,"html-to-pdf-options":e.htmlToPdfOptions,onBeforeDownload:t[0]||(t[0]=m=>r.beforeDownload(m))},{"pdf-content":i(()=>[n(Mt,null,{default:i(()=>[n(be,{elevation:"6",class:"rounded-lg pa-10"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,T1)]),_:1}),n(b,{cols:"5",align:"end",justify:"center"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,F1)]),_:1}),n(ye)]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-0 py-0"},{default:i(()=>[n(ye),n(b,{cols:"12",align:"center",justify:"center"},{default:i(()=>[n(b,{md:"12",sm:"12",class:"pb-0"},{default:i(()=>[...t[1]||(t[1]=[l("h4",{class:"text-center font-weight-bold font-title-size-print"},"ACUSE DE RESPUESTA",-1)])]),_:1}),n(Nt,{color:"#B3B3B3",class:"my-3 borders",width:"75%"},{default:i(()=>[n(k,{class:"px-2"},{default:i(()=>[n(b,{cols:"12",class:""},{default:i(()=>[l("span",R1,f(s.title),1)]),_:1})]),_:1})]),_:1}),n(k,{class:"mt-3"},{default:i(()=>[n(ye),n(b,{cols:"4",class:"pt-0"},{default:i(()=>[t[2]||(t[2]=l("span",{class:"d-inline font-weight-bold font-table-size-print"}," Monterrey, Nuevo León a ",-1)),l("span",$1,f(r.formatDate(s.extraData.createdAt)),1)]),_:1}),n(b,{cols:"4",class:"pt-0",align:"end"},{default:i(()=>[l("div",x1,"Folio: "+f(s.extraData.folio),1)]),_:1})]),_:1})]),_:1})]),_:1}),s.personType==="fisica"?(y(),T(k,{key:0,align:"center","justify-space-between":"",class:"mx-5 mb-5 pt-0"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[3]||(t[3]=[l("div",{class:"font-weight-bold font-table-size-print"},"Datos de Identificación del contribuyente",-1)])]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 border-left border-right"},{default:i(()=>[...t[4]||(t[4]=[l("div",{class:"font-weight-bold font-table-size-print"},"RFC",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.rfc),1)]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 borders"},{default:i(()=>[...t[5]||(t[5]=[l("div",{class:"font-weight-bold font-table-size-print"},"Número de Cuenta Estatal",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right border-top border-bottom font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.numCuentaEstatal?s.applicantData.numCuentaEstatal:" "),1)]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 border-left border-right font-table-size-print"},{default:i(()=>[...t[6]||(t[6]=[l("div",{class:"font-weight-bold"},"Nombre(s)",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.nombre),1)]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 borders"},{default:i(()=>[...t[7]||(t[7]=[l("div",{class:"font-weight-bold font-table-size-print"},"Primer Apellido",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right border-top border-bottom font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.primerApellido),1)]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 border-left border-right border-bottom font-table-size-print"},{default:i(()=>[...t[8]||(t[8]=[l("div",{class:"font-weight-bold"},"Segundo Apellido",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right border-bottom font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.segundoApellido),1)]),_:1})]),_:1})):(y(),T(k,{key:1,align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[9]||(t[9]=[l("div",{class:"font-weight-bold font-table-size-print"},"Datos de Identificación del contribuyente",-1)])]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 border-left border-right"},{default:i(()=>[...t[10]||(t[10]=[l("div",{class:"font-weight-bold font-table-size-print"},"RFC",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.rfc),1)]),_:1}),n(b,{cols:"4",align:"start","align-self":"end",class:"py-1 borders"},{default:i(()=>[...t[11]||(t[11]=[l("div",{class:"font-weight-bold font-table-size-print"},"Denominación/Razón Social",-1)])]),_:1}),n(b,{cols:"8",align:"start","align-self":"end",class:"py-1 border-right border-top border-bottom font-table-size-print"},{default:i(()=>[l("div",null,f(s.applicantData.razonSocial),1)]),_:1})]),_:1})),n(k,{align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[12]||(t[12]=[l("div",{class:"font-weight-bold font-table-size-print"},"Respuesta de solicitud:",-1)])]),_:1}),s.acknowledgmentResponseType==="accepted"?(y(),T(b,{key:0,cols:"12",align:"start","align-self":"end",class:"py-1 border-left border-right border-bottom"},{default:i(()=>[l("div",N1,[t[13]||(t[13]=D(" Estimado contribuyente: La Dirección General de Servicios al Contribuyente perteneciente a la Subsecretaria de Administración Tributaria, le informa que su solicitud de ",-1)),l("b",null,f(s.title),1),t[14]||(t[14]=D(" con folio ",-1)),l("b",null,f(s.extraData.folio),1),t[15]||(t[15]=D(" ha sido ",-1)),t[16
375]||(t[16]=l("b",null," aprobada ",-1)),t[17]||(t[17]=D(". ",-1))]),t[18]||(t[18]=l("div",{class:"font-table-size-print mt-2 text-justify"}," Es responsabilidad de todos contribuir a la prevención del abuso en el consumo de bebidas alcohólicas, protegiendo la salud pública a través del cumplimiento de las regulaciones sobre su venta y consumo en establecimientos comerciales y le reiteramos nuestro compromiso en brindarle cada vez un mejor servicio. ",-1))]),_:1})):(y(),T(b,{key:1,cols:"12",align:"start","align-self":"end",class:"py-1 border-left border-right border-bottom"},{default:i(()=>[l("div",O1,[t[19]||(t[19]=D(" Estimado contribuyente: En atención a su solicitud de ",-1)),l("b",null,f(s.title),1),t[20]||(t[20]=D(", con folio ",-1)),l("b",null,f(s.extraData.folio),1),t[21]||(t[21]=D(" y dado que a la fecha no se tuvo respuesta al requerimiento efectuado anteriormente, de conformidad con la legislación aplicable, se tiene por ",-1)),t[22]||(t[22]=l("b",{class:"text-decoration-underline"}," no presentada ",-1)),t[23]||(t[23]=D(" su solicitud. ",-1))]),t[24]||(t[24]=l("div",{class:"font-table-size-print mt-2 text-justify"},[D(" No obstante, lo anterior y sin menoscabo alguno "),l("b",{class:"text-decoration-underline"}," podrá presentar en cualquier momento de nueva cuenta su trámite.")],-1))]),_:1}))]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-3 pdf-item"},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[25]||(t[25]=[l("div",{class:"font-table-size-print text-justify"}," La SecretarÃa de Finanzas y TesorerÃa General del Estado de Nuevo León tratará los datos personales señalados con fundamento en lo dispuesto en los artÃculos 3°, fracción XXXIII, 4°, 16, 17 y 18 de la Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados, 23, 91 y 95, de la Ley de Transparencia y Acceso a la Información Pública del Estado de Nuevo León, 1, 3, 4, 6, 7 y demás relativos al Reglamento Interior de la SecretarÃa de Finanzas y TesorerÃa General del Estado. ",-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[26]||(t[26]=[l("div",{class:"font-table-size-print text-justify"},[D(" Para ejercer sus derechos de acceso, rectificación, cancelación u oposición de sus datos personales, ingrese al portal "),l("a",{href:"https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado",target:"_blank"},[l("span",{class:"font-table-size-print mr-2"}," https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado ")])],-1)])]),_:1}),n(b,{cols:"12",class:"pt-1"},{default:i(()=>[...t[27]||(t[27]=[l("div",{class:"font-table-size-print text-justify"}," En caso de requerir asistencia puede acudir a la Dirección General de Servicios al Contribuyente, ubicada en el Pabellón Ciudadano, calle Washington número 2000 oriente, Col. Obrera, Monterrey, Nuevo León, C.P. 64010, o comunicarse a través de nuestros medios de contacto: Centro de Atención Ciudadana en el 070 y correo electrónico: [email protected] ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["filename","html-to-pdf-options"])]),_:1})}const z1=Object.assign(_e(E1,[["render",M1],["__scopeId","data-v-013d2cd7"]]),{__name:"Response"}),L1={name:"RecResponse",components:{Html2Pdf:ot},props:{numEstatal:{type:String,default:""},documentData:{type:Object,default:()=>{}},contributorData:{type:Object,default:()=>{}},registeredAddress:{type:Object,default:()=>{}},nuevoLeonAddress:{type:Object,default:()=>{}},contactData:{type:Object,default:()=>{}},economicActivity:{type:Object,default:()=>{}},fiscalObligations:{type:Object,default:()=>{}},legalRepresentative:{type:Object,default:()=>{}},extraData:{type:Object,default:()=>{}},title:{type:String,default:""},personType:{type:String,default:"fisica"},acknowledgmentResponseType:{type:String,default:"accepted"}},setup(){return{logoTesoreriaNlPng:xs,logoEscudoNlPng:Ns}},data(){return{htmlToPdfOptions:{margin:[5,0,25,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}},pdf:{}}},computed:{},methods:{formatDate(e){if(e!=null)if(Wt(e)){const t=e.split("-");return`${t[2]}/${t[1]}/${t[0]}`}else{const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy"):(e=new Date(e),ge(new Date(e),"dd/MM/yyyy"))}},getMonthAndYear(e){if(Wt(e)){const t=e.split("-");return`${t[1]}/${t[0]}`}else{const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"MM/yyyy"):(e=new Date(e),ge(new Date(e),"MM/yyyy"))}},generatePDF(){this.$refs.html2Pdf.generatePdf()},async beforeDownload({html2pdf:e,options:t,pdfContent:s}){const c=this;try{await e().set(t).from(s).toPdf().get("pdf").then(async o=>{const r=o.internal.getNumberOfPages();for(let a=1;a<=r;a++)o.setPage(a),o.setFontSize(10),o.setTextColor(150),o.text(c.$t("page")+" "+a+" "+this.$t("of")+" "+r,o.internal.pageSize.getWidth()*.8,o.internal.pageSize.getHeight()-12);o=o.output("blob"),c.pdf=o;const d=await this.saveDocInStorageAck(c.pdf,c.documentData);c.$emit("pdfGenerated",d)})}catch(o){console.error(o),oe(o)}},async saveDocInStorageAck(e,t){const s=t.module,c=t.submodule,o=t.slugRequest,r=t.id_reference;let d="";try{const a=`finalDocuments/${s}/${c}/${o}/${r}/${r}__${this.acknowledgmentResponseType}RECResponseAcknowledgment.pdf`;d=await gt(a,e),le().close()}catch(a){le().close(),console.error(a),oe(a)}return d},setTextItem(e){return e?e.filter(t=>t&&t.name).map(t=>`<li style="font-weight: 500">${t.name}</li>`).join(""):""}}},q1=["src"],B1=["src"],j1={class:"d-inline font-table-title"},V1={class:"d-inline font-weight-bold font-table-title"},U1={class:"d-inline font-table-size"},H1={class:"custom-table"},W1={class:"custom-td custom-td-75"},G1={class:"custom-td custom-td-75"},Q1={class:"custom-td custom-td-75"},Z1={class:"custom-td custom-td-75"},Y1={class:"custom-td custom-td-75"},K1={class:"custom-td custom-td-75"},X1={class:"custom-table"},J1={class:"custom-td custom-td-75"},em={class:"custom-td custom-td-75"},tm={class:"custom-td custom-td-75"},sm={class:"custom-td custom-td-75"},im={class:"custom-table"},am={class:"custom-td custom-td-50"},nm={class:"custom-td custom-td-50"},om={class:"custom-td custom-td-50"},rm={class:"custom-td custom-td-50"},lm={class:"custom-td custom-td-50"},dm={class:"custom-td custom-td-50"},cm={class:"custom-td custom-td-50"},um={class:"custom-td custom-td-50"},mm={class:"custom-td custom-td-50"},fm={class:"custom-td custom-td-50"},pm={key:0},hm={class:"custom-td custom-td-50"},gm={class:"custom-td custom-td-50"},ym={key:1},bm={class:"custom-td",colspan:"2"},vm=["src"],wm=["src"],_m={class:"custom-table"},Am={class:"custom-td custom-td-50"},Dm={class:"custom-td custom-td-50"},km={class:"custom-td custom-td-50"},Im={class:"custom-td custom-td-50"},Cm={class:"custom-td custom-td-50"},Sm={class:"custom-td custom-td-50"},Pm={class:"custom-td custom-td-50"},Em={class:"custom-td custom-td-50"},Tm={class:"custom-td custom-td-50"},Fm={class:"custom-td custom-td-50"},Rm={class:"custom-td custom-td-50"},$m={class:"custom-td custom-td-50"},xm={class:"custom-td",colspan:"2"},Nm={class:"custom-table"},Om={class:"custom-td custom-td-75"},Mm={class:"custom-td custom-td-75"},zm={class:"custom-td custom-td-75"},Lm={class:"custom-table"},qm=["innerHTML"],Bm={class:"custom-td custom-td-25",style:{"text-align":"center"}},jm={class:"font-table-size"},Vm={class:"font-table-size"},Um={class:"font-table-size"},Hm={class:"custom-table"},Wm={class:"custom-td custom-td-25"},Gm={class:"custom-td custom-td-25"},Qm={class:"custom-td custom-td-25"},Zm={class:"custom-td custom-td-25"},Ym={key:5,class:"html2pdf__page-break"},Km=["src"],Xm=["src"],Jm=["src"],ef=["src"],tf={class:"d-inline font-table-title"},sf={class:"d-inline font-weight-bold font-table-title"},af={class:"d-inline font-table-size"},nf={class:"custom-table"},of={class:"custom-td custom-td-75"},rf={class:"custom-td custom-td-75"},lf={class:"custom-td custom-td-75"},df={class:"custom-td custom-td-75"},cf={class:"custom-td custom-td-75"},uf={class:"custom-table"},mf={class:"custom-td custom-td-75"},ff={class:"custom-td custom-td-75"},pf={class:"custom-td custom-td-75"},hf={class:"custom-td custom-td-75"}
375,gf={class:"font-table-size text-justify"};function yf(e,t,s,c,o,r){const d=ot,a=zt;return y(),T(a,null,{default:i(()=>[n(d,{ref:"html2Pdf","pdf-format":"a4",filename:s.extraData.folio,"pdf-quality":1.5,"show-layout":!1,"float-layout":!0,"preview-modal":!1,"enable-download":!1,"manual-pagination":!0,"pdf-content-width":"800px","pdf-orientation":"portrait","paginate-elements-by-height":2500,"html-to-pdf-options":o.htmlToPdfOptions,onBeforeDownload:t[0]||(t[0]=m=>r.beforeDownload(m))},{"pdf-content":i(()=>[n(Mt,null,{default:i(()=>[s.acknowledgmentResponseType==="accepted"?(y(),T(be,{key:0,elevation:"6",class:"rounded-lg pa-10"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8 align-left-img"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,q1)]),_:1}),n(b,{cols:"5",align:"end",justify:"center",class:"align-right-img"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,B1)]),_:1}),n(ye)]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-0 mb-2 py-0"},{default:i(()=>[n(b,{cols:"12",md:"3",align:"start","align-self":"end",class:"mb-7"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"8",class:"borders py-1 row-color font-table-size"},{default:i(()=>[...t[1]||(t[1]=[l("div",{class:"font-weight-bold"},"Cuenta Estatal",-1)])]),_:1}),n(b,{cols:"4",class:"d-flex justify-center border-top border-right border-bottom py-1 font-table-size"},{default:i(()=>[l("div",null,f(s.numEstatal),1)]),_:1})]),_:1})]),_:1}),n(b,{cols:"12",md:"6",align:"center",justify:"center"},{default:i(()=>[t[5]||(t[5]=l("h4",{class:"text-center font-weight-bold font-table-title"},"ACUSE DE RESPUESTA",-1)),n(Nt,{color:"#B3B3B3",class:"my-4 borders",width:"95%"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pb-0"},{default:i(()=>[t[2]||(t[2]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Tipo de movimiento: ",-1)),l("span",j1,f(s.title),1)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[...t[3]||(t[3]=[l("span",{class:"font-table-title"}," Lugar y fecha de emisión ",-1)])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[t[4]||(t[4]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Monterrey, Nuevo León a ",-1)),l("span",V1,f(r.formatDate(s.extraData.updatedAt)),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"12",md:"3",align:"end","align-self":"end",class:"pb-0 mb-7"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[t[6]||(t[6]=l("div",{class:"d-inline font-weight-bold font-table-size"},"Folio:",-1)),l("div",U1,f(s.extraData.folio),1)]),_:1})]),_:1})]),_:1})]),_:1}),s.personType==="fisica"?(y(),T(k,{key:0,align:"center","justify-space-between":"",class:"mx-5 mb-5 pt-0"},{default:i(()=>[l("table",H1,[t[13]||(t[13]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[7]||(t[7]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",W1,f(s.contributorData.rfc),1)]),l("tr",null,[t[8]||(t[8]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"CURP:",-1)),l("td",G1,f(s.contributorData.curp),1)]),l("tr",null,[t[9]||(t[9]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre(s):",-1)),l("td",Q1,f(s.contributorData.nombre),1)]),l("tr",null,[t[10]||(t[10]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Primer Apellido:",-1)),l("td",Z1,f(s.contributorData.primerApellido),1)]),l("tr",null,[t[11]||(t[11]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Segundo Apellido:",-1)),l("td",Y1,f(s.contributorData.segundoApellido),1)]),l("tr",null,[t[12]||(t[12]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre comercial:",-1)),l("td",K1,f(s.contributorData.nombreComercial?s.contributorData.nombreComercial:" "),1)])])])]),_:1})):(y(),T(k,{key:1,align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[l("table",X1,[t[18]||(t[18]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[14]||(t[14]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",J1,f(s.contributorData.rfc),1)]),l("tr",null,[t[15]||(t[15]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Denominación/Razón Social:",-1)),l("td",em,f(s.contributorData.denominacionSoc),1)]),l("tr",null,[t[16]||(t[16]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Régimen capital:",-1)),l("td",tm,f(s.contributorData.regimenCapital&&s.contributorData.regimenCapital.name?s.contributorData.regimenCapital.name:s.contributorData.regimenCapital),1)]),l("tr",null,[t[17]||(t[17]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre Comercial:",-1)),l("td",sm,f(s.contributorData.nombreComercial),1)])])])]),_:1})),n(k,{align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",im,[t[32]||(t[32]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos del domicilio registrado")])],-1)),l("tbody",null,[l("tr",null,[l("td",am,[t[19]||(t[19]=l("b",null,"Tipo de Vialidad:",-1)),D(" "+f(s.registeredAddress.tipoVialidad&&s.registeredAddress.tipoVialidad.name?s.registeredAddress.tipoVialidad.name:s.registeredAddress.tipoVialidad),1)]),l("td",nm,[t[20]||(t[20]=l("b",null,"Nombre de Vialidad:",-1)),D(" "+f(s.registeredAddress.nombreVialidad),1)])]),l("tr",null,[l("td",om,[t[21]||(t[21]=l("b",null,"Número Exterior:",-1)),D(" "+f(s.registeredAddress.numExt),1)]),l("td",rm,[t[22]||(t[22]=l("b",null,"Número Interior:",-1)),D(" "+f(s.registeredAddress.numInterior),1)])]),l("tr",null,[l("td",lm,[t[23]||(t[23]=l("b",null,"Entre Calle 1:",-1)),D(" "+f(s.registeredAddress.entreCalle),1)]),l("td",dm,[t[24]||(t[24]=l("b",null," Y Calle 2:",-1)),D(" "+f(s.registeredAddress.yCalle),1)])]),l("tr",null,[l("td",cm,[t[25]||(t[25]=l("b",null,"Colonia:",-1)),D(" "+f(s.registeredAddress.colonia),1)]),l("td",um,[t[26]||(t[26]=l("b",null,"Código Postal:",-1)),D(" "+f(s.registeredAddress.cp),1)])]),l("tr",null,[l("td",mm,[t[27]||(t[27]=l("b",null,"Municipio:",-1)),D(" "+f(s.registeredAddress.municipio&&s.registeredAddress.municipio.name?s.registeredAddress.municipio.name:s.registeredAddress.municipio),1)]),l("td",fm,[t[28]||(t[28]=l("b",null," Entidad:",-1)),D(" "+f(s.registeredAddress.entidad),1)])]),s.registeredAddress?.inNL?(y(),j("tr",pm,[l("td",hm,[t[29]||(t[29]=l("b",null,"Tipo de inmueble:",-1)),D(" "+f(s.registeredAddress.tipoInmueble&&s.registeredAddress.tipoInmueble.name?s.registeredAddress.tipoInmueble.name:s.registeredAddress.tipoInmueble),1)]),l("td",gm,[t[30]||(t[30]=l("b",null," Numero del medidor de Agua y Drenaje de Monterrey:",-1)),D(" "+f(s.registeredAddress.medidorAgua),1)])])):M("",!0),s.registeredAddress?.inNL?(y(),j("tr",ym,[l
375("td",bm,[t[31]||(t[31]=l("b",null,"Referencias adicionales:",-1)),D(" "+f(s.registeredAddress.referencias),1)])])):M("",!0)])])]),_:1}),t[64]||(t[64]=l("div",{class:"html2pdf__page-break"},null,-1)),n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0 pdf-item"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8 align-left-img"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,vm)]),_:1}),n(b,{cols:"5",align:"end",justify:"center",class:"align-right-img"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,wm)]),_:1}),n(ye)]),_:1}),s.registeredAddress?.inNL?M("",!0):(y(),T(k,{key:2,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",_m,[t[46]||(t[46]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Domicilio en Nuevo León")])],-1)),l("tbody",null,[l("tr",null,[l("td",Am,[t[33]||(t[33]=l("b",null,"Tipo de Vialidad:",-1)),D(" "+f(s.nuevoLeonAddress.tipoVialidad&&s.nuevoLeonAddress.tipoVialidad.name?s.nuevoLeonAddress.tipoVialidad.name:s.nuevoLeonAddress.tipoVialidad),1)]),l("td",Dm,[t[34]||(t[34]=l("b",null,"Nombre de Vialidad:",-1)),D(" "+f(s.nuevoLeonAddress.nombreVialidad),1)])]),l("tr",null,[l("td",km,[t[35]||(t[35]=l("b",null,"Número Exterior:",-1)),D(" "+f(s.nuevoLeonAddress.numExt),1)]),l("td",Im,[t[36]||(t[36]=l("b",null,"Número Interior:",-1)),D(" "+f(s.nuevoLeonAddress.numInterior),1)])]),l("tr",null,[l("td",Cm,[t[37]||(t[37]=l("b",null,"Entre Calle 1:",-1)),D(" "+f(s.nuevoLeonAddress.entreCalle),1)]),l("td",Sm,[t[38]||(t[38]=l("b",null," Y Calle 2:",-1)),D(" "+f(s.nuevoLeonAddress.yCalle),1)])]),l("tr",null,[l("td",Pm,[t[39]||(t[39]=l("b",null,"Colonia:",-1)),D(" "+f(s.nuevoLeonAddress.colonia),1)]),l("td",Em,[t[40]||(t[40]=l("b",null,"Código Postal:",-1)),D(" "+f(s.nuevoLeonAddress.cp),1)])]),l("tr",null,[l("td",Tm,[t[41]||(t[41]=l("b",null,"Municipio:",-1)),D(" "+f(s.nuevoLeonAddress.municipio&&s.nuevoLeonAddress.municipio.name?s.nuevoLeonAddress.municipio.name:s.nuevoLeonAddress.municipio),1)]),l("td",Fm,[t[42]||(t[42]=l("b",null," Entidad:",-1)),D(" "+f(s.nuevoLeonAddress.entidad),1)])]),l("tr",null,[l("td",Rm,[t[43]||(t[43]=l("b",null,"Tipo de inmueble:",-1)),D(" "+f(s.nuevoLeonAddress.tipoInmueble&&s.nuevoLeonAddress.tipoInmueble.name?s.nuevoLeonAddress.tipoInmueble.name:s.nuevoLeonAddress.tipoInmueble),1)]),l("td",$m,[t[44]||(t[44]=l("b",null," Numero del medidor de Agua y Drenaje de Monterrey:",-1)),D(" "+f(s.nuevoLeonAddress.medidorAgua),1)])]),l("tr",null,[l("td",xm,[t[45]||(t[45]=l("b",null,"Referencias adicionales:",-1)),D(" "+f(s.nuevoLeonAddress.referencias),1)])])])])]),_:1})),n(k,{align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Nm,[t[50]||(t[50]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de contacto")])],-1)),l("tbody",null,[l("tr",null,[t[47]||(t[47]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Teléfono fijo:",-1)),l("td",Om,f(s.contactData.numeroTel),1)]),l("tr",null,[t[48]||(t[48]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Teléfono móvil:",-1)),l("td",Mm,f(s.contactData.numeroCel),1)]),l("tr",null,[t[49]||(t[49]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Correo electrónico:",-1)),l("td",zm,f(s.contactData.email),1)])])])]),_:1}),s.fiscalObligations.withObligations||s.personType==="moral"?(y(),T(k,{key:3,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Lm,[t[51]||(t[51]=l("thead",null,[l("tr",null,[l("th",{class:"custom-th"},"Actividad económica"),l("th",{class:"custom-th"},"Fecha de inicio de actividad")])],-1)),l("tbody",null,[l("tr",null,[l("td",{class:"custom-td custom-td-75 font-weight-bold",innerHTML:r.setTextItem(s.fiscalObligations.activity)},null,8,qm),l("td",Bm,f(r.formatDate(s.fiscalObligations.startDate)),1)])])])]),_:1})):M("",!0),n(k,{align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[52]||(t[52]=[l("div",{class:"font-weight-bold font-table-size"},"Obligaciones fiscales estatales",-1)])]),_:1}),n(b,{cols:"9",align:"start","align-self":"end",class:"py-1 border-left border-right row-color"},{default:i(()=>[...t[53]||(t[53]=[l("div",{class:"font-weight-bold font-table-size"},"Descripción de la obligación",-1)])]),_:1}),n(b,{cols:"3",class:"py-1 border-right row-color"},{default:i(()=>[...t[54]||(t[54]=[l("div",{class:"font-weight-bold d-flex justify-center font-table-size"},"Fecha de inscripción",-1)])]),_:1}),s.fiscalObligations.withObligations||s.personType==="moral"?(y(!0),j(pe,{key:0},Ee(s.fiscalObligations.obligations,(m,v)=>(y(),j(pe,{key:v},[n(b,{cols:"9",align:"start","align-self":"end",class:"py-2 borders"},{default:i(()=>[l("div",jm,f(m.name||m),1)]),_:2},1024),n(b,{cols:"3",class:"py-2 d-flex justify-center border-bottom border-top border-right"},{default:i(()=>[l("div",Vm,f(r.getMonthAndYear(s.fiscalObligations.startDate)),1)]),_:1})],64))),128)):(y(),j(pe,{key:1},[n(b,{cols:"9",align:"start","align-self":"end",class:"py-2 borders"},{default:i(()=>[...t[55]||(t[55]=[l("div",{class:"font-table-size"},"Sin obligaciones fiscales",-1)])]),_:1}),n(b,{cols:"3",class:"py-2 d-flex justify-center border-bottom border-top border-right"},{default:i(()=>[l("div",Um,f(r.getMonthAndYear(s.extraData.updatedAt)),1)]),_:1})],64))]),_:1}),s.personType==="moral"?(y(),T(k,{key:4,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Hm,[t[60]||(t[60]=l("thead",null,[l("tr",null,[l("th",{colspan:"4",class:"custom-th"},"Datos del Representante Legal")])],-1)),l("tbody",null,[l("tr",null,[t[56]||(t[56]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",Wm,f(s.legalRepresentative.rfc),1),t[57]||(t[57]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"NOMBRE(S):",-1)),l("td",Gm,f(s.legalRepresentative.nombre),1)]),l("tr",null,[t[58]||(t[58]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"PRIMER APELLIDO:",-1)),l("td",Qm,f(s.legalRepresentative.primerApellido),1),t[59]||(t[59]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"SEGUNDO APELLIDO:",-1)),l("td",Zm,f(s.legalRepresentative.segundoApellido),1)])])])]),_:1})):M("",!0),s.personType==="moral"&&!s.registeredAddress?.inNL||s.personType==="fisica"&&!s.registeredAddress?.inNL&&s.fiscalObligations.withObligations?(y(),j("div",Ym)):M("",!0),s.personType==="moral"&&!s.registeredAddress?.inNL||s.personType==="fisica"&&!s.registeredAddress?.inNL&&s.fiscalObligations.withObligations?(y(),T(k,{key:6,align:"center","justify-space-between":"",class:"no-gutters py-0 pdf-item"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8 align-left-img"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,Km)]),_:1}),n(b,{cols:"5",align:"end",justify:"center",class:"align-right-img"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,Xm)]),_:1}),n(ye)]),_:1})):M("",!0),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>
375[...t[61]||(t[61]=[l("div",{class:"font-table-size text-justify"}," La SecretarÃa de Finanzas y TesorerÃa General del Estado de Nuevo León tratará los datos personales señalados con fundamento en lo dispuesto en los artÃculos 3°, fracción XXXIII, 4°, 16, 17 y 18 de la Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados, 23, 91 y 95, de la Ley de Transparencia y Acceso a la Información Pública del Estado de Nuevo León, 1, 3, 4, 6, 7 y demás relativos al Reglamento Interior de la SecretarÃa de Finanzas y TesorerÃa General del Estado. ",-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[62]||(t[62]=[l("div",{class:"font-table-size text-justify"},[D(" Para ejercer sus derechos de acceso, rectificación, cancelación u oposición de sus datos personales, ingrese al portal "),l("a",{href:"https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado",target:"_blank"},[l("span",{class:"font-table-size mr-2"}," https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado ")])],-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[63]||(t[63]=[l("div",{class:"font-table-size text-justify"}," En caso de requerir asistencia puede acudir a la Dirección General de Servicios al Contribuyente, ubicada en el Pabellón Ciudadano, calle Washington número 2000 oriente, Col. Obrera, Monterrey, Nuevo León, C.P. 64010, o comunicarse a través de nuestros medios de contacto: Centro de Atención Ciudadana en el 070 y correo electrónico: [email protected] ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):(y(),T(be,{key:1,elevation:"6",class:"rounded-lg pa-10"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0"},{default:i(()=>[n(ye),n(b,{cols:"12",md:"5",align:e.$vuetify.display.smAndDown?"center":"start",justify:"center",class:Be(e.$vuetify.display.smAndDown?"mt-8":"mt-8 align-left-img")},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,Jm)]),_:1},8,["align","class"]),n(b,{class:Be(e.$vuetify.display.smAndDown?"order-first":"align-right-img"),cols:"12",md:"5",align:e.$vuetify.display.smAndDown?"center":"end",justify:"center"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,ef)]),_:1},8,["class","align"]),n(ye)]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-0 mb-2 py-0"},{default:i(()=>[n(ye),n(b,{cols:"12",md:"6",align:"center",justify:"center"},{default:i(()=>[t[68]||(t[68]=l("h4",{class:"text-center font-weight-bold font-table-title"},"ACUSE DE RESPUESTA",-1)),n(Nt,{color:"#B3B3B3",class:"my-4 borders",width:"95%"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pb-0"},{default:i(()=>[t[65]||(t[65]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Tipo de movimiento: ",-1)),l("span",tf,f(s.title),1)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[...t[66]||(t[66]=[l("span",{class:"font-table-title"}," Lugar y fecha de emisión ",-1)])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[t[67]||(t[67]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Monterrey, Nuevo León a ",-1)),l("span",sf,f(r.formatDate(s.extraData.updatedAt)),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(b,{cols:"12",md:"3",align:"end","align-self":"end",class:"pb-0 mb-7"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[t[69]||(t[69]=l("div",{class:"d-inline font-weight-bold font-table-size"},"Folio:",-1)),l("div",af,f(s.extraData.folio),1)]),_:1})]),_:1})]),_:1})]),_:1}),s.personType==="fisica"?(y(),T(k,{key:0,align:"center","justify-space-between":"",class:"mx-5 mb-5 pt-0"},{default:i(()=>[l("table",nf,[t[75]||(t[75]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[70]||(t[70]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",of,f(s.contributorData.rfc),1)]),l("tr",null,[t[71]||(t[71]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"CURP:",-1)),l("td",rf,f(s.contributorData.curp),1)]),l("tr",null,[t[72]||(t[72]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre(s):",-1)),l("td",lf,f(s.contributorData.nombre),1)]),l("tr",null,[t[73]||(t[73]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Primer Apellido:",-1)),l("td",df,f(s.contributorData.primerApellido),1)]),l("tr",null,[t[74]||(t[74]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Segundo Apellido:",-1)),l("td",cf,f(s.contributorData.segundoApellido),1)])])])]),_:1})):(y(),T(k,{key:1,align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[l("table",uf,[t[80]||(t[80]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[76]||
375(t[76]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",mf,f(s.contributorData.rfc),1)]),l("tr",null,[t[77]||(t[77]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Denominación/Razón Social:",-1)),l("td",ff,f(s.contributorData.denominacionSoc),1)]),l("tr",null,[t[78]||(t[78]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Régimen capital:",-1)),l("td",pf,f(s.contributorData.regimenCapital&&s.contributorData.regimenCapital.name?s.contributorData.regimenCapital.name:s.contributorData.regimenCapital),1)]),l("tr",null,[t[79]||(t[79]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre Comercial:",-1)),l("td",hf,f(s.contributorData.nombreComercial),1)])])])]),_:1})),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[81]||(t[81]=[l("div",{class:"font-weight-bold font-table-size text-justify"},"Respuesta de solicitud:",-1)])]),_:1}),n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 border-left border-right border-bottom"},{default:i(()=>[l("div",gf,[t[82]||(t[82]=D(" Estimado contribuyente: En atención a su solicitud de ",-1)),l("b",null,f(s.title)+", ",1),t[83]||(t[83]=D(" con folio ",-1)),l("b",null,f(s.extraData.folio),1),t[84]||(t[84]=D(" y dado que a la fecha no se tuvo respuesta a la prevención efectuada anteriormente, de conformidad con la legislación aplicable, se tiene por ",-1)),t[85]||(t[85]=l("b",{class:"text-decoration-underline"}," rechazada ",-1)),t[86]||(t[86]=D(" su solicitud. ",-1))]),t[87]||(t[87]=l("div",{class:"font-table-size mt-2 text-justify"},[D(" No obstante, lo anterior y sin menoscabo alguno "),l("b",{class:"text-decoration-underline"}," podrá presentar en cualquier momento de nueva cuenta su trámite.")],-1))]),_:1})]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[88]||(t[88]=[l("div",{class:"font-table-size text-justify"}," La SecretarÃa de Finanzas y TesorerÃa General del Estado de Nuevo León tratará los datos personales señalados con fundamento en lo dispuesto en los artÃculos 3°, fracción XXXIII, 4°, 16, 17 y 18 de la Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados, 23, 91 y 95, de la Ley de Transparencia y Acceso a la Información Pública del Estado de Nuevo León, 1, 3, 4, 6, 7 y demás relativos al Reglamento Interior de la SecretarÃa de Finanzas y TesorerÃa General del Estado. ",-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[89]||(t[89]=[l("div",{class:"font-table-size text-justify"},[D(" Para ejercer sus derechos de acceso, rectificación, cancelación u oposición de sus datos personales, ingrese al portal "),l("a",{href:"https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado",target:"_blank"},[l("span",{class:"font-table-size mr-2"}," https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado ")])],-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[90]||(t[90]=[l("div",{class:"font-table-size text-justify"}," En caso de requerir asistencia puede acudir a la Dirección General de Servicios al Contribuyente, ubicada en el Pabellón Ciudadano, calle Washington número 2000 oriente, Col. Obrera, Monterrey, Nuevo León, C.P. 64010, o comunicarse a través de nuestros medios de contacto: Centro de Atención Ciudadana en el 070 y correo electrónico: [email protected] ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1},8,["filename","html-to-pdf-options"])]),_:1})}const bf=Object.assign(_e(L1,[["render",yf],["__scopeId","data-v-b6c334a5"]]),{__name:"RecResponse"}),vf={name:"NoticesRecResponse",components:{Html2Pdf:ot},props:{documentData:{type:Object,default:()=>{}},contributorData:{type:Object,default:()=>{}},registeredAddress:{type:Object,default:()=>{}},nuevoLeonAddress:{type:Object,default:()=>{}},contactData:{type:Object,default:()=>{}},economicActivity:{type:Object,default:()=>{}},fiscalObligations:{type:Object,default:()=>{}},legalRepresentative:{type:Object,default:()=>{}},extraData:{type:Object,default:()=>{}},title:{type:String,default:""},personType:{type:String,default:"fisica"},acknowledgmentResponseType:{type:String,default:"accepted"}},setup(){return{logoTesoreriaNlPng:xs,logoEscudoNlPng:Ns}},data(){return{htmlToPdfOptions:{margin:[5,0,25,0],html2canvas:{backgroundColor:null,allowTaint:!0,canvas:null,useCORS:!0,scale:2}},pdf:{},spacePrint:!1}},computed:{numBloque(){const e=["Actualización de actividades económicas y obligaciones.","Aumento de obligaciones.","Disminución de obligaciones","Actualización de actividades económicas."],t=["Cambio de nombre.","Reanudación de actividades.","Suspensión de actividades.","Cancelación en el Registro Estatal de Contribuyentes.","Cambio de Denominación o Razón Social."],s=["Cambio de Domicilio Fiscal.","Apertura de Establecimiento o Sucursal.","Cierre de Establecimiento o Sucursal."],c=this.extraData.typeNotice;return e.includes(c)?(["Aumento de obligaciones.","Disminución de obligaciones"].includes(c)&&this.setSpacePrint(!0),1
375):t.includes(c)?2:s.includes(c)?3:0}},methods:{setSpacePrint(e){this.spacePrint=e},changeFormat(e){if(e){const t=Ws(e,"yyyy-MM-dd",new Date);return ge(t,"dd-MM-yyyy")}else return"---"},formatDate(e){if(e!=null)if(Wt(e)){const t=e.split("-"),s=`${t[2]}/${t[1]}/${t[0]}`;return ge(Ws(s,"dd/MM/yyyy",new Date),"d 'de' MMMM 'de' yyyy",{locale:ns})}else{const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"d 'de' MMMM 'de' yyyy",{locale:ns}):(e=new Date(e),ge(new Date(e),"d 'de' MMMM 'de' yyyy",{locale:ns}))}},getMonthAndYear(e){if(Wt(e)){const t=e.split("-");return`${t[1]}/${t[0]}`}else{const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"MM/yyyy"):(e=new Date(e),ge(new Date(e),"MM/yyyy"))}},generatePDF(){this.$refs.html2Pdf.generatePdf()},async beforeDownload({html2pdf:e,options:t,pdfContent:s}){const c=this;try{await e().set(t).from(s).toPdf().get("pdf").then(async o=>{const r=o.internal.getNumberOfPages();for(let a=1;a<=r;a++)o.setPage(a),o.setFontSize(10),o.setTextColor(150),o.text(c.$t("page")+" "+a+" "+this.$t("of")+" "+r,o.internal.pageSize.getWidth()*.8,o.internal.pageSize.getHeight()-12);o=o.output("blob"),c.pdf=o;const d=await this.saveDocInStorageAck(c.pdf,c.documentData);c.$emit("pdfGenerated",d)})}catch(o){console.error(o),oe(o)}},async saveDocInStorageAck(e,t){const s=t.module,c=t.submodule,o=t.slugRequest,r=t.id_reference;let d="";try{const a=`finalDocuments/${s}/${c}/${o}/${r}/${r}__${this.acknowledgmentResponseType}RECResponseAcknowledgment.pdf`;d=await gt(a,e),le().close()}catch(a){le().close(),console.error(a),oe(a)}return d},setTextItem(e){if(e){const t=Object.keys(e).filter(s=>s.startsWith("name")).sort((s,c)=>s.localeCompare(c)).map(s=>e[s]);return t[t.length-1]||""}else return""}}},wf=["src"],_f=["src"],Af={class:"d-inline font-table-title"},Df={class:"d-inline font-weight-bold font-table-title"},kf={class:"d-inline font-table-size"},If={class:"custom-table"},Cf={class:"custom-td custom-td-75"},Sf={class:"custom-td custom-td-75"},Pf={class:"custom-td custom-td-75"},Ef={class:"custom-td custom-td-75"},Tf={class:"custom-td custom-td-75"},Ff={class:"custom-table"},Rf={class:"custom-td custom-td-75"},$f={class:"custom-td custom-td-75"},xf={class:"custom-td custom-td-75"},Nf={class:"custom-td custom-td-75"},Of={class:"custom-table"},Mf={class:"custom-td custom-td-33"},zf={class:"custom-td custom-td-33"},Lf=["innerHTML"],qf={class:"custom-td custom-td-33"},Bf={class:"custom-table"},jf={class:"custom-td custom-td-50"},Vf={class:"custom-td custom-td-50"},Uf={class:"custom-table"},Hf={class:"custom-td custom-td-50"},Wf={class:"custom-td custom-td-50"},Gf={class:"custom-td custom-td-50"},Qf={class:"custom-td custom-td-50"},Zf={class:"custom-td custom-td-50"},Yf={class:"custom-td custom-td-50"},Kf={class:"custom-td custom-td-50"},Xf={class:"custom-td custom-td-50"},Jf={class:"custom-td custom-td-50"},ep={class:"custom-td custom-td-50"},tp={class:"custom-td custom-td-50"},sp={class:"custom-td custom-td-50"},ip={class:"custom-td",colspan:"2"},ap={class:"custom-table"},np={class:"custom-td custom-td-75"},op={class:"custom-td custom-td-75"},rp={class:"custom-td custom-td-75"},lp={key:5,class:"html2pdf__page-break"},dp=["src"],cp=["src"],up={class:"custom-table"},mp={class:"custom-td custom-td-25"},fp={class:"custom-td custom-td-25"},pp={class:"custom-td custom-td-25"},hp={class:"custom-td custom-td-25"},gp=["src"],yp=["src"],bp={class:"d-inline font-table-title"},vp={class:"d-inline font-weight-bold font-table-title"},wp={class:"d-inline font-table-size"},_p={class:"custom-table"},Ap={class:"custom-td custom-td-75"},Dp={class:"custom-td custom-td-75"},kp={class:"custom-td custom-td-75"},Ip={class:"custom-td custom-td-75"},Cp={class:"custom-td custom-td-75"},Sp={class:"custom-table"},Pp={class:"custom-td custom-td-75"},Ep={class:"custom-td custom-td-75"},Tp={class:"custom-td custom-td-75"},Fp={class:"custom-td custom-td-75"},Rp={class:"font-table-size text-justify"},$p={key:0};function xp(e,t,s,c,o,r){const d=ot,a=zt;return y(),T(a,null,{default:i(()=>[n(d,{ref:"html2Pdf","pdf-format":"a4",filename:s.extraData.folio,"pdf-quality":1.5,"show-layout":!1,"float-layout":!0,"preview-modal":!1,"enable-download":!1,"manual-pagination":!0,"pdf-content-width":"800px","pdf-orientation":"portrait","paginate-elements-by-height":2500,"html-to-
375pdf-options":o.htmlToPdfOptions,onBeforeDownload:t[0]||(t[0]=m=>r.beforeDownload(m))},{"pdf-content":i(()=>[n(Mt,null,{default:i(()=>[s.acknowledgmentResponseType==="accepted"?(y(),T(be,{key:0,elevation:"6",class:"rounded-lg pa-8"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8 align-left-img"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,wf)]),_:1}),n(b,{cols:"5",align:"end",justify:"center",class:"align-right-img"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,_f)]),_:1}),n(ye)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[n(b,{cols:"12",md:"8",align:"center",justify:"center"},{default:i(()=>[t[4]||(t[4]=l("h4",{class:"text-center font-weight-bold font-table-title"},"ACUSE DE RESPUESTA",-1)),n(Nt,{color:"#B3B3B3",class:"my-4 borders",width:"95%"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pb-0"},{default:i(()=>[t[1]||(t[1]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Tipo de movimiento: ",-1)),l("span",Af,f(s.title),1)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[...t[2]||(t[2]=[l("span",{class:"font-table-title"}," Lugar y fecha de emisión ",-1)])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[t[3]||(t[3]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Monterrey, Nuevo León a ",-1)),l("span",Df,f(r.formatDate(s.extraData.updatedAt)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-0 mb-2 py-0"},{default:i(()=>[n(b,{cols:"12",md:"4",align:"start","align-self":"end",class:"mb-4"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"8",class:"borders py-1 row-color font-table-size"},{default:i(()=>[...t[5]||(t[5]=[l("div",{class:"font-weight-bold"},"Cuenta Estatal",-1)])]),_:1}),n(b,{cols:"4",class:"d-flex justify-center border-top border-right border-bottom py-1 font-table-size"},{default:i(()=>[l("div",null,f(s.contributorData.numCuentaEstatal),1)]),_:1})]),_:1})]),_:1}),n(b,{cols:"12",md:"4",align:"center",justify:"center"}),n(b,{cols:"12",md:"4",align:"end","align-self":"end",class:"pb-0 mb-4"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[t[6]||(t[6]=l("div",{class:"d-inline font-weight-bold font-table-size"},"Folio:",-1)),l("div",kf,f(s.extraData.folio),1)]),_:1})]),_:1})]),_:1})]),_:1}),s.personType==="fisica"?(y(),T(k,{key:0,align:"center","justify-space-between":"",class:"mx-5 mb-5 pt-0"},{default:i(()=>[l("table",If,[t[12]||(t[12]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[7]||(t[7]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",Cf,f(s.contributorData.rfc),1)]),l("tr",null,[t[8]||(t[8]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"CURP:",-1)),l("td",Sf,f(s.contributorData.curp),1)]),l("tr",null,[t[9]||(t[9]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre(s):",-1)),l("td",Pf,f(s.contributorData.nombre),1)]),l("tr",null,[t[10]||(t[10]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Primer Apellido:",-1)),l("td",Ef,f(s.contributorData.primerApellido),1)]),l("tr",null,[t[11]||(t[11]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Segundo Apellido:",-1)),l("td",Tf,f(s.contributorData.segundoApellido),1)])])])]),_:1})):(y(),T(k,{key:1,align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[l("table",Ff,[t[17]||(t[17]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[13]||(t[13]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",Rf,f(s.contributorData.rfc),1)]),l("tr",null,[t[14]||(t[14]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Denominación/Razón Social:",-1)),l("td",$f,f(s.contributorData.denominacionSoc),1)]),l("tr",null,[t[15]||(t[15]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Régimen capital:",-1)),l("td",xf,f(s.contributorData.regimenCapital),1)]),l("tr",null,[t[16]||(t[16]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre Comercial:",-1)),l("td",Nf,f(s.contributorData.nombreComercial),1)])])])]),_:1})),r.numBloque===1?(y(),T(k,{key:2,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Of,[t[18]||(t[18]=l("thead",null,[l("tr",null,[l("th",{class:"custom-th custom-th-33"},"Tipo de aviso"),l("th",{class:"custom-th custom-th-33"},"Descripción de la obligación"),l("th",{class:"custom-th custom-th-33"},"Fecha en que surte efecto el aviso")])],-1)),l("tbody",null,[l("tr",null,[l("td",Mf,f(s.fiscalObligations.typeNotice),1),l("td",zf,[l("span",{innerHTML:s.fiscalObligations.obligation},null,8,Lf)]),l("td",qf,f(r.changeFormat(s.fiscalObligations.startDate)),1)])])])]),_:1})):M("",!0),r.numBloque===2||r.numBloque===3?(y(),T(k,{key:3,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Bf,[t[19]||(t[19]=l("thead",null,[l("tr",null,[l("th",{class:"custom-th custom-th-50"},"Tipo de aviso"),l("th",{class:"custom-th custom-th-50"},"Fecha en que surte efecto el aviso")])],-1)),l("tbody",null,[l("tr",null,[l("td",jf,f(s.fiscalObligations.typeNotice),1),l("td",Vf,f(r.changeFormat(s.fiscalObligations.startDate)),1)])])])]),_:1})):M("",!0),r.numBloque===3?(y(),T(k,{key:4,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",Uf,[t[33]||(t[33]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de la Ubicación")])],-1)),l("tbody",null,[l("tr",null,[l("td",Hf,[t[20]||(t[20]=l("b",null,"Tipo de Vialidad:",-1)),D(" "+f(s.registeredAddress.tipoVialidad&&s.registeredAddress.tipoVialidad.name?s.registeredAddress.tipoVialidad.name:s.registeredAddress.tipoVialidad),1)]),l("td",Wf,[t[21]||(t[21]=l("b",null,"Nombre de Vialidad:",-1)),D(" "+f(s.registeredAddress.nombreVialidad),1)])]),l("tr",null,[l("td",Gf,[t[22]||(t[22]=l("b",null,"Número Exterior:",-1)),D(" "+f(s.registeredAddress.numExt),1)]),l("td",Qf,[t[23]||(t[23]=l("b",null,"Número Interior:",-1)),D(" "+f(s.registeredAddress.numInterior),1)])]),l("tr",null,[l("td",Zf,[t[24]||(t[24]=l("b",null,"Entre Calle 1:",-1)),D(" "+f(s.registeredAddress.entreCalle),1)]),l("td",Yf,[t[25]||(t[25]=l("b",null," Y Calle 2:",-1)),D(" "+f(s.registeredAddress.yCalle),1)])]),l("tr",null,[l("td",Kf,[t[26]||(t[26]=l("b",null,"Colonia:",-1)),D(" "+f(s.registeredAddress.colonia),1)]),l("td",Xf,[t[27]||(t[27]=l("b",null,"Código Postal:",-1)),D(" "+f(s.registeredAddress.cp),1)])]),l("tr",null,[l("td",Jf,[t[28]||(t[28]=l("b",null,"Municipio:",-1)),D(" "+f(s.registeredAddress.municipio&&s.registeredAddress.municipio.name?s.registeredAddress.municipio.name:s.registeredAddress.municipio),1)]),l("td",ep,[t[29]||(t[29]=l("b",null," Entidad:",-1)),D(" "+f(s.registeredAddress.entidad),1)])]),l("tr",null,[l("td",tp,[t[30]||(t[30]=l("b",null,"Tipo de inmueble:",-1)),D(" "+f(s.registeredAddress.tipoInmueble&&s.registeredAddress.tipoInmueble.name?s.registeredAddress.tipoInmueble.name:s.registeredAddress.tipoInmueble),1)]),l("td",sp,[t[31]||(t[31]=l("b",null," Numero del medidor de Agua y Drenaje de Monterrey:",-1)),D(" "+f(s.registeredAddress.medidorAgua),1)])]),l("tr",null,[l("td",ip,[t[32]||(t[32]=l("b",null,"Referencias adicionales:",-1)),D(" "+f(s.registeredAddress.referencias),1)])])])])]),_:1})):M("",!0),n(k,{align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",ap,[t[37]||(t[37]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de contacto")])],-1)),l("tbody",null,[l("tr",null,[t[34]||(t[34]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Teléfono fijo:",-1)),l("td",np,f(s.contactData.numeroTel),1)]),l("tr",null,[t[35]||(t[35]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Teléfono móvil:",-1)),l("td",op,f(s.contactData.numeroCel),1)]),l("tr",null,[t[3
3756]||(t[36]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Correo electrónico:",-1)),l("td",rp,f(s.contactData.email),1)])])])]),_:1}),s.personType==="moral"&&(r.numBloque===3||o.spacePrint===!0)||s.personType==="fisica"&&r.numBloque===3?(y(),j("div",lp)):M("",!0),s.personType==="moral"&&(r.numBloque===3||o.spacePrint===!0)||s.personType==="fisica"&&r.numBloque===3?(y(),T(k,{key:6,align:"center","justify-space-between":"",class:"no-gutters py-0 pdf-item"},{default:i(()=>[n(ye),n(b,{cols:"5",align:"start",justify:"center",class:"mt-8 align-left-img"},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,dp)]),_:1}),n(b,{cols:"5",align:"end",justify:"center",class:"align-right-img"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,cp)]),_:1}),n(ye)]),_:1})):M("",!0),s.personType==="moral"?(y(),T(k,{key:7,align:"center","justify-space-between":"",class:"ma-5 mb-5 pdf-item"},{default:i(()=>[l("table",up,[t[42]||(t[42]=l("thead",null,[l("tr",null,[l("th",{colspan:"4",class:"custom-th"},"Datos del Representante Legal")])],-1)),l("tbody",null,[l("tr",null,[t[38]||(t[38]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",mp,f(s.legalRepresentative.rfc),1),t[39]||(t[39]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"NOMBRE(S):",-1)),l("td",fp,f(s.legalRepresentative.nombre),1)]),l("tr",null,[t[40]||(t[40]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"PRIMER APELLIDO:",-1)),l("td",pp,f(s.legalRepresentative.primerApellido),1),t[41]||(t[41]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"SEGUNDO APELLIDO:",-1)),l("td",hp,f(s.legalRepresentative.segundoApellido),1)])])])]),_:1})):M("",!0),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[43]||(t[43]=[l("div",{class:"font-table-size text-justify"}," La SecretarÃa de Finanzas y TesorerÃa General del Estado de Nuevo León tratará los datos personales señalados con fundamento en lo dispuesto en los artÃculos 3°, fracción XXXIII, 4°, 16, 17 y 18 de la Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados, 23, 91 y 95, de la Ley de Transparencia y Acceso a la Información Pública del Estado de Nuevo León, 1, 3, 4, 6, 7 y demás relativos al Reglamento Interior de la SecretarÃa de Finanzas y TesorerÃa General del Estado. ",-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[44]||(t[44]=[l("div",{class:"font-table-size text-justify"},[D(" Para ejercer sus derechos de acceso, rectificación, cancelación u oposición de sus datos personales, ingrese al portal "),l("a",{href:"https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado",target:"_blank"},[l("span",{class:"font-table-size mr-2"}," https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado ")])],-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>
375[...t[45]||(t[45]=[l("div",{class:"font-table-size text-justify"}," En caso de requerir asistencia puede acudir a la Dirección General de Servicios al Contribuyente, ubicada en el Pabellón Ciudadano, calle Washington número 2000 oriente, Col. Obrera, Monterrey, Nuevo León, C.P. 64010, o comunicarse a través de nuestros medios de contacto: Centro de Atención Ciudadana en el 070 y correo electrónico: [email protected] ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):(y(),T(be,{key:1,elevation:"6",class:"rounded-lg pa-10"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pa-0"},{default:i(()=>[n(k,{align:"center","justify-space-between":"",class:"no-gutters py-0"},{default:i(()=>[n(ye),n(b,{cols:"12",md:"5",align:e.$vuetify.display.smAndDown?"center":"start",justify:"center",class:Be(e.$vuetify.display.smAndDown?"mt-8":"mt-8 align-left-img")},{default:i(()=>[l("img",{src:c.logoTesoreriaNlPng,width:"230px"},null,8,gp)]),_:1},8,["align","class"]),n(b,{class:Be(e.$vuetify.display.smAndDown?"order-first":"align-right-img"),cols:"12",md:"5",align:e.$vuetify.display.smAndDown?"center":"end",justify:"center"},{default:i(()=>[l("img",{src:c.logoEscudoNlPng,width:"100px"},null,8,yp)]),_:1},8,["class","align"]),n(ye)]),_:1}),n(k,{class:"justify-center"},{default:i(()=>[n(b,{cols:"12",md:"8",align:"center",justify:"center"},{default:i(()=>[t[49]||(t[49]=l("h4",{class:"text-center font-weight-bold font-table-title"},"ACUSE DE RESPUESTA",-1)),n(Nt,{color:"#B3B3B3",class:"my-4 borders",width:"95%"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",class:"pb-0"},{default:i(()=>[t[46]||(t[46]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Tipo de movimiento: ",-1)),l("span",bp,f(s.title),1)]),_:1}),n(b,{cols:"12",class:"py-0"},{default:i(()=>[...t[47]||(t[47]=[l("span",{class:"font-table-title"}," Lugar y fecha de emisión ",-1)])]),_:1}),n(b,{cols:"12",class:"pt-0"},{default:i(()=>[t[48]||(t[48]=l("span",{class:"d-inline font-weight-bold font-table-title"}," Monterrey, Nuevo León a ",-1)),l("span",vp,f(r.formatDate(s.extraData.updatedAt)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-0 mb-2 py-0"},{default:i(()=>[n(b,{cols:"12",md:"4",align:"start","align-self":"end",class:"mb-4"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"8",class:"borders py-1 row-color font-table-size"},{default:i(()=>[...t[50]||(t[50]=[l("div",{class:"font-weight-bold"},"Cuenta Estatal",-1)])]),_:1}),n(b,{cols:"4",class:"d-flex justify-center border-top border-right border-bottom py-1 font-table-size"},{default:i(()=>[l("div",null,f(s.contributorData.numCuentaEstatal),1)]),_:1})]),_:1})]),_:1}),n(b,{cols:"12",md:"4",align:"center",justify:"center"}),n(b,{cols:"12",md:"4",align:"end","align-self":"end",class:"pb-0 mb-4"},{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[t[51]||(t[51]=l("div",{class:"d-inline font-weight-bold font-table-size"},"Folio:",-1)),l("div",wp,f(s.extraData.folio),1)]),_:1})]),_:1})]),_:1})]),_:1}),s.personType==="fisica"?(y(),T(k,{key:0,align:"center","justify-space-between":"",class:"mx-5 mb-5 pt-0"},{default:i(()=>[l("table",_p,[t[57]||(t[57]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[52]||(t[52]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",Ap,f(s.contributorData.rfc),1)]),l("tr",null,[t[53]||(t[53]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"CURP:",-1)),l("td",Dp,f(s.contributorData.curp),1)]),l("tr",null,[t[54]||(t[54]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre(s):",-1)),l("td",kp,f(s.contributorData.nombre),1)]),l("tr",null,[t[55]||(t[55]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Primer Apellido:",-1)),l("td",Ip,f(s.contributorData.primerApellido),1)]),l("tr",null,[t[56]||(t[56]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Segundo Apellido:",-1)),l("td",Cp,f(s.contributorData.segundoApellido),1)])])])]),_:1})):(y(),T(k,{key:1,align:"center","justify-space-between":"",class:"ma-5 mb-5"},{default:i(()=>[l("table",Sp,[t[62]||(t[62]=l("thead",null,[l("tr",null,[l("th",{colspan:"2",class:"custom-th"},"Datos de Identificación del Contribuyente")])],-1)),l("tbody",null,[l("tr",null,[t[58]||(t[58]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"RFC:",-1)),l("td",Pp,f(s.contributorData.rfc),1)]),l("tr",null,[t[59]||(t[59]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Denominación/Razón Social:",-1)),l("td",Ep,f(s.contributorData.denominacionSoc),1)]),l("tr",null,[t[60]||(t[60]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Régimen capital:",-1)),l("td",Tp,f(s.contributorData.regimenCapital),1)]),l("tr",null,[t[61]||(t[61]=l("td",{class:"custom-td custom-td-25 font-weight-bold"},"Nombre Comercial:",-1)),l("td",Fp,f(s.contributorData.nombreComercial),1)])])])]),_:1})),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 borders row-color"},{default:i(()=>[...t[63]||(t[63]=[l("div",{class:"font-weight-bold font-table-size text-ju
375stify"},"Respuesta de solicitud:",-1)])]),_:1}),n(b,{cols:"12",align:"start","align-self":"end",class:"py-1 border-left border-right border-bottom"},{default:i(()=>[l("div",Rp,[t[64]||(t[64]=D(" Estimado contribuyente: En atención a su solicitud de ",-1)),s.extraData.typeNotice?(y(),j("b",$p,f(s.extraData.typeNotice.replace(".","")||""),1)):M("",!0),t[65]||(t[65]=D(", con folio ",-1)),l("b",null,f(s.extraData.folio),1),t[66]||(t[66]=D(" y dado que a la fecha no se tuvo respuesta a la prevención efectuada anteriormente o no presentó el aviso correcto, de conformidad con la legislación aplicable, se tiene por ",-1)),t[67]||(t[67]=l("b",{class:"text-decoration-underline"}," rechazada ",-1)),t[68]||(t[68]=D(" su solicitud. ",-1))]),t[69]||(t[69]=l("div",{class:"font-table-size mt-2 text-justify"},[D(" No obstante, lo anterior y sin menoscabo alguno "),l("b",{class:"text-decoration-underline"}," podrá presentar en cualquier momento una nueva solicitud.")],-1))]),_:1})]),_:1}),n(k,{align:"center","justify-space-between":"",class:"mx-5 mt-5 pdf-item"},{default:i(()=>[n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[70]||(t[70]=[l("div",{class:"font-table-size text-justify"}," La SecretarÃa de Finanzas y TesorerÃa General del Estado de Nuevo León tratará los datos personales señalados con fundamento en lo dispuesto en los artÃculos 3°, fracción XXXIII, 4°, 16, 17 y 18 de la Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados, 23, 91 y 95, de la Ley de Transparencia y Acceso a la Información Pública del Estado de Nuevo León, 1, 3, 4, 6, 7 y demás relativos al Reglamento Interior de la SecretarÃa de Finanzas y TesorerÃa General del Estado. ",-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[71]||(t[71]=[l("div",{class:"font-table-size text-justify"},[D(" Para ejercer sus derechos de acceso, rectificación, cancelación u oposición de sus datos personales, ingrese al portal "),l("a",{href:"https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado",target:"_blank"},[l("span",{class:"font-table-size mr-2"}," https://www.nl.gob.mx/es/aviso-de-privacidad-integral-de-la-secretaria-de-finanzas-y-tesoreria-general-del-estado ")])],-1)])]),_:1}),n(b,{cols:"12",class:"py-1"},{default:i(()=>[...t[72]||(t[72]=[l("div",{class:"font-table-size text-justify"}," En caso de requerir asistencia puede acudir a la Dirección General de Servicios al Contribuyente, ubicada en el Pabellón Ciudadano, calle Washington número 2000 oriente, Col. Obrera, Monterrey, Nuevo León, C.P. 64010, o comunicarse a través de nuestros medios de contacto: Centro de Atención Ciudadana en el 070 y correo electrónico: [email protected] ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1},8,["filename","html-to-pdf-options"])]),_:1})}const Np=Object.assign(_e(vf,[["render",xp],["__scopeId","data-v-e11e48b3"]]),{__name:"NoticesRecResponse"});var ds,Js;function Op(){if(Js)return ds;Js=1;function e(t,s,c){var o;return c(t,function(r,d,a){if(s(r,d,a))return o=d,!1}),o}return ds=e,ds}var cs,ei;function Mp(){if(ei)return cs;ei=1;var e=Op(),t=da(),s=ui();function c(o,r){return e(o,s(r,3),t)}return cs=c,cs}var zp=Mp();const ti=Ot(zp);var us,si;function Lp(){if(si)return us;si=1;var e=Ya(),t=ui(),s=Xa(),c=Ka(),o=Ja(),r=va(),d=s(function(a){var m=r(a);return o(m)&&(m=void 0),c(e(a,1,o,!0),t(m,2))});return us=d,us}var qp=Lp();const Bp=Ot(qp);var jp=ca();const Vp=Ot(jp);function Up(){const e=ci(),t=e.public.firebase.projectId,s=e.public.region||"us-central1",c=t==="os-gobierno-de-nuevo-leon"?"production":"sandbox",o=Fe({}),r=Fe({}),d=Fe({}),a=Fe({}),m=Fe({}),v=[{sectionId:"abarrotes",metrosQId:"metrosCuadrados6671D070"},{sectionId:"iCentrosYClubesSociales",metrosQId:"metrosCuadrados6671D159"},{sectionId:"iiCentrosYClubesSociales",metrosQId:"metrosCuadrados6671D189"},{sectionId:"hotelesYMoteles",metrosQId:"metrosCuadrados6671D1Ba"},{sectionId:"1AreaDeExposicion120M",metrosQId:"metrosCuadrados6671D221"},{sectionId:"2AreaDeExposicion120M",metrosQId:"metrosCuadrados6671D296"}],p=Fe({}),u=Fe({}),A=Fe({}),g=Fe({}
375),C=Fe({}),_=Fe("fisica"),S=Fe(""),I=Fe(""),P=Fe(""),F={expedicionDeLicenciaEstatalCambioDeDomicilioYCambioDeGiroParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido668479Ab",segundoApellido:"segundoApellido668479B0",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},canjeDeLicencia:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido66859B70",segundoApellido:"segundoApellido66859B79",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},refrendoDeLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp666864Da",nombre:"nombreS6668653D",primerApellido:"primerApellido666864E5",segundoApellido:"segundoApellido666864Ed",numCuentaEstatalPerFis:"numeroDeCuentaEstatal666864Ca",rfcPerMor:"rfc",razonSocial:"nombreDenominacionORazonSocial66686441",numCuentaEstatalPerMor:"numeroDeCuentaEstatal666863F0"},permisoEspecialParaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc66705722",curp:"curp67B3B5Fc",nombre:"nombreS66705730",primerApellido:"primerApellido66705738",segundoApellido:"segundoApellido66705743",numCuentaEstatalPerFis:"numeroDeCuentaEstatal667056Cf",rfcPerMor:"rfc667057Af",razonSocial:"nombreDenominacionORazonSocial667057C8",numCuentaEstatalPerMor:"numeroDeCuentaEstatal6670579C"},cambioDeGiroDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido6660De27",segundoApellido:"segundoApellido6660De20",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},cambioDeDomicilioDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS668446Fc",primerApellido:"primerApellido6660De27",segundoApellido:"segundoApellido6660De20",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},cambioDeTitularEnLaLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc65Ca886A",curp:"curp66355Eef",nombre:"nombreS65Ca889A",primerApellido:"primerApellido66462480",segundoApellido:"segundoApellido6646248B",numCuentaEstatalPerFis:"numeroDeCuentaEstatal66355Ee7",rfcPerMor:"rfc65Ca8A68",razonSocial:"nombreDenominacionORazonSocial66689481",numCuentaEstatalPerMor:"numeroDeCuentaDeEstatal66355F50"},renovacionYReposicionDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc667C6A91",curp:"curp667C6A8C",nombre:"nombresS667C6Aa1",primerApellido:"primerApellido667C6Ae1",segundoApellido:"segundoApellido667C6Ae9",numCuentaEstatalPerFis:"numeroDeCuentaEstatal667C6A4A",rfcPerMor:"rfc667C6C00",razonSocial:"nombreDenominacionORazonSocial67Be62D3",numCuentaEstatalPerMor:"numeroDeCuentaEstatal667C6Bee"},reposicionDeLicenciaEstatal:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS66843D30",primerApellido:"primerApellido6644E826",segundoApellido:"segundoApellido6644E83A",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},bajaYOCancelacionDeLaLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc6633Ea99",curp:"curp6667767E",nombre:"nombreS6633Bc00",primerApellido:"primerApellido667Daa52",segundoApellido:"segundoApellido667Daa56",numCuentaEstatalPerFis:"cuentaEstatal6633E9C8",rfcPerMor:"rfc6633Bded",razonSocial:"nombreDenominacionORazonSocial666774A9",numCuentaEstatalPerMor:"numeroDeCuentaEstatal6634F680"}},L={expedicionDeLicenciaEstatalCambioDeDomicilioYCambioDeGiroParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido668479Ab",segundoApellido:"segundoApellido668479B0",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},canjeDeLicencia:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido66859B70",segundoApellido:"segundoApellido66859B79",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},refrendoDeLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp666864Da",nombre:"nombreS6668653D",primerApellido:"primerApellido666864E5",segundoApellido:"segundoApellido666864Ed",numCuentaEstatalPerFis:"numeroDeCuentaEstatal666864Ca",rfcPerMor:"rfc",razonSocial:"nombreDenominacionORazonSocial66686441",numCuentaEstatalPerMor:"numeroDeCuentaEstatal666863F0"},permisoEspecialParaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc66705722",curp:"curp67Ddeb91",nombre:"nombreS66705730",primerApellido:"primerApellido66705738",segundoApellido:"segundoApellido66705743",numCuentaEstatalPerFis:"numeroDeCuentaEstatal667056Cf",rfcPerMor:"rfc667057Af",razonSocial:"nombreDenominacionORazonSocial667057C8",numCuentaEstatalPerMor:"numeroDeCuentaEstatal6670579C"},cambioDeGiroDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS6634F48D",primerApellido:"primerApellido6660De27",
375segundoApellido:"segundoApellido6660De20",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},cambioDeDomicilioDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS668446Fc",primerApellido:"primerApellido6660De27",segundoApellido:"segundoApellido6660De20",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},cambioDeTitularEnLaLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc65Ca886A",curp:"curp66355Eef",nombre:"nombreS65Ca889A",primerApellido:"primerApellido66462480",segundoApellido:"segundoApellido6646248B",numCuentaEstatalPerFis:"numeroDeCuentaEstatal66355Ee7",rfcPerMor:"rfc65Ca8A68",razonSocial:"nombreDenominacionORazonSocial66689481",numCuentaEstatalPerMor:"numeroDeCuentaDeEstatal66355F50"},renovacionYReposicionDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc667C6A91",curp:"curp667C6A8C",nombre:"nombresS667C6Aa1",primerApellido:"primerApellido667C6Ae1",segundoApellido:"segundoApellido667C6Ae9",numCuentaEstatalPerFis:"numeroDeCuentaEstatal667C6A4A",rfcPerMor:"rfc667C6C00",razonSocial:"denominacionORazonSocial668D519E",numCuentaEstatalPerMor:"numeroDeCuentaEstatal667C6Bee"},reposicionDeLicenciaEstatal:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc",curp:"curp6634F471",nombre:"nombreS66843D30",primerApellido:"primerApellido6644E826",segundoApellido:"segundoApellido6644E83A",numCuentaEstatalPerFis:"numeroDeCuentaEstatal663558E5",rfcPerMor:"rfc6634F67D",razonSocial:"nombreDenominacionORazonSocial",numCuentaEstatalPerMor:"numeroDeCuentaEstatal663558D9"},bajaYOCancelacionDeLaLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas:{sectionIdPerFis:"datosDelSolicitantePersonaFisica",sectionIdPerMor:"datosDelSolicitantePersonaMoral",rfcPerFis:"rfc6633Ea99",curp:"curp6667767E",nombre:"nombreS6633Bc00",primerApellido:"primerApellido667Daa52",segundoApellido:"segundoApellido667Daa56",numCuentaEstatalPerFis:"cuentaEstatal6633E9C8",rfcPerMor:"rfc6633Bded",razonSocial:"nombreDenominacionORazonSocial666774A9",numCuentaEstatalPerMor:"numeroDeCuentaEstatal67De0C84"}},z={sandbox:{avisoFisica:"seleccionarDeLaListaElAvisoQueDeseaPresentar67Cb82C2",avisoMoral:"seleccionarDeLaListaElAvisoQueDeseaPresentar67Cb82C9",curp:"curp66A7B49E",primerApellido:"primerApellido66A7B4B9",segundoApellido:"segundoApellido66A7B4C0",nombreComercialFisica:"nombreComercial67D362Ea",cuentaEstatalFisica:"numeroDeCuentaEstatal65F9F8C2",nombreDenominacion:"denominacionORazonSocial66A937E7",nombreComercialMoral:"nombreComercial67D35A8A",imssFisica:"numeroDeRegistroPatronal672Bc813",imssMoral:"numeroDeRegistroPatronal672Bc82E",rfcRep:"rfc65F99D3B",nombreRep:"nombreS65F99D52",primerApellidoRep:"primerApellido66A7B517",segundoApellidoRep:"segundoApellido66A7B51E",curpRep:"curp66A7B4F7",telFijo:"telefonoFijo66A9204E",telCel:"telefonoCelular66A9205E",actualizacionActividadesId:"seleccionarDeLaListaElAvisoQueDeseaPresentar672Cd123",aumentoObligacionesImpuestosId:"impuestosEstatales65F9A8C8",aumentoObligacionesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso672Bc92C",disminucionObligacionesImpuestosId:"impuesto",disminucionObligacionesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67Ddef63",actividadesEconomicasPreponderanteId:"actividadEconomicaPreponderante",actividadesEconomicasFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360975",cancelacionFisicaFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360Af8",cancelacionMoralFechaId:"elAvisoSeDeberaPresentarDentroDelMesSiguienteAAquelEnElQueSeActualiceElSupuestoJuridicoOElHechoQueLoMotivePrevioALaPresentacionDeCualquierTramiteQueDebaRealizarAnteLaSecretariaDeFinanzasYTesoreriaGeneralDelEstadoEnDichoMes6734B518",cambioNombreFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360A8E",reanudacionActividadesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360Ad1",suspensionActividadesFechaId:"elAvisoSeDeberaPresentarDentroDelMesSiguienteAAquelEnElQueSeActualiceElSupuestoJuridicoOElHechoQueLoMotivePrevioALaPresentacionDeCualquierTramiteQueDebaRealizarAnteLaSecretariaDeFinanzasYTesoreriaGeneralDelEstadoEnDichoMes6733D354",cambioDenominacionFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360A9C",cambioDomicilio:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso673609F1",tipoVialidadId:"tipoDeVialidad65Fa12F3",tipoInmuebleId:"tipoDeInmueble",numExtId:"domicilio68114Eac.numeroExterior",coloniaId:"domicilio68114Eac.colonia",municipioId:"domicilio68114Eac.municipio",entreCalleId:"domicilio68114Eac.entreCalle1",cpId:"domicilio68114Eac.cp",nombreVialidadId:"domicilio68114Eac.calle",numInteriorId:"domicilio68114Eac.numeroInterior",localidadId:"--",entidadId:"domicilio68114Eac.entidadFederativa",yCalleId:"domicilio68114Eac.yCalle2",referenciasId:"domicilio68114Eac.referenciasAdicionales",medidorAguaId:"--"},aperturaEstablecimiento:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360B08",tipoVialidadId:"tipoDeVialidad65Fa12F3",tipoInmuebleId:"tipoDeInmueble",numExtId:"domicilio681150F8.numeroExterior",coloniaId:"domicilio681150F8.colonia",municipioId:"domicilio681150F8.municipio",entreCalleId:"domicilio681150F8.entreCalle1",cpId:"domicilio681150F8.cp",nombreVialidadId:"domicilio681150F8.calle",numInteriorId:"domicilio681150F8.numeroInterior",localidadId:"--",entidadId:"domicilio681150F8.entidadFederativa",yCalleId:"domicilio681150F8.yCalle2",referenciasId:"domicilio681150F8.referenciasAdicionales",medidorAguaId:"--"},cierreEstablecimiento:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67360B14",tipoVialidadId:"tipoDeVialidad65Fa12F3",tipoInmuebleId:"tipoDeInmueble",numExtId:"domicilio681151A5.numeroExterior",coloniaId:"domicilio681151A5.colonia",municipioId:"domicilio681151A5.municipio",entreCalleId:"domicilio681151A5.entreCalle1",cpId:"domicilio681151A5.cp",nombreVialidadId:"domicilio681151A5.calle",numInteriorId:"domicilio681151A5.numeroInterior",localidadId:"--",entidadId:"domicilio681151A5.entidadFederativa",yCalleId:"domicilio681151A5.yCalle2",referenciasId:"domicilio681151A5.referenciasAdicionales",medidorAguaId:"--"},seleccionarAvisoId:"seleccionarDeLaListaElAvisoQueDeseaPresentar672Cd123"},production:{avisoFisica:"seleccionarDeLaListaElAvisoQueDeseaPresentar67De3731",avisoMoral:"seleccionarDeLaListaElAvisoQueDeseaPresentar67De3A2E",curp:"curp66A7B49E",primerApellido:"primerApellido66A7B4B9",segundoApellido:"segundoApellido66A7B4C0",nombreComercialFisica:"nombreComercial67De3539",cuentaEstatalFisica:"numeroDeCuentaEstatal65F9F8C2",n
375ombreDenominacion:"denominacionORazonSocial66A937E7",nombreComercialMoral:"nombreComercial67De3618",imssFisica:"numeroDeRegistroPatronal67De354E",imssMoral:"numeroDeRegistroPatronal67De3636",rfcRep:"rfc65F99D3B",nombreRep:"nombreS65F99D52",primerApellidoRep:"primerApellido66A7B517",segundoApellidoRep:"segundoApellido66A7B51E",curpRep:"curp66A7B4F7",telFijo:"telefonoFijo66A9204E",telCel:"telefonoCelular66A9205E",actualizacionActividadesId:"seleccionarDeLaListaElAvisoQueDeseaPresentar67De3B03",aumentoObligacionesImpuestosId:"impuestosEstatales65F9A8C8",aumentoObligacionesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De3E0B",disminucionObligacionesImpuestosId:"impuesto",disminucionObligacionesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De3C58",actividadesEconomicasPreponderanteId:"primeraActividadPreponderante68470Ec1",actividadesEconomicasFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De3F98",cancelacionFisicaFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De499C",cancelacionMoralFechaId:"elAvisoSeDeberaPresentarDentroDelMesSiguienteAAquelEnElQueSeActualiceElSupuestoJuridicoOElHechoQueLoMotivePrevioALaPresentacionDeCualquierTramiteQueDebaRealizarAnteLaSecretariaDeFinanzasYTesoreriaGeneralDelEstadoEnDichoMes67De3Bd3",cambioNombreFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De42Fd",reanudacionActividadesFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De4636",suspensionActividadesFechaId:"elAvisoSeDeberaPresentarDentroDelMesSiguienteAAquelEnElQueSeActualiceElSupuestoJuridicoOElHechoQueLoMotivePrevioALaPresentacionDeCualquierTramiteQueDebaRealizarAnteLaSecretariaDeFinanzasYTesoreriaGeneralDelEstadoEnDichoMes67De4578",cambioDenominacionFechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De43C9",cambioDomicilio:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De4217",tipoVialidadId:"tipoDeVialidad65Fa12F3",tipoInmuebleId:"tipoDeInmueble",numExtId:"domicilio68237010.numeroExterior",coloniaId:"domicilio68237010.colonia",municipioId:"domicilio68237010.municipio",entreCalleId:"domicilio68237010.entreCalle1",cpId:"domicilio68237010.cp",nombreVialidadId:"domicilio68237010.calle",numInteriorId:"domicilio68237010.numeroInterior",localidadId:"--",entidadId:"domicilio68237010.entidadFederativa",yCalleId:"domicilio68237010.yCalle2",referenciasId:"domicilio68237010.referenciasAdicionales",medidorAguaId:"--"},aperturaEstablecimiento:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De4D3B",tipoVialidadId:"tipoDeVialidad67De4A82",tipoInmuebleId:"tipoDeInmueble67De4C52",numExtId:"domicilio6823712D.numeroExterior",coloniaId:"domicilio6823712D.colonia",municipioId:"domicilio6823712D.municipio",entreCalleId:"domicilio6823712D.entreCalle1",cpId:"domicilio6823712D.cp",nombreVialidadId:"domicilio6823712D.calle",numInteriorId:"domicilio6823712D.numeroInterior",localidadId:"--",entidadId:"domicilio6823712D.entidadFederativa",yCalleId:"domicilio6823712D.yCalle2",referenciasId:"domicilio6823712D.referenciasAdicionales",medidorAguaId:"--"},cierreEstablecimiento:{fechaId:"fechaAPartirDeLaCualSurteEfectoElAviso67De4Fa4",tipoVialidadId:"tipoDeVialidad67De4Dd9",tipoInmuebleId:"tipoDeInmueble67De4F29",numExtId:"domicilio68237205.numeroExterior",coloniaId:"domicilio68237205.colonia",municipioId:"domicilio68237205.municipio",entreCalleId:"domicilio68237205.entreCalle1",cpId:"domicilio68237205.cp",nombreVialidadId:"domicilio68237205.calle",numInteriorId:"domicilio68237205.numeroInterior",localidadId:"--",entidadId:"domicilio68237205.entidadFederativa",yCalleId:"domicilio68237205.yCalle2",referenciasId:"domicilio68237205.referenciasAdicionales",medidorAguaId:"--"},seleccionarAvisoId:"seleccionarDeLaListaElAvisoQueDeseaPresentar67De3B03"}},V=Vp;function X(U,me){const $=z[c],Y=me;let w=0;const q=["Actualización de actividades económicas y obligaciones.","Aumento de obligaciones.","Disminución de obligaciones","Actualización de actividades económicas."],O=["Cambio de nombre.","Reanudación de actividades.","Suspensión de actividades.","Cancelación en el Registro Estatal de Contribuyentes.","Cambio de Denominación o Razón Social."],Q=["Cambio de Domicilio Fiscal.","Apertura de Establecimiento o Sucursal.","Cierre de Establecimiento o Sucursal."];q.includes(Y)?w=1:O.includes(Y)?w=2:Q.includes(Y)&&(w=3);let Z="";return w===1?Z=U.actualizacionDeActividadesEconomicasYObligaciones.schema[$.seleccionarAvisoId]:Z=Y,Z}function J(U,me){const $=z[c],Y=m.value.typeNotice;let w=0;const q=["Actualización de actividades económicas y obligaciones.","Aumento de obligaciones.","Disminución de obligaciones","Actualización de actividades económicas."],O=["Cambio de nombre.","Reanudación de actividades.","Suspensión de actividades.","Cancelación en el Registro Estatal de Contribuyentes.","Cambio de Denominación o Razón Social."],Q=["Cambio de Domicilio Fiscal.","Apertura de Establecimiento o Sucursal.","Cierre de Establecimiento o Sucursal."];q.includes(Y)?w=1:O.includes(Y)?w=2:Q.includes(Y)&&(w=3);let Z="",H="",ae="";if(w===1){if(ae=U.actualizacionDeActividadesEconomicasYObligaciones.schema[$.actualizacionActividadesId],ae==="Aumento de obligaciones."){const N=U.aumentoDeObligaciones.schema[$.aumentoObligacionesImpuestosId];Z=N.length>0?N.map(x=>`<li>${x.name||x}</li>`).join(""):"--",H=U.aumentoDeObligaciones.schema[$.aumentoObligacionesFechaId]}else if(ae==="Disminución de obligaciones"){const N=U.disminucionDeObligaciones.schema[$.disminucionObligacionesImpuestosId];Z=N.length>0?N.map(x=>`<li>${x.name||x}</li>`).join(""):"--",H=U.disminucionDeObligaciones.schema[$.disminucionObligacionesFechaId]}else if(ae==="Actualización de actividades económicas."){const N=U.actualizacionDeActividadesEconomicas.schema[$.actividadesEconomicasPreponderanteId];
375Z=N[0]?.name5||N[0]?.name4||N[0]?.name3||N[0]?.name2||N[0]?.name1||"--",H=U.actualizacionDeActividadesEconomicas.schema[$.actividadesEconomicasFechaId]}}else if(w===2)ae=Y,ae==="Cancelación en el Registro Estatal de Contribuyentes."?me==="fisica"?H=U.cancelacionEnElRegistroEstatalDeContribuyentesPersonaFisica.schema[$.cancelacionFisicaFechaId]:H=U.cancelacionEnElRegistroEstatalDeContribuyentesPersonaMoral.schema[$.cancelacionMoralFechaId]:ae==="Cambio de nombre."?H=U.cambioDeNombreS.schema[$.cambioNombreFechaId]:ae==="Reanudación de actividades."?H=U.reanudacionDeActividades.schema[$.reanudacionActividadesFechaId]:ae==="Suspensión de actividades."?H=U.suspensionDeActividades.schema[$.suspensionActividadesFechaId]:ae==="Cambio de Denominación o Razón Social."&&(H=U.nuevaDenominacionORazonSocial.schema[$.cambioDenominacionFechaId]);else if(w===3&&w===3){if(ae=Y,ae==="Cambio de Domicilio Fiscal."){const N=U.cambioDeDomicilio.schema,x=$.cambioDomicilio;H=V(N,x.fechaId),u.value={tipoVialidad:V(N,x.tipoVialidadId),tipoInmueble:V(N,x.tipoInmuebleId),numExt:V(N,x.numExtId),colonia:V(N,x.coloniaId),municipio:V(N,x.municipioId),entreCalle:V(N,x.entreCalleId),cp:V(N,x.cpId),nombreVialidad:V(N,x.nombreVialidadId),numInterior:V(N,x.numInteriorId),localidad:x.localidadId,entidad:V(N,x.entidadId),yCalle:V(N,x.yCalleId),referencias:V(N,x.referenciasId),medidorAgua:x.medidorAguaId}}else if(ae==="Apertura de Establecimiento o Sucursal."){const N=U.aperturaDeEstablecimiento.schema,x=$.aperturaEstablecimiento;H=V(N,x.fechaId),u.value={tipoVialidad:V(N,x.tipoVialidadId),tipoInmueble:V(N,x.tipoInmuebleId),numExt:V(N,x.numExtId),colonia:V(N,x.coloniaId),municipio:V(N,x.municipioId),entreCalle:V(N,x.entreCalleId),cp:V(N,x.cpId),nombreVialidad:V(N,x.nombreVialidadId),numInterior:V(N,x.numInteriorId),localidad:x.localidadId,entidad:V(N,x.entidadId),yCalle:V(N,x.yCalleId),referencias:V(N,x.referenciasId),medidorAgua:x.medidorAguaId}}else if(ae==="Cierre de Establecimiento o Sucursal."){const N=U.cierreDeEstablecimiento.schema,x=$.cierreEstablecimiento;H=V(N,x.fechaId),u.value={tipoVialidad:V(N,x.tipoVialidadId),tipoInmueble:V(N,x.tipoInmuebleId),numExt:V(N,x.numExtId),colonia:V(N,x.coloniaId),municipio:V(N,x.municipioId),entreCalle:V(N,x.entreCalleId),cp:V(N,x.cpId),nombreVialidad:V(N,x.nombreVialidadId),numInterior:V(N,x.numInteriorId),localidad:x.localidadId,entidad:V(N,x.entidadId),yCalle:V(N,x.yCalleId),referencias:V(N,x.referenciasId),medidorAgua:x.medidorAguaId}}}C.value={typeNotice:ae||"--",startDate:H||"--",obligation:Z||"--"}}async function G(U,me,$,Y,w){if(Y){S.value=U.title;let q="";U?.user?.company?q="moral":q="fisica",_.value=q;const O=U.mediosDeContacto?.schema,Q=U.preguntaObligaciones?.schema,Z=U.obligacionesFiscales?.schema;if(m.value={createdAt:U?.createdAt,folio:U?.folio,updatedAt:Ne.now(),status:U?.answerStatus||null},q==="fisica"){const H=U.identificacionPersonaFisica?.schema,ae=U.datosDelRepresentanteLegalPersonaFisica?.schema,N=U.domicilioFiscalPersonaFisica?.schema,x=U.domicilioEnElEstadoDeNuevoLeonPersonaFisica?.schema,fe=U.complementoDomicilioNuevoLeonPersonaFisica?.schema;p.value={rfc:H.rfc,curp:H.curp66902A7E,nombre:H.nombreS,primerApellido:H.primerApellido668Ea2Df,segundoApellido:H.segundoApellido668Ea2E3,nombreComercial:H.nombreComercial66B2351A,repLegal:H.cuentaConRepresentanteLegal66B10A45,noImms:H.numeroDeRegistroPatronalAnteElImss},a.value={rfc:ae.rfc||"",nombre:ae.nombreS666B070C||"",primerApellido:ae.primerApellido663E7856||"",segundoApellido:ae.segundoApellido663E785E||"",curp:ae.curp66902B80||""},me==="response"&&(u.value={tipoVialidad:N.tipoDeVialidad65Fa120B,numExt:N.domicilio682E394D.numeroExterior,colonia:N.domicilio682E394D.colonia,municipio:N.domicilio682E394D.municipio,idMunicipio:N.domicilio682E394D.claveMunicipio,entreCalle:N.domicilio682E394D.entreCalle1,cp:N.domicilio682E394D.cp,nombreVialidad:N.domicilio682E394D.calle,numInterior:N.domicilio682E394D.numeroInterior,localidad:"",entidad:N.domicilio682E394D.entidadFederativa,idEntidad:N.domicilio682E394D.claveEntidadFederativa,yCalle:N.domicilio682E394D.yCalle2,tipoInmueble:"",referencias:"",medidorAgua:""},u.value.entidad==="NUEVO LEÃN"?(u.value.inNL=!0,u.value.tipoInmueble=fe?.tipoDeInmueble,u.value.medidorAgua=fe.numeroDelMedidorDeAguaYDrenajeDeMonterrey682E3Abd,u.value.referencias=fe.referenciasAdicionales):(u.value.inNL=!1,u.value.tipoInmueble="",u.value.medidorAgua="",u.value.referencias="",A.value={tipoVialidad:x.tipoDeVialidad666Afd5A,numExt:x.domicilio682E3Bfe.numeroExterior,colonia:x.domicilio682E3Bfe.colonia,municipio:x.domicilio682E3Bfe.municipio,idMunicipio:x.domicilio682E3Bfe.claveMunicipio,entreCalle:x.domicilio682E3Bfe.entreCalle1,cp:x.domicilio682E3Bfe.cp,nombreVialidad:x.domicilio682E3Bfe.calle,numInterior:x.domicilio682E3Bfe.numeroInterior,localidad:"",entidad:"Nuevo León",idEntidad:x.domicilio682E3Bfe.claveEntidadFederativa,yCalle:x.domicilio682E3Bfe.yCalle2,tipoInmueble:x.tipoDeInmueble666Afff3,referencias:x.domicilio682E3Bfe.referenciasAdicionales,medidorAgua:x.numeroDelMedidorDeAguaYDrenajeDeMonterrey682E3C6E}),d.value={numeroTel:O.telefonoFijo665F2823,numeroCel:O.telefonoMovil665F2839,email:O.correoElectronico65Ef415D},C.value={withObligations:Q.laInscripcionAlRegistroEstatalDeContribuyentesSera682E4057==="Con obligaciones fiscales.",obligations:Q.laInscripcionAlRegistroEstatalDeContribuyentesSera682E4057==="Con obligaciones fiscales."?Z.obligacionesFiscalesPorLasCualesEstaRealizandoElAlta682E40C2:[],startDate:Z.fechaDeInicioDeObligacionesEnElEstado66D74Aed,activity:Q.laInscripcionAlRegistroEstatalDeContribuyentesSera682E4057==="Con obligaciones fiscales."?[{name:Z.primeraActividadPreponderante684719D9?Z.primeraActividadPreponderante684719D9[0].name1:"",id:Z.primeraActividadPreponderante684719D9?Z.primeraActividadPreponderante684719D9[0].customId1:"",percentage:Z.deActividad1684719Ee},{name:Z.segundaActividadPreponderante68471A1A?Z.segundaActividadPreponderante68471A1A[0].name1:"",id:Z.segundaActividadPreponderante68471A1A?Z.segundaActividadPreponderante68471A1A[0].customId1:"",percentage:Z.deActividad268471A2B},{name:Z.terceraActividadPreponderante6849F589?Z.terceraActividadPreponderante6849F589[0].name1:"",id:Z.terceraActividadPreponderante6849F589?Z.terceraActividadPreponderante6849F589[0].customId1:"",percentage:Z.deActividad36849F606},{name:Z.cuartaActividadPreponderante6849F5Ed?Z.cuartaActividadPreponderante6849F5Ed[0].name1:"",id:Z.cuartaActividadPreponderante6849F5Ed?Z.cuartaActividadPreponderante6849F5Ed[0].customId1:"",percentage:Z.deActividad46849F61B}]:[]})}else{const H=U.identificacionPersonaMoral?.schema,ae=U.datosDelRepresentanteLegalPersonaMoral?.schema,N=U.domicilioFiscalPersonaMoral?.schema,x=U.domicilioEnElEstadoDeNuevoLeonPersonaMoral?.schema,fe=U.complementoDomicilioNuevoLeonPersonaMoral?.schema;p.value={rfc:H.rfc,denominacionSoc:H.nombreDenominacionORazonSocial682E360C,nombreComercial:H.nombreComercial66902C7E,noImms:H.numeroDeRegistroPatronalAnteElImss,regimenCapital:H.regimenDeCapital66B10B1E},a.value={rfc:ae.rfc,nombre:ae.nombreS666B070C,primerApellido:ae.primerApellido663E7856,segundoApellido:ae.segundoApellido663E785E,curp:ae.curp66902B80},me==="response"&&(u.value={tipoVialidad:N.tipoDeVialidad65Fa120B,numExt:N.domicilio682E394D.numeroExterior,colonia:N.domicilio682E394D.colonia,municipio:N.domicilio682E394D.municipio,idMunicipio:N.domicilio682E394D.claveMunicipio,entreCalle:N.domicilio682E394D.entreCalle1,cp:N.domicilio682E394D.cp,nombreVialidad:N.domicilio682E394D.calle,numInterior:N.domicilio682E394D.numeroInterior,localidad:"",entidad:N.domicilio682E394D.entidadFederativa,idEntidad:N.domicilio682E394D.claveEntidadFederativa,yCalle:N.domicilio682E394D.yCalle2,tipoInmueble:"",referencias:"",medidorAgua:""},u.value.entidad==="NUEVO LEÃN"?(u.value.inNL=!0,u.value.tipoInmueble=fe.tipoDeInmueble||"",u.value.medidorAgua=fe.numeroDelMedidorDeAguaYDrenajeDeMonterrey682E3F2D,u.value.referencias=fe.referenciasAdicionales):(u.value.inNL=!1,u.value.tipoInmueble="",u.value.medidorAgua="",u.value.referencias="",A.value={tipoVialidad:x.tipoDeVialidad666Afd5A,numExt:x.domicilio682E3Bfe.numeroExterior,colonia:x.domicilio682E3Bfe.colonia,municipio:x.domicilio682E3Bfe.municipio,idMunicipio:x.domicilio682E3Bfe.claveMunicipio,entreCalle:x.domicilio682E3Bfe.entreCalle1,cp:x.domicilio682E3Bfe.cp,nombreVialidad:x.domicilio682E3Bfe.calle,numInterior:x.domicilio682E3Bfe.numeroInterior,localidad:"",entidad:"Nuevo León",idEntidad:x.domicilio682E3Bfe.claveEntidadFederativa,yCalle:x.domicilio682E3Bfe.yCalle2,tipoInmueble:x.tipoDeInmueble666Afff3,referencias:x.domicilio682E3Bfe.referenciasAdicionales,medidorAgua:x.numeroDelMedidorDeAguaYDrenajeDeMonterrey682E3C6E}),d.value={numeroTel:O.telefonoFijo665F2823,numeroCel:O.telefonoMovil665F2839,email:O.correoElectronico65Ef415D},C.value={withObligations:!0,obligations:Z.obligacionesFiscalesPorLasCualesEstaRealizandoElAlta682E40C2,startDate:Z.fechaDeInicioDeObligacionesEnElEstado66D74Aed,activity:[{name:Z.primeraActividadPreponderante684719D9?Z.primeraActividadPreponderante684719D9[0].name1:"",id:Z.primeraActividadPreponderante684719D9?Z.primeraActividadPreponderante684719D9[0].customId1:"",percentage:Z.deActividad1684719Ee},{name:Z.segundaActividadPreponderante68471A1A?Z.segundaActividadPreponderante68471A1A[0].name1:"",id:Z.segundaActividadPreponderante68471A1A?Z.segundaActividadPreponderante68471A1A[0].customId1:"",percentage:Z.deActividad268471A2B},{name:Z.terceraActividadPreponderante6849F589?Z.terceraActividadPreponderante6849F589[0].name1:"",id:Z.terceraActividadPreponderante6849F589?Z.terceraActividadPreponderante6849F589[0].customId1:"",percentage:Z.deActividad36849F606},{name:Z.cuartaActividadPreponderante6849F5Ed?Z.cuartaActividadPreponderante6849F5Ed[0].name1:"",id:Z.cuartaActividadPreponderante6849F5Ed?Z.cuartaActividadPreponderante6849F5Ed[0].customId1:"",percentage:Z.deActividad46849F61B}]})}}else if(w){const q=z[c];S.value=U.title;let O="";U?.user?.company?O="moral":O="fisica",_.value=O;
375const Q=U.mediosDeContacto?.schema,Z=X(U,O==="fisica"?U.avisoAPresentarPersonaFisica.schema[q.avisoFisica]||"--":U.avisoAPresentarPersonaMoral.schema[q.avisoMoral]||"--");if(m.value={createdAt:U?.createdAt,folio:U?.folio,updatedAt:Ne.now(),status:U?.answerStatus||null,typeNotice:Z},O==="fisica"){const H=U.datosDeIdentificacionPersonaFisica?.schema;p.value={rfc:H.rfc||"--",curp:H[q.curp]||"--",nombre:H.nombreS||"--",primerApellido:H[q.primerApellido]||"--",segundoApellido:H[q.segundoApellido]||"--",nombreComercial:H[q.nombreComercialFisica]||"--",numCuentaEstatal:H[q.cuentaEstatalFisica]||"--",repLegal:"",noImms:""},me==="response"&&(d.value={numeroTel:Q[q.telFijo]||"--",numeroCel:Q[q.telCel]||"--",email:Q.correoElectronico||"--"},await J(U,O))}else{const H=U.datosDeIdentificacionPersonaMoral?.schema,ae=U.datosDelRepresentanteLegal?.schema;p.value={rfc:H.rfc||"--",denominacionSoc:H[q.nombreDenominacion]||"--",nombreComercial:H[q.nombreComercialMoral]||"--",noImms:H[q.imssMoral]||"--",numCuentaEstatal:H.numeroDeCuentaEstatal||"--",regimenCapital:H.regimen?.name||H.regimen||"--"},a.value={rfc:ae[q.rfcRep]||"--",nombre:ae[q.nombreRep]||"--",primerApellido:ae[q.primerApellidoRep]||"--",segundoApellido:ae[q.segundoApellidoRep]||"--",curp:ae[q.curpRep]||"--"},me==="response"&&(d.value={numeroTel:Q[q.telFijo],numeroCel:Q[q.telCel],email:Q.correoElectronico},await J(U,O))}}else if($){S.value=U.title;let q="";U?.user?.company?q="moral":q="fisica",_.value=q;const O=U.slugRequest;let Q={};if(t==="os-gobierno-de-nuevo-leon"?Q=L[O]:Q=F[O],m.value={createdAt:U?.createdAt,folio:U?.folio,updatedAt:Ne.now(),status:U?.answerStatus||null},q==="fisica"){const Z=U[Q.sectionIdPerFis]?.schema;r.value={rfc:Z[Q.rfcPerFis],curp:Z[Q.curp],nombre:Z[Q.nombre],primerApellido:Z[Q.primerApellido],segundoApellido:Z[Q.segundoApellido],numCuentaEstatal:Z[Q.numCuentaEstatalPerFis]}}else if(q==="moral"){const Z=U[Q.sectionIdPerMor]?.schema;r.value={rfc:Z[Q.rfcPerMor],razonSocial:Z[Q.razonSocial],numCuentaEstatal:Z[Q.numCuentaEstatalPerMor]}}}}return{projectId:t,region:s,currentEnv:c,establishmentDataAck:o,applicantDataAck:r,contactDataAck:d,legalRepresentativeAck:a,extraDataAck:m,metrosCuadradosOptionsAck:v,contributorDataAck:p,registeredAddressAck:u,nuevoLeonAddressAck:A,economicActivityAck:g,fiscalObligationsAck:C,personTypeAck:_,procTitleAck:S,keyfileUrl:I,certfileUrl:P,alcoholsAnswersIdsSdbx:F,alcoholsAnswersIdsProd:L,noticesRec:z,organizeDataAck:G,getDataNotices:J,getNestedProperty:V,getTypeNotice:X}}const Hp={},Wp={xmlns:"http://www.w3.org/2000/svg",width:"15.025",height:"16.694",viewBox:"0 0 15.025 16.694"};function Gp(e,t){return y(),j("svg",Wp,[...t[0]||(t[0]=[l("path",{id:"date_range_FILL0_wght400_GRAD0_opsz48",d:"M9.881,14.142a.82.82,0,1,1,.595-.24A.808.808,0,0,1,9.881,14.142Zm3.694,0a.82.82,0,1,1,.595-.24A.808.808,0,0,1,13.575,14.142Zm3.547,0a.82.82,0,1,1,.595-.24A.808.808,0,0,1,17.122,14.142Zm-9.87,6.552A1.284,1.284,0,0,1,6,19.442V6.5A1.284,1.284,0,0,1,7.252,5.252H8.608V4.647A.624.624,0,0,1,8.8,4.188.65.65,0,0,1,9.276,4a.686.686,0,0,1,.49.188.632.632,0,0,1,.2.48v.584H17.06V4.647a.624.624,0,0,1,.188-.459A.65.65,0,0,1,17.728,4a.686.686,0,0,1,.49.188.632.632,0,0,1,.2.48v.584h1.356A1.284,1.284,0,0,1,21.025,6.5V19.442a1.284,1.284,0,0,1-1.252,1.252Zm0-1.252H19.773V10.469H7.252Zm0-10.225H19.773V6.5H7.252Zm0,0v0Z",transform:"translate(-6 -4)"},null,-1)])])}const Qp=Object.assign(_e(Hp,[["render",Gp]]),{__name:"AppointmentsIconsCalendarioIcon"}),Zp=ut({name:"AppointmentsList",props:{listAppointments:{type:Array,default(){return[]}},status:{type:String,default:""},statusList:{type:Array,default(){return[]}},showMenu:{type:Boolean,default:!1},disableOptions:{type:Boolean,default:!1},showInfoOffice:{type:Boolean,default:!1}},setup(){const e=vi();return{...Fs(),...e}},data(){return{seeDetailsDialog:!1,selectedAppt:{},newState:"",addObservationsDialog:!1,updateDescription:"",updateType:"",dialogTitle:"",observations:"",timelineDialog:!1,localAppointments:[]}},computed:{involvedModules(){return $e().getInvolvedModules},auxRole(){return $e().getAuxRole},disableActions(){let e=!1;return this.disableOptions&&(e=!0),this.auxRole==="visualizer"&&this.involvedModules.includes("appointments")&&(e=!1),e}},watch:{listAppointments:{immediate:!0,handler(e){this.localAppointments=JSON.parse(JSON.stringify(e))}}},async created(){this.showInfoOffice===!0&&await this.attachOfficeIdToAppointments()},methods:{trackOpenDetail(e){this.$analytics?.track?.(Se.appointment_list_open_detail,{appointment_status:e.status})},getDaysString(e){if(!Array.isArray(e))return"";const t=e.map(s=>typeof s=="string"?this.$t(`citas.${s}
375`):s?.label).filter(Boolean);return t.length?t.join(", "):"Sin dÃas disponibles"},async attachOfficeIdToAppointments(){if(!this.localAppointments?.length)return;const e=await Promise.all(this.localAppointments.map(async t=>{if(!t.officeId)return t;try{const s=await bt(`modules/appointments/offices/${t.officeId}`);return s.exists()?{...t,officeId:s.id,officeData:s.data()}:{...t,officeId:null}}catch(s){return console.error("Error fetching office:",s),oe(s),{...t,officeId:null}}}));this.localAppointments=e},updateDoc(e,t){this.$emit("updateNewFile",{file:e,idx:t})},formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy"):(e=new Date(e),ge(new Date(e),"dd/MM/yyyy"))}},formatHour(e){const t=e.split(":");return`${t[0]}:${t[1]}`},assistAppointment(){this.newState="attended",this.addObservationsDialog=!0,this.updateDescription="Status changed",this.updateType="appointmentAttended",this.dialogTitle=this.$t("citas.assist")},cancelAppointment(){this.newState="cancelled",this.addObservationsDialog=!0,this.updateDescription="Status changed",this.updateType="cancelledAppointment",this.dialogTitle=this.$t("citas.cancel")},addObservations(){this.newState="",this.$t("citas.addObservations"),this.addObservationsDialog=!0,this.updateDescription="Add observation",this.updateType="addObservation"},async updateAppointment(){const e={observations:this.observations,updateDescription:this.updateDescription,updateType:this.updateType};if(this.newState&&(e.status=this.newState),this.$emit("updateAppointment",{newValues:e,element:this.selectedAppt}),this.newState==="cancelled"){const t=St();let s="";this.selectedAppt.saveParent.config.setOnlyAppointments===!0?s=`${t}/expediente/appointments/${this.selectedAppt.id}?moduleId=${this.selectedAppt.module}&submoduleId=${this.selectedAppt.submodule}&procedureId=${this.selectedAppt.slugRequest}&redirect=true`:s=`${t}/expediente/module/${this.selectedAppt.module}/${this.selectedAppt.submodule}/${this.selectedAppt.id_reference}?t=${this.selectedAppt.saveParent.submoduleName}&procedureId=${this.selectedAppt.slugRequest}&redirect=true`,this.$emit("removeApptInStage");try{await this.sendEmail(this.selectedAppt.user.email,this.$t("appointments.canceledAppointment"),this.$t("appointments.canceledAppointment"),s,this.$t("newRequests.checkCanceledAppointment"),this.selectedAppt.user.firstName,"","")}catch(c){console.error("[Appointments] Status change email notification failed:",c.message),oe(c)}(this.newState==="cancelled"||this.newState==="attended")&&this.selectedAppt.currentTaskName&&await this.deleteTask(this.selectedAppt.currentTaskName)}this.$emit("updateListOfAppointments"),this.newState="",this.observations="",this.addObservationsDialog=!1,this.selectedAppt={}},availableHistory(e){let t=[];return e.appointmentHistory&&(t=e.appointmentHistory.filter(s=>!!s.updateType)),t?t.length:0},filterTimeline(e){let t=[];return e.appointmentHistory&&(t=e.appointmentHistory.filter(s=>!!s.updateType)),t}}}),Yp={class:"text-subtitle-2 font-weight-bold pl-2 my-auto"},Kp={class:"align-self-start"},Xp={class:"pt-1 d-inline-block text-title"},Jp={class:"body-2"},eh={class:"ml-1 font-weight-medium"},th={class:"body-2"},sh={class:"ml-1 font-weight-medium"},ih={class:"body-2"},ah={class:"d-flex align-center pb-2 text-primary font-weight-medium"},nh={key:0},oh={class:"font-weight-bold"};function rh(e,t,s,c,o,r){const d=Si,a=Qp,m=nn,v=tn,p=at("InboxHistoryTimeline");return y(),T(k,null,{default:i(()=>[n(b,{md:"12"},{default:i(()=>[n(He,{class:"titleStep",color:"cardTitle"},{default:i(()=>[n(k,{class:"ma-0 w-100"},{default:i(()=>[n(d,{fill:"white",width:"25px",height:"25px"}),l("span",Yp,f(e.$t("appointments.appointments")),1),n(ye)]),_:1})]),_:1}),n(be,{class:"mt-2 px-2 px-sm-4 py-5 elevation-0 card-border"},{default:i(()=>[n(Re,{class:"px-0 px-md-4 px-lg-5"},{default:i(()=>[(y(!0),j(pe,null,Ee(e.localAppointments,(u,A)=>(y(),T(k,{key:`${A}-document`},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(be,{class:"rounded-lg px-5 py-3 border-all-blue"},{default:i(()=>[n(Re,{"disable-icon-rotate":!0,class:"px-0 px-sm-5"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(k,{class:"justify-center"},{default:i(()=>[n(b,{cols:"12",sm:"1",class:"d-flex justify-start justify-sm-center pb-0 pb-sm-3 pt-5"},{default:i(()=>[l("div",Kp,[n(a,{fill:"rgb(var(--v-theme-icon))",width:"35px",height:"35px"})])]),_:1}),n(b,{cols:"12",sm:"10",class:""},{default:i(()=>
375[l("div",Xp,[l("h4",null,f(u.title),1)]),n(k,{class:"mt-1"},{default:i(()=>[n(b,{cols:"12",sm:"3",class:"py-1"},{default:i(()=>[l("div",Jp,[D(f(e.$t("folio"))+": ",1),l("span",eh,f(u.folio),1)])]),_:2},1024),n(b,{cols:"12",sm:"4",class:"py-1"},{default:i(()=>[l("div",th,[D(f(e.$t("appointments.dayOfAppointment"))+": ",1),l("span",sh,f(e.formatDate(u.dateStart))+", "+f(e.formatHour(u.startTime)),1)])]),_:2},1024),n(b,{cols:"12",sm:"3",class:"py-1"},{default:i(()=>[l("div",ih,[D(f(e.$t("status"))+": ",1),u.status==="attended"?(y(),T(Ye,{key:0,class:"ml-1",color:"#success",size:"x-small"},{default:i(()=>[D(f(e.$t("appointments.attended")),1)]),_:1})):u.status==="rescheduled"?(y(),T(Ye,{key:1,class:"ml-1",color:"warning",size:"x-small"},{default:i(()=>[D(f(e.$t("appointments.rescheduled")),1)]),_:1})):u.status==="cancelled"?(y(),T(Ye,{key:2,class:"ml-1",color:"error",size:"x-small"},{default:i(()=>[D(f(e.$t("appointments.cancelled")),1)]),_:1})):u.status==="inProgress"?(y(),T(Ye,{key:3,class:"ml-1",color:"info",size:"x-small"},{default:i(()=>[D(f(e.$t("appointments.inProgress")),1)]),_:1})):(y(),T(Ye,{key:4,class:"ml-1",color:"info",size:"x-small"},{default:i(()=>[D(f(u.status),1)]),_:2},1024))])]),_:2},1024)]),_:2},1024),u.officeData&&Object.keys(u.officeData.calendarData).length!==0?(y(),T(k,{key:0,class:""},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(et,{lines:"three",class:"px-0 office-list"},{default:i(()=>[n(Ve,null,{default:i(()=>[l("div",ah,[n(ve,{color:"primary",size:"24",class:"pr-2"},{default:i(()=>[...t[12]||(t[12]=[D("mdi-domain",-1)])]),_:1}),l("span",null,f(u.officeData.generalData.name),1)]),n(is,{class:"pb-2 pb-sm-2 ml-9"},{default:i(()=>[l("div",null,f(u.officeData.generalData.address),1)]),_:2},1024),u.officeData.calendarData.availabilityDaysGroup?(y(),T(is,{key:0,class:"pb-2 pb-sm-2 ml-9"},{default:i(()=>[l("div",null,f(e.getDaysString(u.officeData.calendarData.availabilityDaysGroup)),1)]),_:2},1024)):M("",!0),u.deskInfo?(y(),T(is,{key:1,class:"pb-2 pb-sm-2 ml-9"},{default:i(()=>[l("div",null,f(u.deskInfo.name),1)]),_:2},1024)):M("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)):M("",!0)]),_:2},1024),n(b,{cols:"12",sm:"1",class:"d-flex align-center"},{default:i(()=>[n(te,{disabled:e.disableActions,color:"btnPrimary",icon:"",variant:"text",onClick:g=>
375{e.seeDetailsDialog=!0,e.selectedAppt=u,e.trackOpenDetail(u)}},{default:i(()=>[n(m,{fill:e.disableActions?"#C5C5C5":"rgb(var(--v-theme-btnPrimary))",width:"24px",height:"24px"},null,8,["fill"])]),_:1},8,["disabled","onClick"]),e.showMenu?(y(),T(Is,{key:0,rounded:"lg"},{activator:i(({props:g})=>[n(te,nt({disabled:e.disableActions,icon:"",variant:"text"},{ref_for:!0},g),{default:i(()=>[n(ve,{color:"#595959",size:"large"},{default:i(()=>[...t[13]||(t[13]=[D(" mdi-dots-vertical ",-1)])]),_:1})]),_:1},16,["disabled"])]),default:i(()=>[n(et,null,{default:i(()=>[!["cancelled","attended"].includes(u.status)&&e.auxRole!=="visualizer"?(y(),T(Ve,{key:0,link:"",onClick:g=>{e.assistAppointment(),e.selectedAppt=u}},{default:i(()=>[n(Ze,{class:"menuTitle"},{default:i(()=>[D(f(e.$t("citas.assist")),1)]),_:1})]),_:1},8,["onClick"])):M("",!0),!["cancelled","attended"].includes(u.status)&&e.auxRole!=="visualizer"?(y(),T(Ve,{key:1,link:"",onClick:g=>{e.cancelAppointment(),e.selectedAppt=u}},{default:i(()=>[n(Ze,{class:"menuTitle"},{default:i(()=>[D(f(e.$t("citas.cancel")),1)]),_:1})]),_:1},8,["onClick"])):M("",!0),e.auxRole!=="visualizer"?(y(),T(Ve,{key:2,link:"",onClick:g=>{e.addObservations(),e.selectedAppt=u}},{default:i(()=>[n(Ze,{class:"menuTitle"},{default:i(()=>[D(f(e.$t("citas.addObservations")),1)]),_:1})]),_:1},8,["onClick"])):M("",!0),e.availableHistory(u)?(y(),T(Ve,{key:3,"data-pw":`${u.id}-history`,link:"",onClick:g=>{e.timelineDialog=!0,e.selectedAppt=u}},{default:i(()=>[n(Ze,{class:"menuTitle"},{default:i(()=>[D(f(e.$t("citas.seeTimeline")),1)]),_:1})]),_:1},8,["data-pw","onClick"])):M("",!0)]),_:2},1024)]),_:2},1024)):M("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),n(Me,{modelValue:e.seeDetailsDialog,"onUpdate:modelValue":t[3]||(t[3]=u=>e.seeDetailsDialog=u),persistent:"","max-width":"1200px"},{default:i(()=>[n(we),e.seeDetailsDialog?(y(),T(v,{key:0,appointment:e.selectedAppt,"with-space":!0,dialog:!0,onCloseDialog:t[0]||(t[0]=u=>e.seeDetailsDialog=!1),onRemoveApptInStage:t[1]||(t[1]=u=>e.$emit("removeApptInStage")),onUpdateListOfAppointments:t[2]||(t[2]=u=>{e.$emit("updateListOfAppointments"),e.seeDetailsDialog=!1})},null,8,["appointment"])):M("",!0)]),_:1},8,["modelValue"]),n(Me,{modelValue:e.addObservationsDialog,"onUpdate:modelValue":t[8]||(t[8]=u=>e.addObservationsDialog=u),width:"600px"},{default:i(()=>[n(be,{class:"rounded-lg"},{default:i(()=>[n(He,{color:"primary"},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.dialogTitle),1)]),_:1}),n(ye),n(te,{icon:"",onClick:t[4]||(t[4]=u=>{e.addObservationsDialog=!1,e.selectedAppt={}})},{default:i(()=>[n(ve,null,{default:i(()=>[...t[14]||(t[14]=[D("mdi-close",-1)])]),_:1})]),_:1})]),_:1}),n(we),n(Re,{class:"pt-3 text-black text-left"},{default:i(()=>[e.loading?(y(),T(k,{key:0,justify:"center",class:"d-flex"},{default:i(()=>[n(b,{cols:"12",justify:"center",class:"text-center"},{default:i(()=>[n(mt,{size:50,color:"primary",indeterminate:""})]),_:1})]),_:1})):(y(),T(k,{key:1},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[e.selectedAppt.totalMissingSchedules<=1&&e.selectedAppt.automaticallyDeny&&e.newState==="cancelled"?(y(),j("span",nh,[D(f(e.$t("appointments.thisIsYourOperator"))+" ",1),l("span",oh,f(e.$t("appointments.yourApplicationWillBeDeniedOperator")),1),t[15]||(t[15]=l("br",null,null,-1)),t[16]||(t[16]=l("br",null,null,-1))])):M("",!0),n(ua,{modelValue:e.observations,"onUpdate:modelValue":t[5]||(t[5]=u=>e.observations=u),row:"3","hide-details":"",label:e.$t("citas.addObservations")},null,8,["modelValue","label"])]),_:1})]),_:1}))]),_:1}),n(we),n(Ke,null,{default:i(()=>[n(ye),n(te,{color:"secondary",variant:"outlined",disabled:e.loading,onClick:t[6]||(t[6]=u=>{e.addObservationsDialog=!1,e.selectedAppt={}})},{default:i(()=>[l("span",null,f(e.$t("cancel")),1)]),_:1},8,["disabled"]),n(te,{color:"primary",disabled:e.loading,onClick:t[7]||(t[7]=u=>e.updateAppointment())},{default:i(()=>[D(f(e.$t("save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),n(Me,{modelValue:e.timelineDialog,"onUpdate:modelValue":t[11]||(t[11]=u=>e.timelineDialog=u),width:"1000",scrollable:""},{default:i(()=>[n(be,{elevation:"0"},{default:i(()=>[n(He,{color:"primary",style:{"z-index":"3"}},{default:i(()=>[n(Qe,null,{default:i(()=>[D(f(e.$t("appointments.timeline")),1)]),_:1}),n(ye),n(te,{icon:"",onClick:t[9]||(t[9]=u=>{e.timelineDialog=!1,e.selectedAppt={}})},{default:i(()=>[n(ve,null,{default:i(()=>[...t[17]||(t[17]=[D("mdi-close",-1)])]),_:1})]),_:1})]),_:1}),n(we),n(Re,{class:"pt-3"},{default:i(()=>[n(p,{"history-items":e.filterTimeline(e.selectedAppt)},null,8,["history-items"])]),_:1}),n(we),n(Ke,{style:{"z-index":"3",background:"white"}},{default:i(()=>
375[n(ye),n(te,{color:"primary",variant:"outlined",onClick:t[10]||(t[10]=u=>{e.timelineDialog=!1,e.selectedAppt={}})},{default:i(()=>[D(f(e.$t("details.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const lh=Object.assign(_e(Zp,[["render",rh],["__scopeId","data-v-67262aea"]]),{__name:"AppointmentsDetailsAppointmentsList"}),dh={name:"AppointmentBanner",props:{appointments:{type:Array,default:()=>[]}},emits:["goToAppointments"],computed:{activeAppointment(){const e=(this.appointments||[]).filter(t=>t.status==="inProgress");return e.length===0?null:[...e].sort((t,s)=>this.toMillis(t.dateStart)-this.toMillis(s.dateStart))[0]}},methods:{toMillis(e){if(e==null)return 0;const t=Date.parse(e);return isNaN(t)?((e.seconds||e._seconds)??0)*1e3:t},formatDate(e){return e==null?"":ge(new Date(this.toMillis(e)),"dd/MM/yyyy")},formatHour(e){if(!e||!e.includes(":"))return e||"";const t=e.split(":");return`${t[0]}:${t[1]}`}}},ch={class:"d-sm-flex align-center justify-space-between"},uh={class:"d-sm-flex align-center"},mh={class:"mb-0 text-subtitle-1 font-weight-bold"},fh={class:"ml-sm-2 mb-0 text-subtitle-1 font-weight-regular"};function ph(e,t,s,c,o,r){return r.activeAppointment?(y(),T(Oe,{key:0,"data-pw":"appointmentBanner",color:"#1867C0",icon:"mdi-calendar-clock",border:"start",variant:"outlined"},{default:i(()=>[l("div",ch,[l("div",uh,[l("p",mh,f(e.$t("appointments.bannerLegend")),1),l("p",fh,f(r.formatDate(r.activeAppointment.dateStart))+", "+f(r.formatHour(r.activeAppointment.startTime))+" h ",1)]),n(te,{"data-pw":"appointmentBannerCta",color:"#1867C0",variant:"text",class:"link-like pa-0",onClick:t[0]||(t[0]=d=>e.$emit("goToAppointments"))},{default:i(()=>[D(f(e.$t("appointments.bannerGoToTab"))+" ",1),n(ve,{end:""},{default:i(()=>[...t[1]||(t[1]=[D("mdi-arrow-right",-1)])]),_:1})]),_:1})])]),_:1})):M("",!0)}const hh=Object.assign(_e(dh,[["render",ph]]),{__name:"AppointmentsDetailsAppointmentBanner"}),gh=ut({name:"DetailsCitizenMixin",components:{Documents:Pi,CustomFormBase:bi,NewRequests:Ei,PaymentsImg:Ts,Payments:Ti,CardPayTabIcon:wi,CitizenAppointment:on,AppointmentsList:lh,AppointmentBanner:hh},data(){return{scheduleAppointment:!1,documentsFeedback:[],folio:null,preFolio:null,tab:"0",dialogNext:!1,dialog:!1,dialogResponse:!1,dialogFeedback:!1,dialogDeny:!1,listDocuments:[],e6:1,viewItem:{id:"",title:"",user:{firstName:"",lastName:"",lastName2:"",celphone:""},module:"",submodule:"",link_storage:"",slugRequest:"",updatedAt:"",outputDocuments:[]},certificado:{},loading:!1,title:"",description:"",list:[],myModel:{},mySchema:{},listTabs:[],tabs:null,withSectionsAsTabs:null,withSections:null,showCompleteFormDialog:!1,sendFormStatus:"error",sections:[],showNext:!0,showSend:!1,showPrev:!1,formData:{title:""},seeAnswer:!0,validaciones:{allValidTrue:!0,allValid:!0,existError:!0,validTrueDocuments:!1},createdAt:null,updatedAt:null,tiempoRestanteFeedback:{hora:0,minuto:0,segundo:0,signo:null,segundos:0},tiempoRestantePayment:{hora:0,minuto:0,segundo:0,signo:null,segundos:0},canAnswerFeedback:!1,render:0,dialogMessage:{title:"",val:!1,message:""},showErrorWallet:!1,logicStepsList:[],originalModel:{},originalFiles:{},request:null,appointmentInfo:{},sort:0,grecaptchaToken:this.$config.google.recaptchaToken||"",isNL:this.$config.firebase.projectId==="os-sandbox-nuevo-leon"||this.$config.firebase.projectId==="os-gobierno-de-nuevo-leon",isSdbxNL:this.$config.firebase.projectId==="os-sandbox-nuevo-leon",isLujan:this.$config.firebase.projectId==="os-lujan-de-cuyo"||this.$config.firebase.projectId==="os-arg-lujan-de-cuyo"||this.$config.firebase.projectId==="os-sandbox-lujan-de-cuyo",canRejectSignatureRequest:!1,timeRemainingToSign:null,citizenSignatureTimeout:{hora:0,minuto:0,segundo:0,signo:null,segundos:0},operatorHasRequestedSignature:!1,documentsToSign:[],operatorSignatureRequested:!1}},computed:{brand(){return lt().getBrand},hasALogicQuestion(){return this.list.some(e=>e.goToSection===!0)},user(){return $e().getUser},fullName(){const e=this.user;return e.first_name+" "+e.last_name+(e.last_name2?" "+e.last_name2:"")}}}),yh="/api/procedure-version",bh=/^(?!\.{1,2}$)(?!__.*__$)[A-Za-z0-9_.-]{1,1500}$/,vh=async e=>{if(typeof e!="string"||!bh.test(e))throw Object.assign(new Error("procedure version reference is not a document id"),{code:"BAD_ID"});try{const s=await fetch(`${yh}/${encodeURIComponent(e)}`);
375if(s.ok){if(!(s.headers.get("content-type")||"").includes("application/json"))throw Object.assign(new Error("procedure version endpoint served a non-JSON body"),{code:"NOT_JSON"});return await s.json()}}catch(s){if(s&&s.code==="NOT_JSON")throw s}const t=await ma("procedureVersions",e);if(!t.exists())throw new Error("procedure version document is absent");return t.data()},wh=fa("procedureVersions",{state:()=>({cache:Object.create(null)}),actions:{async resolve(e,t){if(!e)return t;if(this.cache[e])return ke(this.cache[e]);try{const s=await vh(e);if(!s||!s.definition)throw Object.assign(new Error("procedure version document has no definition"),{code:"NOT_JSON"});return this.cache[e]=s.definition,ke(s.definition)}catch(s){if(s&&s.code==="BAD_ID")return t;const c=s&&s.code==="NOT_JSON";return oe(new Error(c?"procedure version endpoint returned a document that is not a version":"procedure version reference did not resolve"),{tags:{source:c?"procedureVersions.cdnRoute":"procedureVersions.resolve"},extra:{versionId:e,cause:s&&s.message}}),t}}}}),Os="open",_h="answered",Ct="Formulario",Fi=new Set(["__proto__","constructor","prototype"]);function ii(e,t){if(!t||Fi.has(t)||!Object.prototype.hasOwnProperty.call(e||{},t))return;const s=e[t];return s&&typeof s=="object"?s:void 0}function Ah(e){const t=e?.historical?.[e?.stageNow-1]?.configStage?.subStages;return Array.isArray(t)?t.reduce((s,c,o)=>(c?.prevention?.status===Os&&s.push({subStageIndex:o,name:c.name,prevention:c.prevention}),s),[]):[]}function Dh(e){const t=new Set;if(!Array.isArray(e))return t;for(const s of e){const c=s?.prevention?.objectFeedback?.documents;if(Array.isArray(c))for(const o of c)o?.name&&t.add(o.name)}return t}function kh(e){const t=new Set;if(!Array.isArray(e))return t;for(const s of e){const c=s?.prevention?.objectFeedback?.sections;if(Array.isArray(c))for(const o of c)o?.id&&!Fi.has(o.id)&&t.add(o.id)}return t}function Ih({answer:e,stageIndex:t,subStageIndex:s,now:c}){const o=ke(e?.historical??[]),r=o?.[t]?.configStage?.subStages??[],d=r[s]?.prevention;d&&(d.status=_h,d.response={date:c,byUser:!0});const a=!r.some((v,p)=>p!==s&&v?.prevention?.status===Os);return{historical:o,isLast:a,statusPatch:a?{status2:"En proceso",preventionResponse:c}:{}}}function Ch(e,t,s){const c=e?.historical?.[t]?.configStage?.subStages?.[s]?.prevention;return!c||c.status!==Os}function Sh(e,t){if(!t)return e;const s=t instanceof Set?t:new Set(t);return Object.entries(e||{}).forEach(([c,o])=>{o&&!s.has(o.name)&&delete e[c]}),e}function ai(e){const t=e.findIndex(s=>s.id==="newRequests");if(t>1){const[s]=e.splice(t,1);e.splice(1,0,s)}return e}const Ph=ut({name:"Details",mixins:[gh],props:{detailsId:{type:String,default:""}},setup(){const e=Up(),t=sn(),s=an(),c=Fs(),o=en();return{...e,...t,...s,...c,...o}},data(){return{accountTierBlockedReason:"",nodeEnv:this.$config.nodeEnv,substagesDocuments:[],parentDOM:null,answerPath:null,UMA:null,groupFiles:[],list:[],invalidAnswers:[],invalidAnswerDialog:!1,invalidApiRequest:!1,loaderBtn:!1,showTimePayment:!1,tiempoCorriendoFeedback:null,tiempoCorriendoPayment:null,userNavigator:"",noExpedienteCatastral:"",outputDocuments:[],acknowledgmentResponseType:"",tempAckPdfUrl:null,alcoholsProcedures:["expedicionDeLicenciaEstatalCambioDeDomicilioYCambioDeGiroParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","canjeDeLicencia","refrendoDeLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas","permisoEspecialParaVentaExpendioYConsumoDeBebidasAlcoholicas","cambioDeGiroDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","cambioDeDomicilioDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","cambioDeTitularEnLaLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","renovacionYReposicionDeLicenciaEstatalParaLaVentaExpendioYOConsumoDeBebidasAlcoholicas","reposicionDeLicenciaEstatal","bajaYOCancelacionDeLaLicenciaEstatalParaLaVentaExpendioYConsumoDeBebidasAlcoholicas"],shouldGenerateAutoDenialAck:!1,objectFeedback:null,changePrevention:!0,ogSections:[],currLogicSections:[],logicFeedbackObject:[],logicDocumentsFeedback:[],regeneratingAck:!1,resolvingSubstage:null}},computed:{userAuxRole(){return $e().getAuxRole},hasActiveAppointment(){return(this.listData||[]).some(e=>e.status==="inProgress")},unreadCount(){return this.viewItem?.messageStats?.unreadByCitizen||0},activeTabSections(){return this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList:this.listTabs},activeShowAllFieldsAndFiles(){return ks().activeShowAllFieldsAndFiles},isAlcoholes(){const e=this.isNL;return this.alcoholsProcedures.includes(this.viewItem.slugRequest)&&e},isREC(){const e=this.isNL;return this.viewItem.slugRequest==="inscripcionAlRegistroEstatalDeContribuyentes"&&e},isNoticesREC(){const e=this.isNL;return this.viewItem.slugRequest==="cambiosAlRegistroEstatalDeContribuyentes"&&e},postDataDocumentsRequest(){const e=this.viewItem.stageNow-1,t=this.viewItem.historical[e]||{},s=this.viewItem.historical.map((c,o)=>c.configStage.type==="electronicSignatureRequest"&&o<this.viewItem.stageNow?{...c,noStage:o}:null).filter(c=>c!==null);return{id_reference:this.viewItem.id_reference,moduleId:this.viewItem.module,submoduleId:this.viewItem.submodule,detailsId:this.viewItem.id_reference,title:this.viewItem.title,stageNow:this.viewItem.stageNow,slugRequest:this.viewItem.slugRequest,folio:this.viewItem.folio||this.viewItem.preFolio||this.viewItem.id_reference,attachmentsWithElectronicSignature:!0,operatorHasRequestedSignature:t.operatorHasRequestedSignature||!1,responseConfirmation:t.responseConfirmation||!1,operatorSignatureRequested:t.operatorSignatureRequested||!1,stages:s,timeout:this.citizenSignatureTimeout.segundos<=0}},allDocumentsSigned(){const e=this.documentsToSign?this.documentsToSign.filter(s=>s.stageUploaded===this.viewItem.stageNow):[];return e&&e.length>0?e.every(s=>s.signed===!0):!1},loggedIn(){return $e().loggedIn},grecaptcha(){return $e().grecaptcha.enterprise},groupRequiredQuestions(){let e=!1;const s=(this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList:this.listTabs.length)[this.tab];if(this.withSections&&this.withSectionsAsTabs&&s){let c=[];if(c=this.list.filter(o=>o.section===s.id&&o.required===!0&&o.kind==="group"),c.length>0)for(let o=0;o<c.length;o++){const r=c[o],d=this.myModel[r.section]?.schema[r.id];if(d==null){e=!0;break}else if(d&&r.limits&&r.minItems>d.length){e=!0;break}else if(d.length<=0){e=!0;break}this.checkForObligatoryQuestionsInGroup(r.questions,r.id,d)||(e=!0)}}else if(!this.withSections||this.withSections&&!this.withSectionsAsTabs){const c=this.list.filter(o=>o.required===!0&&o.kind==="group");if(c.length>0)for(let o=0;o<c.length;o++){const r=c[o],d=this.withSections?this.myModel[r.section]?.schema[r.id]:this.myModel[r.id];if(d==null){e=!0;break}else(d&&r.limits&&r.minItems>d.length||d.length<=0)&&(e=!0)}}return e},stepRequiredQuestions(){let e=!1;const s=(this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList:this.listTabs.length)[this.tab];if(this.withSections&&this.withSectionsAsTabs&&s){const c=this.list.filter(o=>o.section===s.id&&o.required===!0);if(c.length>0)for(let o=0;o<c.length;o++){const r=this.myModel[s.id].schema[c[o].id];if(r==null){e=!0;break}else if(c[o].kind==="apiRequest"&&r&&!r.input){e=!0;break}else Array.isArray(r)&&r.length===0&&(e=!0)}else e=!1}else e=!1;return e},missingSections(){let e=[];
375if(!It(this.ogSections,this.currLogicSections)){const t=new Set(this.ogSections.map(s=>s.id));e=this.currLogicSections.filter(s=>!t.has(s.id))}return e},showFeedbackSections(){let e=!1;return(this.hasALogicQuestion&&(this.logicFeedbackObject&&this.logicFeedbackObject.length>0||this.logicDocumentsFeedback&&this.logicDocumentsFeedback.length>0)||this.objectFeedback&&(this.objectFeedback.sections&&this.objectFeedback.sections.length>0||this.objectFeedback.documents&&this.objectFeedback.documents.length>0))&&(e=!0),e},rulesQuestions(){if(!(Array.isArray(this.mySchema)&&this.mySchema.length>0||this.mySchema&&typeof this.mySchema=="object"&&Object.keys(this.mySchema).length>0))return!1;const s=(this.hasALogicQuestion?this.logicStepsList:this.listTabs).map(r=>r.id),c=this.list.filter(r=>!["addressf","group","richText","informeUrbanistico","apiRequest","file","actasNuevoLeon","educacionNuevoLeon"].includes(r.kind)&&s.includes(r.section));if(c.length===0)return!1;const o=r=>this.withSections&&this.withSectionsAsTabs?{rules:this.mySchema[r.section].schema[r.id]?.rules,answer:this.myModel[r.section].schema[r.id]}:this.withSections?{rules:this.mySchema[r.section].schema[r.id]?.rules,answer:this.myModel[r.section].schema[r.id]}:{rules:this.mySchema[r.id]?.rules,answer:this.myModel[r.id]};for(const r of c){let{answer:d}=o(r);const{rules:a}=o(r);if(a&&a.length>0){const m=d==null||d==="",v=r.required===!0,p=r.kind==="short"&&r.validationType==="mask";if(m&&!v&&p)continue;for(const u of a)if(d===void 0&&(d=null),u(d)!==!0)return!0}}return!1},disabledResponseFeedback(){const e=this.listDocuments.length>0?this.listDocuments.every(t=>t.valid===!0||t.valid===null||t.valid===!1&&t.fileNew):!0;return!this.changePrevention||this.rulesQuestions||this.stepRequiredQuestions||this.groupRequiredQuestions||!e},showViewAcknowledgmentButton(){return this.isAlcoholes||this.isREC||this.isNoticesREC?["Aprobado"].includes(this.viewItem.status2):!1},openSubstagePreventions(){return yt(this.viewItem?.status2)?Ah(this.viewItem):[]}},watch:{tab(e){this.activeTabSections[Number(e)]?.id==="newRequests"&&this.unreadCount>0&&this.markMessagesRead()},myModel:{handler(){this.hasALogicQuestion&&this.withSectionsAsTabs&&this.checkIfLogicQuestionChanged()&&this.removeEmptySections(!0)},immediate:!0,deep:!0},viewItem(e,t){(t.status2==="Pendiente de pago"||t.status2==="Verificando pago")&&e.status2!=="Pendiente de pago"&&e.status2!=="Verificando pago"&&e.status2!=="Rechazado"&&this.isNL===!0&&(this.dialogMessage={val:!0,title:this.$t("details.message"),message:"Etapa pagada exitosamente",icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"})},isAlcoholes(e){if(e){const t=this.viewItem?.outputDocuments?.find(s=>s.idAck==="acuseDeRespuesta");this.isAlcoholes&&this.viewItem.stageAll===this.viewItem.stageNow&&this.viewItem.status2!=="Aprobado"&&!t&&(this.organizeDataAck({...this.viewItem},"response",this.isAlcoholes,this.isREC,this.isNoticesREC),this.acknowledgmentResponseType="accepted",this.$refs.acceptenceAcknowledgment.generatePDF())}},formInvalid(e){e===!0?this.canAnswerFeedback=!1:this.viewItem.status2==="En prevención"&&(this.canAnswerFeedback=!0)}},beforeUnmount(){this.parentDOM&&(this.parentDOM.getElementsByClassName("v-slide-group__next")[0]?.removeEventListener("click",this.nextTab,{passive:!0}),this.parentDOM.getElementsByClassName("v-slide-group__prev")[0]?.removeEventListener("click",this.previousTab,{passive:!0})),this.request&&this.request()},async mounted(){this.$vuetify.display.xs&&(this.parentDOM=document.getElementById("tabs-content"),this.parentDOM?(this.parentDOM.getElementsByClassName("v-slide-group__next")[0]?.addEventListener("click",this.nextTab,{passive:!0}),this.parentDOM.getElementsByClassName("v-slide-group__prev")[0]?.addEventListener("click",this.previousTab,{passive:!0})):(console.warn("[expediente] #tabs-content not found on mobile; tab nav listeners skipped"),oe(new Error("[expediente] #tabs-content container missing on mobile view")))),this.userNavigator=ya(),le().open(),await this.initialize()},methods:{async saveAcuseInOutputDocs(e){if(this.regeneratingAck){console.log("âï¸ Guardando PDF URL temporalmente para regeneración manual"),this.tempAckPdfUrl=e;return}try{le().open();const t=this.viewItem.historical[this.viewItem.stageAll-2];if(this.acknowledgmentResponseType==="accepted")this.outputDocuments.push({documentUrl:e,userWhoUpload:t.completeBy||"",userWhoUploadName:t.completeByName||"",userWhoUploadEmail:t.completeByEmail||"",name:"Acuse de respuesta.pdf",createdAt:t.completeAt||je(),attachmentsWithSignatureAtAnotherStage:!0,attachmentsWithElectronicSignature:!1,stageUploaded:this.viewItem.stageAll-1,idAck:"acuseDeRespuesta"}),await this.update({outputDocuments:this.outputDocuments});else{const s=this.viewItem.user.company?"companies":"users",c=Ft(`/${s}/${this.viewItem.id_user}/documentsFinals`),o={acknowledgmentResponseId:c.id};await this.update(o),await vt(`${s}/${this.viewItem.id_user}/documentsFinals/${c.id}`,{...this.viewItem,...o,finalDocumentId:c.id,docType:"acknowledgment",acknowledgmentType:"response",status2:"Acuse",answerStatus:"Rechazado",createdAt:je(),ackUrl:e},!1),le().close()}le().close()}catch(t){le().close(),console.error("Error en saveAcuseInOutputDocs",t),oe(t)}},async getYear(){const e=je(),t=ge(new Date((e.seconds||e._seconds)*1e3),"yyyy");if(ge(new Date((e.seconds||e._seconds)*1e3),"M")==="1"){const c=this.parseDate(je()),{Timestamp:o}=await as(async()=>{const{Timestamp:d}=await import("./CNHyijYN.js").then(a=>a.i);return{Timestamp:d}},__vite__mapDeps([0,1,2]),import.meta.url),r=o.fromDate(ln(c,{years:1}));return ge(new Date((r.seconds||r._seconds)*1e3),"yyyy")}else return t},async getDataUMA(){this.year=await this.getYear();const e=await Wa(this.year);e.empty||e.forEach(t=>{this.UMA=t.data()})},async desistConfirmed(e){this.$analytics?.track?.(Se.tramite_detail_desist,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,procedure_status:this.viewItem.status2,stage_now:this.viewItem.stageNow}),le().open();let t={reasonsDeny:this.$t("details.commentReasonsDesist"),deny:{denyAt:je(),denyBy:this.user.uid,denyByEmail
375:this.user.email},status2:"Desistido",participants:[],participantsUid:[]};const s=await this.getPartCloseProcess("deniedProcess");t={...t,...s};const c=this.viewItem.historical[this.viewItem.stageNow-1],o=c.configStage;if(o&&o.type==="cita"){const r=c.appointmentId||"",d=this.listData.find(a=>a.id===r);if(r&&d&&d.status==="inProgress"){this.viewItem.historical[this.viewItem.stageNow-1].appointmentId=null,t={...t,historical:this.viewItem.historical};const a={status:"cancelled",observations:this.$t("details.cancelledByDesist"),updateDescription:"Status changed",updateType:"cancelledAppointment"};d.currentTaskName&&await this.deleteTask(d.currentTaskName),await this.updateAppointment({newValues:a,element:d})}}else if(o&&o.type==="inspectores"){const r=[];if(await this.getInspectionsForStage((this._.provides[Ae]||this.$route).params.module_id,(this._.provides[Ae]||this.$route).params.submodule_id,this.viewItem.slugRequest,(this._.provides[Ae]||this.$route).params.details_id,this.viewItem.stageNow).then(d=>{d.empty||d.docs.forEach(a=>{r.push({...a.data(),id:a.id})})}),r.length>0){const d=r[0];if(["pending","assigned","late"].includes(d.status)){const a={status:"cancelled",updateType:"cancelledInspection",updateDescription:"Status changed: Cancelled inspection",observations:this.$t("details.cancelledInspectionByDesist")};this.updateInspection({element:d,newValues:a,answer:{}})}}}try{if(e){const r=this.viewItem.company?"companies":"users",d=Ft(`/${r}/${this.viewItem.id_user}/documentsFinals`);await vt(`${r}/${this.viewItem.id_user}/documentsFinals/${d.id}`,{...this.viewItem,...t,finalDocumentId:d.id,desistInfo:{...e}},!1).then(()=>{t.finalDocumentId=d.id,t.desistInfo={...e}}).catch(a=>{De().open({color:"error",text:this.$t("something_went_wrong")+": "+a})})}await this.update(t),this.viewItem.currentTaskName&&await this.deleteTask(this.viewItem.currentTaskName).then(()=>{le().close()})}catch(r){console.error(r),oe(r),le().close()}this.dialogMessage={title:this.$t("details.message"),message:this.$t("details.mensajeDenyAutomaticPayment"),type:"error"},this.showNotify()},nextTab(){this.tab=String(Number(this.tab)+1)},previousTab(){this.tab=String(Number(this.tab)-1)},async markMessagesRead(){if(this.answerPath)try{await gs("answers-markMessagesAsRead",{answerPath:this.answerPath,role:"citizen"})}catch(e){console.error("[messageStats] markMessagesAsRead failed",e),oe(e,{tags:{feature:"messageStats"},extra:{answerPath:this.answerPath,code:e?.code}})}},buildAppointmentInfo(e,t){return{...e.saveParent,appointmentConfig:t,postId:e.slugRequest,submoduleName:(this._.provides[Ae]||this.$route).query.t,title:e.title,description:e.description,...e.procedureVersion?{procedureVersion:e.procedureVersion}:{}}},initialize(){const e=this;let t=!1;const s=(this._.provides[Ae]||this.$route).query.procedureId;if(!s||s==="undefined"){this.loading=!1,this.$router.push({path:"/expediente"});return}const c=`modules/${(this._.provides[Ae]||this.$route).params.module_id}/${(this._.provides[Ae]||this.$route).params.submodule_id}/${s}/answers/${(this._.provides[Ae]||this.$route).params.details_id}`;this.answerPath=c,this.request=fs(c,async o=>{if(o.exists()&&o.data().createdBy===e.user.uid){e.list=[],e.loading=!1,e.viewItem=o.data(),t||(t=!0,e.$analytics?.track?.(Se.tramite_detail_view,{procedure_id:s,procedure_status:e.viewItem.status2,stage_now:e.viewItem.stageNow})),e.viewItem.status2==="Citado"&&await e.checkAppointments(),["Pendiente de pago","Verificando pago","Generando cobro"].includes(e.viewItem.status2)&&await this.getDataUMA();const r=await wh().resolve(o.data().procedureVersion,o.data().saveParent);e.formData=r,e.list=ke(r.questions),e.outputDocuments=[],e.listDocuments=await e.getSortedDocumentsWithSectionName(o.data().listDocuments),e.viewItem.outputDocuments?e.outputDocuments=e.viewItem.outputDocuments:(e.outputDocuments=[],e.viewItem.outputDocuments=[]),e.originalFiles=ke(e.listDocuments),e.createdAt=e.formatDate(e.viewItem.createdAt)+" hrs",e.updatedAt=e.viewItem.updatedAt?e.formatDate(e.viewItem.updatedAt)+" hrs":null,e.preFolio=o.data().preFolio||"",e.folio=o.data().folio||"";try{await e.getAppointmentsForStage(e.$route.params.module_id,e.$route.params.submodule_id,e.viewItem.slugRequest,e.$route.params.details_id)}catch(d){console.error(d),oe(d)}if(e.openSubstagePreventions.length>0&&e.syncSubstagePreventionSections(),await this.initForm(),await e.revisarValidaciones(),this.viewItem.status2==="En prevención"||this.viewItem.status2==="En preventiva")await this.contadorTiempoFeedback();else if(this.viewItem.status2==="Pendiente de pago")await this.contadorTiempoPayment();else if(this.viewItem.status2==="Pendiente de firma"&&(this.operatorHasRequestedSignature=this.viewItem.historical[this.viewItem.stageNow-1].operatorHasRequestedSignature||!1,this.operatorSignatureRequested=this.viewItem.historical[this.viewItem.stageNow-1].operatorSignatureRequested||!1,this.operatorHasRequestedSignature&&await this.signatureCountdown(),this.viewItem.historical[this.viewItem.stageNow-1]&&this.viewItem.historical[this.viewItem.stageNow-1].configStage.type==="electronicSignatureRequest")){const d=this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList.length+2:this.listTabs.length+2;this.tab=`${d}`}if(this.documentsToSign=this.viewItem.documentsToSign||[],await this.verificarSiExisteEmision(),this.hasALogicQuestion&&this.withSectionsAsTabs&&(await this.removeEmptySections(!0),this.ogSections=ke(this.logicStepsList)),this.viewItem.status2==="Citado"){const a=e.viewItem.historical[e.viewItem.stageNow-1].configStage;e.viewItem.historical[e.viewItem.stageNow-1].totalMissingSchedules===void 0&&(e.viewItem.historical[e.viewItem.stageNow-1].totalMissingSchedules=a.rescheduleMissingDateSwitch?Number(a.rescheduleMissingDateMaximum)+1:1);
375const m={attentionTime:a.timeAppointment,officesList:a.officesList,rescheduleAppointmentActive:a.rescheduleDateSwitch||!1,rescheduleAppointmentLimit:a.rescheduleDateMaximum||0,rescheduleMissingAppointmentActive:a.rescheduleMissingDateSwitch||!1,rescheduleMissingAppointmentLimit:a.rescheduleMissingDateMaximum||0,totalMissingSchedules:e.viewItem.historical[e.viewItem.stageNow-1].totalMissingSchedules,automaticallyDeny:a.automaticDenyForCancelling||!1,cancelApptAutomaticallySwitch:a.cancelApptAutomaticallySwitch||!1,cancelApptAutomaticallyTime:a.cancelApptAutomaticallyTime||0};e.appointmentInfo=e.buildAppointmentInfo(e.viewItem,m)}if(this.isNL===!0&&await this.checkStageBefore(),(this.isAlcoholes||this.isREC||this.isNoticesREC)&&!this.viewItem.acknowledgmentResponseId&&this.viewItem.status2==="Rechazado"&&(this.shouldGenerateAutoDenialAck=!0,this.acknowledgmentResponseType="denied",this.organizeDataAck({...this.viewItem,updatedAt:je()},"response",this.isAlcoholes,this.isREC,this.isNoticesREC),this.isAlcoholes?await this.$refs.acceptenceAcknowledgment.generatePDF():this.isREC?await this.$refs.recAcceptenceAcknowledgment.generatePDF():this.isNoticesREC&&await this.$refs.noticesRecAcceptenceAcknowledgment.generatePDF()),this.openSubstagePreventions.length>0)this.dialogFeedback=!1,this.syncSubstagePreventionDocuments();else if(this.viewItem.status2==="En prevención"){const d=this.viewItem.stageNow-1,a=this.viewItem.historical?.[d],m=a?.feedbacks?.[a?.noPrevention-1]?.prevention?.objectFeedback;m&&(this.dialogFeedback=!0,this.objectFeedback=m,this.hasALogicQuestion&&this.getLogicFeedbackSections())}else this.dialogFeedback=!1;le().close()}else this.$router.push({path:"/expediente"})},o=>{De().open({color:"error",text:this.$t("errorGeneric")}),console.error("Error getting documents: ",o),oe(o),this.loadingSchedule=!1})},async checkAppointments(){let e="";this.viewItem.saveParent.config.setOnlyAppointments===!0?e=`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/appointments`:e=`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}/appointments`;try{const t=await vs(e,[{field:"status",op:"==",value:"inProgress"}],{orderByField:"createdAt",orderDirection:"desc"}),{doc:s,deleteDoc:c}=await as(async()=>{const{doc:r,deleteDoc:d}=await import("./CNHyijYN.js").then(a=>a.i);return{doc:r,deleteDoc:d}},__vite__mapDeps([0,1,2]),import.meta.url),o=t.docs.slice(1).filter(r=>!r.data().folio).map(r=>c(s(js,`${e}/${r.id}`)));await Promise.all(o)}catch(t){console.error(t),oe(t)}},async initForm(){this.loading=!0;const e={},t={},s=this,{title:c,description:o,sections:r,config:d}=this.formData;let{questions:a}=this.formData;if(s.title=c,s.description=o,s.withSectionsAsTabs=d.withSectionsAsTabs,s.withSections=d.withSections,s.answerAnonymous=d.answerAnonymous,d.withSections){for(const p in r){const u=r[p],A=u.icon??"",g=a.filter(function(F){return F.section===u.id}),C=s.sort;s.sort=s.sort+1;const _=await s.orderList(g),S=_.questions,I=s.reduceList(S,u.multipleAnswers,_.column1,_.column2);let P;u.multipleAnswers?(P={sectionTitle:{valid:u.valid,commentOperator:u.commentOperator,icon:A,title:u.name,type:"sectionTitle",col:{cols:12},sort:C},add:{type:"btn",iconCenter:"mdi-plus",label:this.$t("details.add"),dark:!0,class:"mb-2",color:"blue-lighten-2"},spacer:{type:"spacer",col:{sm:12}},answers:{type:"array",schema:I}},t[u.id]={answers:[{}]}):P={sectionTitle:{valid:u.valid,commentOperator:u.commentOperator,icon:A,title:u.name,type:"sectionTitle",col:{cols:12},sort:C},schema:I},e[u.id]=P,S.forEach(F=>{F.defaultAnswer&&s.insertDefaultAnswer(F,t,d.withSections)}),t[u.id]||(t[u.id]={schema:{}})}s.myModel=t,s.mySchema=e;for(const[p,u]of Object.entries(s.mySchema)){const A=u.schema;for(const[S,I]of Object.entries(A))(I.kind==="file"||I.kind==="cert")&&delete A[S];const g=Object.values(A),C=g.length>0&&g.every(S=>S.type==="spacer");(g.length===0||C)&&(d.withSectionsAsTabs?A.deleteFeature=!0:delete s.mySchema[p])}s.withSectionsAsTabs=d.withSectionsAsTabs}else{const p=await s.orderList(a);
375a=p.questions,s.mySchema=this.reduceList(a,null,p.column1,p.column2),a.forEach(u=>s.insertDefaultAnswer(u,t,d.withSections)),a.every(u=>u.kind==="file")||Object.entries(a).forEach(u=>{(u[1].type==="custom-file"||u[1].kind==="cert")&&delete s.mySchema[u[1].id]}),s.myModel=t}this.loading=!1;const m=this.mySchema,v=[];s.myModel=s.viewItem,this.withSectionsAsTabs?Object.keys(m).forEach(function(p){v.push({id:p,title:m[p].sectionTitle.title,icon:m[p].sectionTitle.icon,schema:m[p].schema,edited:!1,valid:s.myModel[p].validForm,commentOperator:s.myModel[p].commentOperator})}):this.withSections?this.list.every(p=>p.kind==="file"||p.kind==="cert")===!1&&v.push({id:"formulario",title:this.$t("details.formulario"),icon:"mdi-file-document"}):this.list.every(p=>p.kind==="file"||p.kind==="cert")===!1&&v.push({id:"formulario",title:this.$t("details.formulario"),icon:"mdi-file-document"}),this.listTabs=v,s.listDocuments.length>0&&s.listTabs.push({id:"documentos",title:this.$t("details.documentos"),icon:"mdi-file",schema:s.listDocuments}),s.listData&&s.listData.length>0&&s.listTabs.push({id:"appointments",title:this.$t("appointments.myAppointments"),icon:"mdi-clock"}),s.listTabs.push({id:"newRequests",title:this.$t("newRequests.title"),icon:"mdi-file"}),this.hasALogicQuestion&&this.withSectionsAsTabs||ai(s.listTabs),this.getCleanModel(),this.listTabs!==null&&(this.tab="0")},async revisarValidaciones(){const e=this;e.validaciones.allValidTrue=!0,e.validaciones.allValid=!0,e.validaciones.validDocuments=!0,e.commentComplete=!0;let t=0,s=0,c=0;for(const o in e.viewItem.listDocuments){const r=e.viewItem.listDocuments[o];r.valid===!1?(e.validaciones.validDocuments=!1,e.validaciones.allValidTrue=!1,r.commentOperator?.length===0&&(e.commentComplete=!1)):r.valid,r.required===!0&&(r.valid===!1?c=c+1:r.valid===!0&&(s=s+1),t=t+1)}s+c<t?(e.validaciones.allValid=null,e.validaciones.allValidTrue=!1):(e.validaciones.allValid=e.validaciones.validDocuments,e.validaciones.allValidTrue=e.validaciones.validDocuments),await e.listTabs.forEach(function(o,r){o.id==="documentos"&&(e.listTabs[r].valid=e.validaciones.allValid)}),this.hasALogicQuestion&&await e.logicStepsList.forEach(function(o,r){o.id==="documentos"&&(e.logicStepsList[r].valid=e.validaciones.allValid)}),this.viewItem.saveParent.config.withSectionsAsTabs===!0?this.hasALogicQuestion?await e.logicStepsList.forEach(function(o){o.id!=="documentos"&&o.id!=="newRequests"&&(o.valid===!1||o.valid===null?((e.viewItem.status2==="En prevención"||e.viewItem.status2==="En preventiva")&&e.editarForm(!0,!1,o.id),e.validaciones.allValidTrue=!1,e.validaciones.allValid=!1,o.commentOperator&&o.commentOperator.length===0&&(e.commentComplete=!1)):o.valid===null&&(e.validaciones.allValidTrue=!1))}):await e.listTabs.forEach(function(o){o.id!=="documentos"&&o.id!=="newRequests"&&(o.valid===!1?((e.viewItem.status2==="En prevención"||e.viewItem.status2==="En preventiva")&&e.editarForm(!0,!1,o.id),e.validaciones.allValidTrue=!1,e.validaciones.allValid=!1,o.commentOperator&&o.commentOperator.length===0&&(e.commentComplete=!1)):o.valid===null&&(e.validaciones.allValidTrue=!1))}):this.viewItem.validForm===!1?(this.validaciones.allValidTrue=!1,this.validaciones.allValid=!1,this.viewItem.commentOperator&&this.viewItem.commentOperator.length===0&&(this.commentComplete=!1),(this.viewItem.status2==="En prevención"||this.viewItem.status2==="En preventiva")&&this.editarForm(!0,!0)):this.viewItem.validForm===null&&(this.validaciones.allValidTrue=!1)},async updateListOfAppointments(){try{await this.getAppointmentsForStage((this._.provides[Ae]||this.$route).params.module_id,(this._.provides[Ae]||this.$route).params.submodule_id,this.viewItem.slugRequest,(this._.provides[Ae]||this.$route).params.details_id),console.log("updateListOfAppointments"),this.tab="0"}catch(e){console.error(e),oe(e)}},async removeApptInCurrentStage(){this.viewItem.historical[this.viewItem.stageNow-1].appointmentId=null;const e={historical:this.viewItem.historical};await this.update(e),this.viewItem.historical[this.viewItem.stageNow-1].totalMissingSchedules<=0&&this.viewItem.historical[this.viewItem.stageNow-1].configStage.automaticDenyForCancelling&&await this.automaticDenyForAppt()},async automaticDenyForAppt(){const e=this,t={updatedAt:je(),updatedBy:e.user.uid,updatedByEmail
375:e.user.email,updatedByName:e.user.first_name+" "+e.user.last_name+(e.user.last_name2?" "+e.user.last_name2:""),reasonsDeny:this.$t("details.commentReasonsDenyAppt"),status2:"Rechazado",participants:[],participantsUid:[]};await e.viewItem.historical.forEach(async s=>{await s.participants.forEach(async d=>{await t.participants.push({email:d.email,name:d.name,uid:d.uid})});const c=t.participants,o=new Set(c.map(JSON.stringify)),r=Array.from(o).map(JSON.parse);t.participants=r,t.participantsUid=r?r.map(d=>d.uid):[]}),await e.update(t),e.viewItem.currentTaskName&&await e.deleteTask(e.viewItem.currentTaskName),this.dialogMessage={val:!0,title:this.$t("details.message"),message:this.$t("details.mensajeDenyAutomaticAppt"),icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"}},async saveApptInCurrentStage(e){this.viewItem.historical[this.viewItem.stageNow-1].appointmentId=e,this.viewItem.historical[this.viewItem.stageNow-1].totalMissingSchedules=Number(this.viewItem.historical[this.viewItem.stageNow-1].totalMissingSchedules)-1;const t={historical:this.viewItem.historical};await this.update(t),this.scheduleAppointment=!1},getCleanModel(){Object.keys(this.mySchema).forEach(t=>{this.originalModel[t]=ke(this.myModel[t])})},async checkLogicAtBlur(){if(this.hasALogicQuestion&&this.withSectionsAsTabs){const e=this.originalModel,t=this.myModel;let s=!1;const c=Object.keys(this.mySchema);for(const o of c){const r=this.list.find(d=>d.section===o&&d.goToSection===!0);if(r&&!It(e[o].schema[r.id],t[o].schema[r.id])){s=!0;break}}this.originalModel=ke(this.myModel),s&&await this.removeEmptySections(!0)}},checkIfLogicQuestionChanged(){const e=this.originalModel,t=this.myModel;let s=!1;const c=Object.keys(this.mySchema);for(const o of c){const r=this.list.find(d=>d.section===o&&d.goToSection===!0);if(r&&["radio","informeUrbanistico","dropdown"].includes(r.kind)&&!It(e[o].schema[r.id],t[o].schema[r.id])){s=!0,this.originalModel=ke(this.myModel);break}}return s},async removeEmptySections(e){const t=this,s=[],c=Object.keys(this.mySchema);for(let o=0;o<c.length;){s.push(this.listTabs[o]);const r=this.list.some(a=>a.section===c[o]&&a.goToSection===!0);let d=null;if(r){const a=this.list.find(m=>m.section===c[o]&&m.goToSection===!0);if(a.goToSection&&a.kind==="apiRequest"&&a.selectedApi&&a.valueName&&a.param){const m=a.valueName,v=this.myModel[c[o]].schema[a.id],p=this.myModel[c[o]].schema[a.id][m];if(p)if(d=a.options.find(u=>u.label===p),!d)oe(new Error(`[details_id] removeEmptySections: no option matched answerAPI (questionId=${a.id})`)),o=o+1;else if(d.redirectToSection==="next")o=o+1;else{if(d.redirectToSection==="last")break;d.redirectToSection?o=d.redirectToSection:o=o+1}else if(!p&&v&&v.input){const u=v.input;this.loaderBtn=!0;try{const A=await $fetch(a.selectedApi.url,{method:"POST",body:{[a.param]:`${u}`}});this.loaderBtn=!1;let g=null;if(os(A)&&(g=A[a.valueName]),g){const C=a.options.find(_=>_.label===g);C?(d=C,this.myModel[c[o]].schema[a.id]={...this.myModel[c[o]].schema[a.id],[a.valueName]:g}):this.invalidApiRequest=!0}else this.invalidApiRequest=!0}catch(A){this.loaderBtn=!1,this.invalidApiRequest=!0,console.error(`Error al hacer peticion (CustomApi): ${A}`),oe(A)}if(d!==null)if(d.redirectToSection==="next")o=o+1;else{if(d.redirectToSection==="last")break;d.redirectToSection?o=d.redirectToSection:o=o+1}else if(this.invalidApiRequest)break}else o=o+1}else if(a.goToSection&&a.kind==="informeUrbanistico"&&a.valueName){const v=(this.myModel[c[o]].schema[a.id]?.apiResponse||{})[a.valueName];if(v)if(d=a.options.find(p=>p.label===v),d)if(d.redirectToSection==="next")o=o+1;else{if(d.redirectToSection==="last")break;d.redirectToSection?o=d.redirectToSection:o=o+1}else this.invalidApiRequest=!0;else this.invalidApiRequest=!0;if(this.invalidApiRequest)break}else if(a.goToSection&&(!["radio","dropdown"].includes(a.kind)||["radio","dropdown"].includes(a.kind)&&a.answersFromCatalog))if(d=a.redirectToSection,d)if(d==="next")o=o+1;else{if(d==="last")break;d?o=d:o=o+1}else o=o+1;else{const m=this.myModel[c[o]].schema[a.id];if(m)if(d=a.options.find(v=>v.label===m),!d)oe(new Error(`[details_id] removeEmptySections: no option matched answerUser (questionId=${a.id})`)),o=o+1;else if(d.redirectToSection==="next")o=o+1;else{if(d.redirectToSection==="last")break;d.redirectToSection?o=d.redirectToSection:o=o+1}else o=o+1}}else o=o+1}this.listDocuments.length>0&&s.push({id:"documentos",title:this.$t("details.documentos"),icon:"mdi-file",schema:this.listDocuments}),t.listData&&t.listData.length>0&&s.push({id:"appointments",title:this.$t("appointments.myAppointments"),icon:"mdi-clock"}),s.push({id:"newRequests",title:this.$t("newRequests.title"),icon:"mdi-file"}),ai(s),this.logicStepsList=s,this.currLogicSections=ke(s),e&&this.getUpdatedFileInputs(),this.dialogFeedback&&this.objectFeedback.sections&&this.getLogicFeedbackSections(),this.revisarValidaciones()},getLogicFeedbackSections(){const e=new Set(this.currLogicSections.map(s=>s.id));this.logicFeedbackObject=this.objectFeedback?.sections.filter(s=>e.has(s.id));const t=new Set(this.listDocuments.map(s=>s.name));this.logicDocumentsFeedback=this.objectFeedback?.documents.filter(s=>t.has(s.name))},async orderList(e){const t=this;let s=[],c=!1,o=!1;if(await e.forEach(r=>{r.column==="1"&&(c=!0),r.column==="2"&&(o=!0)}),c===!0||o===!0){let r=e.filter(a=>a.column==="1"),d=await e.filter(a=>a.column==="2");if(r=r.sort(function(a,m){return a.index>m.index}),d=d.sort(function(a,m){return a.index>m.index}),r.forEach((a,m)=>{if(t.sort=t.sort+1,a.sort=t.sort,s.push(a),d.length-1>=m){const v=d[m];t.sort=t.sort+1,v.sort=t.sort,s.push(v)}}),r.length<d.length){for(let a=r.length;a<d.length;a++){const m=d[a];t.sort=t.sort+1,m.sort=t.sort,s.push(m)}t.sort=t.sort+1}}else s=ke(e);return{questions:s,column1:c,column2:o}},reduceList(e,t,s,c){const o=this,r=e.reduce(function(d,a,m){switch(a.rules=[],a.kind){case"paragraph":if(
375a.type="textarea",a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.limitCharacters)if(a.minCharacters>=0&&a.maxCharacters)a.required?a.rules.push(u=>u?.length>=a.minCharacters&&u?.length<=a.maxCharacters||`${o.$t("forms.characterLimit")}: ${a.minCharacters} ${o.$t("and")} ${a.maxCharacters}`):a.rules.push(u=>u===null||u?.length>=a.minCharacters&&u?.length<=a.maxCharacters||`${o.$t("forms.characterLimit")}: ${a.minCharacters} ${o.$t("and")} ${a.maxCharacters}`);else{const u=a.required?1:0;a.rules.push(A=>A?.length<u&&A?.length>1e3||`${o.$t("forms.characterLimit")}: ${u} ${o.$t("and")} 1000`)}break;case"radio":if(a.answersFromCatalog){const u=a.optionsCatalog.map(A=>({name:A.name,id:A.id,customId:A.customId}));a.options=u}else if(a.goToSection){const u=(a.options||[]).map(A=>A?.label).filter(Boolean);a.options=u}if(a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=!0),a.validateAnswer)switch(a.rejectType){case"includes":a.rules.push(u=>!a.invalidAnswers.includes(u)||o.$t("procedures.includes")+" "+a.invalidAnswers.join(", "));break;case"equalToValues":a.rules.push(u=>u!==a.invalidAnswer||o.$t("procedures.equalTo")+" "+a.invalidAnswer);break}a.type="radio",a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a.column=!0,a["return-object"]=!0,a["item-title"]="name";break;case"checkbox":if(a.answersFromCatalog){const u=a.optionsCatalog.map(A=>({name:A.name,id:A.id,customId:A.customId}));a.options=u}if(a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.validateAnswer)switch(a.rejectType){case"includes":a.rules.push(u=>!a.invalidAnswers.some(A=>u?.includes(A))||o.$t("procedures.includes")+" "+a.invalidAnswers.join(", "));break;case"equalToValues":a.rules.push(u=>{const g=ke(u)?.sort();return!It(a.invalidAnswer.sort(),g)||o.$t("procedures.equalTo")+" "+a.invalidAnswer.join(", ")});break}a.type="select",a.multiple=!0,a.items=a.options,a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a["return-object"]=!0,a["item-title"]="name";break;case"dropdown":if(a.answersFromCatalog){const u=a.optionsCatalog.map(A=>({name:A.name,id:A.id,customId:A.customId}));a.options=u}else if(a.goToSection){const u=(a.options||[]).map(A=>A?.label).filter(Boolean);a.options=u}if(a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.validateAnswer)switch(a.rejectType){case"includes":a.rules.push(u=>!a.invalidAnswers.includes(u)||o.$t("procedures.includes")+" "+a.invalidAnswers.join(", "));break;case"equalToValues":a.rules.push(u=>u!==a.invalidAnswer||o.$t("procedures.equalTo")+" "+a.invalidAnswer);break}a.type="select",a.items=a.options,a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a["return-object"]=!0,a["item-title"]="name";break;case"date":if(a.type="text",a.ext="date",a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a.text={label:a.label,appendIcon:"mdi-calendar"},a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.validateAnswer)switch(a.rejectType){case"lessThan":a.required?a.rules.push(u=>Date.parse(u)>Date.parse(a.fixedDate)||o.$t("procedures.lessThan")+" "+a.fixedDate):a.rules.push(u=>u===null||Date.parse(u)>Date.parse(a.fixedDate)||o.$t("procedures.lessThan")+" "+a.fixedDate);break;case"moreThan":a.required?a.rules.push(u=>Date.parse(u)<Date.parse(a.fixedDate)||o.$t("procedures.moreThan")+" "+a.fixedDate):a.rules.push(u=>u===null||Date.parse(u)<Date.parse(a.fixedDate)||o.$t("procedures.moreThan")+" "+a.fixedDate);break;case"equalTo":a.required?a.rules.push(u=>Date.parse(u)!==Date.parse(a.fixedDate)||o.$t("procedures.equalTo")+" "+a.fixedDate):a.rules.push(u=>u===null||Date.parse(u)!==Date.parse(a.fixedDate)||o.$t("procedures.equalTo")+" "+a.fixedDate);break;case"betweenValues":a.rules.push(u=>!(Date.parse(u)>=Date.parse(a.minDate)&&Date.parse(u)<=Date.parse(a.maxDate))||o.$t("procedures.betweenValues")+" "+a.minDate+" "+o.$t("procedures.and")+" "+a.maxDate);break}break;case"time":if(a.type="text",a.ext="time",a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.text={label:a.label,appendIcon:"mdi-clock"},a.validateAnswer)switch(a.rejectType){case"lessThan":a.required?a.rules.push(u=>u>a.fixedHour||o.$t("procedures.lessThan")+" "+a.fixedHour):a.rules.push(u=>u===null||u>a.fixedHour||o.$t("procedures.lessThan")+" "+a.fixedHour);break;case"moreThan":a.required?a.rules.push(u=>u<a.fixedHour||o.$t("procedures.moreThan")+" "+a.fixedHour):a.rules.push(u=>u===null||u<a.fixedHour||o.$t("procedures.moreThan")+" "+a.fixedHour);break;case"equalTo":a.required?a.rules.push(u=>u!==a.fixedHour||o.$t("procedures.equalTo")+" "+a.fixedHour):a.rules.push(u=>u===null||u!==a.fixedHour||o.$t("procedures.equalTo")+" "+a.fixedHour);break;case"betweenValues":a.rules.push(u=>!(u>=a.minHour&&u<=a.maxHour)||o.$t("procedures.betweenValues")+" "+a.minHour+" "+o.$t("procedures.and")+" "+a.maxHour);break}break;case"file":a.type="custom-file",a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0,a.rules=[],a.required&&a.rules.push(u=>!!u||o.$t("details.fieldRequired")),a.acceptedFiles&&a.acceptedFiles.length>0?(a.accept=a.acceptedFiles.join(", "),a.rules.push(u=>a.acceptedFiles.includes(u?.type)||!u||o.$t("solo-se-aceptan"))):(a.acceptedFiles=["application/pdf"],a.accept=a.acceptedFiles.join(", "),a.rules.push(u=>a.acceptedFiles.includes(u?.type)||!u||o.$t("solo-se-aceptan"))),a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.maxFileSize?a.rules.push(u=>!u||u.size<a.maxFileSize*1e6||`${o.$t("details.tamFileSupered")} ${a.maxFileSize} MB`):a.rules.push(u=>!u||u.size<1*1e6||`${o.$t("details.tamFileSupered")} 100 MB`);break;case"searchField":a.type="custom-search",a.col={cols:12,sm:12,md:6},a.outlined=!0,a.singleLine=!0,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;case"searchFieldCP":a.type="custom-search-cp",a.col={cols:12,sm:12,md:6},a.outlined=!0,a.singleLine=!0,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;case"inspectores":a.type="custom-inspectores",a.col={cols:12},a.outlined=!0,a.singleLine=!0,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;case"addressf":a.type="custom-addressf",a.col={cols:12},a.outlined=!0,a.singleLine=!0;break;case"group":a.type="custom-questions",a.col={cols:12},a.disableFile=!0,a.softDelete=!0,a["data-pw"]=`${a.id}_Input`,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;
375case"richText":a.type="custom-richtext",a.col={cols:12};break;case"apiRequest":a.type="custom-api",a.col={cols:12,sm:12,md:6},a["data-pw"]=`${a.id}_Input`,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.options=a.options.map(u=>u.label);break;case"informeUrbanistico":a.type="custom-informe",a.col={cols:12},a["data-pw"]=`${a.id}_Input`,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;case"actasNuevoLeon":o.isNL||o.$config.firebase.projectId==="lab-cmp"?a.type="custom-actas":a.type="text",a.col={cols:12},a["data-cy"]=`${a.id}_Input`,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;case"educacionNuevoLeon":o.isNL||o.$config.firebase.projectId==="lab-cmp"?a.type="custom-educacion":a.type="text",a.col={cols:12},a["data-cy"]=`${a.id}_Input`,a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint);break;default:if(a.type==="number"){if(a.type="number",a.required?a.rules.push(u=>/^-?\d*\.?\d+$/.test(u)||o.$t("invalidNumber")):a.rules.push(u=>u===null||/^-?\d*\.?\d+$/.test(u)||o.$t("invalidNumber")),a.validateAnswer)switch(a.rejectType){case"lessThan":a.rules.push(u=>Number(u)>Number(a.fixedQuantity)||o.$t("procedures.lessThan")+" "+a.fixedQuantity);break;case"moreThan":a.rules.push(u=>Number(u)<Number(a.fixedQuantity)||o.$t("procedures.moreThan")+" "+a.fixedQuantity);break;case"equalTo":a.rules.push(u=>Number(u)!==Number(a.fixedQuantity)||o.$t("procedures.equalTo")+" "+a.fixedQuantity);break;case"betweenValues":a.rules.push(u=>!(Number(u)>=Number(a.minQuantity)&&Number(u)<=Number(a.maxQuantity))||o.$t("procedures.betweenValues")+" "+a.minQuantity+" "+o.$t("procedures.and")+" "+a.maxQuantity);break}}else if(a.validationType==="basic")switch(a.type="text",a.basicValidationType){case"email":a.rules.push(u=>!u||/^[-\w.%+]{1,64}@(?:[A-Z0-9-]{1,63}\.){1,125}[A-Z]{2,63}$/i.test(u)||o.$t("forms.emailNotValid"));break;case"justText":a.rules.push(u=>!u||/^[^\d]+$/i.test(u)||o.$t("forms.justTextRule"));break;case"noSpecialCharacters":a.rules.push(u=>!u||/^[a-zA-Z0-9 ]+$/i.test(u)||o.$t("forms.noSpecialChRules"));break}else if(a.validationType==="mask"){switch(a.type="custom-mask",a.maskType){case"phoneNumber":a.mask="(###) ### ####";break;case"postalCode":a.mask="#####";break;case"curp":a.mask="AAAA######AAAAAAN#";break;case"custom":a.mask=a.customMask;break}a.mask=ha(a.mask),a.rules.push(u=>ga(a.mask).test(u)||`${o.$t("forms.invalidFormat")}: ${a.mask}`)}else a.type="text";if(a.limitCharacters)if(a.minCharacters>=0&&a.maxCharacters)a.required?a.rules.push(u=>u?.length>=a.minCharacters&&u?.length<=a.maxCharacters||`${o.$t("forms.characterLimit")}: ${a.minCharacters} ${o.$t("and")} ${a.maxCharacters}`):a.rules.push(u=>u===null||u?.length>=a.minCharacters&&u?.length<=a.maxCharacters||`${o.$t("forms.characterLimit")}: ${a.minCharacters} ${o.$t("and")} ${a.maxCharacters}`);else{const u=a.required?1:0;a.rules.push(A=>A?.length<u&&A?.length>1e3||`${o.$t("forms.characterLimit")}: ${u} ${o.$t("and")} 1000`)}a.withHint&&a.hintText&&(a.hint=a.hintText,a.persistentHint=a.alwaysShowHint),a.col={cols:12,sm:12,md:6},a.singleLine=!0,a.outlined=!0;break}o.viewItem.saveParent.config.withSections===!1&&(o.viewItem.status2==="En prevención"||o.viewItem.status2==="En preventiva")&&o.viewItem.validForm===!1?a?.typeOfPerson?a.disabled=!0:a.disabled=!1:a.disabled=!0;const v=a.kind==="short"&&a.type==="number";a.required&&a.kind!=="file"&&!v&&a.rules.push(u=>!!u||o.$t("details.fieldRequired")),d[a.id]=a;const p=e[m-1];return a.spacer||s===!0&&c===!1?d["spacer"+m]={type:"spacer",col:{sm:6},sort:parseFloat(a.sort)+parseFloat(.01)}:(s===!1&&c===!0||p&&p.column==="2"&&a.column==="2")&&(d["spacer"+m]={type:"spacer",col:{sm:6},sort:parseFloat(a.sort)-parseFloat(.01)}),d},{});return t&&(r.remove={type:"btn",iconCenter:"mdi-delete",label:this.$t("details.delete"),dark:!0,class:"mb-2",color:"blue-lighten-2"}),r},insertDefaultAnswer(e,t,s){e.kind!=="file"&&(s===!0?[e.section]in t?t[e.section].schema[e.id]=this.user[e.defaultAnswerKey]:(Object.assign(t,{[e.section]:{schema:{}}}),t[e.section].schema[e.id]=this.user[e.defaultAnswerKey]):Object.assign(t,{[e.id]:this.user[e.defaultAnswerKey]}))},updateFile(e){const t=ke(this.listDocuments);
375t[e.idx].fileNew=e.file,this.listDocuments=ke(t);const s=this.listTabs.findIndex(c=>c.id==="documentos");s>=0&&(this.listTabs[s].schema=this.listDocuments)},getUpdatedFileInputs(){const e=[],t=[];this.logicStepsList.forEach(s=>{s&&s.id!=="documentos"&&e.push({id:s.id,schema:s.schema})}),e.forEach(s=>{for(const c in s.schema)if(c.includes("noExpedienteCatastral")){let o=this.originalFiles.find(r=>r.name==="comprobanteNoAdeudoPDF"&&r.section===s.id);o&&t.push(o),o=this.originalFiles.find(r=>r.name==="comprobanteNoAdeudoXML"&&r.section===s.id),o&&t.push(o)}this.list.forEach((c,o)=>{let r={};if(c.kind==="file"&&c.section===s.id){const d=this.originalFiles.find(a=>a.name===c.id&&a.section===s.id);d?t.push(d):(r={id:o+1,section:s.id,name:c.id,type:"",size:0,valid:!1,commentOperator:"",nameFile:c.label||c.id,required:c.required||!1,acceptedFiles:c.acceptedFiles&&c.acceptedFiles.length>0?c.acceptedFiles:["application/pdf"],maxFileSize:c.maxFileSize?c.maxFileSize:"2"},t.push(r))}if(c.kind==="group"&&c.section===s.id){const d=c.questions,a=this.myModel[s.id].schema[c.id];d.forEach(m=>{m.kind==="file"&&a&&a.forEach((v,p)=>{if(!v.prevAdded){const u=`${m.id}_${s.id}_${p+1}`,A=this.originalFiles.find(g=>g.name===u);A?t.push(A):(r={id:o+1,section:s.id,name:`${m.id}_${s.id}_${p+1}`,type:"",size:0,valid:!1,commentOperator:"",nameFile:m.label?`${m.label} - ${s.id} - ${p+1}`:`${m.id} - ${s.id} - ${p+1}`,required:m.required||!1,acceptedFiles:m.acceptedFiles&&m.acceptedFiles.length>0?m.acceptedFiles:["application/pdf"],maxFileSize:m.maxFileSize?m.maxFileSize:"2"},t.push(r))}})})}})}),this.listDocuments=t,this.viewItem.listDocuments=t},sortDocuments(e){return e?Array.isArray(e)?e.sort((t,s)=>t.id-s.id):Object.values(e).sort((t,s)=>t.id-s.id):[]},getSectionName(e,t){if(!t||!t.sections)return"";let s=t.sections;Array.isArray(s)||(s=Object.values(s));const c=s.find(o=>o?.id===e||o?.schemaId===e);return c&&(c.name||c.schema?.name||c.richTextLabel?.replace(/<[^>]+>/g,"").trim())||""},getSortedDocumentsWithSectionName(e){return this.sortDocuments(e).map(s=>({...s,sectionName:this.getSectionName(s.section,this.formData)}))},async upload(e){const t=this,s=[],c=t.viewItem.slugRequest+"/"+this.viewItem.link_storage;let o="";return this.user.company?o="companies":o="users",await this.asyncForEach(e,async r=>{const[d,a]=Object.entries(r)[0];if(this.withSections){const v=(a.section?a.section:"prevention")+"_"+d+"_time"+new Date().getTime(),p=`answerFiles/${t.$route.params.module_id}/${t.$route.params.submodule_id}/${c}/${v}.${a.file.name.split(".").pop()}`,u=await gt(p,a.file);s.push({[d]:u,groupId:a.groupId||null,innerQuestionId:a.innerQuestionId||null}),a.saveToDocuments&&t.loggedIn&&await vt(`${o}/${t.user.uid}/documents`,{category:"Otro",createdAt:je(),createdBy:t.user.uid,fullName:v+"."+a.file.name.split(".").pop(),ide:t.quitarCaracteres(a.documentName),mime:a.file.type,size:a.file.size,statusDocument:"Vigente",storage:u,title:a.documentName,type:a.file.name.split(".").pop()},!1)}else{const m=d+"_time"+new Date().getTime(),v=`answerFiles/${t.$route.params.module_id}/${t.$route.params.submodule_id}/${c}/${m}.${a.file.name.split(".").pop()}`,p=await gt(v,a.file);s.push({[d]:p,groupId:a.groupId||null,innerQuestionId:a.innerQuestionId||null}),a.saveToDocuments&&t.loggedIn&&await vt(`${o}/${t.user.uid}/documents`,{category:"Otro",createdAt:je(),createdBy:t.user.uid,fullName:m+"."+a.file.name.split(".").pop(),ide:t.quitarCaracteres(a.documentName),mime:a.file.type,size:a.file.size,statusDocument:"Vigente",storage:p,title:a.documentName,type:a.file.name.split(".").pop()},!1)}}),s},async uploadFilesFunction(e=null,t=null){const s=[],c=this;let o=[];if(this.hasALogicQuestion?this.logicStepsList.forEach(function(r){r.id==="documentos"&&(o=ke(c.listDocuments))}):this.listTabs.forEach(function(r){r.id==="documentos"&&(o=ke(r.schema))}),this.documentsFeedback=ke(o),this.documentsFeedback=Sh(this.documentsFeedback,e),c.documentsFeedback.length>0&&c.documentsFeedback.forEach(function(r,d){if(c.documentsFeedback[d].valid===!0)delete c.documentsFeedback[d];else if(c.documentsFeedback[d].valid===!1){c.documentsFeedback[d].historico=[];let a="";c.documentsFeedback[d].url&&(a=c.documentsFeedback[d].url),c.documentsFeedback[d].historico.push({name:c.documentsFeedback[d].name,nameFile:c.documentsFeedback[d].nameFile,url:a,date:c.viewItem.updatedAt,noPrevention:c.viewItem.historical[c.viewItem.stageNow-1].noPrevention??t??1})}}),this.withSections===!1){const{questions:r}=this.formData;Object.keys(r).length>
3750&&Object.entries(c.documentsFeedback).forEach((d,a)=>{if((d[1].type==="file"||d[1].fileNew)&&c.documentsFeedback[d[0]].fileNew){c.documentsFeedback[d[0]].fileNew.section=d[1].section;let m={};if(c.documentsFeedback[d[0]].fileNew.selectedOption==="pc")s.push({[d[1].name]:d[1].fileNew}),m={id:a+1,section:"",name:d[1].name,type:d[1].fileNew.file.type,mime:d[1].fileNew.file.type,size:d[1].fileNew.file.size,valid:null,commentOperator:"",historico:d[1].historico,nameFile:d[1].nameFile,required:d[1].required,acceptedFiles:d[1].acceptedFiles&&d[1].acceptedFiles.length>0?d[1].acceptedFiles:["application/pdf"],maxFileSize:d[1].maxFileSize?d[1].maxFileSize:"2"};else if(c.documentsFeedback[d[0]].fileNew.selectedOption==="portadocumentos"){let v=null,p="application/pdf",u="pdf";const A=c.user.company?c.user.company:!1,g=c.documentsFeedback[d[0]].fileNew.documentType;g==="documents"?(v=c.documentsFeedback[d[0]].fileNew.file.storage,u=c.documentsFeedback[d[0]].fileNew.file.type,p=c.documentsFeedback[d[0]].fileNew.file.mime):g==="documentsFinals"?v=`${St()}/finalDocument/${c.documentsFeedback[d[0]].fileNew.file.id}?userUid=${c.user.uid}&company=${A}`:g==="certs"&&(v=c.documentsFeedback[d[0]].fileNew.file.link),m={id:a+1,section:d[1].section?d[1].section:"",name:d[1].name,type:u,size:d[1].fileNew.file.size,mime:p,valid:null,commentOperator:"",historico:d[1].historico,nameFile:d[1].nameFile,required:d[1].required,documentType:g,url:v,acceptedFiles:d[1].acceptedFiles&&d[1].acceptedFiles.length>0?d[1].acceptedFiles:["application/pdf"],maxFileSize:d[1].maxFileSize?d[1].maxFileSize:"2"},delete c.documentsFeedback[d[0]].fileNew,c.listDocuments[d[0]]=m}c.documentsFeedback[d[0]]=m}}),s.length>0&&(await this.upload(s)).reduce((a,m)=>{const[v,p]=Object.entries(m)[0];return a[v]=p,c.documentsFeedback.forEach((u,A)=>{u&&u.name===v&&(delete c.documentsFeedback[A].fileNew,c.listDocuments[A]={...c.documentsFeedback[A],url:p})}),c.viewItem[v]=p,a},{})}else Object.keys(c.documentsFeedback).length>0&&Object.entries(c.documentsFeedback).forEach((r,d)=>{if(c.documentsFeedback[r[0]].fileNew){c.documentsFeedback[r[0]].fileNew.section=r[1].section;let a={};if(c.documentsFeedback[r[0]].fileNew.selectedOption==="pc")s.push({[r[1].name]:r[1].fileNew}),a={id:d+1,section:r[1].section?r[1].section:"",name:r[1].name,type:r[1].fileNew.file.type,mime:r[1].fileNew.file.type,size:r[1].fileNew.file.size,valid:null,commentOperator:"",historico:r[1].historico,nameFile:r[1].nameFile,required:r[1].required,acceptedFiles:r[1].acceptedFiles&&r[1].acceptedFiles.length>0?r[1].acceptedFiles:["application/pdf"],maxFileSize:r[1].maxFileSize?r[1].maxFileSize:"2"};else if(c.documentsFeedback[r[0]].fileNew.selectedOption==="portadocumentos"){let m=null,v="application/pdf",p="pdf";const u=c.documentsFeedback[r[0]].fileNew.documentType;if(u==="documents")m=c.documentsFeedback[r[0]].fileNew.file.storage,p=c.documentsFeedback[r[0]].fileNew.file.type,v=c.documentsFeedback[r[0]].fileNew.file.mime;else if(u==="documentsFinals"){const A=c.user.company?c.user.company:!1;m=`${St()}/finalDocument/${c.documentsFeedback[r[0]].fileNew.file.id}?userUid=${c.user.uid}&company=${A}`}else u==="certs"&&(m=c.documentsFeedback[r[0]].fileNew.file.link);a={id:d+1,section:r[1].section?r[1].section:"",name:r[1].name,type:p,size:r[1].fileNew.file.size,mime:v,valid:null,commentOperator:"",historico:r[1].historico,nameFile:r[1].nameFile,required:r[1].required,url:m,documentType:u,acceptedFiles:r[1].acceptedFiles&&r[1].acceptedFiles.length>0?r[1].acceptedFiles:["application/pdf"],maxFileSize:r[1].maxFileSize?r[1].maxFileSize:"2"},delete c.documentsFeedback[r[0]].fileNew,c.listDocuments[r[0]]=a}c.documentsFeedback[r[0]]=a}}),s.length>0&&(await this.upload(s)).reduce((d,a)=>{const[m,v]=Object.entries(a)[0];return c.documentsFeedback.forEach((p,u)=>{p&&p.name===m&&(delete c.documentsFeedback[u].fileNew,c.listDocuments[u]={...c.documentsFeedback[u],url:v},c.viewItem[c.documentsFeedback[u].section].schema[m]=v)}),d},{})},calculateRemainingTime(e){const t=this,s=t.parseDate(je()),c=t.parseDate(e),o=Rs(new Date(c),new Date(s));let r=0,d=0,a=0,m=null;return o>=0?(r=Math.floor(o/3600),r=(r<10,r),d=Math.floor(o/60%60),d=(d<10,d),a=o%60,a=(a<10,a),m="positivo"):(r=0,d=0,a=0,m="negativo"),{hora:r,minuto:d,segundo:a,signo:m,segundos:o}},async getPartCloseProcess(){const e=this,t={participants:[],participantsUid:[]},s=await e.searchParticipants("all");return t.involvedOperators=this.involvedOperators,t.assignedOperator=null,t.participants=s,t.participantsUid=s?s.map(c=>c.uid):[],t},showNotify(){const e=this,t=this.dialogMessage.type;this.$nextTick(function(){switch(t){case"success":e.dialogMessage={...e.dialogMessage,icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"};break;case"error":e.dialogMessage={...e.dialogMessage,icon:"mdi-close-circle-outline",iconColor:"#EA5757",textColor:"#EA5757"};break;case"warning":e.dialogMessage={...e.dialogMessage,icon:"mdi-information-outline",iconColor:"#FB9800",textColor:"#FB9800"};break}this.dialogMessage={...this.dialogMessage,val:!0}})},async searchParticipants(e){const t=this,s=[];await t.viewItem.historical.forEach(async(d,a)=>{(e==="all"||e==="stage"&&t.viewItem.stageNow===a)&&await d.participants.forEac
375h(m=>{s.push({email:m.email,name:m.name,uid:m.uid})})});const c=s,o=new Set(c.map(JSON.stringify));return Array.from(o).map(JSON.parse)},async timeOutPayment(){const e=this;let t={reasonsDeny:this.$t("details.commentReasonsDenyPayment"),deny:{denyAt:je(),denyBy:e.user.uid,denyByEmail:e.user.email},status2:"Rechazado",participants:[],participantsUid:[]};const s=await e.getPartCloseProcess("deniedProcess");t={...t,...s},await e.update(t),e.viewItem.currentTaskName&&await e.deleteTask(e.viewItem.currentTaskName),this.dialogMessage={title:this.$t("details.message"),message:this.$t("details.mensajeDenyAutomaticPayment"),type:"error"},this.showNotify()},async contadorTiempoFeedback(){const e=this,t=await this.calculateRemainingTime(e.viewItem.preventionLimit);t.segundos>0&&(e.canAnswerFeedback=!0),this.tiempoCorriendoFeedback&&clearInterval(this.tiempoCorriendoFeedback),this.tiempoCorriendoFeedback=Pt(function(){t.segundos>0?(t.segundo--,t.segundos--,t.segundo===-1&&(t.segundo=59,t.minuto--),t.minuto===-1&&(t.minuto=59,t.hora--)):clearInterval(e.tiempoCorriendoFeedback),t.hora=t.hora<10?"0"+parseInt(t.hora):parseInt(t.hora),t.minuto=t.minuto<10?"0"+parseInt(t.minuto):parseInt(t.minuto),t.segundo=t.segundo<10?"0"+parseInt(t.segundo):parseInt(t.segundo),e.tiempoRestanteFeedback={...t}},1e3)},async contadorTiempoPayment(){const e=this,t=this.viewItem.historical[this.viewItem.stageNow-1].configStage.paymentLimit;if(this.tiempoCorriendoPayment&&clearInterval(this.tiempoCorriendoPayment),t&&t!==null){const s=await this.calculateRemainingTime(t);this.showTimePayment=!0,this.tiempoCorriendoPayment=Pt(async function(){s.segundos>0?(s.segundo--,s.segundos--,s.segundo===-1&&(s.segundo=59,s.minuto--),s.minuto===-1&&(s.minuto=59,s.hora--)):e.viewItem.status2==="Pendiente de pago"&&(clearInterval(e.tiempoCorriendoPayment),await e.timeOutPayment()),s.hora=s.hora<10?"0"+parseInt(s.hora):parseInt(s.hora),s.minuto=s.minuto<10?"0"+parseInt(s.minuto):parseInt(s.minuto),s.segundo=s.segundo<10?"0"+parseInt(s.segundo):parseInt(s.segundo),e.tiempoRestantePayment={...s}},1e3)}else this.showTimePayment=!1},async signatureCountdown(){const e=this,t=e.viewItem.historical[e.viewItem.stageNow-1],s=await this.calculateRemainingTime(t.citizenResponseDeadline);this.timeRemainingToSign&&clearInterval(this.timeRemainingToSign),this.timeRemainingToSign=Pt(function(){if(s.segundos>0){s.segundo--,s.segundos--,s.segundo===-1&&(s.segundo=59,s.minuto--),s.minuto===-1&&(s.minuto=59,s.hora--);const c=e.user.role;(["superadmin","admin"].includes(c)||e.assignedOperatorUid===e.userUid)&&(e.canRejectSignatureRequest=!0)}else clearInterval(e.timeRemainingToSign),e.viewItem.historical&&e.viewItem.historical.length>=e.viewItem.stageNow&&!t.configStage?.autoDenyOnNoResponse&&(e.canRejectSignatureRequest=!0);s.hora=s.hora<10?"0"+parseInt(s.hora):parseInt(s.hora),s.minuto=s.minuto<10?"0"+parseInt(s.minuto):parseInt(s.minuto),s.segundo=s.segundo<10?"0"+parseInt(s.segundo):parseInt(s.segundo),e.citizenSignatureTimeout={...s}},1e3)},async requestFeedback(){this.checkForDeniedAnswers(),!this.invalidAnswers||this.invalidAnswers.length===0?await this.sendRequestFeedback():this.invalidAnswers.length>0&&(this.invalidAnswerDialog=!0)},async checkGroupQuestions(){const e=this;if(this.withSections){if(this.withSections===!0){const t=this.myModel;await this.asyncForEach(Object.entries(t),async s=>{const{questions:c}=this.formData;Object.keys(c).length>0&&Object.entries(c).forEach((o,r)=>{if(o[1].kind==="group"&&o[1].section===s[0]){const d=o[1].id,a=s[1].schema[d]||[],m=o[1].questions;if(m){for(let v=0;v<m.length;v++){const p=m[v];if(p.kind==="file"&&a)for(let u=0;u<a.length;u++){let A=null;const g=a[u],C=g[p.id];if(g.deleted){const _=`${p.id}_${o[1].section}_${u+1}`;if(wt(e.listDocuments)){const S=e.listDocuments.findIndex(I=>I.name===_);S>=0&&e.listDocuments.splice(S,1)}else{const S=ti(e.listDocuments,I=>I.name===_);S&&(delete e.listDocuments[_],delete e.listDocuments[S])}}else if(C&&g.prevAdded&&C.selectedOption==="pc")e.groupFiles.push({[`${p.id}_${o[1].section}_${u+1}`]:{file:C.file,documentName:C.documentName,saveToDocuments:C.saveToDocuments,groupId:d,innerQuestionId:p.id}}),A={id:r+1,section:o[1].section,name:`${p.id}_${o[1].section}_${u+1}`,type:C.file.type,mime:C.file.type,size:C.file.size,valid:null,commentOperator:"",nameFile:p.label?`${p.label} - ${o[1].section} - ${u+1}`:`${p.id} - ${o[1].section} - ${u+1}`,required:p.required||!1,acceptedFiles:p.acceptedFiles&&p.acceptedFiles.length>0?p.acceptedFiles:["application/pdf"],maxFileSize:p.maxFileSize?p.maxFileSize:"2"};else if(C&&g.prevAdded&&C.selectedOption==="portadocumentos"){let _=null,S="application/pdf",I="pdf";const P=C.documentType;if(P==="documents")_=C.file.storage,I=C.file.type,S=C.file.mime;else if(P==="documentsFinals"){const F=e.user.company?e.user.company:!1;_=`${St()}/finalDocument/${C.file.id}?userUid=${e.user.uid}&company=${F}`}else P==="certs"&&(_=C.file.link);A={id:r+1,section:o[1].section,name:`${p.id}_${o[1].section}_${u+1}`,type:I,mime:S,size:C.file.size?C.file.size:0,valid:null,commentOperator:"",url:`${_}`,documentType:P,nameFile:p.label?`${p.label} - ${o[1].section} - ${u+1}`:`${p.id} - ${o[1].section} - ${u+1}`,required:p.required||!1,acceptedFiles:p.acceptedFiles&&p.acceptedFiles.length>0?p.acceptedFiles:["application/pdf"],maxFileSize:p.maxFileSize?p.maxFileSize:"2"}}else!C&&g.prevAdded&&(A={id:r+1,section:o[1].section,name:`${p.id}_${o[1].section}_${u+1}`,type:"",mime:"",size:0,valid:null,commentOperator:"",nameFile:p.label?`${p.label} - ${o[1].section} - ${u+1}`:`${p.id} - ${o[1].section} - ${u+1}`,required:p.required||!1,acceptedFiles:p.acceptedFiles&&p.acceptedFiles.length>0?p.acceptedFiles:["application/pdf"],maxFileSize:p.maxFileSize?p.maxFileSize:"2"});A&&(e.listDocuments[`${p.id}_${o[1].section}_${u+1}`]=A,e.viewItem.listDocuments[`${p.id}_${o[1].section}_${u+1}`]=A)}}
375a.forEach(v=>v.prevAdded=!1)}}}),e.groupFiles.length>0&&(await this.upload(e.groupFiles,s[0])).forEach(r=>{const d=r.groupId,a=r.innerQuestionId,m=Object.keys(r)[0],p=m.split("_").pop()-1;e.listDocuments[m]={...e.listDocuments[m],url:r[m]},e.viewItem.listDocuments[m]={...e.listDocuments[m],url:r[m]},e.myModel[s[0]].schema[d][p][a]=r[m],e.viewItem=e.myModel}),e.groupFiles=[]})}}else{const{questions:t}=this.formData;Object.entries(t).forEach((s,c)=>{if(s[1].kind==="group"){const o=e.myModel[s[1].id]||[],r=s[1].questions;for(let d=0;d<r.length;d++){let a=null;const m=r[d];if(m.kind==="file")for(let v=0;v<o.length;v++){const p=o[v],u=p[m.id];if(p.deleted){const A=`${m.id}_${v+1}`;if(wt(e.listDocuments)){const g=e.listDocuments.findIndex(C=>C.name===A);g>=0&&e.listDocuments.splice(g,1)}else{const g=ti(e.listDocuments,C=>C.name===A);g&&(delete e.listDocuments[A],delete e.listDocuments[g])}}else if(u&&p.prevAdded&&u.selectedOption==="pc")e.groupFiles.push({[`${m.id}_${v+1}`]:{file:u.file,documentName:u.documentName,saveToDocuments:u.saveToDocuments,groupId:s[1].id,innerQuestionId:m.id}}),a={id:c+1,section:"",name:`${m.id}_${v+1}`,type:u.file.type,mime:u.file.type,size:u.file.size,valid:null,commentOperator:"",nameFile:m.label?`${m.label} - ${v+1}`:`${m.id} - ${v+1}`,required:m.required||!1,acceptedFiles:m.acceptedFiles&&m.acceptedFiles.length>0?m.acceptedFiles:["application/pdf"],maxFileSize:m.maxFileSize?m.maxFileSize:"2"};else if(u&&p.prevAdded&&u.selectedOption==="portadocumentos"){let A=null,g="application/pdf",C="pdf";const _=u.documentType;if(_==="documents")A=u.file.storage,C=u.file.type,g=u.file.mime;else if(_==="documentsFinals"){const S=e.user.company?e.user.company:!1;A=`${St()}/finalDocument/${u.file.id}?userUid=${e.user.uid}&company=${S}`}else _==="certs"&&(A=u.file.link);a={id:c+1,section:"",name:`${m.id}_${v+1}`,type:C,mime:g,size:u.file.size?u.file.size:0,valid:null,commentOperator:"",url:`${A}`,documentType:_,nameFile:m.label?`${m.label} - ${v+1}`:`${m.id} - ${v+1}`,required:m.required||!1,acceptedFiles:m.acceptedFiles&&m.acceptedFiles.length>0?m.acceptedFiles:["application/pdf"],maxFileSize:m.maxFileSize?m.maxFileSize:"2"}}else!u&&p.prevAdded&&(a={id:c+1,section:"",name:`${m.id}_${v+1}`,type:"",mime:"",size:0,valid:null,commentOperator:"",nameFile:m.label?`${m.label} - ${v+1}`:`${m.id} - ${v+1}`,required:m.required||!1,acceptedFiles:m.acceptedFiles&&m.acceptedFiles.length>0?m.acceptedFiles:["application/pdf"],maxFileSize:m.maxFileSize?m.maxFileSize:"2"});a&&(e.listDocuments[`${m.id}_${v+1}`]=a,e.viewItem.listDocuments[`${m.id}_${v+1}`]=a)}}o.forEach(d=>d.prevAdded=!1)}}),e.groupFiles&&e.groupFiles.length>0&&(await this.upload(e.groupFiles,"")).forEach(c=>{const o=c.groupId,r=c.innerQuestionId,d=Object.keys(c)[0],m=d.split("_").pop()-1;e.listDocuments[d]={...e.listDocuments[d],url:c[d]},e.viewItem.listDocuments[d]={...e.viewItem.listDocuments[d],url:c[d]},e.myModel[o][m][r]=c[d],e.viewItem.myModel=e.myModel})}},async sendRequestFeedback(){le().open();const e=ke(this.viewItem),t=ke(this.listDocuments);Gs(this.viewItem.listDocuments,this.listDocuments),this.hasALogicQuestion&&this.listDocuments.length===0?this.viewItem.listDocuments=this.listDocuments:this.listDocuments=this.viewItem.listDocuments;const s=je();this.viewItem.updatedAt=s,await this.updateSchema();try{await this.uploadFilesFunction()}catch(m){le().close(),De().open({color:"error",text:this.$t("errorGeneric")}),console.error("Error uploading files: ",m),oe(m);return}await this.checkGroupQuestions(),wt(this.listDocuments)&&this.listDocuments.forEach(m=>{!m.commentOperator&&m.valid===!1&&(m.valid=null)}),this.viewItem.updatedBy=this.user.uid,this.viewItem.preventionResponse=s,this.viewItem.listDocuments={...this.viewItem.listDocuments,...this.listDocuments};const c=this.viewItem.historical[this.viewItem.stageNow-1],o=c.feedbacks[c.noPrevention-1];let r=null;if(o?(o.preventionResponse.date=s,o.preventionResponse.responseByUser=!0,r=o.prevention?.taskName||null):oe(new Error(`Prevention response without a matching feedback entry (stage ${this.viewItem.stageNow}, noPrevention ${c.noPrevention})`),{tags:{flow:"prevention-feedback",degrade:"incoherent-stage"},extra:{answerId:this.viewItem.id_reference,module:this.viewItem.module}}),this.viewItem.status2="En proceso",this.hasALogicQuestion){const{sections:m}=this.viewItem.saveParent,p=this.logicStepsList.filter(u=>!["documentos","appointments","newRequests"].includes(u.id)).map(u=>u.id);m.forEach(u=>{const A=u.id;p.includes(A)||(this.viewItem[A]={...this.viewItem[A],schema:{}})})}const d=this.viewItem,a=d.id_reference;try{await Je(`/modules/${d.module}/${d.submodule}/${d.slugRequest}/answers/${a}`,{...d})}catch(m){this.viewItem=e,this.listDocuments=t,le().close(),De().open({color:"error",text:this.$t("details.feedbackNotSaved")}),console.error("Error updating documents: ",m),oe(m,{tags:{flow:"prevention-feedback",degrade:"feedback-not-saved"},extra:{answerId:a,module:d.module,submodule:d.submodule}});return}this.changes=!1,le().close();try{this.$analytics?.track?.(Se.tramite_detail_feedback_submit,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId}),this.dialogMessage={val:!0,title:this.$t("details.message"),message:this.$t("details.feedbackSuccess"),icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"},this.editarForm(!1,!0),this.hasALogicQuestion&&await this.removeEmptySections(!1)}catch(m){console.error("Error confirming the saved response: ",m),oe(m,{tags:{flow:"prevention-feedback",degrade:"view-refresh-failed"},extra:{answerId:a,module:d.module}})}r&&(await this.deleteTask(r)||(console.error("Prevention task was not cancelled: ",r),oe(new Error(`Prevention task not cancelled: ${r}`),{tags:{flow:"prevention-feedback",degrade:"task-not-cancelled"},extra:{answerId:a,taskName:r}})));try{const m=d.participants?.find(v=>v.uid===d.assignedOperator);if(m&&m.email){const v=[m.email],p=bs(),u=ge(new Date,"dd/MM/yyyy HH:mm:ss"),A=d.preFolio||d.folio||d.id_reference;await this.sendEmailMultipleUser(v,`${this.$t("emails.feedbackResponse.title")} - ${A}`,`${this.$t("emails.feedbackResponse.title")}`,`${p}/admin/modules/${d.module}/${d.submodule}/inbox`,`${this.$t("emails.feedbackResponse.content1")} ${A}. ${this.$t("emails.feedbackResponse.content2")}`,`<b>ð
${this.$t("emails.feedbackResponse.subcontent")}</b>: ${u}`,`${this.$t("emails.feedbackResponse.subcontent2")}`,this.$t("sendEmail.viewInbox"),m.name||"",`${this.$t("emails.feedbackResponse.warning")}`)}}catch(m){console.error("Error notifying the operator: ",m),oe(m,{tags:{flow:"prevention-feedback",degrade:"operator-not-notified"},extra:{answerId:a,module:d.module}})}},syncSubstagePreventionSections(){const e=this.openSubstagePreventions,t=kh(e);if(t.size===0)return;const s={};e.forEach(c=>
375{(c.prevention?.objectFeedback?.sections||[]).forEach(r=>{r?.id&&s[r.id]===void 0&&(s[r.id]=r.commentOperator||"")})}),t.forEach(c=>{if(c===Ct)return;const o=ii(this.viewItem,c);if(!o){this.reportSubstagePreventionDrift(`section:${c}`,`substage-prevention sync: flagged section '${c}' not present on answer '${this.viewItem?.id_reference}' (logic-pruned or drifted) â unlock skipped`);return}o.validForm!==!1&&(o.validForm=!1),o.commentOperator=s[c]||""}),t.has(Ct)&&(this.viewItem.validForm!==!1&&(this.viewItem.validForm=!1),this.viewItem.commentOperator=s[Ct]||"")},syncSubstagePreventionDocuments(){const e=this.openSubstagePreventions,t=Dh(e);if(t.size===0)return;const s={};e.forEach(r=>{(r.prevention?.objectFeedback?.documents||[]).forEach(a=>{a?.name&&s[a.name]===void 0&&(s[a.name]=a.commentOperator||"")})});const c=wt(this.listDocuments)?this.listDocuments:Object.values(this.listDocuments||{}),o=new Set;c.forEach(r=>{!r||!t.has(r.name)||(o.add(r.name),r.valid!==!1&&(r.valid=!1),r.commentOperator=s[r.name]||"")}),t.forEach(r=>{o.has(r)||this.reportSubstagePreventionDrift(`document:${r}`,`substage-prevention sync: flagged document '${r}' not present on answer '${this.viewItem?.id_reference}' (logic-pruned or drifted) â replace unlock skipped`)})},reportSubstagePreventionDrift(e,t){this._substagePreventionDriftReported||(this._substagePreventionDriftReported=new Set),!this._substagePreventionDriftReported.has(e)&&(this._substagePreventionDriftReported.add(e),oe(new Error(t)))},async resolveSubstagePrevention(e){if(this.checkForDeniedAnswers(),this.invalidAnswers&&this.invalidAnswers.length>0){this.invalidAnswerDialog=!0;return}const t=this.viewItem.stageNow-1,s=this.viewItem.historical?.[t]?.configStage?.subStages?.[e]?.prevention;if(!s)return;this.resolvingSubstage=e,le().open();const c=ke(this.viewItem);Gs(this.viewItem.listDocuments,this.listDocuments),this.hasALogicQuestion&&this.listDocuments.length===0?this.viewItem.listDocuments=this.listDocuments:this.listDocuments=this.viewItem.listDocuments;const o=je();this.viewItem.updatedAt=o,await this.updateSchema();const r=(s.objectFeedback?.documents||[]).map(P=>P.name);try{await this.uploadFilesFunction(r,s.noPrevention)}catch(P){le().close(),De().open({color:"error",text:this.$t("errorGeneric")}),console.error("Error uploading files: ",P),oe(P),this.viewItem=c,this.listDocuments=this.viewItem.listDocuments,this.resolvingSubstage=null;return}try{await this.checkGroupQuestions()}catch(P){le().close(),De().open({color:"error",text:this.$t("errorGeneric")}),console.error("Error uploading group question files: ",P),oe(P),this.viewItem=c,this.listDocuments=this.viewItem.listDocuments,this.resolvingSubstage=null;return}wt(this.listDocuments)&&this.listDocuments.forEach(P=>{r.includes(P.name)&&!P.commentOperator&&P.valid===!1&&(P.valid=null)});const d=s.objectFeedback?.sections||[];let a={};d.forEach(P=>{if(!P?.id)return;if(P.id===Ct){a={validForm:null};return}const F=ii(this.viewItem,P.id);F?.validForm===!1&&(F.validForm=null)}),this.viewItem.updatedBy=this.user.uid,this.viewItem.listDocuments={...this.viewItem.listDocuments,...this.listDocuments};const m=`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}`;let v=null;try{const P=await bt(m);v=P?.exists?.()?P.data():null}catch(P){console.error("Error re-reading answer: ",P),oe(P)}if(!v){oe(new Error("substage-prevention resolve aborted after upload: answer re-read failed â uploaded blobs orphaned")),le().close(),De().open({color:"error",text:this.$t("errorGeneric")}),this.viewItem.listDocuments=ke(c.listDocuments),this.listDocuments=this.viewItem.listDocuments,this.resolvingSubstage=null;return}const p=v;if(Ch(p,t,e)){oe(new Error("substage-prevention resolve aborted after upload: prevention already answered/gone (raced resolve) â uploaded blobs orphaned")),le().close(),De().open({color:"info",text:this.$t("details.substagePreventionAlreadyAnswered")}),this.viewItem.listDocuments=ke(c.listDocuments),this.listDocuments=this.viewItem.listDocuments,this.resolvingSubstage=null;return}const u=p.historical[t].configStage.subStages[e].prevention,{historical:A,isLast:g,statusPatch:C}=Ih({answer:p,stageIndex:t,subStageIndex:e,now:o}),_={},{sections:S,questions:I}=this.viewItem.saveParent;
375this.viewItem.saveParent.config.withSections===!0?S.forEach(P=>{this.viewItem[P.id]!==void 0&&(_[P.id]=this.viewItem[P.id])}):I.forEach(P=>{this.viewItem[P.id]!==void 0&&(_[P.id]=this.viewItem[P.id])});try{await Je(m,{historical:A,listDocuments:this.viewItem.listDocuments,..._,...a,updatedAt:o,updatedBy:this.user.uid,...C}),a.validForm===null&&(this.viewItem.validForm=null),this.changes=!1,le().close(),this.dialogMessage={val:!0,title:this.$t("details.message"),message:this.$t("details.feedbackSuccess"),icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"},g&&this.editarForm(!1,!0)}catch(P){this.viewItem=c,this.listDocuments=this.viewItem.listDocuments,le().close(),De().open({color:"error",text:this.$t("errorGeneric")}),console.error("Error updating documents: ",P),oe(P);return}finally{this.resolvingSubstage=null}u.taskName&&(await this.deleteTask(u.taskName)||(console.error("Prevention task was not cancelled: ",u.taskName),oe(new Error(`Prevention task not cancelled: ${u.taskName}`),{tags:{flow:"substage-prevention",degrade:"task-not-cancelled"},extra:{answerId:this.viewItem.id_reference,answerPath:m,taskName:u.taskName}})))},async sendSignatureConfirmation(){const e=this;this.$analytics?.track?.(Se.tramite_detail_signature,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,signature_method:"confirm"}),le().open();const t=je();e.viewItem.updatedAt=t,e.viewItem.updatedBy=e.user.uid;const s=e.viewItem.historical[e.viewItem.stageNow-1],c=s.noRequestRetry;e.viewItem.historical&&s.retries[c-1]&&(s.retries[c-1].retryResponse.date=t,s.retries[c-1].retryResponse.responseByUser=!0),s.signatureConfirmation=t,s.citizenResponse=t,s.operatorHasRequestedSignature=!1,s.responseConfirmation=!0,e.viewItem.historical[e.viewItem.stageNow-1]=s;const o=e.viewItem,r=o.id_reference;await Je(`/modules/${o.module}/${o.submodule}/${o.slugRequest}/answers/${r}`,{...o}).then(async()=>{e.changes=!1,le().close(),e.dialogMessage={val:!0,title:e.$t("details.message"),message:e.$t("details.sendSignatureSuccess"),icon:"mdi-checkbox-marked-circle-outline",iconColor:"#37A637",textColor:"#37A637"};const d=e.viewItem.participants.find(a=>a.uid===e.viewItem.assignedOperator);if(d&&d.email){const a=[d.email],m=bs();await e.sendEmailMultipleUser(a,`${e.$t("emails.sendSignature.title")} - ${e.viewItem.preFolio||e.viewItem.folio||e.viewItem.id_reference}`,`${e.$t("emails.sendSignature.title")}`,`${m}/admin/modules/${e.viewItem.module}/${e.viewItem.submodule}/inbox`,`${e.$t("emails.sendSignature.content")} ${e.viewItem.preFolio||e.viewItem.folio||e.viewItem.id_reference}`,"",`${e.$t("emails.sendSignature.subcontent2")}`,e.$t("sendEmail.viewInbox"),d.name||"",`${e.$t("emails.sendSignature.warning")}`)}}).catch(d=>{le().close(),De().open({color:"error",text:e.$t("errorGeneric")}),console.error("Error getting documents: ",d)})},async updateSchema(){const e=this;let t=e.viewItem;const{sections:s,questions:c}=e.viewItem.saveParent;e.viewItem.saveParent.config.withSections===!0?s.forEach(o=>{Object.entries(e.myModel).forEach(r=>{if(r[0]===o.id){const d={[r[0]]:r[1]};t={...t,...d},e.viewItem=t}})}):c.forEach(o=>{Object.entries(e.myModel).forEach(r=>{if(r[0]===o.id){const d={[r[0]]:r[1]};t={...t,...d},e.viewItem=t}})}),await this.$nextTick(),e.render=e.render+1},async update(e){e={...e,updatedAt:je(),updatedBy:this.user.uid,updatedByEmail:this.user.email,updatedByName:this.fullName},this.updatedAt=e.updatedAt!==null?this.formatDate(e.updatedAt)+" hrs":"";const t=this;await Je(`/modules/${t.viewItem.module}/${t.viewItem.submodule}/${t.viewItem.slugRequest}/answers/${t.viewItem.id_reference}`,{...e}).then(()=>{t.viewItem={...t.viewItem,...e}}).catch(s=>{console.error("Error getting documents: ",s)})},async editarForm(e,t,s){const c=this,o=c.mySchema;this.$nextTick(function(){for(const r in c.mySchema)if(c.viewItem.saveParent.config.withSectionsAsTabs===!1){if(o[r]?.typeOfPerson||(o[r].disabled=!e),o[r].schema)for(const d in o[r].schema)os(o[r].schema[d])&&!o[r].schema[d]?.typeOfPerson&&(c.viewItem.saveParent.config.withSectionsAsTabs===!1||t===!0||s===r)&&(o[r].schema[d].disabled=!e)}else for(const d in o[r].schema)os(o[r].schema[d])&&!o[r].schema[d]?.typeOfPerson&&(c.viewItem.saveParent.config.withSectionsAsTabs===!1||t===!0||s===r)&&(o[r].schema[d].disabled=!e);Object.assign(c.mySchema,o)}),await c.$nextTick(),c.render=c.render+1},emitDialog(e){this.dialogMessage={val:e.val,title:e.title,message:e.message,icon:e.icon,iconColor:e.iconColor,textColor:e.textColor}},async verificarSiExisteEmision(){const e=this;let t=!1;e.showErrorWallet=!1,e.viewItem.saveParent.itemsStage&&await e.asyncForEach(e.viewItem.saveParent.itemsStage,async s=>{const c=s?.emissionType||[];c&&await e.asyncForEach(c,o=>{o==="Certificado"&&(t=!0)})}),!e.user.public_address&&t===!0&&this.userAuxRole!=="institutional"&&(e.showErrorWallet=!0)},retroceder(){window.history.back()},capitalize(e){const t=e[0].toUpperCase(),s=e.slice(1);return t+s},now(e){const t=je();return e==="date"?ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy"):e==="time"?ge(new Date((t.seconds||t._seconds)*1e3),"HH:mm:ss"):ge(new Date((t.seconds||t._seconds)*1e3),"dd/MM/yyyy HH:mm:ss")},formatDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?ge(new Date((e.seconds||e._seconds)*1e3),"dd/MM/yyyy HH:mm:ss"):(e=new Date(e),ge(new Date(e),"dd/MM/yyyy HH:mm:ss"))}},parseDate(e){if(e!=null){const t=Date.parse(e);return isNaN(t)?new Date((e.seconds||e._seconds)*1e3):(e=new Date(e),new Date(e))}},async asyncForEach(e,t){for(let s=0;s<e.length;s++)await t(e[s],s,e)},quitarCaracteres(e){const t="ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃãà áäâèéëêìÃïîòóöôùúüûÃñÃç",s="AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuuÃñcc";for(let c=0;c<t.length;c++)e=e.replace(new RegExp(t.charAt(c),"g"),s.charAt(c));return e=e.replace(/(^\s+|\s+$)/g,""),e=e.replace(/[^A-Za-z0-9Ãñ]+/g,"").toUpperCase(),e},async getAssignedOperator(e){let t=null;if(e)if(Array.isArray(e)){t=[];for(let s=0;s<e.length;s++){const c=await bt(`users/${e[s]}`);let o=c.exists()?c.data():null;o||(o={first_name:"",last_name:"",uid:"",email:""});let r=`${o.first_name} ${o.last_name}`;
375o.last_name2&&(r=r+" "+o.last_name2),t.push({name:r,email:o.email,uid:o.uid})}}else{const s=e?.uid||e,c=await bt(`users/${s}`);let o=c.exists()?c.data():null;o||(o={first_name:"",last_name:"",uid:"",email:""});let r=`${o.first_name} ${o.last_name}`;o.last_name2&&(r=r+" "+o.last_name2),t={name:r,email:o.email,uid:o.uid}}return t},generateGrecaptchaToken(){return this.grecaptcha.enterprise.execute(this.grecaptchaToken,{action:"verify"}).then(e=>e).catch(e=>(console.error("error",e),e))},showColumns(){const e=this.viewItem.stageAll,t=this.viewItem.stageNow-1||0,s=this.viewItem?.historical?this.viewItem?.historical[t]:null;return(s||e===0)&&(["Aprobado","En prevención","En preventiva","Pendiente de pago","Desistido"].includes(this.viewItem.status2)||this.viewItem.status2==="Citado"&&!s.appointmentId&&s.configStage&&s.configStage.appointmentCitizen===!0&&s.totalMissingSchedules>0||["En proceso","Pendiente de pago","Citado","En prevención","En preventiva"].includes(this.viewItem.status2)&&this.viewItem?.saveParent?.config?.addDesist||this.showErrorWallet===!0||this.isAlcoholes||this.isREC||this.isNoticesREC||this.viewItem.status2==="Pendiente de firma"&&!s.responseConfirmation&&s.operatorHasRequestedSignature===!0)},async saveViewItem(e){const t=ke(e);await this.update(t)},checkForDeniedAnswers(){this.invalidAnswers=[],this.list.forEach(e=>{if(e.validateAnswer&&e.rejectType){const t=this.myModel;let s=null;if(this.withSections){let c=[];this.withSectionsAsTabs?c=this.hasALogicQuestion?this.logicStepsList.map(o=>o.id):this.listTabs.map(o=>o.id):c=Object.keys(this.mySchema),c.includes(e.section)&&(s=t[e.section].schema[e.id])}else s=t[e.id];if(s!=null){if(e.kind==="short"&&e.type==="number")switch(e.rejectType){case"lessThan":e.fixedQuantity&&Number(s)<Number(e.fixedQuantity)&&this.invalidAnswers.push(e);break;case"moreThan":e.fixedQuantity&&Number(s)>Number(e.fixedQuantity)&&this.invalidAnswers.push(e);break;case"equalTo":e.fixedQuantity&&Number(s)===Number(e.fixedQuantity)&&this.invalidAnswers.push(e);break;case"betweenValues":e.minQuantity&&e.maxQuantity&&Number(s)>=Number(e.minQuantity)&&Number(s)<=Number(e.maxQuantity)&&this.invalidAnswers.push(e);break}if(["radio","dropdown"].includes(e.kind)&&!e.answersFromCatalog)switch(e.rejectType){case"includes":e.invalidAnswers&&e.invalidAnswers.includes(s)&&this.invalidAnswers.push(e);break;case"equalToValues":e.invalidAnswer&&s===e.invalidAnswer&&this.invalidAnswers.push(e);break}if(e.kind==="checkbox"&&!e.answersFromCatalog)switch(e.rejectType){case"includes":e.invalidAnswers&&e.invalidAnswers.some(c=>s.includes(c))&&this.invalidAnswers.push(e);break;case"equalToValues":e.invalidAnswer&&It(e.invalidAnswer.sort(),s.sort())&&this.invalidAnswers.push(e);break}if(e.kind==="time")switch(e.rejectType){case"lessThan":e.fixedHour&&s<e.fixedHour&&this.invalidAnswers.push(e);break;case"moreThan":e.fixedHour&&s>e.fixedHour&&this.invalidAnswers.push(e);break;case"equalTo":e.fixedHour&&s===e.fixedHour&&this.invalidAnswers.push(e);break;case"betweenValues":e.minHour&&e.maxHour&&s>=e.minHour&&s<=e.maxHour&&this.invalidAnswers.push(e);break}if(e.kind==="date")switch(e.rejectType){case"lessThan":e.fixedDate&&Date.parse(s)<Date.parse(e.fixedDate)&&this.invalidAnswers.push(e);break;case"moreThan":e.fixedDate&&Date.parse(s)>Date.parse(e.fixedDate)&&this.invalidAnswers.push(e);break;case"equalTo":e.fixedDate&&s===e.fixedDate&&this.invalidAnswers.push(e);break;case"betweenValues":e.minDate&&e.maxDate&&Date.parse(s)>=Date.parse(e.minDate)&&Date.parse(s)<=Date.parse(e.maxDate)&&this.invalidAnswers.push(e);break}if(e.kind==="informeUrbanistico"){const c=s.apiResponse[e.valueName];switch(e.rejectType){case"includes":e.invalidAnswers&&e.invalidAnswers.includes(c)&&this.invalidAnswers.push(e);break;case"equalToValues":e.invalidAnswer&&c===e.invalidAnswer&&this.invalidAnswers.push(e);break}}}}})},checkStageBefore(){if(this.viewItem.stageNow>1&&this.viewItem.historical[this.viewItem.stageNow-2]&&this.viewItem.historical[this.viewItem.stageNow-2].configStage.type==="pagos"){const t=this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList.length+1:this.listTabs.length+1;this.tab=`${t}`}},putAnswerInMayus(e){const t=e.value,s=e.questionId,c=e.section;t&&s&&(this.withSections&&this.myModel[c]&&this.myModel[c].schema?this.myModel[c].schema[s]=t.toUpperCase():this.myModel[s]=t.toUpperCase())},saveDocumentsToSign(e,t){t?this.documentsToSign=Bp(this.documentsToSign,ke(e),"documentUrl"):this.documentsToSign=ke(e),this.$analytics?.track?.(Se.tramite_detail_signature,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,signature_method:"sign_docs",doc_count:this.documentsToSign.length}),this.update({documentsToSign:this.documentsToSign})},getNumberTab(e){return this.$analytics?.track?.(Se.tramite_detail_tab_change,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,tab_name:typeof e=="string"?e:e?.name||e?.id}),(this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList:this.listTabs).findIndex(c=>c.id===e||c.title===e.name).toString()},goToSubstageSection(e){const t=e?.id===Ct?"formulario":e?.id,s=this.hasALogicQuestion&&this.withSectionsAsTabs?this.logicStepsList:this.listTabs;let c=s.findIndex(o=>o.id===t);if(c===-1&&(c=s.findIndex(o=>
375o.title===e?.name)),c===-1){oe(new Error(`substage-prevention jump: section '${e?.id}' not found in the tab list (pruned or renamed) â tab unchanged`));return}this.$analytics?.track?.(Se.tramite_detail_tab_change,{procedure_id:(this._.provides[Ae]||this.$route).query.procedureId,tab_name:e?.name||e?.id}),this.tab=c.toString()},revisedDocument(e){if(!e?.question?.name)return;const t=this.objectFeedback.documents.findIndex(s=>s.name===e.question.name);t!==-1&&(this.objectFeedback.documents[t].revised=!0)},revisedForm(e,t){if(!t?.id)return;const s=this.objectFeedback.sections.findIndex(c=>c.id===t.id);s!==-1&&(this.objectFeedback.sections[s].revised=!0)},checkForObligatoryQuestionsInGroup(e,t,s){let c=!0;const o=e.filter(r=>r.required===!0);if(s&&s.length>0)for(let r=0;r<s.length;r++){const d=s[r];let a=!0;for(let m=0;m<o.length;m++){const v=o[m].id,p=d[v];if(p==null||p===""){a=!1;break}}if(!a){c=!1;break}}else c=!1;return c},fillNumberQuestionValue(e){const t=e.questionId,s=e.section;t&&(this.withSections&&this.myModel[s]&&this.myModel[s].schema?this.myModel[s].schema[t]=null:this.myModel[t]=null)},async viewAcknowledgment(){console.log("ðµ viewAcknowledgment called"),this.regeneratingAck=!0,le().open();try{console.log("ðµ Verifying flow...");const e=await this.verifyAcknowledgmentFlowComplete();console.log("ðµ isFlowComplete:",e);let t=this.getAcknowledgmentDocumentId();if(console.log("ðµ acknowledgmentId:",t),!e&&(console.log("ðµ Flow incomplete, regenerating..."),t=await this.regenerateAcknowledgment({skipLoader:!0}),console.log("ðµ After regenerate, acknowledgmentId:",t),!t)){this.regeneratingAck=!1,le().close();return}console.log("ðµ Redirecting to /finalDocument/"+t),this.regeneratingAck=!1,le().close();const s={userUid:this.viewItem.user?.uid||this.viewItem.id_user};this.viewItem.user?.company&&(s.company=this.viewItem.user.company),this.$router.push({path:`/finalDocument/${t}`,query:s})}catch(e){console.error("ð´ Error viewing acknowledgment:",e),oe(e),De().open({color:"error",text:"Error al cargar el acuse de respuesta"}),this.regeneratingAck=!1,le().close()}},getAcknowledgmentDocumentId(){return this.isAlcoholes?this.viewItem.acknowledgmentResponseId:this.isREC||this.isNoticesREC?this.viewItem.recAckResponseId:null},async verifyAcknowledgmentFlowComplete(){const e=this.getAcknowledgmentDocumentId();if(!e)return console.log("ð verifyAcknowledgmentFlowComplete: acknowledgmentId does not exist"),!1;const t=this.outputDocuments?.find(c=>c.idAck==="acuseDeRespuesta");if(!t)return console.log("ð verifyAcknowledgmentFlowComplete: outputDocument with idAck=acuseDeRespuesta does not exist"),!1;if(!t.documentUrl||t.documentUrl.trim()==="")return console.log("ð verifyAcknowledgmentFlowComplete: outputDocument exists but documentUrl is empty"),!1;try{if(!this.viewItem.user)return console.log("ð verifyAcknowledgmentFlowComplete: viewItem.user is null/undefined"),!1;const c=this.viewItem.user.company?"companies":"users",o=await bt(`/${c}/${this.viewItem.id_user}/documentsFinals/${e}`);if(!o.exists())return console.log("ð verifyAcknowledgmentFlowComplete: documentsFinals does not exist"),!1;const r=o.data();if(!r.ackUrl||r.ackUrl.trim()==="")return console.log("ð verifyAcknowledgmentFlowComplete: ackUrl does not exist or is empty"),!1}catch(c){return console.log("ð verifyAcknowledgmentFlowComplete: error fetching documentsFinals",c),!1}return this.outputDocumentsHashed?.some(c=>c.file_name==="Acuse de respuesta.pdf")||console.warn("â ï¸ verifyAcknowledgmentFlowComplete: acknowledgment hash does not exist (not critical, continuing)"),!0},async regenerateAcknowledgment({skipLoader:e=!1}={}){const t=this;this.regeneratingAck=!0;try{e||le().open();const s=this.isAlcoholes?"acknowledgmentResponseId":this.isREC||this.isNoticesREC?"recAckResponseId":null;if(!s)throw new Error("Tipo de trámite no requiere acuse de respuesta");const c=this.viewItem.stageAll-1,o=this.viewItem.historical[c];if(!o||!o.completeAt)throw new Error("No se encontró la fecha de aprobación en el historial");const r=o.completeAt,d=this.viewItem.user.company?"companies":"users";try{const F=await vs(`/${d}/${t.viewItem.id_user}/documentsFinals`,[{field:"folio",op:"==",value:t.viewItem.folio},{field:"docType",op:"==",value:"acknowledgment"},{field:"acknowledgmentType",op:"==",value:"response"}]);if(!F.empty){const L=pa(),{doc:z}=await as(async()=>{const{doc:V}=await import("./CNHyijYN.js").then(X=>X.i);return{doc:V}},__vite__mapDeps([0,1,2]),import.meta.url);F.docs.forEach(V=>{L.delete(z(js,`/${d}/${t.viewItem.id_user}/documentsFinals/${V.id}`))}),await L.commit(),console.log(`â
${F.size} documentsFinals anteriores eliminados para folio: ${t.viewItem.folio}`)}}catch(F){console.warn("â ï¸ Error al eliminar documentsFinals anteriores:",F),oe(F)}const a=this.outputDocuments.filter(F=>F.idAck!=="acuseDeRespuesta"),m=(this.outputDocumentsHashed||[]).filter(F=>F.file_name!=="Acuse de respuesta.pdf");await Je(`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}`,{outputDocuments:a,outputDocumentsHashed:m,[s]:null,updatedAt:je(),updatedBy:this.user.uid,updatedByEmail
375:this.user.email,updatedByName:this.fullName}),this.outputDocuments=a,this.outputDocumentsHashed=m,console.log("â
Datos anteriores eliminados correctamente"),console.log("ð Generando nuevo PDF del acuse...");const v=this.viewItem.status2==="Rechazado";if(this.acknowledgmentResponseType=v?"denied":"accepted",await this.organizeDataAck({...this.viewItem,updatedAt:r},"response",this.isAlcoholes,this.isREC,this.isNoticesREC),this.tempAckPdfUrl=null,this.isAlcoholes?await this.$refs.acceptenceAcknowledgment.generatePDF():this.isREC?await this.$refs.recAcceptenceAcknowledgment.generatePDF():this.isNoticesREC&&await this.$refs.noticesRecAcceptenceAcknowledgment.generatePDF(),await new Promise(F=>{const L=Pt(()=>{this.tempAckPdfUrl&&(clearInterval(L),F())},500);setTimeout(()=>{clearInterval(L),F()},3e4)}),!this.tempAckPdfUrl)throw new Error("No se pudo generar el PDF del acuse");console.log("â
PDF del acuse generado correctamente");const p={documentUrl:this.tempAckPdfUrl,idAck:"acuseDeRespuesta",name:"Acuse de respuesta.pdf"},u={...this.viewItem,status2:this.viewItem.status2,completeAt:r},A="response",g=Ft(`/${d}/${t.viewItem.id_user}/documentsFinals`);await vt(`${d}/${t.viewItem.id_user}/documentsFinals/${g.id}`,{...u,finalDocumentId:g.id,docType:"acknowledgment",acknowledgmentType:A,status2:"Acuse",answerStatus:u.status2,createdAt:r,ackUrl:p.documentUrl},!1),console.log("â
DocumentsFinals creado:",g.id);let C="",_="",S="";o.completeBy?(C=o.completeBy,_=o.completeByName||"",S=o.completeByEmail||""):(C=this.user.uid,_=this.fullName,S=this.user.email);const I={documentUrl:p.documentUrl,userWhoUpload:C,userWhoUploadName:_,userWhoUploadEmail:S,name:"Acuse de respuesta.pdf",createdAt:je(),attachmentsWithSignatureAtAnotherStage:!1,attachmentsWithElectronicSignature:!1,stageUploaded:this.viewItem.stageAll-1,idAck:"acuseDeRespuesta",finalDocumentId:g.id};this.outputDocuments.push(I),console.log("â
OutputDocument creado");let P=null;try{const F=await gs("hashFiles",{fileUrl:p.documentUrl});if(F){P=F;const L={hash:F,size:p.size||0,file_name:"Acuse de respuesta.pdf",hashing_algorithm:"SHA256",endBy:this.user.uid,fileStorageURL:p.documentUrl,endDate:r,endByName:this.fullName,signatures:[]};this.outputDocumentsHashed||(this.outputDocumentsHashed=[]),this.outputDocumentsHashed.push(L),console.log("â
Hash del acuse generado correctamente:",F)}}catch(F){console.warn("â ï¸ Error al generar hash del acuse:",F),oe(F)}await Je(`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}`,{[s]:g.id,outputDocuments:this.outputDocuments,outputDocumentsHashed:this.outputDocumentsHashed,updatedAt:je(),updatedBy:this.user.uid,updatedByEmail:this.user.email,updatedByName:this.fullName}),console.log("â
Documento principal actualizado"),await new Promise(F=>setTimeout(F,500));try{const F=(this._.provides[Ae]||this.$route).query.procedureId;if(!F||F==="undefined")throw new Error("regenerateAcknowledgment: missing or invalid procedureId in route query");const z=(await bt(`modules/${this.viewItem.module}/${this.viewItem.submodule}/${F}/answers/${this.viewItem.id_reference}`)).data();await Je(`/${d}/${t.viewItem.id_user}/documentsFinals/${g.id}`,{...z,finalDocumentId:g.id,docType:"acknowledgment",acknowledgmentType:A,status2:"Acuse",answerStatus:u.status2,createdAt:r,ackUrl:p.documentUrl,ackHash:P}),console.log("â
DocumentsFinals del acuse actualizado con datos completos"),t.viewItem.finalDocumentId&&(await Je(`/${d}/${t.viewItem.id_user}/documentsFinals/${t.viewItem.finalDocumentId}`,{...z,updatedAt:je()}),console.log("â
DocumentsFinals principal actualizado con datos completos"))}catch(F){console.warn("â ï¸ Error al actualizar finalDocument:",F),oe(F)}if(t.viewItem.finalDocumentId)try{console.log("ð Regenerando PDF del finalDocument...");const F=t.viewItem.isCertificate||!1,L=t.viewItem.verificationDisabled||!1,z=F?L?"_cert":"_certValid":"",V=`finalDocuments/${this.viewItem.module}/${this.viewItem.submodule}/${t.viewItem.slugRequest}/${this.viewItem.id_reference}/${this.viewItem.id_reference}${z}.pdf`;try{await hs(V),console.log("â
PDF anterior eliminado del storage")}catch{console.log("â¹ï¸ No habÃa PDF anterior para eliminar")}await this.generatePdf(),console.log("â
PDF del finalDocument regenerado correctamente")}catch(F){console.warn("â ï¸ Error al regenerar PDF del finalDocument:",F),oe(F)}return this.$sentry.captureMessage("Acuse regenerado manualmente",{level:"info",tags:{tipo:"acuse_regeneracion_manual",tramite_tipo:this.isAlcoholes?"Alcoholes":this.isREC?"REC":"Avisos REC"},extra:{acuseId:g.id,tramiteId:`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}`,folio:this.viewItem.folio&&this.viewItem.folio!==""?this.viewItem.folio:this.viewItem.preFolio}}),e||le().close(),g.id}catch(s){return console.error("Error regenerating acknowledgment:",s),this.$sentry.captureException(s,{tags:{tipo:"acuse_regeneracion_error"},extra:{tramiteId:`/modules/${this.viewItem.module}/${this.viewItem.submodule}/${this.viewItem.slugRequest}/answers/${this.viewItem.id_reference}`,folio:this.viewItem.folio&&this.viewItem.folio!==""?this.viewItem.folio:this.viewItem.preFolio}}),De().open({color:"error",text:`Error al regenerar acuse: ${s.message}`}),e||le().close(),null}finally{this.regeneratingAck=!1,this.tempAckPdfUrl=null}}}}),Eh={key:3},Th={class:"d-flex align-center"},Fh={class:"panel-title"},Rh={class:"d-sm-flex align-center"},$h={class:"ma-auto"},xh={class:"ma-auto"},Nh={class:"text-left font-weight-medium ml-2"},Oh={class:"text-left font-weight-medium ml-2"},Mh={class:"d-sm-flex align-center"},zh={class:"mb-0 text-body-2 font-weight-medium"},Lh={class:"ml-sm-2 mb-0 text-body-2 font-weight-regular"},qh={class:"d-sm-flex align-center"},Bh={class:"mb-0 text-body-2 font-weight-medium"},jh={class:"ml-sm-2 mb-0 text-body-2 font-weight-regular"},Vh={class:"pa-0 text-subtitle-2 font-weight-bold d-blocks"},Uh=["innerHTML"];function Hh(e,t,s,c,o,r){const d=yn,a=Ro,m=ul,v=Kl,p=Dd,u=zd,A=Qd,g=yi,C=fc,_=at("AlertInformationIcon"),S=at("AppointmentBanner"),I=jc,P=at("CardPayTabIcon"),F=$s,L=bi,z=Pi,V=at("AppointmentsList"),X=Ei,J=Ti,G=P1,U=at("CitizenAppointment"),me=Ua,$=Ha,Y=z1,w=bf,q=Np;return y(),T(k,{width:"100%","min-height":"calc(100vh - 150px)"},{default:i(()=>[n(b,{md:"12"},{default:i(()=>[n(be,{class:"rounded-lg elevation-3"},{default:i(()=>[n(Re,null,{default:i(()=>[n(k,null,{default:i(()=>[n(b,{cols:"12",sm:e.showColumns()===!0?4:6,class:"my-3 px-5"},{default:i(()=>[n(d,{"view-item":e.viewItem,"created-at":e.createdAt,folio:e.folio,"pre-folio":e.preFolio,"show-error-wallet":e.showErrorWallet},null,8,["view-item","created-at","folio","pre-folio","show-error-wallet"])]),_:1},8,["sm"]),n(we,{vertical:"",class:"ocultar"}),n(b,{cols:"12",sm:e.showColumns()===!0?4:6,class:"my-3 px-5"},{default:i(()=>[n(a,{"view-item":e.viewItem,"updated-at":e.updatedAt,dialog:e.dialog,onSetDialog:t[0]||(t[0]=O=>e.dialog=O)},null,8,["view-item","updated-at","dialog"])]),_:1},8,["sm"]),e.showColumns()===!0?(y(),T(we,{key:0,vertical:"",class:"ocultar"})):M("",!0),e.showColumns()===!0?(y(),T(b,{key:1,cols:"12",sm:"4",class:"my-3 px-6 px-xl-14"},{default:i(()=>[n(m,{"view-item":e.viewItem,"change-prevention":e.changePrevention,"can-answer-feedback":e.canAnswerFeedback,"disabled-response-feedback":e.disabledResponseFeedback,"tiempo-restante-feedback":e.tiempoRestanteFeedback,"citizen-signature-timeout":e.citizenSignatureTimeout,"dialog-response":e.dialogResponse,"substages-documents":e.substagesDocuments,"schedule-appointment":e.scheduleAppointment,"show-error-wallet":e.showErrorWallet,"operator-has-requested-signature":e.operatorHasRequestedSignature,"all-documents-signed":e.allDocumentsSigned,"show-view-acknowledgment-button":e.showViewAcknowledgmentButton,"loading-acknowledgment":e.regeneratingAck,"has-substage-preventions":e.openSubstagePreventions.length>0,onSetDialogResponse:t[1]||(t[1]=O=>e.dialogResponse=O),onRequestFeedback:t[2]||(t[2]=O=>e.requestFeedback(O)),onSendSignatureConfirmation:t[3]||(t[3]=O=>e.sendSignatureConfirmation(O)),onSetScheduleAppointment:t[4]||(t[4]=O=>e.scheduleAppointment=O),onViewAcknowledgment:e.viewAcknowledgment},null,8,["view-item","change-prevention","can-answer-feedback","disabled-response-feedback","tiempo-restante-feedback","citizen-signature-timeout","dialog-response","substages-documents","schedule-appointment","show-error-wallet","operator-has-requested-signature","all-documents-signed","show-view-acknowledgment-button","loading-acknowledgment","has-substage-preventions","onViewAcknowledgment"]),!e.isNL&&!e.isLujan&&!e.viewItem.processExternal&&e.UMA?(y(),T(v,{key:0,"current-u-m-a":e.UMA,"current-year":e.year,"view-item":e.viewItem,"tiempo-restante-payment":e.tiempoRestantePayment,"search-participants":e.searchParticipants,"get-assigned-operator":e.getAssignedOperator,"no-expediente-catastral":e.noExpedienteCatastral,onUpdate:t[5]||
375(t[5]=O=>e.update(O)),onEmitDialog:t[6]||(t[6]=O=>e.emitDialog(O))},null,8,["current-u-m-a","current-year","view-item","tiempo-restante-payment","search-participants","get-assigned-operator","no-expediente-catastral"])):e.isNL===!0&&!e.viewItem.processExternal&&e.UMA?(y(),T(p,{key:1,"current-u-m-a":e.UMA,"current-year":e.year,user:e.user,"view-item":e.viewItem,"show-time-payment":e.showTimePayment,"tiempo-restante-payment":e.tiempoRestantePayment,"search-participants":e.searchParticipants,"get-assigned-operator":e.getAssignedOperator,"with-sections":e.withSections||!1,onEmitDialog:t[7]||(t[7]=O=>e.emitDialog(O)),onSaveViewItem:t[8]||(t[8]=O=>e.saveViewItem(O))},null,8,["current-u-m-a","current-year","user","view-item","show-time-payment","tiempo-restante-payment","search-participants","get-assigned-operator","with-sections"])):e.isLujan===!0&&!e.viewItem.processExternal&&e.UMA?(y(),T(u,{key:2,"current-u-m-a":e.UMA,"current-year":e.year,user:e.user,"view-item":e.viewItem,"tiempo-restante-payment":e.tiempoRestantePayment,"search-participants":e.searchParticipants,"get-assigned-operator":e.getAssignedOperator,onUpdate:t[9]||(t[9]=O=>e.update(O)),onEmitDialog:t[10]||(t[10]=O=>e.emitDialog(O)),onSaveViewItem:t[11]||(t[11]=O=>e.saveViewItem(O))},null,8,["current-u-m-a","current-year","user","view-item","tiempo-restante-payment","search-participants","get-assigned-operator"])):M("",!0),["En proceso","Pendiente de pago","Citado","En prevención"].includes(e.viewItem.status2)&&!e.scheduleAppointment&&e.viewItem?.saveParent?.config?.addDesist?(y(),j("div",Eh,[n(A,{"post-data":e.viewItem,"desist-config":e.viewItem?.saveParent?.config,onDesistProcedure:t[12]||(t[12]=O=>e.desistConfirmed(O)),onAccountTierRequired:t[13]||(t[13]=O=>e.accountTierBlockedReason=O)},null,8,["post-data","desist-config"]),n(g,{"model-value":!!e.accountTierBlockedReason,reason:e.accountTierBlockedReason,dismissible:"","onUpdate:modelValue":t[14]||(t[14]=O=>e.accountTierBlockedReason="")},null,8,["model-value","reason"])])):M("",!0)]),_:1})):M("",!0)]),_:1})]),_:1})]),_:1})]),_:1}),e.openSubstagePreventions.length>0?(y(),T(b,{key:0,cols:"12"},{default:i(()=>[n(C,{preventions:e.openSubstagePreventions,"list-documents":e.listDocuments,"form-invalid":e.rulesQuestions||e.stepRequiredQuestions||e.groupRequiredQuestions,"resolving-index":e.resolvingSubstage,onResolve:t[15]||(t[15]=O=>e.resolveSubstagePrevention(O)),onGoToSection:t[16]||(t[16]=O=>e.goToSubstageSection(O)),onGoToDocuments:t[17]||(t[17]=O=>e.tab=e.getNumberTab("documentos"))},null,8,["preventions","list-documents","form-invalid","resolving-index"])]),_:1})):M("",!0),e.dialogFeedback===!0&&e.showFeedbackSections?(y(),T(b,{key:1,cols:"12"},{default:i(()=>[l("div",null,[n(Oe,{color:"#FB8C00",border:"start",variant:"outlined"},{default:i(()=>[n(_i,{multiple:"",accordion:""},{default:i(()=>[n(Ai,null,{default:i(()=>[n(Di,null,{default:i(()=>[l("div",Th,[l("span",Fh,[l("div",Rh,[n(_,{fill:"#FB8C00",width:"28px",height:"28px",class:"mr-2"}),t[44]||(t[44]=l("p",{class:"mb-0 text-subtitle-1 font-weight-bold"}," El funcionario solicita que se efectúen correcciones en las secciones indicadas: ",-1))])])])]),_:1}),n(ki,null,{default:i(()=>[n(et,{density:"compact",class:"pl-6"},{default:i(()=>[(y(!0),j(pe,null,Ee(e.hasALogicQuestion?e.logicFeedbackObject:e.objectFeedback.sections,(O,Q)=>(y(),T(Ve,{key:`sec-${Q}`,class:"px-0"},{prepend:i(()=>[l("div",$h,[n(ve,{color:"grey-darken-2"},{default:i(()=>
375[...t[45]||(t[45]=[D("mdi-circle-small",-1)])]),_:1})])]),default:i(()=>[n(Ze,{class:"text-body-2"},{default:i(()=>[n(te,{variant:"text",color:O.revised===!0?"rgb(var(--v-theme-tabDisabled))":"rgb(var(--v-theme-btnPrimary))",class:"link-like pa-0",onClick:Z=>e.tab=e.getNumberTab(O)},{default:i(()=>[D(f(O.name),1)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128)),(e.hasALogicQuestion?e.logicDocumentsFeedback.length>0:e.objectFeedback.documents.length>0)?(y(),T(Ve,{key:0,class:"px-0"},{prepend:i(()=>[l("div",xh,[n(ve,{color:"grey-darken-2"},{default:i(()=>[...t[46]||(t[46]=[D("mdi-circle-small",-1)])]),_:1})])]),default:i(()=>[n(Ze,{class:"text-body-2"},{default:i(()=>[n(te,{variant:"text",color:e.objectFeedback.documents.every(O=>O.revised===!0)?"rgb(var(--v-theme-tabDisabled))":"rgb(var(--v-theme-btnPrimary))",class:"link-like pa-0",onClick:t[18]||(t[18]=O=>e.tab=e.getNumberTab("documentos"))},{default:i(()=>[...t[47]||(t[47]=[D(" Documentos ",-1)])]),_:1},8,["color"])]),_:1})]),_:1})):M("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})):M("",!0),!e.scheduleAppointment&&e.hasActiveAppointment?(y(),T(b,{key:2,cols:"12"},{default:i(()=>[n(S,{appointments:e.listData,onGoToAppointments:t[19]||(t[19]=O=>e.tab=e.getNumberTab("appointments"))},null,8,["appointments"])]),_:1})):M("",!0),e.dialogFeedback===!0&&e.missingSections&&e.missingSections.length>0&&e.hasALogicQuestion?(y(),T(b,{key:3,cols:"12"},{default:i(()=>[l("div",null,[n(Oe,{icon:"mdi-alert-circle-outline",type:"warning",border:"start",variant:"outlined"},{default:i(()=>[D(f(e.$t("details.changeInLogic"))+" ",1),l("b",null,f(e.missingSections.map(O=>O.title).join(", ")),1)]),_:1})])]),_:1})):M("",!0),e.scheduleAppointment?(y(),T(b,{key:5,cols:"12",class:"my-3 mx-md-3"},{default:i(()=>[n(U,{user:e.user,post:e.appointmentInfo,"show-cancel":!0,"request-folio":e.viewItem.folio!==null?e.viewItem.folio:e.viewItem.preFolio,"current-stage":e.viewItem.stageNow,"answer-status":e.viewItem.status2,onCancelAppt:t[36]||(t[36]=O=>e.scheduleAppointment=!1),onSaveApptInStage:t[37]||(t[37]=O=>e.saveApptInCurrentStage(O))},null,8,["user","post","request-folio","current-stage","answer-status"])]),_:1})):(y(),j(pe,{key:4},[e.viewItem.processExternal?M("",!0):(y(),T(b,{key:0,id:"tabs-content",cols:"12",class:Be(e.dialogFeedback!==!0?"mt-3":"")},{default:i(()=>[n(ri,{modelValue:e.tab,"onUpdate:modelValue":t[20]||(t[20]=O=>e.tab=O),color:"tabBorder","next-icon":"mdi-chevron-right","prev-icon":"mdi-chevron-left","show-arrows":"","center-active":"","slider-color":"tabBorder"},{default:i(()=>[(y(!0),j(pe,null,Ee(e.hasALogicQuestion&&e.withSectionsAsTabs?e.logicStepsList:e.listTabs,(O,Q)=>(y(),j(pe,{key:`${Q}`},[e.withSectionsAsTabs!==!0||O.schema&&O.schema.deleteFeature!==!0||O.id==="newRequests"||O.id==="documentos"||O.id==="appointments"?(y(),T(Rt,{key:0,value:`${Q}`,class:"text-left"},{default:i(()=>[O.id==="newRequests"?(y(),T(rn,{key:0,"model-value":e.unreadCount>0,content:e.unreadCount,max:99,color:"error",inline:"","aria-label":e.$t("newRequests.unreadAria",{count:e.unreadCount})},{default:i(()=>[n(I,{"view-item":e.viewItem,section:O},null,8,["view-item","section"])]),_:2},1032,["model-value","content","aria-label"])):(y(),T(I,{key:1,"view-item":e.viewItem,section:O},null,8,["view-item","section"]))]),_:2},1032,["value"])):M("",!0)],64))),128)),e.viewItem.existPayment===!0?(y(),T(Rt,{key:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+1}`:`${e.listTabs.length+1}`,value:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+1}`:`${e.listTabs.length+1}`,class:"text-left"},{default:i(()=>[l("span",null,[n(P,{fill:"rgb(var(--v-theme-tabText))",width:"25px",height:"25px"})]),l("label",Nh,f(e.$t("details.payments.title")),1)]),_:1},8,["value"])):M("",!0),e.viewItem.status2==="Pendiente de firma"&&e.postDataDocumentsRequest.stages.length>1||e.operatorSignatureRequested===!0||e.viewItem.status2!=="Pendiente de firma"&&e.viewItem.documentsToSign&&e.viewItem.documentsToSign.length>0?(y(),T(Rt,{key:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+2}`:`${e.listTabs.length+2}`,value:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+2}`:`${e.listTabs.length+2}`,class:"text-left"},{default:i(()=>[l("span",null,[n(ve,{start:"",color:"#053F6F"},{default:i(()=>[...t[48]||(t[48]=[D(" mdi mdi-paperclip ",-1)])]),_:1})]),l("label",Oh,f(e.$t("uploadDocumentsToSign.tabTitle")),1)]),_:1},8,["value"])):M("",!0)]),_:1},8,["modelValue"]),n(be,{class:"rounded-lg elevation-3"},{default:i(()=>[n(li,{modelValue:e.tab,"onUpdate:modelValue":t[35]||(t[35]=O=>e.tab=O)},{default:i(()=>[(y(!0),j(pe,null,Ee(e.hasALogicQuestion&&e.withSectionsAsTabs?e.logicStepsList:e.listTabs,(O,Q)=>(y(),j(pe,{key:`${Q}`}
375,[e.withSectionsAsTabs!==!0||O.schema&&O.schema.deleteFeature!==!0||O.id==="newRequests"||O.id==="documentos"||O.id==="appointments"?(y(),T($t,{key:0,value:`${Q}`,class:"pt-3 pb-6 px-sm-4"},{default:i(()=>[O.valid===!1&&e.viewItem.saveParent.config.withSectionsAsTabs===!0&&(e.viewItem.status2==="En prevención"||e.viewItem.status2==="En preventiva")&&O.id!=="documentos"&&O.id!=="newRequests"&&O.id!=="appointments"?(y(),T(k,{key:0,class:"justify-center"},{default:i(()=>[n(b,{cols:"12",class:"py-3"},{default:i(()=>[n(Oe,{color:"warning",border:"start",variant:"outlined"},{default:i(()=>[l("div",Mh,[n(F,{fill:"#FB8C00",width:"26px",height:"26px",class:"ml-1 mr-2 mb-1"}),l("p",zh,f(e.$t("details.titleOperatorComent"))+":",1),l("p",Lh,f(O.commentOperator),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024)):e.viewItem.validForm===!1&&e.viewItem.saveParent.config.withSectionsAsTabs===!1&&O.id!=="documentos"&&O.id!=="newRequests"&&O.id!=="appointments"&&(e.viewItem.status2==="En prevención"||e.viewItem.status2==="En preventiva")?(y(),T(k,{key:1,class:"justify-center"},{default:i(()=>[n(b,{cols:"12",class:"py-3"},{default:i(()=>[n(Oe,{color:"warning",border:"start",variant:"outlined"},{default:i(()=>[l("div",qh,[n(F,{fill:"#FB8C00",width:"26px",height:"26px",class:"ml-1 mr-2 mb-1"}),l("p",Bh,f(e.$t("details.titleOperatorComent"))+":",1),l("p",jh,f(e.viewItem.commentOperator),1)])]),_:1})]),_:1})]),_:1})):M("",!0),O.id&&O.id!=="confirmar"&&O.id!=="formulario"&&O.id!=="documentos"&&O.id!=="appointments"&&O.id!=="newRequests"?(y(),T(k,{key:2,"no-gutters":"",class:"background-title text-white","full-height":""},{default:i(()=>[n(b,{cols:"12",class:"pa-3"},{default:i(()=>[l("h4",Vh,[O.icon.includes("mdi")?(y(),T(ve,{key:0,class:"text-white mr-2"},{default:i(()=>[D(f(O.icon),1)]),_:2},1024)):M("",!0),D(" "+f(`${O.title}`),1)])]),_:2},1024),n(b,{cols:"12",class:"px-0 pt-0"},{default:i(()=>[n(we)]),_:1})]),_:2},1024)):M("",!0),O.id&&O.id!=="confirmar"&&O.id!=="formulario"&&O.id!=="documentos"&&O.id!=="appointments"&&O.id!=="newRequests"?(y(),T(L,{key:`${e.render}-r`,model:e.myModel[O.id].schema,schema:O.schema,"in-prevention":["En prevención","En preventiva"].includes(e.viewItem.status2),"user-navigator":e.userNavigator,"loader-btn":e.loaderBtn,"with-sections":e.withSections,"with-sections-as-tabs":e.withSectionsAsTabs,onChangesInForm:t[21]||(t[21]=Z=>e.changePrevention=Z),onUnfocusedField:t[22]||(t[22]=Z=>e.checkLogicAtBlur()),onChangedApiQuestion:t[23]||(t[23]=Z=>e.checkLogicAtBlur()),onPutAnswerInMayus:t[24]||(t[24]=Z=>e.putAnswerInMayus(Z)),onFillNumberQuestionValue:t[25]||(t[25]=Z=>e.fillNumberQuestionValue(Z))},null,8,["model","schema","in-prevention","user-navigator","loader-btn","with-sections","with-sections-as-tabs"])):O.id!=="documentos"&&O.id!=="appointments"&&O.id!=="newRequests"?(y(),T(L,{key:`${e.render}-r`,"user-navigator":e.userNavigator,model:e.myModel,schema:e.mySchema,"with-sections":e.withSections,"with-sections-as-tabs":e.withSectionsAsTabs,onChangesInForm:t[26]||(t[26]=Z=>e.changePrevention=Z),onPutAnswerInMayus:t[27]||(t[27]=Z=>e.putAnswerInMayus(Z)),onFillNumberQuestionValue:t[28]||(t[28]=Z=>e.fillNumberQuestionValue(Z))},null,8,["user-navigator","model","schema","with-sections","with-sections-as-tabs"])):O.id==="documentos"?(y(),T(z,{key:5,"list-documents":e.listDocuments,status:e.viewItem.status2,"show-all":e.activeShowAllFieldsAndFiles,onUpdateNewFile:t[29]||(t[29]=Z=>{e.changePrevention=!0,e.updateFile(Z)})},null,8,["list-documents","status","show-all"])):O.id==="appointments"?(y(),T(V,{key:6,"list-appointments":e.listData,"status-list":e.statusList,"show-info-office":!0,onRemoveApptInStage:t[30]||(t[30]=Z=>e.removeApptInCurrentStage()),onUpdateListOfAppointments:t[31]||(t[31]=Z=>e.updateListOfAppointments())},null,8,["list-appointments","status-list"])):O.id==="newRequests"?(y(),T(X,{key:7,status:e.viewItem.status2,"slug-request":e.viewItem.slugRequest,"link-storage":e.viewItem.link_storage,module:e.viewItem.module,details:(e._.provides[Ae]||e.$route).params.details_id,submodule:e.viewItem.submodule,"stage-now":e.viewItem.stageNow,"view-item":{participants:e.viewItem.participants,assignedOperator:e.viewItem.assignedOperator,folio:e.viewItem.folio,preFolio:e.viewItem.preFolio,id_reference:e.viewItem.id_reference},onEmitDialog:e.emitDialog},null,8,["status","slug-request","link-storage","module","details","submodule","stage-now","view-item","onEmitDialog"])):M("",!0)]),_:2},1032,["value"])):M("",!0)],64))),128)),e.viewItem.existPayment===!0?(y(),T($t,{key:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+1}`:`${e.listTabs.length+1}`,value:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+1}`:`${e.listTabs.length+1}`,eager:"",class:"pt-3 px-sm-4"},{default:i(()=>[n(J,{"tab-payment":e.hasALogicQuestion&&e.withSectionsAsTabs?e.logicStepsList.length+1:e.listTabs.length+1,tab:`${e.tab}`,"id-reference":e.viewItem.id_reference},null,8,["tab-payment","tab","id-reference"])]),_:1},8,["value"])):M("",!0),e.viewItem.status2==="Pendiente de firma"&&e.postDataDocumentsRequest.stages.length>1||e.operatorSignatureRequested===!0||e.viewItem.status2!=="Pendiente de firma"&&e.viewItem.documentsToSign&&e.viewItem.documentsToSign.length>0?(y(),T($t,{key:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+2}`:`${e.listTabs.length+2}`,value:e.hasALogicQuestion&&e.withSectionsAsTabs?`${e.logicStepsList.length+2}`:`${e.listTabs.length+2}`,eager:"",class:"pt-3 px-sm-4"},{default:i(()=>[n(k,{"no-gutters":""},{default:i(()=>[n(b,{cols:"12"},{default:i(()=>[n(G,{"flag-sign-documents-to-sign-saved":e.flagSignDocumentsToSignSaved,"onUpdate:flagSignDocumentsToSignSaved":t[32]||(t[32]=O=>e.flagSignDocumentsToSignSaved=O),"button-disabled":!1,folio:e.postDataDocumentsRequest.folio,"module-id":e.postDataDocumentsRequest.moduleId,"submodule-id":e.postDataDocumentsRequest.submoduleId,post:e.postDataDocumentsRequest,"slug-request":e.viewItem.slugRequest,"details-id":e.postDataDocumentsRequest.detailsId,status:e.viewItem.status2,"user-aux-role":e.userAuxRole,"documents-to-sign":e.documentsToSign,"answer-status":e.viewItem.status2,"with-list-documents":e.listDocuments.length>0&&!e.closeDocuments,onDeleteDocumentsToSign:t[33]||(t[33]=O=>e.update({documentsToSign:O})),onSaveDocumentsToSign:t[34]||(t[34]=O=>e.saveDocumentsToSign(O,!0))},null,8,["flag-sign-documents-to-sign-saved","folio","module-id","submodule-id","post","slug-request","details-id","status","user-aux-role","documents-to-sign","answer-status","with-list-documents"])]),_:1})]),_:1})]),_:1},8,["value"])):M("",!0)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["class"]))],64)),n(Me,{modelValue:e.dialogMessage.val,"onUpdate:modelValue":t[39]||(t[39]=O=>e.dialogMessage.val=O),width:"500",scrollable:""},{default:i(()=>[n(be,null,{default:i(()=>[n(Re,{class:"py-5 text-black"},{default:i(()=>[l("div",{class:"mt-5 text-center",style:ht({color:e.dialogMessage.textColor})},[e.dialogMessage.icon?(y(),T(ve,{key:0,color:e.dialogMessage.iconColor},{default:i(()=>[D(f(e.dialogMessage.icon),1)]),_:1},8,["color"])):M("",!0),l("label",{innerHTML:e.dialogMessage.message},null,8,Uh)],4)]),_:1}),n(we),n(Ke,{class:"justify-center py-5"},{default:i(()=>[n(te,{color:"btnPrimary",onClick:t[38]||(t[38]=O=>e.dialogMessage.val=!1)},{default:i(()=>[D(f(e.$t("ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),n(me,{"invalid-answer-dialog":e.invalidAnswerDialog,"invali
375d-answers":e.invalidAnswers,onCloseDialog:t[40]||(t[40]=O=>e.invalidAnswerDialog=!1)},null,8,["invalid-answer-dialog","invalid-answers"]),n($,{"invalid-api-dialog":e.invalidApiRequest,"in-prevention":!0},null,8,["invalid-api-dialog"]),n(Y,{ref:"acceptenceAcknowledgment","person-type":e.personTypeAck,"establishment-data":e.establishmentDataAck,"applicant-data":e.applicantDataAck,"contact-data":e.contactDataAck,"legal-representative":e.legalRepresentativeAck,"extra-data":e.extraDataAck,title:e.procTitleAck,"document-data":e.viewItem,"acknowledgment-response-type":e.acknowledgmentResponseType,onPdfGenerated:t[41]||(t[41]=O=>e.saveAcuseInOutputDocs(O))},null,8,["person-type","establishment-data","applicant-data","contact-data","legal-representative","extra-data","title","document-data","acknowledgment-response-type"]),n(w,{ref:"recAcceptenceAcknowledgment","person-type":e.personTypeAck,"extra-data":e.extraDataAck,title:e.procTitleAck,"legal-representative":e.legalRepresentativeAck,"contributor-data":e.contributorDataAck,"registered-address":e.registeredAddressAck,"nuevo-leon-address":e.nuevoLeonAddressAck,"economic-activity":e.economicActivityAck,"fiscal-obligations":e.fiscalObligationsAck,"contact-data":e.contactDataAck,"document-data":e.viewItem,"num-estatal":e.recCuentaEstatal,"acknowledgment-response-type":e.acknowledgmentResponseType,onPdfGenerated:t[42]||(t[42]=O=>e.saveAcuseInOutputDocs(O))},null,8,["person-type","extra-data","title","legal-representative","contributor-data","registered-address","nuevo-leon-address","economic-activity","fiscal-obligations","contact-data","document-data","num-estatal","acknowledgment-response-type"]),n(q,{ref:"noticesRecAcceptenceAcknowledgment","person-type":e.personTypeAck,"extra-data":e.extraDataAck,title:e.procTitleAck,"legal-representative":e.legalRepresentativeAck,"contributor-data":e.contributorDataAck,"registered-address":e.registeredAddressAck,"nuevo-leon-address":e.nuevoLeonAddressAck,"economic-activity":e.economicActivityAck,"fiscal-obligations":e.fiscalObligationsAck,"contact-data":e.contactDataAck,"document-data":e.viewItem,"acknowledgment-response-type":e.acknowledgmentResponseType,onPdfGenerated:t[43]||(t[43]=O=>e.saveAcuseInOutputDocs(O))},null,8,["person-type","extra-data","title","legal-representative","contributor-data","registered-address","nuevo-leon-address","economic-activity","fiscal-obligations","contact-data","document-data","acknowledgment-response-type"])]),_:1})}const m0=_e(Ph,[["render",Hh]]);export{m0 as default,ai as moveNewRequestsToSecond};
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.