nfets 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-CAMDTF2T.mjs +20 -0
- package/dist/{chunk-EG7US67K.mjs → chunk-Q47VIRPG.mjs} +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +100 -82
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +99 -81
- package/dist/nfe/index.d.cts +138 -5
- package/dist/nfe/index.d.ts +138 -5
- package/dist/nfe/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-LP4JOWRA.mjs +0 -2
package/dist/chunk-LP4JOWRA.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{A as Ta,C as _a,D as La,E as Qa,F as Ba,G as qa,I as O,J as c,K as Bo,d as Da,f,g as ja,h as v,i as me,k as Vn,m as ye,n as A,o as wa,p as Ea,u as Va,v as jt,x as S,y as wt,z as Ma}from"./chunk-EG7US67K.mjs";import{a as s}from"./chunk-W6MRGYXP.mjs";var $e=(function(i){return i.Normal="1",i.EPEC="4",i.SVCAN="6",i.SVCRS="7",i.OFFLINE="9",i})({});var qo=(function(i){return i.Cancelamento="110111",i})({});import{existsSync as ks}from"fs";import{resolve as dn}from"path";var ep={PL_009_V4:"PL_009_V4",PL_010_V1:"PL_010_V1",PL_010_V1_21:"PL_010_V1.21"},Mn=s(()=>{if(process.env.NFETS_NFE_SCHEMAS_DIR)return process.env.NFETS_NFE_SCHEMAS_DIR;let i=Qa(),e=[dn(i,"node_modules","nfets","packages","nfe","schemas"),dn(i,"../../../../","nfe","schemas"),dn(i,"../../../","nfe","schemas"),dn(i,"../../","nfe","schemas"),dn(i,"../","nfe","schemas")];for(let o of e)if(ks(o))return o;return i},"schemas"),Ua=ep;var Tn=class{static{s(this,"AccessKeyBuilder")}compile(e){let o=e.cUF.toString().padStart(2,"0"),n=e.year.toString().padStart(2,"0"),r=e.month.toString().padStart(2,"0"),t=(e.identification??"").padStart(14,"0"),a=e.mod.toString().padStart(2,"0"),p=e.serie.toString().padStart(3,"0"),ve=e.nNF.toString().padStart(9,"0"),Le=e.tpEmis.toString().padStart(1,"0"),At=(e.cNF??this.code()).toString().padStart(8,"0"),Dt=`${o}${n}${r}${t}${a}${p}${ve}${Le}${At}`;return`${Dt}${this.verifyingDigit(Dt)}`}decompile(e){if(e.length!==44)return;let n=/^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{14})([0-9]{2})([0-9]{3})([0-9]{9})([0-9]{1})([0-9]{8})([0-9]{1})$/.exec(e);if(!n)return;let[r,t,a,p,ve,Le,At,Dt,Qo,at,Ws]=n;return{cUF:t,year:a,month:p,identification:ve,mod:Le,serie:At,nNF:Dt,tpEmis:Qo,cNF:at,vd:Ws}}code(){let e=Math.floor(Math.random()*1e8).toString().padStart(8,"0");return this.isCodeValid(e)?e:this.code()}isCodeValid(e){return!~["00000000","11111111","22222222","33333333","44444444","55555555","66666666","77777777","88888888","99999999","12345678","23456789","34567890","45678901","56789012","67890123","78901234","89012345","90123456","01234567"].indexOf(e)}verifyingDigit(e){let o=[2,3,4,5,6,7,8,9],n=42,r=0;for(;n>=0;)for(let a=0;a<8&&n>=0;a++){let p=parseInt(e[n]);r+=p*o[a],n--}let t=11-r%11;return t>9?0:t}};var _n=class{static{s(this,"DefaultDetBuilderAggregator")}builder;constructor(e){this.builder=e}prod(e){let o=wt.from(0);this.builder.increment(({ICMSTot:n})=>({ICMSTot:{vProd:wt.newOrZero(n?.vProd).add(e.vProd).toFixed(2),vFrete:wt.newOrZero(n?.vFrete).add(e.vFrete??o).toFixed(2),vSeg:wt.newOrZero(n?.vSeg).add(e.vSeg??o).toFixed(2),vDesc:wt.newOrZero(n?.vDesc).add(e.vDesc??o).toFixed(2),vOutro:wt.newOrZero(n?.vOutro).add(e.vOutro??o).toFixed(2)}}))}icms(e){}};var Ln=class{static{s(this,"DefaultTotalBuilderAggregator")}builder;constructor(e){this.builder=e}aggregate(){let e=wt.from(0);this.builder.increment(({ICMSTot:o,ISSQNtot:n})=>({ICMSTot:{vNF:wt.newOrZero(o?.vProd).sub(o?.vDesc??e).sub(o?.vICMSDeson??e).add(o?.vST??e).add(o?.vFCPST??e).add(o?.vFrete??e).add(o?.vSeg??e).add(o?.vOutro??e).add(o?.vII??e).add(o?.vIPI??e).add(o?.vIPIDevol??e).add(n?.vServ??e).toFixed(2)}}))}};import $a from"crypto";var Qn=class{static{s(this,"CryptoSignerRepository")}async sign(e,o,n){try{if(!o.privateKey)return ye(new me("Certificate private key not found"));let t=$a.sign(n,Buffer.from(e),{key:o.privateKey,padding:$a.constants.RSA_PKCS1_PADDING}).toString("base64");return await Promise.resolve(A(t))}catch(r){return Promise.resolve(Ta(r))}}};var Ri=class{static{s(this,"Pipeline")}certificate;xmlns="http://www.portalfiscal.inf.br/nfe";http=La.create();toolkit=new qa;caching=new Ma;signerRepository=new Qn;certificates=new _a(this.http,this.signerRepository,this.caching);soap=new Ba(this.toolkit,this.certificates);signer=new wa(this.toolkit,this.certificates);xmlSigner=new Ea(this.toolkit,this.certificates);constructor(e){this.certificate=e}errors(){return Reflect.getMetadata(jt,this)}};import Rp from"path";import{Type as tp}from"class-transformer";import{IsEnum as Ja,IsNotEmptyObject as op,IsObject as ip,ValidateNested as np,IsOptional as rp}from"class-validator";function Bn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Bn,"_ts_decorate");function Tr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Tr,"_ts_metadata");var Uo=class{static{s(this,"ConsultStatusPayload")}tpAmb;cUF;xServ="STATUS"};Bn([Ja(v),Tr("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],Uo.prototype,"tpAmb",void 0);Bn([Ja(f),Tr("design:type",typeof StateCode>"u"?Object:StateCode)],Uo.prototype,"cUF",void 0);Bn([rp()],Uo.prototype,"xServ",void 0);var Mr=class{static{s(this,"ConsultStatusRequest")}consStatServ};Bn([op(),ip(),np(),tp(()=>Uo),Tr("design:type",typeof IConsultStatusPayload>"u"?Object:IConsultStatusPayload)],Mr.prototype,"consStatServ",void 0);import{Type as _r}from"class-transformer";import{IsEnum as Ha,IsOptional as Un,IsString as st,Length as Ga,MinLength as ap,MaxLength as sp,Matches as ln,ValidateNested as Lr,Allow as pp,IsObject as Ya}from"class-validator";function ie(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ie,"_ts_decorate");function Se(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Se,"_ts_metadata");var qn=class{static{s(this,"InfInutAttributes")}Id};ie([st(),Se("design:type",String)],qn.prototype,"Id",void 0);var un=class{static{s(this,"InutNFeAttributes")}xmlns;versao};ie([st(),Se("design:type",String)],un.prototype,"xmlns",void 0);ie([st(),Un(),Se("design:type",String)],un.prototype,"versao",void 0);var ge=class{static{s(this,"InfInut")}$;tpAmb;xServ="INUTILIZAR";cUF;ano;CNPJ;CPF;mod;serie;nNFIni;nNFFin;xJust};ie([Lr(),_r(()=>qn),Se("design:type",typeof IInfInutAttributes>"u"?Object:IInfInutAttributes)],ge.prototype,"$",void 0);ie([Ha(v),Se("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],ge.prototype,"tpAmb",void 0);ie([Un()],ge.prototype,"xServ",void 0);ie([Ha(f),Se("design:type",typeof StateCode>"u"?Object:StateCode)],ge.prototype,"cUF",void 0);ie([st(),Ga(2,2),ln(/^[0-9]{2}$/),Se("design:type",String)],ge.prototype,"ano",void 0);ie([st(),Un(),Se("design:type",String)],ge.prototype,"CNPJ",void 0);ie([st(),Un(),Se("design:type",String)],ge.prototype,"CPF",void 0);ie([st(),Ga(2,2),ln(/^(55|65)$/),Se("design:type",String)],ge.prototype,"mod",void 0);ie([st(),ln(/^[0-9]{1,3}$/),Se("design:type",String)],ge.prototype,"serie",void 0);ie([st(),ln(/^[0-9]{1,9}$/),Se("design:type",String)],ge.prototype,"nNFIni",void 0);ie([st(),ln(/^[0-9]{1,9}$/),Se("design:type",String)],ge.prototype,"nNFFin",void 0);ie([st(),ap(15),sp(255),Se("design:type",String)],ge.prototype,"xJust",void 0);ge=ie([O({properties:["CNPJ","CPF"],required:!0})],ge);var Kt=class{static{s(this,"InutilizacaoPayload")}$;infInut;Signature};ie([Ya(),Lr(),_r(()=>un),Se("design:type",typeof IInutNFeAttributes>"u"?Object:IInutNFeAttributes)],Kt.prototype,"$",void 0);ie([Ya(),Lr(),_r(()=>ge),Se("design:type",typeof IInfInut>"u"?Object:IInfInut)],Kt.prototype,"infInut",void 0);ie([pp(),Se("design:type",typeof Signature>"u"?Object:Signature)],Kt.prototype,"Signature",void 0);import{IsEnum as cp,IsOptional as fp,IsString as dp,Length as up,Matches as lp}from"class-validator";function Qr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Qr,"_ts_decorate");function Xa(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Xa,"_ts_metadata");var oi=class{static{s(this,"ConsultaProtocoloPayload")}tpAmb;xServ="CONSULTAR";chNFe};Qr([cp(v),Xa("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],oi.prototype,"tpAmb",void 0);Qr([fp()],oi.prototype,"xServ",void 0);Qr([dp(),up(44,44),lp(/^[0-9]{44}$/),Xa("design:type",String)],oi.prototype,"chNFe",void 0);import{IsEnum as Br,IsOptional as Jn,IsString as vp,IsNotEmpty as mp}from"class-validator";function vn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(vn,"_ts_decorate");function $n(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s($n,"_ts_metadata");var Wt=class{static{s(this,"NfeAutorizacaoPayload")}tpAmb;cUF;idLote;indSinc="1";NFe};vn([Br(v),Jn(),$n("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],Wt.prototype,"tpAmb",void 0);vn([Br(f),Jn(),$n("design:type",typeof StateCode>"u"?Object:StateCode)],Wt.prototype,"cUF",void 0);vn([vp(),Jn(),$n("design:type",String)],Wt.prototype,"idLote",void 0);vn([Jn(),Br(["0","1"])],Wt.prototype,"indSinc",void 0);vn([mp(),$n("design:type",typeof T>"u"?Object:T)],Wt.prototype,"NFe",void 0);import{IsEnum as yp,IsString as gp}from"class-validator";function Za(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Za,"_ts_decorate");function Ka(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Ka,"_ts_metadata");var Ii=class{static{s(this,"RetAutorizacaoPayload")}tpAmb;nRec};Za([yp(v),Ka("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],Ii.prototype,"tpAmb",void 0);Za([gp(),Ka("design:type",String)],Ii.prototype,"nRec",void 0);import{IsString as kt,IsNotEmpty as Sp,ValidateNested as Yn,IsObject as Xn,IsOptional as Wa,IsEnum as Np,IsNumber as hp,Allow as Cp}from"class-validator";import{Type as Zn}from"class-transformer";function ne(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ne,"_ts_decorate");function se(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(se,"_ts_metadata");var Hn=class{static{s(this,"InfEventoAttributes")}Id};ne([kt(),se("design:type",String)],Hn.prototype,"Id",void 0);var ae=class{static{s(this,"InfEvento")}$;cOrgao;tpAmb;CNPJ;CPF;chNFe;dhEvento;tpEvento;nSeqEvento;verEvento;detEvento};ne([Xn(),Yn(),Zn(()=>Hn),se("design:type",typeof IInfEventoAttributes>"u"?Object:IInfEventoAttributes)],ae.prototype,"$",void 0);ne([kt(),se("design:type",typeof StateCode>"u"?Object:StateCode)],ae.prototype,"cOrgao",void 0);ne([kt(),se("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],ae.prototype,"tpAmb",void 0);ne([kt(),Wa(),se("design:type",String)],ae.prototype,"CNPJ",void 0);ne([kt(),Wa(),se("design:type",String)],ae.prototype,"CPF",void 0);ne([kt(),se("design:type",String)],ae.prototype,"chNFe",void 0);ne([Bo({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),se("design:type",String)],ae.prototype,"dhEvento",void 0);ne([Np(qo),se("design:type",typeof qo>"u"?Object:qo)],ae.prototype,"tpEvento",void 0);ne([hp(),se("design:type",Number)],ae.prototype,"nSeqEvento",void 0);ne([kt(),se("design:type",String)],ae.prototype,"verEvento",void 0);ne([Xn(),se("design:type",typeof T>"u"?Object:T)],ae.prototype,"detEvento",void 0);ae=ne([O({properties:["CNPJ","CPF"],required:!0})],ae);var Gn=class{static{s(this,"EventoItemAttributes")}xmlns};ne([kt(),se("design:type",String)],Gn.prototype,"xmlns",void 0);var Et=class{static{s(this,"EventoItem")}$;infEvento;Signature};ne([Xn(),Yn(),Zn(()=>Gn),se("design:type",typeof IEventoItemAttributes>"u"?Object:IEventoItemAttributes)],Et.prototype,"$",void 0);ne([Xn(),Yn(),Zn(()=>ae),se("design:type",typeof ae>"u"?Object:ae)],Et.prototype,"infEvento",void 0);ne([Cp(),se("design:type",typeof Signature>"u"?Object:Signature)],Et.prototype,"Signature",void 0);var zi=class{static{s(this,"EventoPayload")}idLote;evento};ne([kt(),se("design:type",String)],zi.prototype,"idLote",void 0);ne([Sp(),Yn(),Zn(()=>Et),se("design:type",typeof Et>"u"?Object:Et)],zi.prototype,"evento",void 0);import{IsIn as bp,IsOptional as Wn,IsString as kn}from"class-validator";function Oi(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Oi,"_ts_decorate");function Kn(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Kn,"_ts_metadata");var pt=class{static{s(this,"ConsultaCadastroPayload")}xServ="CONS-CAD";UF;IE="";CNPJ="";CPF=""};Oi([Wn()],pt.prototype,"xServ",void 0);Oi([kn(),bp(Object.values(ja)),Kn("design:type",typeof StateAcronym>"u"?Object:StateAcronym)],pt.prototype,"UF",void 0);Oi([Wn(),kn(),Kn("design:type",String)],pt.prototype,"IE",void 0);Oi([Wn(),kn(),Kn("design:type",String)],pt.prototype,"CNPJ",void 0);Oi([Wn(),kn(),Kn("design:type",String)],pt.prototype,"CPF",void 0);pt=Oi([O({properties:["IE","CNPJ","CPF"],required:!0})],pt);var ka={AM:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.am.gov.br/services2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},AN:{[v.Homolog]:{RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom1.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeDistribuicaoDFe:{method:"nfeDistDFeInteresse",operation:"NFeDistribuicaoDFe",version:"1.01",url:"https://hom1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx"},NfeConsultaDest:{method:"nfeConsultaNFDest",operation:"NfeConsultaDest",version:"1.01",url:"https://hom.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx"},NfeDownloadNF:{method:"nfeDownloadNF",operation:"NfeDownloadNF",version:"4.00",url:"https://hom.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://hom.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx"}},[v.Production]:{RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeDistribuicaoDFe:{method:"nfeDistDFeInteresse",operation:"NFeDistribuicaoDFe",version:"1.01",url:"https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx"},NfeConsultaDest:{method:"nfeConsultaNFDest",operation:"NfeConsultaDest",version:"1.01",url:"https://www.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx"},NfeDownloadNF:{method:"nfeDownloadNF",operation:"NfeDownloadNF",version:"4.00",url:"https://www.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://www.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx"}}},BA:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/CadConsultaCadastro4/CadConsultaCadastro4.asmx"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.ba.gov.br/webservices/CadConsultaCadastro4/CadConsultaCadastro4.asmx"}}},GO:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"}}},MG:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/CadConsultaCadastro4"}}},MS:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.ms.gov.br/ws/CadConsultaCadastro4"}}},MT:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/CadConsultaCadastro4"}}},PE:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/CadConsultaCadastro4"}}},PR:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/CadConsultaCadastro4"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefa.pr.gov.br/nfe/CadConsultaCadastro4"}}},RS:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}},SP:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeautorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nferetautorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeautorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nferetautorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx"}}},SVAN:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},SVRS:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}},SVCAN:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},SVCRS:{[v.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[v.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}}};var Fp={[f.AC]:"SVRS",[f.AL]:"SVRS",[f.AM]:"AM",[f.AP]:"SVRS",[f.BA]:"BA",[f.CE]:"SVRS",[f.DF]:"SVRS",[f.ES]:"SVRS",[f.GO]:"GO",[f.MA]:"SVAN",[f.MG]:"MG",[f.MS]:"MS",[f.MT]:"MT",[f.PA]:"SVRS",[f.PB]:"SVRS",[f.PE]:"PE",[f.PI]:"SVRS",[f.PR]:"PR",[f.RJ]:"SVRS",[f.RN]:"SVRS",[f.RO]:"SVRS",[f.RR]:"SVRS",[f.RS]:"RS",[f.SC]:"SVRS",[f.SE]:"SVRS",[f.SP]:"SP",[f.TO]:"SVRS",AN:"AN",SVAN:"SVAN",SVRS:"SVRS",SVCAN:"SVCAN",SVCRS:"SVCRS"},es=Fp;var er={[f.AC]:"SVCAN",[f.AL]:"SVCAN",[f.AM]:"SVCRS",[f.AP]:"SVCAN",[f.BA]:"SVCRS",[f.CE]:"SVCAN",[f.DF]:"SVCAN",[f.ES]:"SVCAN",[f.GO]:"SVCRS",[f.MA]:"SVCRS",[f.MG]:"SVCAN",[f.MS]:"SVCRS",[f.MT]:"SVCRS",[f.PA]:"SVCAN",[f.PB]:"SVCAN",[f.PE]:"SVCRS",[f.PI]:"SVCAN",[f.PR]:"SVCRS",[f.RJ]:"SVCAN",[f.RN]:"SVCAN",[f.RO]:"SVCAN",[f.RR]:"SVCAN",[f.RS]:"SVCAN",[f.SC]:"SVCAN",[f.SE]:"SVCAN",[f.SP]:"SVCAN",[f.TO]:"SVCAN"};function ii(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ii,"_ts_decorate");function X(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(X,"_ts_metadata");var Je=class{static{s(this,"NfeRemoteTransmitter")}remoteTransmissionRepository;constructor(e){this.remoteTransmissionRepository=e}options={};xmlns="http://www.portalfiscal.inf.br/nfe";configure(e){this.options={...this.options,...e};let{certificate:o}=this.options;return o&&this.remoteTransmissionRepository.setCertificate(o),this.options.schema??=Ua.PL_009_V4,this}service(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb,r=this.options.contingency?er[o]:es[o];return ka[r][n][e.service]}errors(){return Reflect.getMetadata(jt,this)}validate(e){try{let o=this.errors();return o?ye(new me(o.join(", "))):("cUF"in e&&(e.cUF??=this.options.cUF),"tpAmb"in e&&(e.tpAmb??=this.options.tpAmb),A(e))}finally{Reflect.deleteMetadata(jt,this)}}ns(e,o){let n=e.$??{};return n.xmlns=this.xmlns,n.versao=o,{...e,$:n}}xsd(e){return Rp.resolve(Mn(),this.options.schema,e)}async consultStatus(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({...n,service:"NfeStatusServico"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("consStatServ_v4.00.xsd"),payload:{consStatServ:this.ns(n,r.version)},method:"nfeStatusServicoNF"})}async inutilizacao(e){let o=this.validate(e);if(o.isLeft())return o;let{cUF:n,tpAmb:r}=o.value.infInut,t=o.value,a=this.service({cUF:n,tpAmb:r,service:"NfeInutilizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:a.url,xsd:this.xsd("inutNFe_v4.00.xsd"),payload:{inutNFe:this.ns(t,a.version)},method:"nfeInutilizacaoNF"})}async consultaProtocolo(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({cUF:n.chNFe.substring(0,2),tpAmb:n.tpAmb,service:"NfeConsultaProtocolo"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("consSitNFe_v4.00.xsd"),payload:{consSitNFe:this.ns(n,r.version)},method:"nfeConsultaNF"})}async autorizacao(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({...n,service:"NfeAutorizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("enviNFe_v4.00.xsd"),payload:{enviNFe:this.ns(n,r.version)},method:"nfeAutorizacaoLote"})}async retAutorizacao(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({...n,service:"NfeRetAutorizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("consReciNFe_v4.00.xsd"),payload:{consReciNFe:this.ns(n,r.version)},method:"nfeRetAutorizacaoLote"})}async recepcaoEvento(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({service:"RecepcaoEvento"});return n.evento=this.ns(n.evento,r.version),this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("envEvento_v1.00.xsd"),payload:{envEvento:this.ns(n,r.version)},method:"nfeRecepcaoEvento"})}async consultaCadastro(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,r=this.service({cUF:f[n.UF],service:"NfeConsultaCadastro"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:r.url,xsd:this.xsd("ConsCad_v4.00.xsd"),payload:{ConsCad:this.ns(n,r.version)},method:"consultaCadastro"})}};ii([S(Uo),X("design:type",Function),X("design:paramtypes",[typeof IConsultStatusPayload>"u"?Object:IConsultStatusPayload]),X("design:returntype",Promise)],Je.prototype,"consultStatus",null);ii([S(Kt),X("design:type",Function),X("design:paramtypes",[typeof IInutilizacaoPayload>"u"?Object:IInutilizacaoPayload]),X("design:returntype",Promise)],Je.prototype,"inutilizacao",null);ii([S(oi),X("design:type",Function),X("design:paramtypes",[typeof IConsultaProtocoloPayload>"u"?Object:IConsultaProtocoloPayload]),X("design:returntype",Promise)],Je.prototype,"consultaProtocolo",null);ii([S(Wt),X("design:type",Function),X("design:paramtypes",[typeof IAutorizacaoPayload>"u"?Object:IAutorizacaoPayload]),X("design:returntype",Promise)],Je.prototype,"autorizacao",null);ii([S(Ii),X("design:type",Function),X("design:paramtypes",[typeof IRetAutorizacaoPayload>"u"?Object:IRetAutorizacaoPayload]),X("design:returntype",Promise)],Je.prototype,"retAutorizacao",null);ii([S(zi),X("design:type",Function),X("design:paramtypes",[Object]),X("design:returntype",Promise)],Je.prototype,"recepcaoEvento",null);ii([S(pt),X("design:type",Function),X("design:paramtypes",[typeof IConsultaCadastroPayload>"u"?Object:IConsultaCadastroPayload]),X("design:returntype",Promise)],Je.prototype,"consultaCadastro",null);var Ke=class extends Ri{static{s(this,"TransmissionPipeline")}certificate;transmitter=new Je(this.soap);constructor(e){super(e),this.certificate=e}};var tr=class extends me{static{s(this,"CouldNotReceiveResponseError")}constructor(e="Falha ao consultar protocolo de autoriza\xE7\xE3o ap\xF3s 3 tentativas, tente novamente mais tarde."){super(e)}};var or=class extends Ke{static{s(this,"NfeAuthorizerPipeline")}async execute(e,o){let n=await this.certificates.read(this.certificate);if(n.isLeft())return n;let r=await this.handleNfeBatch(n.value,e.NFe);if(r.isLeft())return r;let[t]=r.value;this.transmitter.configure({cUF:t.infNFe.ide.cUF,tpAmb:t.infNFe.ide.tpAmb,...o,contingency:this.contingency(t),certificate:n.value}),e.idLote??=new Date().getTime().toString().slice(0,15);let a=await this.transmitter.autorizacao({...e,NFe:r.value});if(a.isLeft())return a;let p=a.value;return this.isSyncResponse(p)?A(p):await this.handleAsyncResponse(p)}async signNfe(e,o){return this.signer.sign(o,{tag:"infNFe",mark:"Id"},e)}async handleNfeBatch(e,o){if(!Array.isArray(o)){let r=await this.signNfe(e,o);return r.isLeft()?ye(r.value):A([r.value])}let n=await Promise.all(o.map(r=>this.signNfe(e,r)));return n.some(r=>r.isLeft())?ye(new me("Failed to sign a NFe in batch")):A(n.filter(r=>r.isRight()).map(r=>r.value))}isSyncResponse(e){return"protNFe"in e.retEnviNFe&&!!e.retEnviNFe.protNFe}async handleAsyncResponse(e){let{tpAmb:o,infRec:{nRec:n}}=e.retEnviNFe,r=1;for(;r<=3;)try{await new Promise(p=>setTimeout(p,1e3));let t=await this.transmitter.retAutorizacao({nRec:n,tpAmb:o});if(t.isLeft())continue;let a=t.value.retConsReciNFe.protNFe;if(!a||Array.isArray(a)&&a.length===0)continue;return A({retEnviNFe:{...t.value.retConsReciNFe,protNFe:a}})}finally{r++}return ye(new tr)}contingency(e){let{dhCont:o,xJust:n,tpEmis:r}=e.infNFe.ide;if(!(!o||!n||r===$e.Normal))return{dhCont:o,xJust:n}}};var qr={AC:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hml.sefaznet.ac.gov.br/nfce/qrcode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaznet.ac.gov.br/nfce/qrcode"}}},AL:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfce.sefaz.al.gov.br/QRCode/consultarNFCe.jsp"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.al.gov.br/QRCode/consultarNFCe.jsp"}}},AM:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://sistemas.sefaz.am.gov.br/nfceweb-hom/consultarNFCe.jsp"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/CscNFCe"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://sistemas.sefaz.am.gov.br/nfceweb/consultarNFCe.jsp"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/CscNFCe"}}},AP:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.sefaz.ap.gov.br/nfcehml/nfce.php"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.ap.gov.br/nfce/nfcep.php"}}},BA:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://hnfe.sefaz.ba.gov.br/servicos/nfce/qrcode.aspx"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfe.sefaz.ba.gov.br/servicos/nfce/qrcode.aspx"}}},CE:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfceh.sefaz.ce.gov.br/pages/ShowNFCe.html"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.ce.gov.br/pages/ShowNFCe.html"}}},DF:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://dec.fazenda.df.gov.br/ConsultarNFCe.aspx"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.fazenda.df.gov.br/nfce/qrcode"}}},ES:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.es.gov.br/ConsultaNFCe/qrcode.aspx"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://app.sefaz.es.gov.br/ConsultaNFCe/qrcode.aspx"}}},GO:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/v2/CscNFCe"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://nfewebhomolog.sefaz.go.gov.br/nfeweb/sites/nfce/danfeNFCe"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/v2/CscNFCe"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://nfeweb.sefaz.go.gov.br/nfeweb/sites/nfce/danfeNFCe"}}},MA:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hom.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp"}}},MG:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://portalsped.fazenda.mg.gov.br/portalnfce/sistema/qrcode.xhtml"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://portalsped.fazenda.mg.gov.br/portalnfce/sistema/qrcode.xhtml"}}},MT:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.mt.gov.br/nfce/consultanfce"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.mt.gov.br/nfce/consultanfce"}}},MS:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.dfe.ms.gov.br/nfce/qrcode"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.dfe.ms.gov.br/nfce/qrcode"}}},PA:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://appnfc.sefa.pa.gov.br/portal-homologacao/view/consultas/nfce/nfceForm.seam"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://appnfc.sefa.pa.gov.br/portal/view/consultas/nfce/nfceForm.seam"}}},PB:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.sefaz.pb.gov.br/nfcehom"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.pb.gov.br/nfce"}}},PE:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfcehomolog.sefaz.pe.gov.br/nfce/consulta"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.pe.gov.br/nfce/consulta"}}},PI:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.sefaz.pi.gov.br/nfce/qrcode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.pi.gov.br/nfce/qrcode"}}},PR:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.fazenda.pr.gov.br/nfce/qrcode"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.fazenda.pr.gov.br/nfce/qrcode"}}},RJ:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www4.fazenda.rj.gov.br/consultaNFCe/QRCode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://consultadfe.fazenda.rj.gov.br/consultaNFCe/QRCode"}}},RN:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://hom.nfce.set.rn.gov.br/consultarNFCe.aspx"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.set.rn.gov.br/consultarNFCe.aspx"}}},RO:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.nfce.sefin.ro.gov.br/consultanfce/consulta.jsp"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.sefin.ro.gov.br/consultanfce/consulta.jsp"}}},RR:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://200.174.88.103:8080/nfce/servlet/qrcode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.rr.gov.br/servlet/qrcode"}}},RS:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx"}}},SC:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://hom.sat.sef.sc.gov.br/nfce/consulta"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://sat.sef.sc.gov.br/nfce/consulta"}}},SE:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hom.nfe.se.gov.br/nfce/qrcode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.se.gov.br/nfce/qrcode"}}},SP:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeInutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeConsultaProtocolo4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeRecepcaoEvento4.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://homologacao.nfce.epec.fazenda.sp.gov.br/EPECws/RecepcaoEPEC.asmx"},EPECStatusServico:{method:"nfeStatusServicoNF2",operation:"NfeStatusServico2",version:"4.00",url:"https://homologacao.nfce.epec.fazenda.sp.gov.br/EPECws/EPECStatusServico.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.homologacao.nfce.fazenda.sp.gov.br/qrcode"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeInutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeConsultaProtocolo4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeRecepcaoEvento4.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"1.00",url:"https://nfce.epec.fazenda.sp.gov.br/EPECws/RecepcaoEPEC.asmx"},EPECStatusServico:{method:"nfeStatusServicoNF2",operation:"NfeStatusServico2",version:"4.00",url:"https://nfce.epec.fazenda.sp.gov.br/EPECws/EPECStatusServico.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.nfce.fazenda.sp.gov.br/qrcode"}}},TO:{[v.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.to.gov.br/nfce/qrcode"}},[v.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.to.gov.br/nfce/qrcode"}}},SVRS:{[v.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"}},[v.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"}}},SVAN:{[v.Homolog]:{},[v.Production]:{}}};var ts={[v.Homolog]:{[f.AC]:"www.sefaznet.ac.gov.br/nfce/consulta",[f.AL]:"www.sefaz.al.gov.br/nfce/consulta",[f.AP]:"www.sefaz.ap.gov.br/nfce/consulta",[f.AM]:"www.sefaz.am.gov.br/nfce/consulta",[f.BA]:"http://hinternet.sefaz.ba.gov.br/nfce/consulta",[f.CE]:"www.sefaz.ce.gov.br/nfce/consulta",[f.DF]:"www.fazenda.df.gov.br/nfce/consulta",[f.ES]:"www.sefaz.es.gov.br/nfce/consulta",[f.GO]:"www.nfce.go.gov.br/post/ver/214413/consulta-nfc-e-homologacao",[f.MA]:"www.sefaz.ma.gov.br/nfce/consulta",[f.MG]:"https://hportalsped.fazenda.mg.gov.br/portalnfce",[f.MS]:"http://www.dfe.ms.gov.br/nfce/consulta",[f.MT]:"http://homologacao.sefaz.mt.gov.br/nfce/consultanfce",[f.PA]:"www.sefa.pa.gov.br/nfce/consulta",[f.PB]:"www.sefaz.pb.gov.br/nfcehom",[f.PE]:"nfce.sefaz.pe.gov.br/nfce/consulta",[f.PR]:"http://www.fazenda.pr.gov.br/nfce/consulta",[f.PI]:"www.sefaz.pi.gov.br/nfce/consulta",[f.RJ]:"www.fazenda.rj.gov.br/nfce/consulta",[f.RN]:"www.set.rn.gov.br/nfce/consulta",[f.RO]:"www.sefin.ro.gov.br/nfce/consulta",[f.RR]:"www.sefaz.rr.gov.br/nfce/consulta",[f.RS]:"www.sefaz.rs.gov.br/nfce/consulta",[f.SE]:"http://www.hom.nfe.se.gov.br/nfce/consulta",[f.SC]:"https://hom.sat.sef.sc.gov.br/nfce/consulta",[f.SP]:"https://www.homologacao.nfce.fazenda.sp.gov.br/NFCeConsultaPublica",[f.TO]:"http://homologacao.sefaz.to.gov.br/nfce/consulta.jsf"},[v.Production]:{[f.AC]:"www.sefaznet.ac.gov.br/nfce/consulta",[f.AL]:"www.sefaz.al.gov.br/nfce/consulta",[f.AP]:"www.sefaz.ap.gov.br/nfce/consulta",[f.AM]:"www.sefaz.am.gov.br/nfce/consulta",[f.BA]:"http://www.sefaz.ba.gov.br/nfce/consulta",[f.CE]:"www.sefaz.ce.gov.br/nfce/consulta",[f.DF]:"www.fazenda.df.gov.br/nfce/consulta",[f.ES]:"www.sefaz.es.gov.br/nfce/consulta",[f.GO]:"www.sefaz.go.gov.br/nfce/consulta",[f.MA]:"www.sefaz.ma.gov.br/nfce/consulta",[f.MG]:"https://portalsped.fazenda.mg.gov.br/portalnfce",[f.MS]:"http://www.dfe.ms.gov.br/nfce/consulta",[f.MT]:"http://www.sefaz.mt.gov.br/nfce/consultanfce",[f.PA]:"www.sefa.pa.gov.br/nfce/consulta",[f.PE]:"nfce.sefaz.pe.gov.br/nfce/consulta",[f.PR]:"http://www.fazenda.pr.gov.br/nfce/consulta",[f.PI]:"www.sefaz.pi.gov.br/nfce/consulta",[f.RJ]:"www.fazenda.rj.gov.br/nfce/consulta",[f.RN]:"www.set.rn.gov.br/nfce/consulta",[f.RO]:"www.sefin.ro.gov.br/nfce/consulta",[f.RR]:"www.sefaz.rr.gov.br/nfce/consulta",[f.RS]:"www.sefaz.rs.gov.br/nfce/consulta",[f.SC]:"https://sat.sef.sc.gov.br/nfce/consulta",[f.SE]:"http://www.nfce.se.gov.br/nfce/consulta",[f.SP]:"https://www.nfce.fazenda.sp.gov.br/NFCeConsultaPublica",[f.TO]:"www.sefaz.to.gov.br/nfce/consulta",[f.PB]:"www.sefaz.pb.gov.br/nfce/consulta"}};var Ip={[f.AC]:"SVRS",[f.AL]:"SVRS",[f.AM]:"AM",[f.AP]:"SVRS",[f.BA]:"SVRS",[f.CE]:"SVRS",[f.DF]:"SVRS",[f.ES]:"SVRS",[f.GO]:"GO",[f.MA]:"SVRS",[f.MG]:"MG",[f.MS]:"MS",[f.MT]:"MT",[f.PA]:"SVRS",[f.PB]:"SVRS",[f.PE]:"SVRS",[f.PI]:"SVRS",[f.PR]:"PR",[f.RJ]:"SVRS",[f.RN]:"SVRS",[f.RO]:"SVRS",[f.RR]:"SVRS",[f.RS]:"RS",[f.SC]:"SVRS",[f.SE]:"SVRS",[f.SP]:"SP",[f.TO]:"SVRS",SVRS:"SVRS"},os=Ip;import{IsEnum as Ur,IsOptional as nr,IsString as zp,IsNotEmpty as Op}from"class-validator";function mn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(mn,"_ts_decorate");function ir(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ir,"_ts_metadata");var eo=class{static{s(this,"NfceAutorizacaoPayload")}tpAmb;cUF;idLote;indSinc="1";NFe};mn([Ur(v),nr(),ir("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],eo.prototype,"tpAmb",void 0);mn([Ur(f),nr(),ir("design:type",typeof StateCode>"u"?Object:StateCode)],eo.prototype,"cUF",void 0);mn([zp(),nr(),ir("design:type",String)],eo.prototype,"idLote",void 0);mn([nr(),Ur(["0","1"])],eo.prototype,"indSinc",void 0);mn([Op(),ir("design:type",typeof T>"u"?Object:T)],eo.prototype,"NFe",void 0);function Pp(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Pp,"_ts_decorate");function $r(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s($r,"_ts_metadata");var ni=class extends Je{static{s(this,"NfceRemoteTransmitter")}remoteTransmissionRepository;qrCode;options={};constructor(e,o){super(e),this.remoteTransmissionRepository=e,this.qrCode=o}configure(e){return super.configure(e)}service(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb,r=os[o],p=qr[r][n][e.service];if(p)return p;let ve=Object.keys(f).find(Le=>f[Le]===o);return qr[ve][n][e.service]}async autorizacao(e){let o=await this.attachInfNfeSupl(e);return o.isLeft()?o:super.autorizacao({...e,NFe:o.value})}getUrlConsult(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb;return ts[n][o]}async attachInfNfeSupl(e){let{NFe:o}=e;if(!Array.isArray(o))return this.attachQrCode({...e,NFe:o});let n=await Promise.all(o.map(r=>this.attachQrCode({...e,NFe:r})));return n.some(r=>r.isLeft())?ye(new me("Failed to attach QRCode to NFCe in batch")):A(n.filter(r=>r.isRight()).map(r=>r.value))}async attachQrCode(e){let o=await this.generateQrCode(e);return o.isLeft()?o:(e.NFe.infNFeSupl=o.value,A(e.NFe))}async generateQrCode(e){let o=this.service({...e,service:"NfeConsultaQR"}),n=this.options.qrCode;switch(n.version??=o.version,n.version){case"200":return await this.qrCode.execute(e.NFe,{version:n.version,urlConsult:this.getUrlConsult(e),urlService:o.url,CSC:n.CSC,CSCId:n.CSCId});case"300":return this.options.certificate?await this.qrCode.execute(e.NFe,{version:n.version,certificate:this.options.certificate,urlConsult:this.getUrlConsult(e),urlService:o.url}):ye(new me("Certificate is required in QRCode version 3.00"));default:return Vn(n.version)}}};Pp([S(eo),$r("design:type",Function),$r("design:paramtypes",[typeof IAutorizacaoPayload>"u"?Object:IAutorizacaoPayload]),$r("design:returntype",Promise)],ni.prototype,"autorizacao",null);import xp from"crypto";var Pi=class{static{s(this,"NfceQrcode")}certificateRepository;constructor(e){this.certificateRepository=e}async execute(e,o){let n=await this.content(e,o);return n.isLeft()?n:A(this.assemble(n.value,o))}async content(e,o){return this.isVersion200(o)?await this.execute200(e,o):this.isVersion300(o)?await this.execute300(e,o):Vn(o)}isVersion200(e){return e.version==="200"}isVersion300(e){return e.version==="300"}assemble(e,o){return{qrCode:e,urlChave:o.urlConsult}}getSequence(e,o){let{version:n,CSCId:r}=o,t=e.infNFe.ide.tpAmb,a=Number.parseInt(r),p=e.infNFe.$.Id?.substring(3),ve=Number.parseInt(n??"")/100;if(e.infNFe.ide.tpEmis!==$e.OFFLINE)return`${p}|${ve}|${t}|${a}`;let At=e.Signature.SignedInfo.Reference.DigestValue.split("").map(at=>at.charCodeAt(0).toString(16).padStart(2,"0")).join(""),Dt=new Date(e.infNFe.ide.dhEmi).getDate(),Qo=Number(e.infNFe.total.ICMSTot.vNF).toFixed(2);return`${p}|${ve}|${t}|${Dt}|${Qo}|${At}|${a}`}async execute200(e,o){let{urlService:n,CSC:r}=o,t=this.getSequence(e,o),a=xp.createHash("sha1").update(`${t}${r}`).digest("hex").toUpperCase(),p=`${n}?p=`;return Promise.resolve(A(`${p}${t}|${a}`))}async execute300(e,o){let{urlService:n}=o,r=`${n}?p=`,t=e.infNFe.ide.tpAmb,a=e.infNFe.$.Id?.substring(3),p=Number.parseInt(o.version)/100;if(e.infNFe.ide.tpEmis!==$e.OFFLINE)return A(`${r}${a}|${p}|${t}`);let ve=new Date(e.infNFe.ide.dhEmi).getDate(),Le=Number(e.infNFe.total.ICMSTot.vNF).toFixed(2),At=e.infNFe.dest?.CNPJ??e.infNFe.dest?.CPF??e.infNFe.dest?.idEstrangeiro??"",Dt=At.length?e.infNFe.ide.idDest:"",Qo=`${a}|${p}|${t}|${ve}|${Le}|${Dt}$`,at=await this.certificateRepository.sign(Qo,o.certificate,Da.SHA1);return at.isLeft()?at:A(`${r}${Qo}|${at.value}`)}};var is=class extends or{static{s(this,"NfceAuthorizerPipeline")}certificate;qrCode=new Pi(this.certificates);transmitter=new ni(this.soap,this.qrCode);constructor(e){super(e),this.certificate=e}};var rr=class extends Ke{static{s(this,"NfeConsultStatusPipeline")}async execute(e){let o=await this.certificates.read(this.certificate);return o.isLeft()?o:(this.transmitter.configure({...e,certificate:o.value}),await this.transmitter.consultStatus(e))}};var ns=class extends rr{static{s(this,"NfceConsultStatusPipeline")}qrCode=new Pi(this.certificates);transmitter=new ni(this.soap,this.qrCode)};var rs=class extends Ke{static{s(this,"NfeAuthorizationResponsePipeline")}async execute(e){let o=await this.certificates.read(this.certificate);return o.isLeft()?o:(this.transmitter.configure({cUF:e.cUF,tpAmb:e.tpAmb,certificate:o.value}),this.transmitter.retAutorizacao(e))}};var as={[qo.Cancelamento]:{method:"envEventoCancNFe",version:"1.00",descEvento:"Cancelamento"}};function Ap(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ap,"_ts_decorate");function Jr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Jr,"_ts_metadata");var yn=class extends Ke{static{s(this,"EventPipeline")}async event(e,o,n){let r=await this.certificates.read(this.certificate);if(r.isLeft())return r;let t=o.chNFe.slice(0,2);this.transmitter.configure({cUF:t,...n,certificate:r.value});let a=as[e],p=this.certificates.getCertificateInfo(r.value.certificate),{nSeqEvento:ve,dhEvento:Le,chNFe:At}=o,Dt=["ID",e,At,ve.toString().padStart(2,"0")].join(""),Qo={$:{xmlns:this.xmlns},infEvento:{$:{Id:Dt},cOrgao:t,tpAmb:n.tpAmb,CNPJ:p.CNPJ,CPF:p.CPF,chNFe:At,dhEvento:Le,tpEvento:e,nSeqEvento:ve,verEvento:a.version,detEvento:{$:{versao:a.version},descEvento:a.descEvento,...o.detEvento}}},at=this.validated(Qo);return at.isLeft()?at:await this.signer.sign(at.value,{tag:"infEvento",mark:"Id"},r.value)}validated(e){let o=this.errors();return o?ye(new me(o.join(", "))):A(e)}};Ap([S(Et),Jr("design:type",Function),Jr("design:paramtypes",[typeof IEventoItem>"u"?Object:IEventoItem]),Jr("design:returntype",void 0)],yn.prototype,"validated",null);var ss=class extends yn{static{s(this,"NfeNfceCancelPipeline")}async execute(e,o){let n={chNFe:e.chNFe,dhEvento:e.dhEvento??new Date().toISOString(),detEvento:{nProt:e.nProt,xJust:e.xJust},nSeqEvento:1},r=await this.event(qo.Cancelamento,n,o);return r.isLeft()?r:await this.transmitter.recepcaoEvento({idLote:e.idLote??new Date().getTime().toString().slice(0,15),evento:r.value})}};function Dp(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Dp,"_ts_decorate");function Hr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Hr,"_ts_metadata");var Gr=class extends Ke{static{s(this,"NfeNfceVoidRangePipeline")}async execute(e,o){let n=await this.certificates.read(this.certificate);if(n.isLeft())return n;let r=this.certificates.getCertificateInfo(n.value.certificate);this.transmitter.configure({...o,certificate:n.value});let t=e.ano??new Date().getFullYear().toString().slice(2),a=["ID",o.cUF,t,r.CNPJ?.padStart(14,"0")??"",e.mod,e.serie.padStart(3,"0"),e.nNFIni.padStart(9,"0"),e.nNFFin.padStart(9,"0")].join(""),p={$:{xmlns:this.xmlns},infInut:{$:{Id:a},tpAmb:e.tpAmb??o.tpAmb,cUF:o.cUF,ano:t,CNPJ:r.CNPJ,CPF:r.CPF,mod:e.mod,serie:e.serie,nNFIni:e.nNFIni,nNFFin:e.nNFFin,xJust:e.xJust}},ve=this.validated(p);if(ve.isLeft())return ve;let Le=await this.signer.sign(ve.value,{tag:"infInut",mark:"Id"},n.value);return Le.isLeft()?Le:await this.transmitter.inutilizacao(Le.value)}validated(e){let o=this.errors();return o?ye(new me(o.join(", "))):A(e)}};Dp([S(Kt),Hr("design:type",Function),Hr("design:paramtypes",[typeof IIInutilizacaoPayload>"u"?Object:IIInutilizacaoPayload]),Hr("design:returntype",void 0)],Gr.prototype,"validated",null);import Sc from"path";import{Allow as mc,IsNotEmpty as yc,IsNotEmptyObject as Bs,IsObject as qs,IsString as gc,ValidateNested as Us}from"class-validator";import{ArrayMaxSize as Ls,ArrayMinSize as vc,IsNotEmptyObject as Pa,IsObject as xa,IsOptional as _e,IsString as Qs,ValidateNested as te}from"class-validator";import{Type as oe}from"class-transformer";import{ArrayMaxSize as jp,IsArray as wp,IsEnum as Ep,IsOptional as Qe,IsString as C,ValidateNested as ar}from"class-validator";import{Type as sr}from"class-transformer";function g(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(g,"_ts_decorate");function N(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(N,"_ts_metadata");var to=class{static{s(this,"RefNF")}cUF;AAMM;CNPJ;mod;serie;nNF};g([C(),N("design:type",String)],to.prototype,"cUF",void 0);g([C(),N("design:type",String)],to.prototype,"AAMM",void 0);g([C(),N("design:type",String)],to.prototype,"CNPJ",void 0);g([C(),N("design:type",String)],to.prototype,"mod",void 0);g([C(),N("design:type",String)],to.prototype,"serie",void 0);g([C(),N("design:type",String)],to.prototype,"nNF",void 0);var He=class{static{s(this,"RefNFP")}cUF;AAMM;CNPJ="";CPF="";IE;mod;serie;nNF};g([C(),N("design:type",String)],He.prototype,"cUF",void 0);g([C(),N("design:type",String)],He.prototype,"AAMM",void 0);g([Qe(),C(),N("design:type",String)],He.prototype,"CNPJ",void 0);g([Qe(),C(),N("design:type",String)],He.prototype,"CPF",void 0);g([C(),N("design:type",String)],He.prototype,"IE",void 0);g([C(),N("design:type",String)],He.prototype,"mod",void 0);g([C(),N("design:type",String)],He.prototype,"serie",void 0);g([C(),N("design:type",String)],He.prototype,"nNF",void 0);He=g([O({properties:["CNPJ","CPF"],required:!0})],He);var xi=class{static{s(this,"RefECF")}mod;nECF;nCOO};g([C(),N("design:type",String)],xi.prototype,"mod",void 0);g([C(),N("design:type",String)],xi.prototype,"nECF",void 0);g([C(),N("design:type",String)],xi.prototype,"nCOO",void 0);var oo=class{static{s(this,"NFref")}refNFe;refNFeSig;refNF;refNFP;refCTe;refECF};g([Qe(),C(),N("design:type",String)],oo.prototype,"refNFe",void 0);g([Qe(),C(),N("design:type",String)],oo.prototype,"refNFeSig",void 0);g([Qe(),ar(),sr(()=>to),N("design:type",typeof IRefNF>"u"?Object:IRefNF)],oo.prototype,"refNF",void 0);g([Qe(),ar(),sr(()=>He),N("design:type",typeof IRefNFP>"u"?Object:IRefNFP)],oo.prototype,"refNFP",void 0);g([Qe(),C(),N("design:type",String)],oo.prototype,"refCTe",void 0);g([Qe(),ar(),sr(()=>xi),N("design:type",typeof IRefECF>"u"?Object:IRefECF)],oo.prototype,"refECF",void 0);var z=class{static{s(this,"Ide")}cUF;cNF;natOp;mod;serie;nNF;dhEmi;dhSaiEnt;tpNF;idDest;cMunFG;tpImp;tpEmis;cDV="";tpAmb;finNFe;indFinal;indPres;indIntermed;procEmi;verProc;dhCont;xJust;NFref};g([Ep(f),N("design:type",typeof StateCode>"u"?Object:StateCode)],z.prototype,"cUF",void 0);g([C(),N("design:type",String)],z.prototype,"cNF",void 0);g([C(),N("design:type",String)],z.prototype,"natOp",void 0);g([C(),N("design:type",String)],z.prototype,"mod",void 0);g([C(),N("design:type",String)],z.prototype,"serie",void 0);g([C(),N("design:type",String)],z.prototype,"nNF",void 0);g([Bo({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),N("design:type",String)],z.prototype,"dhEmi",void 0);g([Qe(),Bo({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),N("design:type",String)],z.prototype,"dhSaiEnt",void 0);g([C(),N("design:type",String)],z.prototype,"tpNF",void 0);g([C(),N("design:type",String)],z.prototype,"idDest",void 0);g([C(),N("design:type",String)],z.prototype,"cMunFG",void 0);g([C(),N("design:type",String)],z.prototype,"tpImp",void 0);g([C(),N("design:type",typeof TpEmis>"u"?Object:TpEmis)],z.prototype,"tpEmis",void 0);g([C(),Qe(),N("design:type",String)],z.prototype,"cDV",void 0);g([C(),N("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],z.prototype,"tpAmb",void 0);g([C(),N("design:type",String)],z.prototype,"finNFe",void 0);g([C(),N("design:type",String)],z.prototype,"indFinal",void 0);g([C(),N("design:type",String)],z.prototype,"indPres",void 0);g([Qe(),C(),N("design:type",String)],z.prototype,"indIntermed",void 0);g([C(),N("design:type",String)],z.prototype,"procEmi",void 0);g([C(),N("design:type",String)],z.prototype,"verProc",void 0);g([Qe(),C(),Bo({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),N("design:type",String)],z.prototype,"dhCont",void 0);g([Qe(),C(),N("design:type",String)],z.prototype,"xJust",void 0);g([Qe(),wp(),jp(999),ar({each:!0}),sr(()=>oo),N("design:type",Array)],z.prototype,"NFref",void 0);import{IsOptional as Ai,IsString as io,ValidateNested as Vp}from"class-validator";import{Type as Mp}from"class-transformer";import{IsOptional as pr,IsString as dt}from"class-validator";function ct(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ct,"_ts_decorate");function ft(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ft,"_ts_metadata");var Ne=class{static{s(this,"EnderEmit")}xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone};ct([dt(),ft("design:type",String)],Ne.prototype,"xLgr",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"nro",void 0);ct([pr(),dt(),ft("design:type",String)],Ne.prototype,"xCpl",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"xBairro",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"cMun",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"xMun",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"UF",void 0);ct([dt(),ft("design:type",String)],Ne.prototype,"CEP",void 0);ct([pr(),dt(),ft("design:type",String)],Ne.prototype,"cPais",void 0);ct([pr(),dt(),ft("design:type",String)],Ne.prototype,"xPais",void 0);ct([pr(),dt(),ft("design:type",String)],Ne.prototype,"fone",void 0);function ut(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ut,"_ts_decorate");function Vt(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Vt,"_ts_metadata");var pe=class{static{s(this,"Emit")}CNPJ="";CPF="";xNome;xFant;enderEmit;IE;IEST;IM;CNAE;CRT};ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"CNPJ",void 0);ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"CPF",void 0);ut([io(),Vt("design:type",String)],pe.prototype,"xNome",void 0);ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"xFant",void 0);ut([Vp(),Mp(()=>Ne),Vt("design:type",typeof Ne>"u"?Object:Ne)],pe.prototype,"enderEmit",void 0);ut([io(),Vt("design:type",String)],pe.prototype,"IE",void 0);ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"IEST",void 0);ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"IM",void 0);ut([Ai(),io(),Vt("design:type",String)],pe.prototype,"CNAE",void 0);ut([io(),Vt("design:type",String)],pe.prototype,"CRT",void 0);pe=ut([O({properties:["CNPJ","CPF"],required:!0})],pe);import{IsOptional as no,IsString as ro,ValidateNested as Tp}from"class-validator";import{Type as _p}from"class-transformer";import{IsOptional as mt,IsString as yt}from"class-validator";function lt(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(lt,"_ts_decorate");function vt(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(vt,"_ts_metadata");var Ee=class{static{s(this,"EnderDest")}xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone};lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"xLgr",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"nro",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"xCpl",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"xBairro",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"cMun",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"xMun",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"UF",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"CEP",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"cPais",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"xPais",void 0);lt([mt(),yt(),vt("design:type",String)],Ee.prototype,"fone",void 0);function gt(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(gt,"_ts_decorate");function Mt(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Mt,"_ts_metadata");var ce=class{static{s(this,"Dest")}CNPJ="";CPF="";idEstrangeiro;xNome;enderDest;indIEDest;IE;ISUF;IM;email};gt([no(),ro(),Mt("design:type",String)],ce.prototype,"CNPJ",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"CPF",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"idEstrangeiro",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"xNome",void 0);gt([no(),Tp(),_p(()=>Ee),Mt("design:type",typeof IEnderDest>"u"?Object:IEnderDest)],ce.prototype,"enderDest",void 0);gt([ro(),Mt("design:type",String)],ce.prototype,"indIEDest",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"IE",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"ISUF",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"IM",void 0);gt([no(),ro(),Mt("design:type",String)],ce.prototype,"email",void 0);ce=gt([O({properties:["CNPJ","CPF"],required:!0})],ce);import{IsOptional as Tt,IsString as Oe}from"class-validator";function he(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(he,"_ts_decorate");function ze(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ze,"_ts_metadata");var j=class{static{s(this,"Local")}CNPJ;CPF;xNome;xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone;email;IE};he([Tt(),Oe(),ze("design:type",String)],j.prototype,"CNPJ",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"CPF",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"xNome",void 0);he([Oe(),ze("design:type",String)],j.prototype,"xLgr",void 0);he([Oe(),ze("design:type",String)],j.prototype,"nro",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"xCpl",void 0);he([Oe(),ze("design:type",String)],j.prototype,"xBairro",void 0);he([Oe(),ze("design:type",String)],j.prototype,"cMun",void 0);he([Oe(),ze("design:type",String)],j.prototype,"xMun",void 0);he([Oe(),ze("design:type",String)],j.prototype,"UF",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"CEP",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"cPais",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"xPais",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"fone",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"email",void 0);he([Tt(),Oe(),ze("design:type",String)],j.prototype,"IE",void 0);j=he([O({properties:["CNPJ","CPF"]})],j);import{IsOptional as cs,IsString as fs}from"class-validator";function Yr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Yr,"_ts_decorate");function ps(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ps,"_ts_metadata");var _t=class{static{s(this,"AutXML")}CNPJ;CPF};Yr([cs(),fs(),ps("design:type",String)],_t.prototype,"CNPJ",void 0);Yr([cs(),fs(),ps("design:type",String)],_t.prototype,"CPF",void 0);_t=Yr([O({properties:["CNPJ","CPF"]})],_t);import{IsOptional as Lp,IsString as ls}from"class-validator";function ds(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ds,"_ts_decorate");function us(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(us,"_ts_metadata");var $o=class{static{s(this,"InfIntermed")}CNPJ;idCadIntTran};ds([ls(),us("design:type",String)],$o.prototype,"CNPJ",void 0);ds([Lp(),ls(),us("design:type",String)],$o.prototype,"idCadIntTran",void 0);import{IsOptional as vs,IsString as Kr}from"class-validator";function Xr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Xr,"_ts_decorate");function Zr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Zr,"_ts_metadata");var ao=class{static{s(this,"Exporta")}UFSaidaPais;xLocExporta;xLocDespacho};Xr([Kr(),Zr("design:type",String)],ao.prototype,"UFSaidaPais",void 0);Xr([vs(),Kr(),Zr("design:type",String)],ao.prototype,"xLocExporta",void 0);Xr([vs(),Kr(),Zr("design:type",String)],ao.prototype,"xLocDespacho",void 0);import{IsOptional as ea,IsString as ta}from"class-validator";function Wr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Wr,"_ts_decorate");function kr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(kr,"_ts_metadata");var so=class{static{s(this,"Compra")}xNEmp;xPed;xCont};Wr([ea(),ta(),kr("design:type",String)],so.prototype,"xNEmp",void 0);Wr([ea(),ta(),kr("design:type",String)],so.prototype,"xPed",void 0);Wr([ea(),ta(),kr("design:type",String)],so.prototype,"xCont",void 0);import{IsOptional as ms,IsString as wi}from"class-validator";function Di(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Di,"_ts_decorate");function ji(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ji,"_ts_metadata");var We=class{static{s(this,"InfRespTec")}CNPJ;xContato;email;fone;idCSRT;hashCSRT};Di([wi(),ji("design:type",String)],We.prototype,"CNPJ",void 0);Di([wi(),ji("design:type",String)],We.prototype,"xContato",void 0);Di([wi(),ji("design:type",String)],We.prototype,"email",void 0);Di([wi(),ji("design:type",String)],We.prototype,"fone",void 0);Di([ms(),wi(),ji("design:type",String)],We.prototype,"idCSRT",void 0);Di([ms(),wi(),ji("design:type",String)],We.prototype,"hashCSRT",void 0);import{IsOptional as ys,ValidateNested as na}from"class-validator";import{Type as ra}from"class-transformer";import{IsOptional as Lt}from"class-validator";function P(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(P,"_ts_decorate");function x(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(x,"_ts_metadata");var I=class{static{s(this,"ICMSTot")}vBC="0.00";vICMS="0.00";vICMSDeson="0.00";vFCPUFDest;vICMSUFDest;vICMSUFRemet;vFCP="0.00";vBCST="0.00";vST="0.00";vFCPST="0.00";vFCPSTRet="0.00";qBCMono;vICMSMono;qBCMonoReten;vICMSMonoReten;qBCMonoRet;vICMSMonoRet;vProd="0.00";vFrete="0.00";vSeg="0.00";vDesc="0.00";vII="0.00";vIPI="0.00";vIPIDevol="0.00";vPIS="0.00";vCOFINS="0.00";vOutro="0.00";vNF="0.00";vTotTrib};P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vBC",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMS",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSDeson",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vFCPUFDest",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSUFDest",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSUFRemet",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vFCP",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vBCST",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vST",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vFCPST",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vFCPSTRet",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"qBCMono",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSMono",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"qBCMonoReten",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSMonoReten",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"qBCMonoRet",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vICMSMonoRet",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vProd",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vFrete",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vSeg",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vDesc",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vII",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vIPI",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vIPIDevol",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vPIS",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vCOFINS",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vOutro",void 0);P([c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vNF",void 0);P([Lt(),c({fixed:2}),x("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],I.prototype,"vTotTrib",void 0);import{IsOptional as St,IsString as tt}from"class-validator";function ke(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ke,"_ts_decorate");function et(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(et,"_ts_metadata");var Pe=class{static{s(this,"ISSQNTot")}vServ;vBC;vISS;vPIS;vCOFINS;dCompet;vDeducao;vOutro;vDescIncond;vDescCond;vISSRet;cRegTrib};ke([St(),tt(),et("design:type",String)],Pe.prototype,"vServ",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vBC",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vISS",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vPIS",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vCOFINS",void 0);ke([tt(),et("design:type",String)],Pe.prototype,"dCompet",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vDeducao",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vOutro",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vDescIncond",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vDescCond",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"vISSRet",void 0);ke([St(),tt(),et("design:type",String)],Pe.prototype,"cRegTrib",void 0);import{IsOptional as si}from"class-validator";function ri(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ri,"_ts_decorate");function ai(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ai,"_ts_metadata");var Nt=class{static{s(this,"RetTrib")}vRetPIS;vRetCOFINS;vRetCSLL;vBCIRRF;vIRRF;vBCRetPrev;vRetPrev};ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vRetPIS",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vRetCOFINS",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vRetCSLL",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vBCIRRF",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vIRRF",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vBCRetPrev",void 0);ri([si(),c({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Nt.prototype,"vRetPrev",void 0);function oa(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(oa,"_ts_decorate");function ia(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ia,"_ts_metadata");var po=class{static{s(this,"Total")}ICMSTot;ISSQNtot;retTrib};oa([na(),ra(()=>I),ia("design:type",typeof IICMSTot>"u"?Object:IICMSTot)],po.prototype,"ICMSTot",void 0);oa([ys(),na(),ra(()=>Pe),ia("design:type",typeof IISSQNTot>"u"?Object:IISSQNTot)],po.prototype,"ISSQNtot",void 0);oa([ys(),na(),ra(()=>Nt),ia("design:type",typeof IRetTrib>"u"?Object:IRetTrib)],po.prototype,"retTrib",void 0);import{ArrayMaxSize as Ss,IsOptional as ui,IsString as aa,ValidateNested as gn}from"class-validator";import{Type as Sn}from"class-transformer";import{IsOptional as ci,IsString as fi}from"class-validator";function Jo(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Jo,"_ts_decorate");function pi(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(pi,"_ts_metadata");var xe=class{static{s(this,"Transporta")}CNPJ;CPF;xNome;IE;xEnder;xMun;UF};Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"CNPJ",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"CPF",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"xNome",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"IE",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"xEnder",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"xMun",void 0);Jo([ci(),fi(),pi("design:type",String)],xe.prototype,"UF",void 0);xe=Jo([O({properties:["CNPJ","CPF"]})],xe);import{IsOptional as Mi,IsString as gs}from"class-validator";function Ei(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ei,"_ts_decorate");function Vi(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Vi,"_ts_metadata");var Ge=class{static{s(this,"RetTransp")}vServ;vBCRet;pICMSRet;vICMSRet;CFOP;cMunFG};Ei([Mi(),c({fixed:2}),Vi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vServ",void 0);Ei([Mi(),c({fixed:2}),Vi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vBCRet",void 0);Ei([Mi(),c({fixed:4}),Vi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"pICMSRet",void 0);Ei([Mi(),c({fixed:2}),Vi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vICMSRet",void 0);Ei([Mi(),gs(),Vi("design:type",String)],Ge.prototype,"CFOP",void 0);Ei([Mi(),gs(),Vi("design:type",String)],Ge.prototype,"cMunFG",void 0);import{IsOptional as Li,IsString as Qi}from"class-validator";function Ti(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ti,"_ts_decorate");function _i(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(_i,"_ts_metadata");var Qt=class{static{s(this,"VeicTransp")}placa;UF;RNTC};Ti([Li(),Qi(),_i("design:type",String)],Qt.prototype,"placa",void 0);Ti([Li(),Qi(),_i("design:type",String)],Qt.prototype,"UF",void 0);Ti([Li(),Qi(),_i("design:type",String)],Qt.prototype,"RNTC",void 0);var di=class{static{s(this,"Reboque")}placa;UF;RNTC};Ti([Li(),Qi(),_i("design:type",String)],di.prototype,"placa",void 0);Ti([Li(),Qi(),_i("design:type",String)],di.prototype,"UF",void 0);Ti([Li(),Qi(),_i("design:type",String)],di.prototype,"RNTC",void 0);import{IsOptional as Ui,IsString as cr}from"class-validator";function Bi(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Bi,"_ts_decorate");function qi(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(qi,"_ts_metadata");var Bt=class{static{s(this,"Vol")}qVol;esp;marca;nVol;pesoL;pesoB};Bi([Ui(),cr(),qi("design:type",String)],Bt.prototype,"qVol",void 0);Bi([Ui(),cr(),qi("design:type",String)],Bt.prototype,"esp",void 0);Bi([Ui(),cr(),qi("design:type",String)],Bt.prototype,"marca",void 0);Bi([Ui(),cr(),qi("design:type",String)],Bt.prototype,"nVol",void 0);Bi([Ui(),c({fixed:3}),qi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bt.prototype,"pesoL",void 0);Bi([Ui(),c({fixed:3}),qi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bt.prototype,"pesoB",void 0);function co(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(co,"_ts_decorate");function Ho(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Ho,"_ts_metadata");var Ae=class{static{s(this,"Transp")}modFrete;transporta;retTransp;veicTransp;reboque;vagao;balsa;vol};co([aa(),Ho("design:type",String)],Ae.prototype,"modFrete",void 0);co([ui(),gn(),Sn(()=>xe),Ho("design:type",typeof xe>"u"?Object:xe)],Ae.prototype,"transporta",void 0);co([ui(),gn(),Sn(()=>Ge),Ho("design:type",typeof Ge>"u"?Object:Ge)],Ae.prototype,"retTransp",void 0);co([ui(),gn(),Sn(()=>Qt),Ho("design:type",typeof Qt>"u"?Object:Qt)],Ae.prototype,"veicTransp",void 0);co([ui(),gn({each:!0}),Sn(()=>di),Ss(5),Ho("design:type",Array)],Ae.prototype,"reboque",void 0);co([ui(),aa(),Ho("design:type",String)],Ae.prototype,"vagao",void 0);co([ui(),aa(),Ho("design:type",String)],Ae.prototype,"balsa",void 0);co([ui(),gn({each:!0}),Sn(()=>Bt),Ss(5e3),Ho("design:type",Array)],Ae.prototype,"vol",void 0);Ae=co([O({properties:["veicTransp","reboque"]}),O({properties:["vagao","balsa"]})],Ae);import{ArrayMaxSize as Qp,IsOptional as vo,IsString as sa,ValidateNested as Ns}from"class-validator";import{Type as hs}from"class-transformer";function uo(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(uo,"_ts_decorate");function lo(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(lo,"_ts_metadata");var fo=class{static{s(this,"Fat")}nFat;vOrig;vDesc;vLiq};uo([vo(),sa(),lo("design:type",String)],fo.prototype,"nFat",void 0);uo([vo(),c({fixed:2}),lo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],fo.prototype,"vOrig",void 0);uo([vo(),c({fixed:2}),lo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],fo.prototype,"vDesc",void 0);uo([vo(),c({fixed:2}),lo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],fo.prototype,"vLiq",void 0);var $i=class{static{s(this,"Dup")}nDup;dVenc;vDup};uo([vo(),sa(),lo("design:type",String)],$i.prototype,"nDup",void 0);uo([vo(),sa(),lo("design:type",String)],$i.prototype,"dVenc",void 0);uo([vo(),c({fixed:2}),lo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],$i.prototype,"vDup",void 0);var Go=class{static{s(this,"Cobr")}fat;dup};uo([vo(),Ns(),hs(()=>fo),lo("design:type",typeof fo>"u"?Object:fo)],Go.prototype,"fat",void 0);uo([vo(),Ns({each:!0}),Qp(120),hs(()=>$i),lo("design:type",Array)],Go.prototype,"dup",void 0);import{ArrayMaxSize as Up,ArrayMinSize as $p,IsOptional as Jp,ValidateNested as Hp}from"class-validator";import{Type as Gp}from"class-transformer";import{IsOptional as ua,IsString as la,ValidateNested as Bp}from"class-validator";import{Type as qp}from"class-transformer";import{IsOptional as fa,IsString as da}from"class-validator";function pa(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(pa,"_ts_decorate");function ca(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ca,"_ts_metadata");var qt=class{static{s(this,"Card")}cNPJ;tBand;cAut};pa([fa(),da(),ca("design:type",String)],qt.prototype,"cNPJ",void 0);pa([fa(),da(),ca("design:type",String)],qt.prototype,"tBand",void 0);pa([fa(),da(),ca("design:type",String)],qt.prototype,"cAut",void 0);function Nn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Nn,"_ts_decorate");function hn(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(hn,"_ts_metadata");var mo=class{static{s(this,"DetPag")}indPag;tPag;vPag;card;xPag};Nn([ua(),la(),hn("design:type",String)],mo.prototype,"indPag",void 0);Nn([la(),hn("design:type",typeof TPag>"u"?Object:TPag)],mo.prototype,"tPag",void 0);Nn([c({fixed:2}),hn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],mo.prototype,"vPag",void 0);Nn([ua(),Bp(),qp(()=>qt),hn("design:type",typeof qt>"u"?Object:qt)],mo.prototype,"card",void 0);Nn([ua(),la(),hn("design:type",String)],mo.prototype,"xPag",void 0);function Cs(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Cs,"_ts_decorate");function bs(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(bs,"_ts_metadata");var Yo=class{static{s(this,"Pag")}detPag;vTroco};Cs([Hp({each:!0}),$p(1),Up(100),Gp(()=>mo),bs("design:type",Array)],Yo.prototype,"detPag",void 0);Cs([Jp(),c({fixed:2}),bs("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Yo.prototype,"vTroco",void 0);import{ArrayMaxSize as va,IsOptional as li,IsString as Hi,ValidateNested as ma}from"class-validator";import{Type as ya}from"class-transformer";function yo(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(yo,"_ts_decorate");function go(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(go,"_ts_metadata");var Ji=class{static{s(this,"InfAdicObs")}xCampo;xTexto};yo([Hi(),go("design:type",String)],Ji.prototype,"xCampo",void 0);yo([Hi(),go("design:type",String)],Ji.prototype,"xTexto",void 0);var Cn=class{static{s(this,"ProcRef")}nProc;indProc};yo([li(),Hi(),go("design:type",String)],Cn.prototype,"nProc",void 0);yo([li(),Hi(),go("design:type",String)],Cn.prototype,"indProc",void 0);var ht=class{static{s(this,"InfAdic")}infAdFisco;infCpl;obsCont;obsFisco;procRef};yo([li(),Hi(),go("design:type",String)],ht.prototype,"infAdFisco",void 0);yo([li(),Hi(),go("design:type",String)],ht.prototype,"infCpl",void 0);yo([li(),ma({each:!0}),ya(()=>Ji),va(10),go("design:type",Array)],ht.prototype,"obsCont",void 0);yo([li(),ma({each:!0}),ya(()=>Ji),va(10),go("design:type",Array)],ht.prototype,"obsFisco",void 0);yo([li(),ma({each:!0}),ya(()=>Cn),va(100),go("design:type",Array)],ht.prototype,"procRef",void 0);import{ArrayMaxSize as Fs,IsNotEmptyObject as Yp,IsObject as Xp,IsOptional as vi,IsString as Xo,ValidateNested as Rs}from"class-validator";import{Type as ga}from"class-transformer";function Ve(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ve,"_ts_decorate");function Me(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Me,"_ts_metadata");var fr=class{static{s(this,"ForDiaAttributes")}dia};Ve([Xo(),Me("design:type",String)],fr.prototype,"dia",void 0);var bn=class{static{s(this,"ForDia")}$;qtde};Ve([Xp(),Yp(),ga(()=>fr),Me("design:type",typeof IForDiaAttributes>"u"?Object:IForDiaAttributes)],bn.prototype,"$",void 0);Ve([Xo(),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],bn.prototype,"qtde",void 0);var Fn=class{static{s(this,"Deduc")}xDed;vDed};Ve([Xo(),Me("design:type",String)],Fn.prototype,"xDed",void 0);Ve([c({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fn.prototype,"vDed",void 0);var De=class{static{s(this,"Cana")}safra;ref;forDia;qTotMes;qTotAnt;qTotGer;deduc;vFor;vTotDed;vLiqFor};Ve([Xo(),Me("design:type",String)],De.prototype,"safra",void 0);Ve([Xo(),Me("design:type",String)],De.prototype,"ref",void 0);Ve([Rs({each:!0}),Fs(31),ga(()=>bn),Me("design:type",Array)],De.prototype,"forDia",void 0);Ve([vi(),Xo(),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"qTotMes",void 0);Ve([vi(),Xo(),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"qTotAnt",void 0);Ve([vi(),Xo(),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"qTotGer",void 0);Ve([vi(),Rs({each:!0}),Fs(10),ga(()=>Fn),Me("design:type",Array)],De.prototype,"deduc",void 0);Ve([vi(),c({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"vFor",void 0);Ve([vi(),c({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"vTotDed",void 0);Ve([vi(),c({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],De.prototype,"vLiqFor",void 0);import{IsObject as cc,IsOptional as xr,IsString as _s,ValidateNested as jn}from"class-validator";import{Type as wn}from"class-transformer";import{ArrayMaxSize as An,IsArray as yr,IsObject as gi,IsOptional as E,IsString as Z,ValidateNested as ho}from"class-validator";import{Type as Co}from"class-transformer";import{IsOptional as dr,IsString as zn}from"class-validator";function Rn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Rn,"_ts_decorate");function In(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(In,"_ts_metadata");var So=class{static{s(this,"Rastro")}nLote;qLote;dFab;dVal;cAgreg};Rn([zn(),In("design:type",String)],So.prototype,"nLote",void 0);Rn([dr(),zn(),In("design:type",String)],So.prototype,"qLote",void 0);Rn([dr(),zn(),In("design:type",String)],So.prototype,"dFab",void 0);Rn([dr(),zn(),In("design:type",String)],So.prototype,"dVal",void 0);Rn([dr(),zn(),In("design:type",String)],So.prototype,"cAgreg",void 0);import{IsString as Be,IsOptional as On,IsArray as Zp,ValidateNested as Kp,ArrayMaxSize as Wp,ArrayMinSize as kp}from"class-validator";import{Type as ec}from"class-transformer";function de(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(de,"_ts_decorate");function Ce(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Ce,"_ts_metadata");var Zo=class{static{s(this,"Adi")}nAdicao;nSeqAdic;cFabricante;vDescDI;nDraw};de([Be(),Ce("design:type",String)],Zo.prototype,"nAdicao",void 0);de([Be(),Ce("design:type",String)],Zo.prototype,"nSeqAdic",void 0);de([Be(),Ce("design:type",String)],Zo.prototype,"cFabricante",void 0);de([c({fixed:2}),Ce("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Zo.prototype,"vDescDI",void 0);de([On(),Be(),Ce("design:type",String)],Zo.prototype,"nDraw",void 0);var fe=class{static{s(this,"DI")}nDI;dDI;xLocDesemb;UFDesemb;dDesemb;tpViaTransp;vAFRMM;tpIntermedio;CNPJ="";CPF="";UFTerceiro;adi};de([Be(),Ce("design:type",String)],fe.prototype,"nDI",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"dDI",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"xLocDesemb",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"UFDesemb",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"dDesemb",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"tpViaTransp",void 0);de([On(),c({fixed:2}),Ce("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],fe.prototype,"vAFRMM",void 0);de([Be(),Ce("design:type",String)],fe.prototype,"tpIntermedio",void 0);de([Be(),On(),Ce("design:type",String)],fe.prototype,"CNPJ",void 0);de([Be(),On(),Ce("design:type",String)],fe.prototype,"CPF",void 0);de([Be(),On(),Ce("design:type",String)],fe.prototype,"UFTerceiro",void 0);de([Zp(),Kp({each:!0}),ec(()=>Zo),Wp(999),kp(1),Ce("design:type",Array)],fe.prototype,"adi",void 0);fe=de([O({properties:["CNPJ","CPF"],required:!0})],fe);import{Type as tc}from"class-transformer";import{IsOptional as Is,IsString as Sa,ValidateNested as oc}from"class-validator";function Pn(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Pn,"_ts_decorate");function xn(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(xn,"_ts_metadata");var Gi=class{static{s(this,"ExportInd")}nRE;chNFe;qExport};Pn([Sa(),xn("design:type",String)],Gi.prototype,"nRE",void 0);Pn([Sa(),xn("design:type",String)],Gi.prototype,"chNFe",void 0);Pn([c({fixed:4}),xn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Gi.prototype,"qExport",void 0);var Yi=class{static{s(this,"DetExport")}nDraw;exportInd};Pn([Is(),Sa(),xn("design:type",String)],Yi.prototype,"nDraw",void 0);Pn([Is(),oc(),tc(()=>Gi),xn("design:type",typeof IExportInd>"u"?Object:IExportInd)],Yi.prototype,"exportInd",void 0);import{IsString as Ps}from"class-validator";function zs(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(zs,"_ts_decorate");function Os(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Os,"_ts_metadata");var Xi=class{static{s(this,"InfProdNFF")}cProdFisco;cOperNFF};zs([Ps(),Os("design:type",String)],Xi.prototype,"cProdFisco",void 0);zs([Ps(),Os("design:type",String)],Xi.prototype,"cOperNFF",void 0);import{IsString as xs}from"class-validator";function Na(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Na,"_ts_decorate");function ha(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ha,"_ts_metadata");var mi=class{static{s(this,"InfProdEmb")}xEmb;qVolEmb;uEmb};Na([xs(),ha("design:type",String)],mi.prototype,"xEmb",void 0);Na([c({fixed:3}),ha("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],mi.prototype,"qVolEmb",void 0);Na([xs(),ha("design:type",String)],mi.prototype,"uEmb",void 0);import{IsString as Q}from"class-validator";function _(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(_,"_ts_decorate");function L(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(L,"_ts_metadata");var D=class{static{s(this,"VeicProd")}tpOp;chassi;cCor;xCor;pot;cilin;pesoL;pesoB;nSerie;tpComb;nMotor;CMT;dist;anoMod;anoFab;tpPint;tpVeic;espVeic;VIN;condVeic;cMod;cCorDENATRAN;lota;tpRest};_([Q(),L("design:type",String)],D.prototype,"tpOp",void 0);_([Q(),L("design:type",String)],D.prototype,"chassi",void 0);_([Q(),L("design:type",String)],D.prototype,"cCor",void 0);_([Q(),L("design:type",String)],D.prototype,"xCor",void 0);_([Q(),L("design:type",String)],D.prototype,"pot",void 0);_([Q(),L("design:type",String)],D.prototype,"cilin",void 0);_([Q(),L("design:type",String)],D.prototype,"pesoL",void 0);_([Q(),L("design:type",String)],D.prototype,"pesoB",void 0);_([Q(),L("design:type",String)],D.prototype,"nSerie",void 0);_([Q(),L("design:type",String)],D.prototype,"tpComb",void 0);_([Q(),L("design:type",String)],D.prototype,"nMotor",void 0);_([Q(),L("design:type",String)],D.prototype,"CMT",void 0);_([Q(),L("design:type",String)],D.prototype,"dist",void 0);_([Q(),L("design:type",String)],D.prototype,"anoMod",void 0);_([Q(),L("design:type",String)],D.prototype,"anoFab",void 0);_([Q(),L("design:type",String)],D.prototype,"tpPint",void 0);_([Q(),L("design:type",String)],D.prototype,"tpVeic",void 0);_([Q(),L("design:type",String)],D.prototype,"espVeic",void 0);_([Q(),L("design:type",String)],D.prototype,"VIN",void 0);_([Q(),L("design:type",String)],D.prototype,"condVeic",void 0);_([Q(),L("design:type",String)],D.prototype,"cMod",void 0);_([Q(),L("design:type",String)],D.prototype,"cCorDENATRAN",void 0);_([Q(),L("design:type",String)],D.prototype,"lota",void 0);_([Q(),L("design:type",String)],D.prototype,"tpRest",void 0);import{IsString as As}from"class-validator";function Ca(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ca,"_ts_decorate");function ba(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(ba,"_ts_metadata");var yi=class{static{s(this,"Med")}cProdANVISA;xMotivoIsencao;vPMC};Ca([As(),ba("design:type",String)],yi.prototype,"cProdANVISA",void 0);Ca([As(),ba("design:type",String)],yi.prototype,"xMotivoIsencao",void 0);Ca([c({fixed:2}),ba("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],yi.prototype,"vPMC",void 0);import{IsString as vr}from"class-validator";function ur(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(ur,"_ts_decorate");function lr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(lr,"_ts_metadata");var Ko=class{static{s(this,"Arma")}tpArma;nSerie;nCano;descr};ur([vr(),lr("design:type",String)],Ko.prototype,"tpArma",void 0);ur([vr(),lr("design:type",String)],Ko.prototype,"nSerie",void 0);ur([vr(),lr("design:type",String)],Ko.prototype,"nCano",void 0);ur([vr(),lr("design:type",String)],Ko.prototype,"descr",void 0);import{IsString as No,IsOptional as ko,IsObject as Fa,ValidateNested as Ra,ArrayMaxSize as ic,Max as mr}from"class-validator";import{Type as Ia}from"class-transformer";function B(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(B,"_ts_decorate");function q(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(q,"_ts_metadata");var Zi=class{static{s(this,"OrigComb")}indImport;cUFOrig;pOrig};B([No(),q("design:type",String)],Zi.prototype,"indImport",void 0);B([No(),q("design:type",String)],Zi.prototype,"cUFOrig",void 0);B([c({fixed:4}),mr(100),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Zi.prototype,"pOrig",void 0);var Ki=class{static{s(this,"CIDE")}qBCProd;vAliqProd;vCIDE};B([c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ki.prototype,"qBCProd",void 0);B([c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ki.prototype,"vAliqProd",void 0);B([c({fixed:2}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ki.prototype,"vCIDE",void 0);var Wo=class{static{s(this,"Encerrante")}nBico;nBomba;nTanque;vEncIni;vEncFin};B([No(),q("design:type",String)],Wo.prototype,"nBico",void 0);B([No(),q("design:type",String)],Wo.prototype,"nBomba",void 0);B([No(),q("design:type",String)],Wo.prototype,"nTanque",void 0);B([c({fixed:3}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Wo.prototype,"vEncIni",void 0);B([c({fixed:3}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Wo.prototype,"vEncFin",void 0);var be=class{static{s(this,"Comb")}cProdANP;descANP;pGLP;pGNn;pGNi;vPart;CODIF;qTemp;UFCons;CIDE;encerrante;pBio;origComb};B([No(),q("design:type",String)],be.prototype,"cProdANP",void 0);B([No(),q("design:type",String)],be.prototype,"descANP",void 0);B([ko(),mr(100),c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"pGLP",void 0);B([ko(),mr(100),c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"pGNn",void 0);B([ko(),mr(100),c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"pGNi",void 0);B([ko(),c({fixed:2}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"vPart",void 0);B([No(),ko(),q("design:type",String)],be.prototype,"CODIF",void 0);B([ko(),c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"qTemp",void 0);B([No(),q("design:type",String)],be.prototype,"UFCons",void 0);B([Fa(),Ra(),Ia(()=>Ki),q("design:type",typeof ICIDE>"u"?Object:ICIDE)],be.prototype,"CIDE",void 0);B([Fa(),Ra(),Ia(()=>Wo),q("design:type",typeof IEncerrante>"u"?Object:IEncerrante)],be.prototype,"encerrante",void 0);B([ko(),c({fixed:4}),q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],be.prototype,"pBio",void 0);B([Fa(),Ra({each:!0}),Ia(()=>Zi),ic(30),ko(),q("design:type",Array)],be.prototype,"origComb",void 0);function b(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(b,"_ts_decorate");function F(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(F,"_ts_metadata");var h=class{static{s(this,"Prod")}cProd;cEAN;cBarra;xProd;NCM;NVE;CEST;indEscala;CNPJFab;cBenef;gCred;EXTIPI;CFOP;uCom;qCom;vUnCom;vProd;cEANTrib;uTrib;qTrib;vUnTrib;vFrete;vSeg;vDesc;vOutro;indTot;DI;detExport;xPed;nItemPed;nFCI;rastro;infProdNFF;infProdEmb;veicProd;med;arma;comb;nRECOPI};b([Z(),F("design:type",String)],h.prototype,"cProd",void 0);b([Z(),F("design:type",String)],h.prototype,"cEAN",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"cBarra",void 0);b([Z(),F("design:type",String)],h.prototype,"xProd",void 0);b([Z(),F("design:type",String)],h.prototype,"NCM",void 0);b([E(),yr(),An(8),Z({each:!0}),F("design:type",Array)],h.prototype,"NVE",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"CEST",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"indEscala",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"CNPJFab",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"cBenef",void 0);b([E(),gi(),F("design:type",Object)],h.prototype,"gCred",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"EXTIPI",void 0);b([Z(),F("design:type",String)],h.prototype,"CFOP",void 0);b([Z(),F("design:type",String)],h.prototype,"uCom",void 0);b([c({fixed:4}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"qCom",void 0);b([c({fixed:10}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vUnCom",void 0);b([c({fixed:2}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vProd",void 0);b([Z(),F("design:type",String)],h.prototype,"cEANTrib",void 0);b([Z(),F("design:type",String)],h.prototype,"uTrib",void 0);b([c({fixed:4}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"qTrib",void 0);b([c({fixed:10}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vUnTrib",void 0);b([E(),c({fixed:2}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vFrete",void 0);b([E(),c({fixed:2}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vSeg",void 0);b([E(),c({fixed:2}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vDesc",void 0);b([E(),c({fixed:2}),F("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],h.prototype,"vOutro",void 0);b([Z(),F("design:type",String)],h.prototype,"indTot",void 0);b([E(),yr(),ho({each:!0}),An(100),Co(()=>fe),F("design:type",Array)],h.prototype,"DI",void 0);b([E(),yr(),ho({each:!0}),An(500),Co(()=>Yi),F("design:type",Array)],h.prototype,"detExport",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"xPed",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"nItemPed",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"nFCI",void 0);b([E(),yr(),ho({each:!0}),An(500),Co(()=>So),F("design:type",Array)],h.prototype,"rastro",void 0);b([E(),gi(),ho(),Co(()=>Xi),F("design:type",typeof IInfProdNFF>"u"?Object:IInfProdNFF)],h.prototype,"infProdNFF",void 0);b([E(),gi(),ho(),Co(()=>mi),F("design:type",typeof IInfProdEmb>"u"?Object:IInfProdEmb)],h.prototype,"infProdEmb",void 0);b([E(),gi(),ho(),Co(()=>D),F("design:type",typeof IVeicProd>"u"?Object:IVeicProd)],h.prototype,"veicProd",void 0);b([E(),gi(),ho(),Co(()=>yi),F("design:type",typeof IMed>"u"?Object:IMed)],h.prototype,"med",void 0);b([E(),gi(),ho({each:!0}),Co(()=>Ko),An(500),F("design:type",Array)],h.prototype,"arma",void 0);b([E(),gi(),ho(),Co(()=>be),F("design:type",typeof IComb>"u"?Object:IComb)],h.prototype,"comb",void 0);b([E(),Z(),F("design:type",String)],h.prototype,"nRECOPI",void 0);h=b([O({properties:["veicProd","med","arma","comb"]})],h);import{Type as To}from"class-transformer";import{IsNumber as rc,IsOptional as Xt,ValidateNested as _o}from"class-validator";import{IsOptional as l,IsString as y,Max as nc,ValidateNested as Fe}from"class-validator";import{Type as Re}from"class-transformer";function d(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(d,"_ts_decorate");function u(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(u,"_ts_metadata");var bo=class{static{s(this,"ICMS00")}orig;CST;modBC;vBC;pICMS;vICMS};d([y(),u("design:type",String)],bo.prototype,"orig",void 0);d([y(),u("design:type",String)],bo.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],bo.prototype,"modBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],bo.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],bo.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],bo.prototype,"vICMS",void 0);var Ye=class{static{s(this,"ICMS10")}orig;CST;modBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};d([y(),u("design:type",String)],Ye.prototype,"orig",void 0);d([y(),u("design:type",String)],Ye.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],Ye.prototype,"modBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"vICMS",void 0);d([l(),y(),u("design:type",String)],Ye.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ye.prototype,"vICMSST",void 0);var Ut=class{static{s(this,"ICMS20")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS};d([y(),u("design:type",String)],Ut.prototype,"orig",void 0);d([y(),u("design:type",String)],Ut.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],Ut.prototype,"modBC",void 0);d([l(),y(),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ut.prototype,"pRedBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ut.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ut.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ut.prototype,"vICMS",void 0);var Fo=class{static{s(this,"ICMS30")}orig;CST;modBCST;vBCST;pICMSST;vICMSST};d([y(),u("design:type",String)],Fo.prototype,"orig",void 0);d([y(),u("design:type",String)],Fo.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],Fo.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"vICMSST",void 0);var Si=class{static{s(this,"ICMS40")}orig;CST;vICMSDeson;motDesICMS};d([y(),u("design:type",String)],Si.prototype,"orig",void 0);d([y(),u("design:type",String)],Si.prototype,"CST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Si.prototype,"vICMSDeson",void 0);d([l(),y(),u("design:type",String)],Si.prototype,"motDesICMS",void 0);var ot=class{static{s(this,"ICMS51")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;pDif;vICMSDif};d([y(),u("design:type",String)],ot.prototype,"orig",void 0);d([y(),u("design:type",String)],ot.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],ot.prototype,"modBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"pRedBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"vICMS",void 0);d([l(),c({fixed:4}),nc(100),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"pDif",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ot.prototype,"vICMSDif",void 0);var Ro=class{static{s(this,"ICMS60")}orig;CST;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};d([y(),u("design:type",String)],Ro.prototype,"orig",void 0);d([y(),u("design:type",String)],Ro.prototype,"CST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ro.prototype,"vBCSTRet",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ro.prototype,"pST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ro.prototype,"vICMSSubstituto",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ro.prototype,"vICMSSTRet",void 0);var qe=class{static{s(this,"ICMS70")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};d([y(),u("design:type",String)],qe.prototype,"orig",void 0);d([y(),u("design:type",String)],qe.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],qe.prototype,"modBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"pRedBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"vICMS",void 0);d([l(),y(),u("design:type",String)],qe.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qe.prototype,"vICMSST",void 0);var Ue=class{static{s(this,"ICMS90")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};d([y(),u("design:type",String)],Ue.prototype,"orig",void 0);d([y(),u("design:type",String)],Ue.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],Ue.prototype,"modBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"pRedBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"vICMS",void 0);d([l(),y(),u("design:type",String)],Ue.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ue.prototype,"vICMSST",void 0);var ue=class{static{s(this,"ICMSPart")}orig;CST;modBC;vBC;pRedBC;pICMS;vICMS;modBCST;pMVAST;pRedBCST;vBCST;pICMSST;vICMSST;pBCOp;UFST};d([y(),u("design:type",String)],ue.prototype,"orig",void 0);d([y(),u("design:type",String)],ue.prototype,"CST",void 0);d([l(),y(),u("design:type",String)],ue.prototype,"modBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pRedBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"vICMS",void 0);d([l(),y(),u("design:type",String)],ue.prototype,"modBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pMVAST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pRedBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"vICMSST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ue.prototype,"pBCOp",void 0);d([l(),y(),u("design:type",String)],ue.prototype,"UFST",void 0);var Io=class{static{s(this,"ICMSST")}orig;CST;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};d([y(),u("design:type",String)],Io.prototype,"orig",void 0);d([y(),u("design:type",String)],Io.prototype,"CST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Io.prototype,"vBCSTRet",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Io.prototype,"pST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Io.prototype,"vICMSSubstituto",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Io.prototype,"vICMSSTRet",void 0);var Ni=class{static{s(this,"ICMSSN101")}orig;CSOSN;pCredSN;vCredICMSSN};d([y(),u("design:type",String)],Ni.prototype,"orig",void 0);d([y(),u("design:type",String)],Ni.prototype,"CSOSN",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ni.prototype,"pCredSN",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ni.prototype,"vCredICMSSN",void 0);var Dn=class{static{s(this,"ICMSSN102")}orig;CSOSN};d([y(),u("design:type",String)],Dn.prototype,"orig",void 0);d([y(),u("design:type",String)],Dn.prototype,"CSOSN",void 0);var Ct=class{static{s(this,"ICMSSN201")}orig;CSOSN;modBCST;vBCST;pICMSST;vICMSST;pCredSN;vCredICMSSN};d([y(),u("design:type",String)],Ct.prototype,"orig",void 0);d([y(),u("design:type",String)],Ct.prototype,"CSOSN",void 0);d([l(),y(),u("design:type",String)],Ct.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ct.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ct.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ct.prototype,"vICMSST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ct.prototype,"pCredSN",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ct.prototype,"vCredICMSSN",void 0);var zo=class{static{s(this,"ICMSSN202")}orig;CSOSN;modBCST;vBCST;pICMSST;vICMSST};d([y(),u("design:type",String)],zo.prototype,"orig",void 0);d([y(),u("design:type",String)],zo.prototype,"CSOSN",void 0);d([l(),y(),u("design:type",String)],zo.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zo.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zo.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zo.prototype,"vICMSST",void 0);var Oo=class{static{s(this,"ICMSSN500")}orig;CSOSN;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};d([y(),u("design:type",String)],Oo.prototype,"orig",void 0);d([y(),u("design:type",String)],Oo.prototype,"CSOSN",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Oo.prototype,"vBCSTRet",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Oo.prototype,"pST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Oo.prototype,"vICMSSubstituto",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Oo.prototype,"vICMSSTRet",void 0);var je=class{static{s(this,"ICMSSN900")}orig;CSOSN;modBC;vBC;pRedBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST;pCredSN;vCredICMSSN};d([y(),u("design:type",String)],je.prototype,"orig",void 0);d([y(),u("design:type",String)],je.prototype,"CSOSN",void 0);d([l(),y(),u("design:type",String)],je.prototype,"modBC",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"vBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"pRedBC",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"pICMS",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"vICMS",void 0);d([l(),y(),u("design:type",String)],je.prototype,"modBCST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"vBCST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"pICMSST",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"vICMSST",void 0);d([l(),c({fixed:4}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"pCredSN",void 0);d([l(),c({fixed:2}),u("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],je.prototype,"vCredICMSSN",void 0);var V=class{static{s(this,"ICMS")}ICMS00;ICMS10;ICMS20;ICMS30;ICMS40;ICMS51;ICMS60;ICMS70;ICMS90;ICMSPart;ICMSST;ICMSSN101;ICMSSN102;ICMSSN201;ICMSSN202;ICMSSN500;ICMSSN900};d([l(),Fe(),Re(()=>bo),u("design:type",typeof IICMS00>"u"?Object:IICMS00)],V.prototype,"ICMS00",void 0);d([l(),Fe(),Re(()=>Ye),u("design:type",typeof IICMS10>"u"?Object:IICMS10)],V.prototype,"ICMS10",void 0);d([l(),Fe(),Re(()=>Ut),u("design:type",typeof IICMS20>"u"?Object:IICMS20)],V.prototype,"ICMS20",void 0);d([l(),Fe(),Re(()=>Fo),u("design:type",typeof IICMS30>"u"?Object:IICMS30)],V.prototype,"ICMS30",void 0);d([l(),Fe(),Re(()=>Si),u("design:type",typeof IICMS40>"u"?Object:IICMS40)],V.prototype,"ICMS40",void 0);d([l(),Fe(),Re(()=>ot),u("design:type",typeof IICMS51>"u"?Object:IICMS51)],V.prototype,"ICMS51",void 0);d([l(),Fe(),Re(()=>Ro),u("design:type",typeof IICMS60>"u"?Object:IICMS60)],V.prototype,"ICMS60",void 0);d([l(),Fe(),Re(()=>qe),u("design:type",typeof IICMS70>"u"?Object:IICMS70)],V.prototype,"ICMS70",void 0);d([l(),Fe(),Re(()=>Ue),u("design:type",typeof IICMS90>"u"?Object:IICMS90)],V.prototype,"ICMS90",void 0);d([l(),Fe(),Re(()=>ue),u("design:type",typeof IICMSPart>"u"?Object:IICMSPart)],V.prototype,"ICMSPart",void 0);d([l(),Fe(),Re(()=>Io),u("design:type",typeof IICMSST>"u"?Object:IICMSST)],V.prototype,"ICMSST",void 0);d([l(),Fe(),Re(()=>Ni),u("design:type",typeof IICMSSN101>"u"?Object:IICMSSN101)],V.prototype,"ICMSSN101",void 0);d([l(),Fe(),Re(()=>Dn),u("design:type",typeof IICMSSN102>"u"?Object:IICMSSN102)],V.prototype,"ICMSSN102",void 0);d([l(),Fe(),Re(()=>Ct),u("design:type",typeof IICMSSN201>"u"?Object:IICMSSN201)],V.prototype,"ICMSSN201",void 0);d([l(),Fe(),Re(()=>zo),u("design:type",typeof IICMSSN202>"u"?Object:IICMSSN202)],V.prototype,"ICMSSN202",void 0);d([l(),Fe(),Re(()=>Oo),u("design:type",typeof IICMSSN500>"u"?Object:IICMSSN500)],V.prototype,"ICMSSN500",void 0);d([l(),Fe(),Re(()=>je),u("design:type",typeof IICMSSN900>"u"?Object:IICMSSN900)],V.prototype,"ICMSSN900",void 0);V=d([O({properties:["ICMS00","ICMS10","ICMS20","ICMS30","ICMS40","ICMS51","ICMS60","ICMS70","ICMS90","ICMSPart","ICMSST","ICMSSN101","ICMSSN102","ICMSSN201","ICMSSN202","ICMSSN500","ICMSSN900"]})],V);import{IsOptional as $t,IsString as bt,ValidateNested as Ds}from"class-validator";import{Type as js}from"class-transformer";function Xe(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Xe,"_ts_decorate");function Ze(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Ze,"_ts_metadata");var Po=class{static{s(this,"IPITrib")}CST;vBC;pIPI;qUnid;vUnid;vIPI};Xe([bt(),Ze("design:type",String)],Po.prototype,"CST",void 0);Xe([$t(),bt(),Ze("design:type",String)],Po.prototype,"vBC",void 0);Xe([$t(),bt(),Ze("design:type",String)],Po.prototype,"pIPI",void 0);Xe([$t(),bt(),Ze("design:type",String)],Po.prototype,"qUnid",void 0);Xe([$t(),bt(),Ze("design:type",String)],Po.prototype,"vUnid",void 0);Xe([$t(),bt(),Ze("design:type",String)],Po.prototype,"vIPI",void 0);var gr=class{static{s(this,"IPINT")}CST};Xe([bt(),Ze("design:type",String)],gr.prototype,"CST",void 0);var it=class{static{s(this,"IPI")}CNPJProd;cSelo;qSelo;cEnq;IPITrib;IPINT};Xe([$t(),bt(),Ze("design:type",String)],it.prototype,"CNPJProd",void 0);Xe([$t(),bt(),Ze("design:type",String)],it.prototype,"cSelo",void 0);Xe([$t(),bt(),Ze("design:type",String)],it.prototype,"qSelo",void 0);Xe([bt(),Ze("design:type",String)],it.prototype,"cEnq",void 0);Xe([$t(),Ds(),js(()=>Po),Ze("design:type",typeof IIPITrib>"u"?Object:IIPITrib)],it.prototype,"IPITrib",void 0);Xe([$t(),Ds(),js(()=>gr),Ze("design:type",typeof IIPINT>"u"?Object:IIPINT)],it.prototype,"IPINT",void 0);import{IsOptional as hr,IsString as Cr}from"class-validator";function Sr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Sr,"_ts_decorate");function Nr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Nr,"_ts_metadata");var Jt=class{static{s(this,"II")}vBC;vDespAdu;vII;vIOF};Sr([hr(),Cr(),Nr("design:type",String)],Jt.prototype,"vBC",void 0);Sr([hr(),Cr(),Nr("design:type",String)],Jt.prototype,"vDespAdu",void 0);Sr([hr(),Cr(),Nr("design:type",String)],Jt.prototype,"vII",void 0);Sr([hr(),Cr(),Nr("design:type",String)],Jt.prototype,"vIOF",void 0);import{IsOptional as K,IsString as W,ValidateNested as br}from"class-validator";import{Type as Fr}from"class-transformer";function U(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(U,"_ts_decorate");function $(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s($,"_ts_metadata");var xo=class{static{s(this,"PISAliq")}CST;vBC;pPIS;vPIS};U([W(),$("design:type",String)],xo.prototype,"CST",void 0);U([K(),W(),$("design:type",String)],xo.prototype,"vBC",void 0);U([K(),W(),$("design:type",String)],xo.prototype,"pPIS",void 0);U([K(),W(),$("design:type",String)],xo.prototype,"vPIS",void 0);var Ao=class{static{s(this,"PISQtde")}CST;qBCProd;vAliqProd;vPIS};U([W(),$("design:type",String)],Ao.prototype,"CST",void 0);U([K(),W(),$("design:type",String)],Ao.prototype,"qBCProd",void 0);U([K(),W(),$("design:type",String)],Ao.prototype,"vAliqProd",void 0);U([K(),W(),$("design:type",String)],Ao.prototype,"vPIS",void 0);var Wi=class{static{s(this,"PISNT")}CST};U([W(),$("design:type",String)],Wi.prototype,"CST",void 0);var Ft=class{static{s(this,"PISOutr")}CST;vBC;pPIS;qBCProd;vAliqProd;vPIS};U([W(),$("design:type",String)],Ft.prototype,"CST",void 0);U([K(),W(),$("design:type",String)],Ft.prototype,"vBC",void 0);U([K(),W(),$("design:type",String)],Ft.prototype,"pPIS",void 0);U([K(),W(),$("design:type",String)],Ft.prototype,"qBCProd",void 0);U([K(),W(),$("design:type",String)],Ft.prototype,"vAliqProd",void 0);U([K(),W(),$("design:type",String)],Ft.prototype,"vPIS",void 0);var Ht=class{static{s(this,"PIS")}PISAliq;PISQtde;PISNT;PISOutr};U([K(),br(),Fr(()=>xo),$("design:type",typeof xo>"u"?Object:xo)],Ht.prototype,"PISAliq",void 0);U([K(),br(),Fr(()=>Ao),$("design:type",typeof Ao>"u"?Object:Ao)],Ht.prototype,"PISQtde",void 0);U([K(),br(),Fr(()=>Wi),$("design:type",typeof Wi>"u"?Object:Wi)],Ht.prototype,"PISNT",void 0);U([K(),br(),Fr(()=>Ft),$("design:type",typeof Ft>"u"?Object:Ft)],Ht.prototype,"PISOutr",void 0);var Rt=class{static{s(this,"PISST")}vBC;pPIS;qBCProd;vAliqProd;vPIS};U([K(),W(),$("design:type",String)],Rt.prototype,"vBC",void 0);U([K(),W(),$("design:type",String)],Rt.prototype,"pPIS",void 0);U([K(),W(),$("design:type",String)],Rt.prototype,"qBCProd",void 0);U([K(),W(),$("design:type",String)],Rt.prototype,"vAliqProd",void 0);U([K(),W(),$("design:type",String)],Rt.prototype,"vPIS",void 0);import{IsOptional as k,IsString as ee,ValidateNested as Rr}from"class-validator";import{Type as Ir}from"class-transformer";function J(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(J,"_ts_decorate");function H(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(H,"_ts_metadata");var Do=class{static{s(this,"COFINSAliq")}CST;vBC;pCOFINS;vCOFINS};J([ee(),H("design:type",String)],Do.prototype,"CST",void 0);J([k(),ee(),H("design:type",String)],Do.prototype,"vBC",void 0);J([k(),ee(),H("design:type",String)],Do.prototype,"pCOFINS",void 0);J([k(),ee(),H("design:type",String)],Do.prototype,"vCOFINS",void 0);var jo=class{static{s(this,"COFINSQtde")}CST;qBCProd;vAliqProd;vCOFINS};J([ee(),H("design:type",String)],jo.prototype,"CST",void 0);J([k(),ee(),H("design:type",String)],jo.prototype,"qBCProd",void 0);J([k(),ee(),H("design:type",String)],jo.prototype,"vAliqProd",void 0);J([k(),ee(),H("design:type",String)],jo.prototype,"vCOFINS",void 0);var ki=class{static{s(this,"COFINSNT")}CST};J([ee(),H("design:type",String)],ki.prototype,"CST",void 0);var It=class{static{s(this,"COFINSOutr")}CST;vBC;pCOFINS;qBCProd;vAliqProd;vCOFINS};J([ee(),H("design:type",String)],It.prototype,"CST",void 0);J([k(),ee(),H("design:type",String)],It.prototype,"vBC",void 0);J([k(),ee(),H("design:type",String)],It.prototype,"pCOFINS",void 0);J([k(),ee(),H("design:type",String)],It.prototype,"qBCProd",void 0);J([k(),ee(),H("design:type",String)],It.prototype,"vAliqProd",void 0);J([k(),ee(),H("design:type",String)],It.prototype,"vCOFINS",void 0);var Gt=class{static{s(this,"COFINS")}COFINSAliq;COFINSQtde;COFINSNT;COFINSOutr};J([k(),Rr(),Ir(()=>Do),H("design:type",typeof Do>"u"?Object:Do)],Gt.prototype,"COFINSAliq",void 0);J([k(),Rr(),Ir(()=>jo),H("design:type",typeof jo>"u"?Object:jo)],Gt.prototype,"COFINSQtde",void 0);J([k(),Rr(),Ir(()=>ki),H("design:type",typeof ki>"u"?Object:ki)],Gt.prototype,"COFINSNT",void 0);J([k(),Rr(),Ir(()=>It),H("design:type",typeof It>"u"?Object:It)],Gt.prototype,"COFINSOutr",void 0);var zt=class{static{s(this,"COFINSST")}vBC;pCOFINS;qBCProd;vAliqProd;vCOFINS};J([k(),ee(),H("design:type",String)],zt.prototype,"vBC",void 0);J([k(),ee(),H("design:type",String)],zt.prototype,"pCOFINS",void 0);J([k(),ee(),H("design:type",String)],zt.prototype,"qBCProd",void 0);J([k(),ee(),H("design:type",String)],zt.prototype,"vAliqProd",void 0);J([k(),ee(),H("design:type",String)],zt.prototype,"vCOFINS",void 0);import{IsOptional as on,IsString as nn}from"class-validator";function en(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(en,"_ts_decorate");function tn(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(tn,"_ts_metadata");var nt=class{static{s(this,"ISSQN")}vBC;vAliq;vISSQN;cMunFG;cListServ;cSitTrib};en([on(),nn(),tn("design:type",String)],nt.prototype,"vBC",void 0);en([on(),nn(),tn("design:type",String)],nt.prototype,"vAliq",void 0);en([on(),nn(),tn("design:type",String)],nt.prototype,"vISSQN",void 0);en([on(),nn(),tn("design:type",String)],nt.prototype,"cMunFG",void 0);en([on(),nn(),tn("design:type",String)],nt.prototype,"cListServ",void 0);en([on(),nn(),tn("design:type",String)],nt.prototype,"cSitTrib",void 0);import{IsOptional as Vo,IsString as Mo}from"class-validator";function wo(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(wo,"_ts_decorate");function Eo(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Eo,"_ts_metadata");var Te=class{static{s(this,"ICMSUFDest")}vBCUFDest;vBCFCPUFDest;pFCPUFDest;pICMSUFDest;pICMSInter;pICMSInterPart;vFCPUFDest;vICMSUFDest;vICMSUFRemet};wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"vBCUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"vBCFCPUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"pFCPUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"pICMSUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"pICMSInter",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"pICMSInterPart",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"vFCPUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"vICMSUFDest",void 0);wo([Vo(),Mo(),Eo("design:type",String)],Te.prototype,"vICMSUFRemet",void 0);function Ot(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ot,"_ts_decorate");function Yt(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Yt,"_ts_metadata");var le=class{static{s(this,"Imposto")}vTotTrib;ICMS;IPI;ISSQN;II;PIS;PISST;COFINS;COFINSST;ICMSUFDest};Ot([Xt(),rc(),Yt("design:type",Number)],le.prototype,"vTotTrib",void 0);Ot([Xt(),_o(),To(()=>V),Yt("design:type",typeof IICMS>"u"?Object:IICMS)],le.prototype,"ICMS",void 0);Ot([Xt(),_o(),To(()=>it),Yt("design:type",typeof IIPI>"u"?Object:IIPI)],le.prototype,"IPI",void 0);Ot([Xt(),_o(),To(()=>nt),Yt("design:type",typeof IISSQN>"u"?Object:IISSQN)],le.prototype,"ISSQN",void 0);Ot([Xt(),_o(),To(()=>Jt),Yt("design:type",typeof III>"u"?Object:III)],le.prototype,"II",void 0);Ot([Xt(),_o(),To(()=>Ht),Yt("design:type",typeof IPIS>"u"?Object:IPIS)],le.prototype,"PIS",void 0);Ot([Xt(),_o(),To(()=>Rt),Yt("design:type",typeof IPISST>"u"?Object:IPISST)],le.prototype,"PISST",void 0);Ot([Xt(),_o(),To(()=>Gt),Yt("design:type",typeof ICOFINS>"u"?Object:ICOFINS)],le.prototype,"COFINS",void 0);Ot([Xt(),_o(),To(()=>zt),Yt("design:type",typeof ICOFINSST>"u"?Object:ICOFINSST)],le.prototype,"COFINSST",void 0);Ot([Xt(),_o(),To(()=>Te),Yt("design:type",typeof IICMSUFDest>"u"?Object:IICMSUFDest)],le.prototype,"ICMSUFDest",void 0);le=Ot([O({properties:["ICMS","ISSQN"]})],le);import{IsOptional as ac,IsString as ws,ValidateNested as sc}from"class-validator";import{Type as pc}from"class-transformer";function za(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(za,"_ts_decorate");function Oa(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Oa,"_ts_metadata");var zr=class{static{s(this,"IpiDevol")}vIPIDevol};za([ws(),Oa("design:type",String)],zr.prototype,"vIPIDevol",void 0);var rn=class{static{s(this,"Devol")}pDevol;IPI};za([ws(),Oa("design:type",String)],rn.prototype,"pDevol",void 0);za([ac(),sc(),pc(()=>zr),Oa("design:type",typeof IIpiDevol>"u"?Object:IIpiDevol)],rn.prototype,"IPI",void 0);import{IsOptional as Es,IsString as Vs,ValidateNested as Ms}from"class-validator";import{Type as Ts}from"class-transformer";function Or(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Or,"_ts_decorate");function Pr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Pr,"_ts_metadata");var an=class{static{s(this,"Observation")}xCampo;xTexto};Or([Vs(),Pr("design:type",String)],an.prototype,"xCampo",void 0);Or([Vs(),Pr("design:type",String)],an.prototype,"xTexto",void 0);var sn=class{static{s(this,"ObsItem")}obsCont;obsFisco};Or([Es(),Ms(),Ts(()=>an),Pr("design:type",typeof IObservation>"u"?Object:IObservation)],sn.prototype,"obsCont",void 0);Or([Es(),Ms(),Ts(()=>an),Pr("design:type",typeof IObservation>"u"?Object:IObservation)],sn.prototype,"obsFisco",void 0);function hi(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(hi,"_ts_decorate");function Ci(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Ci,"_ts_metadata");var pn=class{static{s(this,"DetAttributes")}nItem};hi([_s(),Ci("design:type",String)],pn.prototype,"nItem",void 0);var Zt=class{static{s(this,"Det")}prod;imposto;impostoDevol;infAdProd;obsItem};hi([cc(),jn(),wn(()=>pn),Ci("design:type",typeof IDetAttributes>"u"?Object:IDetAttributes)],Zt.prototype,"$",void 0);hi([jn(),wn(()=>h),Ci("design:type",typeof IProd>"u"?Object:IProd)],Zt.prototype,"prod",void 0);hi([xr(),jn(),wn(()=>le),Ci("design:type",typeof IImposto>"u"?Object:IImposto)],Zt.prototype,"imposto",void 0);hi([xr(),jn(),wn(()=>rn),Ci("design:type",typeof IDevol>"u"?Object:IDevol)],Zt.prototype,"impostoDevol",void 0);hi([xr(),_s(),Ci("design:type",String)],Zt.prototype,"infAdProd",void 0);hi([xr(),jn(),wn(()=>sn),Ci("design:type",typeof IObsItem>"u"?Object:IObsItem)],Zt.prototype,"obsItem",void 0);import{IsDate as fc,IsOptional as En,IsString as ei}from"class-validator";function Pt(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Pt,"_ts_decorate");function xt(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(xt,"_ts_metadata");var Ie=class{static{s(this,"Avulsa")}CNPJ;xOrgao;matr;xAgente;fone;UF;nDAR;dEmi;vDAR;repEmi;dPag};Pt([ei(),xt("design:type",String)],Ie.prototype,"CNPJ",void 0);Pt([ei(),xt("design:type",String)],Ie.prototype,"xOrgao",void 0);Pt([ei(),xt("design:type",String)],Ie.prototype,"matr",void 0);Pt([ei(),xt("design:type",String)],Ie.prototype,"xAgente",void 0);Pt([En(),ei(),xt("design:type",String)],Ie.prototype,"fone",void 0);Pt([ei(),xt("design:type",String)],Ie.prototype,"UF",void 0);Pt([En(),ei(),xt("design:type",String)],Ie.prototype,"nDAR",void 0);Pt([En(),Bo({format:"YYYY-MM-DD"}),xt("design:type",typeof Date>"u"?Object:Date)],Ie.prototype,"dEmi",void 0);Pt([En(),c({fixed:2}),xt("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ie.prototype,"vDAR",void 0);Pt([ei(),xt("design:type",String)],Ie.prototype,"repEmi",void 0);Pt([En(),fc(),xt("design:type",typeof Date>"u"?Object:Date)],Ie.prototype,"dPag",void 0);import{IsString as lc}from"class-validator";function dc(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(dc,"_ts_decorate");function uc(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(uc,"_ts_metadata");var bi=class{static{s(this,"InfSolicNFF")}xSolic};dc([lc(),uc("design:type",String)],bi.prototype,"xSolic",void 0);function G(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(G,"_ts_decorate");function Y(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Y,"_ts_metadata");var Fi=class{static{s(this,"InfNFeAttributes")}Id;versao};G([_e(),Qs(),Y("design:type",String)],Fi.prototype,"Id",void 0);G([_e(),Qs(),Y("design:type",String)],Fi.prototype,"versao",void 0);var w=class{static{s(this,"InfNFe")}ide;emit;avulsa;dest;retirada;entrega;autXML;det;total;transp;cobr;pag;infIntermed;infAdic;exporta;compra;cana;infRespTec;infSolicNFF};G([xa(),Pa(),oe(()=>Fi),te(),Y("design:type",typeof IInfNFeAttributes>"u"?Object:IInfNFeAttributes)],w.prototype,"$",void 0);G([xa(),Pa(),te(),oe(()=>z),Y("design:type",typeof IIde>"u"?Object:IIde)],w.prototype,"ide",void 0);G([xa(),Pa(),te(),oe(()=>pe),Y("design:type",typeof IEmit>"u"?Object:IEmit)],w.prototype,"emit",void 0);G([_e(),te(),oe(()=>Ie),Y("design:type",typeof IAvulsa>"u"?Object:IAvulsa)],w.prototype,"avulsa",void 0);G([_e(),te(),oe(()=>ce),Y("design:type",typeof IDest>"u"?Object:IDest)],w.prototype,"dest",void 0);G([_e(),te(),oe(()=>j),Y("design:type",typeof ILocal>"u"?Object:ILocal)],w.prototype,"retirada",void 0);G([_e(),te(),oe(()=>j),Y("design:type",typeof ILocal>"u"?Object:ILocal)],w.prototype,"entrega",void 0);G([_e(),te({each:!0}),Ls(10),oe(()=>_t),Y("design:type",Array)],w.prototype,"autXML",void 0);G([te({each:!0}),Ls(990),vc(1),oe(()=>Zt),Y("design:type",Array)],w.prototype,"det",void 0);G([te(),oe(()=>po),Y("design:type",typeof ITotal>"u"?Object:ITotal)],w.prototype,"total",void 0);G([te(),oe(()=>Ae),Y("design:type",typeof ITransp>"u"?Object:ITransp)],w.prototype,"transp",void 0);G([_e(),te(),oe(()=>Go),Y("design:type",typeof ICobr>"u"?Object:ICobr)],w.prototype,"cobr",void 0);G([te(),oe(()=>Yo),Y("design:type",typeof IPag>"u"?Object:IPag)],w.prototype,"pag",void 0);G([_e(),te(),oe(()=>$o),Y("design:type",typeof IInfIntermed>"u"?Object:IInfIntermed)],w.prototype,"infIntermed",void 0);G([_e(),te(),oe(()=>ht),Y("design:type",typeof IInfAdic>"u"?Object:IInfAdic)],w.prototype,"infAdic",void 0);G([_e(),te(),oe(()=>ao),Y("design:type",typeof IExporta>"u"?Object:IExporta)],w.prototype,"exporta",void 0);G([_e(),te(),oe(()=>so),Y("design:type",typeof ICompra>"u"?Object:ICompra)],w.prototype,"compra",void 0);G([_e(),te(),oe(()=>De),Y("design:type",typeof ICana>"u"?Object:ICana)],w.prototype,"cana",void 0);G([_e(),te(),oe(()=>We),Y("design:type",typeof IInfRespTec>"u"?Object:IInfRespTec)],w.prototype,"infRespTec",void 0);G([_e(),te(),oe(()=>bi),Y("design:type",typeof ISolicNFF>"u"?Object:ISolicNFF)],w.prototype,"infSolicNFF",void 0);import{Type as $s}from"class-transformer";function Ar(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Ar,"_ts_decorate");function Dr(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Dr,"_ts_metadata");var cn=class{static{s(this,"NFeAttributes")}xmlns};Ar([gc(),yc(),Dr("design:type",String)],cn.prototype,"xmlns",void 0);var ti=class{static{s(this,"NFe")}$;infNFe;Signature};Ar([qs(),Bs(),$s(()=>cn),Us(),Dr("design:type",typeof INFeAttributes>"u"?Object:INFeAttributes)],ti.prototype,"$",void 0);Ar([qs(),Bs(),$s(()=>w),Us(),Dr("design:type",typeof IInfNFe>"u"?Object:IInfNFe)],ti.prototype,"infNFe",void 0);Ar([mc(),Dr("design:type",typeof Signature>"u"?Object:Signature)],ti.prototype,"Signature",void 0);function rt(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(rt,"_ts_decorate");function R(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(R,"_ts_metadata");var we=class{static{s(this,"NfeDetXmlBuilder")}listener;data={};static create(e){return new this(e)}constructor(e){this.listener=e}det(e){return this.data.$=e,this}prod(e){return this.data.prod=e,this.listener?.prod(e),this}imposto(e){return this.data.imposto=e,this}icms(e){return this.data.imposto??={},this.data.imposto.ICMS=e,this.listener?.icms(e),this}issqn(e){return this.data.imposto??={},this.data.imposto.ISSQN=e,this}ii(e){return this.data.imposto??={},this.data.imposto.II=e,this}ipi(e){return this.data.imposto??={},this.data.imposto.IPI=e,this}pis(e){return this.data.imposto??={},this.data.imposto.PIS=e,this}pisst(e){return this.data.imposto??={},this.data.imposto.PISST=e,this}cofins(e){return this.data.imposto??={},this.data.imposto.COFINS=e,this}cofinsst(e){return this.data.imposto??={},this.data.imposto.COFINSST=e,this}icmsufdest(e){return this.data.imposto??={},this.data.imposto.ICMSUFDest=e,this}assemble(){return this.data.imposto&&this.imposto(this.data.imposto),this.data}};rt([S(pn),R("design:type",Function),R("design:paramtypes",[typeof IDetAttributes>"u"?Object:IDetAttributes]),R("design:returntype",void 0)],we.prototype,"det",null);rt([S(h),R("design:type",Function),R("design:paramtypes",[typeof IProd>"u"?Object:IProd]),R("design:returntype",void 0)],we.prototype,"prod",null);rt([S(le),R("design:type",Function),R("design:paramtypes",[typeof IImposto>"u"?Object:IImposto]),R("design:returntype",void 0)],we.prototype,"imposto",null);rt([S(V),R("design:type",Function),R("design:paramtypes",[typeof IICMS>"u"?Object:IICMS]),R("design:returntype",void 0)],we.prototype,"icms",null);rt([S(nt),R("design:type",Function),R("design:paramtypes",[typeof IISSQN>"u"?Object:IISSQN]),R("design:returntype",void 0)],we.prototype,"issqn",null);rt([S(Jt),R("design:type",Function),R("design:paramtypes",[typeof III>"u"?Object:III]),R("design:returntype",void 0)],we.prototype,"ii",null);rt([S(it),R("design:type",Function),R("design:paramtypes",[typeof IIPI>"u"?Object:IIPI]),R("design:returntype",void 0)],we.prototype,"ipi",null);rt([S(Ht),R("design:type",Function),R("design:paramtypes",[typeof IPIS>"u"?Object:IPIS]),R("design:returntype",void 0)],we.prototype,"pis",null);rt([S(Rt),R("design:type",Function),R("design:paramtypes",[typeof IPISST>"u"?Object:IPISST]),R("design:returntype",void 0)],we.prototype,"pisst",null);rt([S(Gt),R("design:type",Function),R("design:paramtypes",[typeof ICOFINS>"u"?Object:ICOFINS]),R("design:returntype",void 0)],we.prototype,"cofins",null);rt([S(zt),R("design:type",Function),R("design:paramtypes",[typeof ICOFINSST>"u"?Object:ICOFINSST]),R("design:returntype",void 0)],we.prototype,"cofinsst",null);rt([S(Te),R("design:type",Function),R("design:paramtypes",[typeof IICMSUFDest>"u"?Object:IICMSUFDest]),R("design:returntype",void 0)],we.prototype,"icmsufdest",null);function re(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(re,"_ts_decorate");function m(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(m,"_ts_metadata");var M=class{static{s(this,"NfeXmlBuilder")}builder;contingency;data={$:{xmlns:"http://www.portalfiscal.inf.br/nfe"},infNFe:{total:{ICMSTot:{}}}};$data=void 0;get entity(){return ti}root="NFe";$det=new _n(this);$total=new Ln(this);nfeDetXmlBuilder=we.create(this.$det);static create(e,o){return new this(e,o)}constructor(e,o){this.builder=e,this.contingency=o}infNFe(e){return this.data.infNFe.$=e,this}ide(e){return this.data.infNFe.ide=e,this}emit(e){return this.data.infNFe.emit=e,this}avulsa(e){return this.data.infNFe.avulsa=e,this}dest(e){return this.data.infNFe.dest=e,this}retirada(e){return this.data.infNFe.retirada=e,this}entrega(e){return this.data.infNFe.entrega=e,this}autXML(e){return this.data.infNFe.autXML??=[],this.data.infNFe.autXML.push(e),this}det(e,o){return this.data.infNFe.det=e.map((n,r)=>{let t=o(this.nfeDetXmlBuilder.det({nItem:(r+1).toString()}),n);return this.collect(t),t.assemble()}),this}total(e){return this.data.infNFe.total=e,this}increment(e){let o=e(this.data.infNFe.total);return this.data.infNFe.total={...this.data.infNFe.total,ICMSTot:{...this.data.infNFe.total.ICMSTot,...o.ICMSTot},ISSQNtot:o.ISSQNtot?{...this.data.infNFe.total.ISSQNtot,...o.ISSQNtot}:void 0},this}transp(e){return this.data.infNFe.transp=e,this}cobr(e){return this.data.infNFe.cobr=e,this}pag(e){return this.data.infNFe.pag=e,this}infIntermed(e){return this.data.infNFe.infIntermed=e,this}infAdic(e){return this.data.infNFe.infAdic=e,this}exporta(e){return this.data.infNFe.exporta=e,this}compra(e){return this.data.infNFe.compra=e,this}cana(e){return this.data.infNFe.cana=e,this}infRespTec(e){return this.data.infNFe.infRespTec=e,this}infSolicNFF(e){return this.data.infNFe.infSolicNFF=e,this}quiet(){return Reflect.deleteMetadata(jt,this),this}toObject(){if(this.$data!==void 0)return A(this.$data);let e=this.errors();return e?ye(new me(e.join(", "))):(this.$total?.aggregate(),this.assertHomologValidations(),this.assertContingencyModes(),this.fillAccessKeyIfEmpty(),this.$data=Va(this.data,this.entity,{clearEmptyValues:!0}),A(this.$data))}async assemble(){let e=this.toObject();return e.isLeft()?e:A(await this.builder.build(e.value,{rootName:this.root}))}assertHomologValidations(){return this.data.infNFe.ide.tpAmb!==v.Homolog?!1:(this.data.infNFe.dest&&(this.data.infNFe.dest.xNome="NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"),!0)}assertContingencyModes(){if(this.contingency===void 0)return this.automaticallyInferContingencyMode();this.data.infNFe.ide.dhCont??=this.contingency.dhCont,this.data.infNFe.ide.xJust??=this.contingency.xJust;let{cUF:e,tpEmis:o}=this.data.infNFe.ide;if(o!==$e.Normal)return;switch(er[e]){case"SVCAN":return this.data.infNFe.ide.tpEmis=$e.SVCAN,void 0;case"SVCRS":return this.data.infNFe.ide.tpEmis=$e.SVCRS,void 0}}automaticallyInferContingencyMode(){let{xJust:e,dhCont:o,tpEmis:n}=this.data.infNFe.ide;if(!(!e&&!o&&n===$e.Normal))return this.contingency={xJust:e??"SEFAZ fora do Ar",dhCont:o??new Date().toISOString()},this.assertContingencyModes()}errors(){return Reflect.getMetadata(jt,this)}collect(e){let o=Reflect.getMetadata(jt,e);if(!o)return;let n=this.errors();Reflect.defineMetadata(jt,(n??[]).concat(o),this)}fillAccessKeyIfEmpty(){if(this.data.infNFe.$.Id)return;let e=new Tn().compile({cUF:this.data.infNFe.ide.cUF,year:this.data.infNFe.ide.dhEmi.substring(2,4),month:this.data.infNFe.ide.dhEmi.substring(5,7),identification:this.data.infNFe.emit.CPF??this.data.infNFe.emit.CNPJ,mod:this.data.infNFe.ide.mod,serie:this.data.infNFe.ide.serie,nNF:this.data.infNFe.ide.nNF,tpEmis:this.data.infNFe.ide.tpEmis,cNF:this.data.infNFe.ide.cNF});this.data.infNFe.ide.cDV=e.slice(-1),this.data.infNFe.$={Id:`${this.root}${e}`,versao:this.data.infNFe.$.versao}}};re([S(Fi),m("design:type",Function),m("design:paramtypes",[typeof IInfNFeAttributes>"u"?Object:IInfNFeAttributes]),m("design:returntype",void 0)],M.prototype,"infNFe",null);re([S(z),m("design:type",Function),m("design:paramtypes",[typeof IIde>"u"?Object:IIde]),m("design:returntype",void 0)],M.prototype,"ide",null);re([S(pe),m("design:type",Function),m("design:paramtypes",[typeof IEmit>"u"?Object:IEmit]),m("design:returntype",void 0)],M.prototype,"emit",null);re([S(Ie),m("design:type",Function),m("design:paramtypes",[typeof IAvulsa>"u"?Object:IAvulsa]),m("design:returntype",void 0)],M.prototype,"avulsa",null);re([S(ce),m("design:type",Function),m("design:paramtypes",[typeof IDest>"u"?Object:IDest]),m("design:returntype",void 0)],M.prototype,"dest",null);re([S(j),m("design:type",Function),m("design:paramtypes",[typeof ILocal>"u"?Object:ILocal]),m("design:returntype",void 0)],M.prototype,"retirada",null);re([S(j),m("design:type",Function),m("design:paramtypes",[typeof ILocal>"u"?Object:ILocal]),m("design:returntype",void 0)],M.prototype,"entrega",null);re([S(_t),m("design:type",Function),m("design:paramtypes",[typeof IAutXML>"u"?Object:IAutXML]),m("design:returntype",void 0)],M.prototype,"autXML",null);re([S(po),m("design:type",Function),m("design:paramtypes",[typeof ITotal>"u"?Object:ITotal]),m("design:returntype",void 0)],M.prototype,"total",null);re([S(Ae),m("design:type",Function),m("design:paramtypes",[typeof ITransp>"u"?Object:ITransp]),m("design:returntype",void 0)],M.prototype,"transp",null);re([S(Go),m("design:type",Function),m("design:paramtypes",[typeof ICobr>"u"?Object:ICobr]),m("design:returntype",void 0)],M.prototype,"cobr",null);re([S(Yo),m("design:type",Function),m("design:paramtypes",[typeof IPag>"u"?Object:IPag]),m("design:returntype",void 0)],M.prototype,"pag",null);re([S($o),m("design:type",Function),m("design:paramtypes",[typeof IInfIntermed>"u"?Object:IInfIntermed]),m("design:returntype",void 0)],M.prototype,"infIntermed",null);re([S(ht),m("design:type",Function),m("design:paramtypes",[typeof IInfAdic>"u"?Object:IInfAdic]),m("design:returntype",void 0)],M.prototype,"infAdic",null);re([S(ao),m("design:type",Function),m("design:paramtypes",[typeof IExporta>"u"?Object:IExporta]),m("design:returntype",void 0)],M.prototype,"exporta",null);re([S(so),m("design:type",Function),m("design:paramtypes",[typeof ICompra>"u"?Object:ICompra]),m("design:returntype",void 0)],M.prototype,"compra",null);re([S(De),m("design:type",Function),m("design:paramtypes",[typeof ICana>"u"?Object:ICana]),m("design:returntype",void 0)],M.prototype,"cana",null);re([S(We),m("design:type",Function),m("design:paramtypes",[typeof IInfRespTec>"u"?Object:IInfRespTec]),m("design:returntype",void 0)],M.prototype,"infRespTec",null);re([S(bi),m("design:type",Function),m("design:paramtypes",[typeof ISolicNFF>"u"?Object:ISolicNFF]),m("design:returntype",void 0)],M.prototype,"infSolicNFF",null);var jr=class extends Ri{static{s(this,"NfeXmlBuilderPipeline")}certificate;schema;builder=M.create(this.toolkit);constructor(e,o="PL_009_V4"){super(e),this.certificate=e,this.schema=o}build(e){return e(this.builder),this}toObject(){return this.builder.toObject()}async assemble(){let e=await this.builder.assemble();return e.isLeft()?e:this.assertXmlSignedAndValidated(e.value)}get nfeXsdSchema(){return Sc.resolve(Mn(),this.schema,"nfe_v4.00.xsd")}async assertXmlSignedAndValidated(e){if(!this.certificate)return A(e);let o=await this.certificates.read(this.certificate);if(o.isLeft())return o;let n=await this.xmlSigner.sign(e,{tag:"infNFe",mark:"Id"},o.value);if(n.isLeft())return n;let r=await this.toolkit.validate(n.value,this.nfeXsdSchema);return r.isLeft()?r:A(n.value)}};import{Type as Aa}from"class-transformer";import{Allow as Nc,IsNotEmptyObject as Ys,IsObject as Xs,ValidateNested as Zs}from"class-validator";import{IsString as Gs}from"class-validator";function Js(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(Js,"_ts_decorate");function Hs(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Hs,"_ts_metadata");var fn=class{static{s(this,"InfNFeSupl")}qrCode;urlChave};Js([Gs(),Hs("design:type",String)],fn.prototype,"qrCode",void 0);Js([Gs(),Hs("design:type",String)],fn.prototype,"urlChave",void 0);function wr(i,e,o,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var p=i.length-1;p>=0;p--)(a=i[p])&&(t=(r<3?a(t):r>3?a(e,o,t):a(e,o))||t);return r>3&&t&&Object.defineProperty(e,o,t),t}s(wr,"_ts_decorate");function Er(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}s(Er,"_ts_metadata");var Lo=class{static{s(this,"NFCe")}$;infNFe;infNFeSupl;Signature};wr([Xs(),Ys(),Aa(()=>cn),Zs(),Er("design:type",typeof INFeAttributes>"u"?Object:INFeAttributes)],Lo.prototype,"$",void 0);wr([Xs(),Ys(),Aa(()=>w),Zs(),Er("design:type",typeof IInfNFe>"u"?Object:IInfNFe)],Lo.prototype,"infNFe",void 0);wr([Aa(()=>fn),Er("design:type",typeof IInfNFeSupl>"u"?Object:IInfNFeSupl)],Lo.prototype,"infNFeSupl",void 0);wr([Nc(),Er("design:type",typeof Signature>"u"?Object:Signature)],Lo.prototype,"Signature",void 0);var Vr=class extends M{static{s(this,"NfceXmlBuilder")}data={$:{xmlns:"http://www.portalfiscal.inf.br/nfe"},infNFe:{total:{ICMSTot:{}}},infNFeSupl:{}};get entity(){return Lo}static create(e,o){return new this(e,o)}assertHomologValidations(){return super.assertHomologValidations()?(this.data.infNFe.det[0].prod.xProd="NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL",!0):!1}assertContingencyModes(){if(this.contingency===void 0)return this.automaticallyInferContingencyMode();this.data.infNFe.ide.dhCont??=this.contingency.dhCont,this.data.infNFe.ide.xJust??=this.contingency.xJust;let{tpEmis:e}=this.data.infNFe.ide;if(e===$e.Normal)return this.data.infNFe.ide.tpEmis=$e.OFFLINE,void 0}};var Ks=class extends jr{static{s(this,"NfceXmlBuilderPipeline")}builder=Vr.create(this.toolkit)};export{$e as a,qo as b,Mn as c,Tn as d,_n as e,Ln as f,Je as g,or as h,ni as i,Pi as j,is as k,rr as l,ns as m,rs as n,ss as o,Gr as p,ti as q,we as r,M as s,jr as t,Lo as u,Vr as v,Ks as w};
|