@cristian.aragao/milharis-core 1.30.64 → 1.30.67
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/index.cjs.js +1 -1
- package/dist/index.d.mts +52 -37
- package/dist/index.d.ts +52 -37
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1363,6 +1363,10 @@ type TypeUser = TypeMetaData & {
|
|
|
1363
1363
|
* @description Preferências do usuário em algumas páginas
|
|
1364
1364
|
*/
|
|
1365
1365
|
preferences: {
|
|
1366
|
+
/**
|
|
1367
|
+
* @description Indica se o usuário quer ver o tema dark.
|
|
1368
|
+
*/
|
|
1369
|
+
darkMode: boolean;
|
|
1366
1370
|
/**
|
|
1367
1371
|
* @description Indica se o usuário quer ver o PDF no layout legado
|
|
1368
1372
|
*/
|
|
@@ -1373,15 +1377,23 @@ type TypeUser = TypeMetaData & {
|
|
|
1373
1377
|
*/
|
|
1374
1378
|
permissoes: {
|
|
1375
1379
|
/**
|
|
1376
|
-
* @description
|
|
1380
|
+
* @description Para usuários sub-administradores (site).
|
|
1381
|
+
* Indica se o usuário pode descarregar para a associação.
|
|
1382
|
+
*/
|
|
1383
|
+
podeEnviarParaAssociacao: boolean;
|
|
1384
|
+
/**
|
|
1385
|
+
* @description Para usuários cambistas.
|
|
1386
|
+
* Indica se o usuário pode cancelar apostas pelo app.
|
|
1377
1387
|
*/
|
|
1378
1388
|
podeCancelarPule: boolean;
|
|
1379
1389
|
/**
|
|
1380
|
-
* @description
|
|
1390
|
+
* @description Para usuários cambistas.
|
|
1391
|
+
* Indica se o usuário pode reservar apostas pelo app.
|
|
1381
1392
|
*/
|
|
1382
1393
|
podeReservar: boolean;
|
|
1383
1394
|
/**
|
|
1384
|
-
* @description
|
|
1395
|
+
* @description Para usuários cambistas.
|
|
1396
|
+
* Indica se o usuário pode jogar números surpresinha
|
|
1385
1397
|
*/
|
|
1386
1398
|
podeJogarSurpresinha: boolean;
|
|
1387
1399
|
};
|
|
@@ -2609,39 +2621,6 @@ type TypeCartDescargasProps = {
|
|
|
2609
2621
|
filtros?: TypeCartListProps;
|
|
2610
2622
|
};
|
|
2611
2623
|
|
|
2612
|
-
type TypeLimiteNumeroAposta = TypeMetaData & {
|
|
2613
|
-
/**
|
|
2614
|
-
* @description Id aleatório gerado para o documento
|
|
2615
|
-
* @example "62e77f29-ba2b-a6a0-af4b-cfd1aab7d546"
|
|
2616
|
-
*/
|
|
2617
|
-
id: string;
|
|
2618
|
-
/**
|
|
2619
|
-
* @description Id incremental por banca
|
|
2620
|
-
* @example "1"
|
|
2621
|
-
* @example "2"
|
|
2622
|
-
*/
|
|
2623
|
-
id_integer: string;
|
|
2624
|
-
/**
|
|
2625
|
-
* @description Limite do valor de aposta para digitador
|
|
2626
|
-
* @example 100 (100 reais)
|
|
2627
|
-
*/
|
|
2628
|
-
limite: number;
|
|
2629
|
-
/**
|
|
2630
|
-
* @description Tipo de jogo que o limite de número de apostas pertence
|
|
2631
|
-
* @example "all" (todos os jogos)
|
|
2632
|
-
* @example "milhar"
|
|
2633
|
-
* @example "centena"
|
|
2634
|
-
* @example "dezena"
|
|
2635
|
-
* @example "grupo"
|
|
2636
|
-
*/
|
|
2637
|
-
tipo_jogo: "all" | keyof typeof GAMES;
|
|
2638
|
-
/**
|
|
2639
|
-
* @description ID da banca que o limite de número de apostas pertence
|
|
2640
|
-
* @example "5454-43sd-43s-345-345"
|
|
2641
|
-
*/
|
|
2642
|
-
bancaId: string;
|
|
2643
|
-
};
|
|
2644
|
-
|
|
2645
2624
|
/**
|
|
2646
2625
|
* @description Objeto que contem todas as coleções do banco de dados, com seus respectivos modelos.
|
|
2647
2626
|
* Serve para facilitar para facilitar a criação de novos documentos no banco de dados e para facilitar a leitura do código.
|
|
@@ -3064,6 +3043,42 @@ type TypeGuiasItems = {
|
|
|
3064
3043
|
[id: TypeGuiaItem["id"]]: TypeGuiaItem;
|
|
3065
3044
|
};
|
|
3066
3045
|
|
|
3046
|
+
type TypeLimiteNumeroAposta = TypeMetaData & {
|
|
3047
|
+
/**
|
|
3048
|
+
* @description Id aleatório gerado para o documento
|
|
3049
|
+
* @example "62e77f29-ba2b-a6a0-af4b-cfd1aab7d546"
|
|
3050
|
+
*/
|
|
3051
|
+
id: string;
|
|
3052
|
+
/**
|
|
3053
|
+
* @description Id incremental por banca
|
|
3054
|
+
* @example "1"
|
|
3055
|
+
* @example "2"
|
|
3056
|
+
*/
|
|
3057
|
+
id_integer: string;
|
|
3058
|
+
/**
|
|
3059
|
+
* @description Limite do valor de aposta para digitador
|
|
3060
|
+
* @example 100 (100 reais)
|
|
3061
|
+
*/
|
|
3062
|
+
limite: number;
|
|
3063
|
+
/**
|
|
3064
|
+
* @description Tipo de jogo que o limite de número de apostas pertence
|
|
3065
|
+
* @example "all" (todos os jogos)
|
|
3066
|
+
* @example "milhar"
|
|
3067
|
+
* @example "centena"
|
|
3068
|
+
* @example "dezena"
|
|
3069
|
+
* @example "grupo"
|
|
3070
|
+
*/
|
|
3071
|
+
tipo_jogo: "all" | keyof typeof GAMES;
|
|
3072
|
+
/**
|
|
3073
|
+
* @description ID da banca que o limite de número de apostas pertence
|
|
3074
|
+
* @example "5454-43sd-43s-345-345"
|
|
3075
|
+
*/
|
|
3076
|
+
bancaId: string;
|
|
3077
|
+
};
|
|
3078
|
+
type TypeLimitesNumerosApostas = {
|
|
3079
|
+
[id: string]: TypeLimiteNumeroAposta;
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3067
3082
|
declare const GameModel: (obj?: Partial<TypeGame>) => TypeGame;
|
|
3068
3083
|
|
|
3069
3084
|
declare const NumberModel: (obj?: Partial<TypeNumero>) => TypeNumero;
|
|
@@ -4321,4 +4336,4 @@ declare const functionsCore: {
|
|
|
4321
4336
|
envio: typeof envio;
|
|
4322
4337
|
};
|
|
4323
4338
|
|
|
4324
|
-
export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, GuiaItemModel, GuiaModel, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, LimiteNumeroApostaModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_GUIA, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeEnviosExtracao, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeGuia, type TypeGuiaItem, type TypeGuias, type TypeGuiasItems, type TypeJogoComComissao, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, agruparEnvioPorExtracao, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, collectionsRetentionDays, collectionsToAudit, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, criarEstruturaJogo, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getComissoesDoEnvio, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getProximaExtracaoDisponivelParaAposta, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
|
|
4339
|
+
export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, GuiaItemModel, GuiaModel, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, LimiteNumeroApostaModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_GUIA, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeEnviosExtracao, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeGuia, type TypeGuiaItem, type TypeGuias, type TypeGuiasItems, type TypeJogoComComissao, type TypeLimitGame, type TypeLimitGames, type TypeLimiteNumeroAposta, type TypeLimitesNumerosApostas, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, agruparEnvioPorExtracao, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, collectionsRetentionDays, collectionsToAudit, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, criarEstruturaJogo, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getComissoesDoEnvio, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getProximaExtracaoDisponivelParaAposta, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
|
package/dist/index.d.ts
CHANGED
|
@@ -1363,6 +1363,10 @@ type TypeUser = TypeMetaData & {
|
|
|
1363
1363
|
* @description Preferências do usuário em algumas páginas
|
|
1364
1364
|
*/
|
|
1365
1365
|
preferences: {
|
|
1366
|
+
/**
|
|
1367
|
+
* @description Indica se o usuário quer ver o tema dark.
|
|
1368
|
+
*/
|
|
1369
|
+
darkMode: boolean;
|
|
1366
1370
|
/**
|
|
1367
1371
|
* @description Indica se o usuário quer ver o PDF no layout legado
|
|
1368
1372
|
*/
|
|
@@ -1373,15 +1377,23 @@ type TypeUser = TypeMetaData & {
|
|
|
1373
1377
|
*/
|
|
1374
1378
|
permissoes: {
|
|
1375
1379
|
/**
|
|
1376
|
-
* @description
|
|
1380
|
+
* @description Para usuários sub-administradores (site).
|
|
1381
|
+
* Indica se o usuário pode descarregar para a associação.
|
|
1382
|
+
*/
|
|
1383
|
+
podeEnviarParaAssociacao: boolean;
|
|
1384
|
+
/**
|
|
1385
|
+
* @description Para usuários cambistas.
|
|
1386
|
+
* Indica se o usuário pode cancelar apostas pelo app.
|
|
1377
1387
|
*/
|
|
1378
1388
|
podeCancelarPule: boolean;
|
|
1379
1389
|
/**
|
|
1380
|
-
* @description
|
|
1390
|
+
* @description Para usuários cambistas.
|
|
1391
|
+
* Indica se o usuário pode reservar apostas pelo app.
|
|
1381
1392
|
*/
|
|
1382
1393
|
podeReservar: boolean;
|
|
1383
1394
|
/**
|
|
1384
|
-
* @description
|
|
1395
|
+
* @description Para usuários cambistas.
|
|
1396
|
+
* Indica se o usuário pode jogar números surpresinha
|
|
1385
1397
|
*/
|
|
1386
1398
|
podeJogarSurpresinha: boolean;
|
|
1387
1399
|
};
|
|
@@ -2609,39 +2621,6 @@ type TypeCartDescargasProps = {
|
|
|
2609
2621
|
filtros?: TypeCartListProps;
|
|
2610
2622
|
};
|
|
2611
2623
|
|
|
2612
|
-
type TypeLimiteNumeroAposta = TypeMetaData & {
|
|
2613
|
-
/**
|
|
2614
|
-
* @description Id aleatório gerado para o documento
|
|
2615
|
-
* @example "62e77f29-ba2b-a6a0-af4b-cfd1aab7d546"
|
|
2616
|
-
*/
|
|
2617
|
-
id: string;
|
|
2618
|
-
/**
|
|
2619
|
-
* @description Id incremental por banca
|
|
2620
|
-
* @example "1"
|
|
2621
|
-
* @example "2"
|
|
2622
|
-
*/
|
|
2623
|
-
id_integer: string;
|
|
2624
|
-
/**
|
|
2625
|
-
* @description Limite do valor de aposta para digitador
|
|
2626
|
-
* @example 100 (100 reais)
|
|
2627
|
-
*/
|
|
2628
|
-
limite: number;
|
|
2629
|
-
/**
|
|
2630
|
-
* @description Tipo de jogo que o limite de número de apostas pertence
|
|
2631
|
-
* @example "all" (todos os jogos)
|
|
2632
|
-
* @example "milhar"
|
|
2633
|
-
* @example "centena"
|
|
2634
|
-
* @example "dezena"
|
|
2635
|
-
* @example "grupo"
|
|
2636
|
-
*/
|
|
2637
|
-
tipo_jogo: "all" | keyof typeof GAMES;
|
|
2638
|
-
/**
|
|
2639
|
-
* @description ID da banca que o limite de número de apostas pertence
|
|
2640
|
-
* @example "5454-43sd-43s-345-345"
|
|
2641
|
-
*/
|
|
2642
|
-
bancaId: string;
|
|
2643
|
-
};
|
|
2644
|
-
|
|
2645
2624
|
/**
|
|
2646
2625
|
* @description Objeto que contem todas as coleções do banco de dados, com seus respectivos modelos.
|
|
2647
2626
|
* Serve para facilitar para facilitar a criação de novos documentos no banco de dados e para facilitar a leitura do código.
|
|
@@ -3064,6 +3043,42 @@ type TypeGuiasItems = {
|
|
|
3064
3043
|
[id: TypeGuiaItem["id"]]: TypeGuiaItem;
|
|
3065
3044
|
};
|
|
3066
3045
|
|
|
3046
|
+
type TypeLimiteNumeroAposta = TypeMetaData & {
|
|
3047
|
+
/**
|
|
3048
|
+
* @description Id aleatório gerado para o documento
|
|
3049
|
+
* @example "62e77f29-ba2b-a6a0-af4b-cfd1aab7d546"
|
|
3050
|
+
*/
|
|
3051
|
+
id: string;
|
|
3052
|
+
/**
|
|
3053
|
+
* @description Id incremental por banca
|
|
3054
|
+
* @example "1"
|
|
3055
|
+
* @example "2"
|
|
3056
|
+
*/
|
|
3057
|
+
id_integer: string;
|
|
3058
|
+
/**
|
|
3059
|
+
* @description Limite do valor de aposta para digitador
|
|
3060
|
+
* @example 100 (100 reais)
|
|
3061
|
+
*/
|
|
3062
|
+
limite: number;
|
|
3063
|
+
/**
|
|
3064
|
+
* @description Tipo de jogo que o limite de número de apostas pertence
|
|
3065
|
+
* @example "all" (todos os jogos)
|
|
3066
|
+
* @example "milhar"
|
|
3067
|
+
* @example "centena"
|
|
3068
|
+
* @example "dezena"
|
|
3069
|
+
* @example "grupo"
|
|
3070
|
+
*/
|
|
3071
|
+
tipo_jogo: "all" | keyof typeof GAMES;
|
|
3072
|
+
/**
|
|
3073
|
+
* @description ID da banca que o limite de número de apostas pertence
|
|
3074
|
+
* @example "5454-43sd-43s-345-345"
|
|
3075
|
+
*/
|
|
3076
|
+
bancaId: string;
|
|
3077
|
+
};
|
|
3078
|
+
type TypeLimitesNumerosApostas = {
|
|
3079
|
+
[id: string]: TypeLimiteNumeroAposta;
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3067
3082
|
declare const GameModel: (obj?: Partial<TypeGame>) => TypeGame;
|
|
3068
3083
|
|
|
3069
3084
|
declare const NumberModel: (obj?: Partial<TypeNumero>) => TypeNumero;
|
|
@@ -4321,4 +4336,4 @@ declare const functionsCore: {
|
|
|
4321
4336
|
envio: typeof envio;
|
|
4322
4337
|
};
|
|
4323
4338
|
|
|
4324
|
-
export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, GuiaItemModel, GuiaModel, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, LimiteNumeroApostaModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_GUIA, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeEnviosExtracao, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeGuia, type TypeGuiaItem, type TypeGuias, type TypeGuiasItems, type TypeJogoComComissao, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, agruparEnvioPorExtracao, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, collectionsRetentionDays, collectionsToAudit, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, criarEstruturaJogo, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getComissoesDoEnvio, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getProximaExtracaoDisponivelParaAposta, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
|
|
4339
|
+
export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, GuiaItemModel, GuiaModel, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, LimiteNumeroApostaModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_GUIA, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeEnviosExtracao, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeGuia, type TypeGuiaItem, type TypeGuias, type TypeGuiasItems, type TypeJogoComComissao, type TypeLimitGame, type TypeLimitGames, type TypeLimiteNumeroAposta, type TypeLimitesNumerosApostas, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, agruparEnvioPorExtracao, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, collectionsRetentionDays, collectionsToAudit, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, criarEstruturaJogo, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getComissoesDoEnvio, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getProximaExtracaoDisponivelParaAposta, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var or=Object.defineProperty;var U=(e,o)=>{for(var r in o)or(e,r,{get:o[r],enumerable:!0})};var rr=[13,16,19];var f={milhar:{id:"milhar",label:"Milhar",sigla:"M",format:"####",formatDigitar:"####",markAll:!1,max:0,order:1,showPerLine:6},centena:{id:"centena",label:"Centena",sigla:"C",format:"###",formatDigitar:"###",markAll:!1,max:0,order:2,showPerLine:7},dezena:{id:"dezena",label:"Dezena",sigla:"D",format:"##",formatDigitar:"##",markAll:!1,max:0,order:3,showPerLine:0},grupo:{id:"grupo",label:"Grupo",sigla:"G",max:25,format:"##",formatDigitar:"##",markAll:!1,order:4,showPerLine:0},"terno.dezena":{id:"terno.dezena",label:"Terno de Dezena",sigla:"TD",format:"##-##-##",formatDigitar:"######",markAll:!0,max:0,order:5,showPerLine:3},"terno.grupo":{id:"terno.grupo",label:"Terno de Grupo",sigla:"TG",max:25,format:"##-##-##",formatDigitar:"######",markAll:!0,order:6,showPerLine:3},"duque.dezena":{id:"duque.dezena",label:"Duque de Dezena",sigla:"DD",format:"##-##",formatDigitar:"####",markAll:!0,max:0,order:7,showPerLine:5},"duque.grupo":{id:"duque.grupo",label:"Duque de Grupo",sigla:"DG",max:25,format:"##-##",formatDigitar:"####",markAll:!0,order:8,showPerLine:5},"milhar.invertida":{id:"milhar.invertida",label:"Milhar Invertida",sigla:"MI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena.invertida":{id:"centena.invertida",label:"Centena Invertida",sigla:"CI",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7},"milhar@centena":{id:"milhar@centena",label:"Milhar Centena",sigla:"MC",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar.invertida@centena.invertida":{id:"milhar.invertida@centena.invertida",label:"Milhar e Centena Invertidas",sigla:"MCI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@dezena":{id:"milhar@dezena",label:"Milhar e Dezena",sigla:"MD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@centena@dezena":{id:"milhar@centena@dezena",label:"Milhar, Centena e Dezena",sigla:"MCD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena@dezena":{id:"centena@dezena",label:"Centena Dezena",sigla:"CD",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7}};var i={"01":"Avestruz","02":"\xC1guia","03":"Burro","04":"Borboleta","05":"Cachorro","06":"Cabra","07":"Carneiro","08":"Camelo","09":"Cobra",10:"Coelho",11:"Cavalo",12:"Elefante",13:"Galo",14:"Gato",15:"Jacar\xE9",16:"Le\xE3o",17:"Macaco",18:"Porco",19:"Pav\xE3o",20:"Peru",21:"Touro",22:"Tigre",23:"Urso",24:"Veado",25:"Vaca"},tr={"01":{grupo:"01",bicho:i["01"]},"02":{grupo:"01",bicho:i["01"]},"03":{grupo:"01",bicho:i["01"]},"04":{grupo:"01",bicho:i["01"]},"05":{grupo:"02",bicho:i["02"]},"06":{grupo:"02",bicho:i["02"]},"07":{grupo:"02",bicho:i["02"]},"08":{grupo:"02",bicho:i["02"]},"09":{grupo:"03",bicho:i["03"]},10:{grupo:"03",bicho:i["03"]},11:{grupo:"03",bicho:i["03"]},12:{grupo:"03",bicho:i["03"]},13:{grupo:"04",bicho:i["04"]},14:{grupo:"04",bicho:i["04"]},15:{grupo:"04",bicho:i["04"]},16:{grupo:"04",bicho:i["04"]},17:{grupo:"05",bicho:i["05"]},18:{grupo:"05",bicho:i["05"]},19:{grupo:"05",bicho:i["05"]},20:{grupo:"05",bicho:i["05"]},21:{grupo:"06",bicho:i["06"]},22:{grupo:"06",bicho:i["06"]},23:{grupo:"06",bicho:i["06"]},24:{grupo:"06",bicho:i["06"]},25:{grupo:"07",bicho:i["07"]},26:{grupo:"07",bicho:i["07"]},27:{grupo:"07",bicho:i["07"]},28:{grupo:"07",bicho:i["07"]},29:{grupo:"08",bicho:i["08"]},30:{grupo:"08",bicho:i["08"]},31:{grupo:"08",bicho:i["08"]},32:{grupo:"08",bicho:i["08"]},33:{grupo:"09",bicho:i["09"]},34:{grupo:"09",bicho:i["09"]},35:{grupo:"09",bicho:i["09"]},36:{grupo:"09",bicho:i["09"]},37:{grupo:"10",bicho:i[10]},38:{grupo:"10",bicho:i[10]},39:{grupo:"10",bicho:i[10]},40:{grupo:"10",bicho:i[10]},41:{grupo:"11",bicho:i[11]},42:{grupo:"11",bicho:i[11]},43:{grupo:"11",bicho:i[11]},44:{grupo:"11",bicho:i[11]},45:{grupo:"12",bicho:i[12]},46:{grupo:"12",bicho:i[12]},47:{grupo:"12",bicho:i[12]},48:{grupo:"12",bicho:i[12]},49:{grupo:"13",bicho:i[13]},50:{grupo:"13",bicho:i[13]},51:{grupo:"13",bicho:i[13]},52:{grupo:"13",bicho:i[13]},53:{grupo:"14",bicho:i[14]},54:{grupo:"14",bicho:i[14]},55:{grupo:"14",bicho:i[14]},56:{grupo:"14",bicho:i[14]},57:{grupo:"15",bicho:i[15]},58:{grupo:"15",bicho:i[15]},59:{grupo:"15",bicho:i[15]},60:{grupo:"15",bicho:i[15]},61:{grupo:"16",bicho:i[16]},62:{grupo:"16",bicho:i[16]},63:{grupo:"16",bicho:i[16]},64:{grupo:"16",bicho:i[16]},65:{grupo:"17",bicho:i[17]},66:{grupo:"17",bicho:i[17]},67:{grupo:"17",bicho:i[17]},68:{grupo:"17",bicho:i[17]},69:{grupo:"18",bicho:i[18]},70:{grupo:"18",bicho:i[18]},71:{grupo:"18",bicho:i[18]},72:{grupo:"18",bicho:i[18]},73:{grupo:"19",bicho:i[19]},74:{grupo:"19",bicho:i[19]},75:{grupo:"19",bicho:i[19]},76:{grupo:"19",bicho:i[19]},77:{grupo:"20",bicho:i[20]},78:{grupo:"20",bicho:i[20]},79:{grupo:"20",bicho:i[20]},80:{grupo:"20",bicho:i[20]},81:{grupo:"21",bicho:i[21]},82:{grupo:"21",bicho:i[21]},83:{grupo:"21",bicho:i[21]},84:{grupo:"21",bicho:i[21]},85:{grupo:"22",bicho:i[22]},86:{grupo:"22",bicho:i[22]},87:{grupo:"22",bicho:i[22]},88:{grupo:"22",bicho:i[22]},89:{grupo:"23",bicho:i[23]},90:{grupo:"23",bicho:i[23]},91:{grupo:"23",bicho:i[23]},92:{grupo:"23",bicho:i[23]},93:{grupo:"24",bicho:i[24]},94:{grupo:"24",bicho:i[24]},95:{grupo:"24",bicho:i[24]},96:{grupo:"24",bicho:i[24]},97:{grupo:"25",bicho:i[25]},98:{grupo:"25",bicho:i[25]},99:{grupo:"25",bicho:i[25]},"00":{grupo:"25",bicho:i[25]}};var ar={required:"Obrigat\xF3rio.",list_length_zero:"Selecione pelo menos um item.",incorrect_login:"Usu\xE1rio e/ou senha incorretos!",incorrect_password:"Senha incorreta.",email_already_in_use:"Este login j\xE1 est\xE1 sendo usado!",invalid_device:"Este login j\xE1 est\xE1 sendo usado em outro dispositivo!"};var b={super_admin:{id:"super_admin",label:"Super Administrador"},associacao:{id:"associacao",label:"Associa\xE7\xE3o"},admin:{id:"admin",label:"Administrador"},sub_admin:{id:"sub_admin",label:"Sub-administrador"},digitador_adm:{id:"digitador_adm",label:"Digitador Administrador"},digitador:{id:"digitador",label:"Digitador"},cambista_talao:{id:"cambista_talao",label:"Cambista de tal\xE3o"},cambista:{id:"cambista",label:"Cambista"}};var Me={PROCESSANDO:{id:"PROCESSANDO",label:"PROCESSANDO",color:"green",showSite:!1,ordem:0},JOGADA:{id:"JOGADA",label:"PULES JOGADAS",color:"green",showSite:!0,ordem:1},AGUARDANDO_CANCELAMENTO:{id:"AGUARDANDO_CANCELAMENTO",label:"AGUARDANDO CANCELAMENTO",color:"yellow",showSite:!0,ordem:3},CANCELADA:{id:"CANCELADA",label:"CANCELADAS",color:"red",showSite:!0,ordem:4}};var ir={notificacao:{id:"notificacao",label:"Notifica\xE7\xE3o"},impressao:{id:"impressao",label:"Impress\xE3o"}};var sr={agora:{id:"agora",label:"Agora"},jogo_hoje:{id:"jogo_hoje",label:"Jogo Hoje"},jogo_pre_datado:{id:"jogo_pre_datado",label:"Jogo Pr\xE9-Datado"},resultado:{id:"resultado",label:"Resultado"}};var S="vp_";var M="envio_old_";var z="envio_";var Ge={ENVIANDO:{id:"ENVIANDO",labelBanca:"ENVIANDO",labelAssociacao:"RECEBENDO",color:"blue",showSiteBanca:!0,showSiteAssociacao:!1,order:1},DEVOLVENDO:{id:"DEVOLVENDO",labelBanca:"RECEBENDO",labelAssociacao:"DEVOLVENDO",color:"blue",showSiteBanca:!1,showSiteAssociacao:!1,order:1},ENVIADA:{id:"ENVIADA",labelBanca:"ENVIADA",labelAssociacao:"RECEBIDA",color:"green",showSiteBanca:!0,showSiteAssociacao:!0,order:2},DEVOLVIDA:{id:"DEVOLVIDA",labelBanca:"DEVOLVIDA",labelAssociacao:"DEVOLVIDA",color:"orange",showSiteBanca:!0,showSiteAssociacao:!0,order:3},ERRO:{id:"ERRO",labelBanca:"ERRO",labelAssociacao:"ERRO",color:"red",showSiteBanca:!1,showSiteAssociacao:!1,order:4}};var nr={Enter:{label:"Enter",value:"enter"},Ctrl:{label:"Ctrl",value:"ctrl"},Tab:{label:"Tab",value:"tab"},Space:{label:"\u23B5",value:"space"},Backspace:{label:"Backspace",value:"backspace"},Escape:{label:"Esc",value:"escape"},Delete:{label:"Del",value:"delete"},Backslash:{label:"\\",value:"backslash"},Semicolon:{label:";",value:"semicolon"},CapsLock:{label:"CapsLock",value:"capslock"},Quote:{label:"'",value:"quote"},Comma:{label:",",value:"decimal,comma"},Insert:{label:"Insert",value:"insert"},Home:{label:"Home",value:"home"},End:{label:"End",value:"end"},PageUp:{label:"Page Up",value:"pageup"},PageDown:{label:"Page Down",value:"pagedown"},ArrowUp:{label:"\u2191",value:"arrowup"},ArrowDown:{label:"\u2193",value:"arrowdown"},ArrowLeft:{label:"\u2190",value:"arrowleft"},ArrowRight:{label:"\u2192",value:"arrowright"},NumLock:{label:"Num Lock",value:"numlock"},Dot:{label:".",value:"period,comma"},Divide:{label:"/",value:"slash,divide"},Subtract:{label:"-",value:"minus,subtract"},Multiply:{label:"*",value:"multiply,shift+8"},Add:{label:"+",value:"add,shift+equal"},Equal:{id:"Equal",label:"=",value:"equal"},F1:{label:"F1",value:"f1"},F2:{label:"F2",value:"f2"},F3:{label:"F3",value:"f3"},F4:{label:"F4",value:"f4"},F5:{label:"F5",value:"f5"},F6:{label:"F6",value:"f6"},F7:{label:"F7",value:"f7"},F8:{label:"F8",value:"f8"},F9:{label:"F9",value:"f9"},F10:{label:"F10",value:"f10"},F11:{label:"F11",value:"f11"},F12:{label:"F12",value:"f12"},0:{label:"0",value:"0"},1:{label:"1",value:"1"},2:{label:"2",value:"2"},3:{label:"3",value:"3"},4:{label:"4",value:"4"},5:{label:"5",value:"5"},6:{label:"6",value:"6"},7:{label:"7",value:"7"},8:{label:"8",value:"8"},9:{label:"9",value:"9"},A:{label:"A",value:"a"},B:{label:"B",value:"b"},C:{label:"C",value:"c"},D:{label:"D",value:"d"},E:{label:"E",value:"e"},F:{label:"F",value:"f"},G:{label:"G",value:"g"},H:{label:"H",value:"h"},I:{label:"I",value:"i"},J:{label:"J",value:"j"},K:{label:"K",value:"k"},L:{label:"L",value:"l"},M:{label:"M",value:"m"},N:{label:"N",value:"n"},O:{label:"O",value:"o"},P:{label:"P",value:"p"},Q:{label:"Q",value:"q"},R:{label:"R",value:"r"},S:{label:"S",value:"s"},T:{label:"T",value:"t"},U:{label:"U",value:"u"},V:{label:"V",value:"v"},W:{label:"W",value:"w"},X:{label:"X",value:"x"},Y:{label:"Y",value:"y"},Z:{label:"Z",value:"z"}};var cr={EM_ESPERA:{id:"EM_ESPERA",label:"Esperando aprova\xE7\xE3o",color:"orange"},APROVADO:{id:"APROVADO",label:"Aprovado",color:"green"},BLOQUEADO:{id:"BLOQUEADO",label:"Bloqueado",color:"red"}};var N={1:{id:"1",order:1,label:"1\xBA Pr\xEAmio",labelShort:"1\xBA"},2:{id:"2",order:2,label:"2\xBA Pr\xEAmio",labelShort:"2\xBA"},3:{id:"3",order:3,label:"3\xBA Pr\xEAmio",labelShort:"3\xBA"},4:{id:"4",order:4,label:"4\xBA Pr\xEAmio",labelShort:"4\xBA"},5:{id:"5",order:5,label:"5\xBA Pr\xEAmio",labelShort:"5\xBA"},"1-5":{id:"1-5",order:6,label:"1\xBA ao 5\xBA Pr\xEAmio",labelShort:"1\xBA ao 5\xBA"}};var Oe={[f.milhar.id]:{id:f.milhar.id,label:f.milhar.label,order:1},[f.centena.id]:{id:f.centena.id,label:f.centena.label,order:2},[f.dezena.id]:{id:f.dezena.id,label:f.dezena.label,order:3},[f.grupo.id]:{id:f.grupo.id,label:f.grupo.label,order:4},[f["terno.dezena"].id]:{id:f["terno.dezena"].id,label:f["terno.dezena"].label,order:5},[f["terno.grupo"].id]:{id:f["terno.grupo"].id,label:f["terno.grupo"].label,order:6},[f["duque.dezena"].id]:{id:f["duque.dezena"].id,label:f["duque.dezena"].label,order:7},[f["duque.grupo"].id]:{id:f["duque.grupo"].id,label:f["duque.grupo"].label,order:8},restante:{id:"restante",label:"Restante",order:9}};var Y={vendas:{id:"vendas",label:"Vendas",color:"red",showSite:!0,ordem:1},premios:{id:"premios",label:"Pr\xEAmios",color:"red",showSite:!0,ordem:2},revisando:{id:"revisando",label:"Revisando",color:"blue",showSite:!0,ordem:3},concluida:{id:"concluida",label:"Conclu\xEDda",color:"green",showSite:!0,ordem:4}};var y=e=>({id:e?.id||"",id_integer:e?.id_integer||"",role:e?.role||b.super_admin.id,name:e?.name||"Gerado automaticamente pelo sistema",login:e?.login||""});var Le={};U(Le,{clone:()=>I,combineDateTime:()=>uo,dateToNumber:()=>c,delay:()=>_o,dividirArray:()=>Do,formatterBRL:()=>ho,formatterPercentage:()=>bo,formatterPercentageDecimal:()=>No,generateId:()=>J,getAllCombinations:()=>pe,getCodigoAuth:()=>ue,getDataInicioFim:()=>To,getInitials:()=>So,matchNormalized:()=>Eo,normalize:()=>Z,numberToDate:()=>_,numbersSelectedFormated:()=>Ao,parserBRL:()=>xo,parserPercentage:()=>Po,parserPercentageDecimal:()=>Io,pegarHorarioSaoPaulo:()=>m,removerLetters:()=>Ro,showFormatDate:()=>C});import mr from"clone-deep";var I=e=>mr(e);import{isValid as dr}from"date-fns";var c=e=>{if(!e||!dr(e))return 0;let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return+`${o}${r}${t}${a}${n}${s}`};import{parse as pr,isValid as ur}from"date-fns";import lr from"moment-timezone";var m=()=>{let e=lr.tz(new Date,"America/Sao_Paulo").format("DD_MM_YYYY_HH_mm_ss_SSS"),[o,r,t,a,n,s,u]=e.split("_");return new Date(Number(t),Number(r)-1,Number(o),Number(a),Number(n),Number(s),Number(u))};var _=e=>{if(!e)return;let o=e.toString(),r=o.slice(0,4),t=o.slice(4,6),a=o.slice(6,8),n=o.slice(8,10),s=o.slice(10,12),u=o.slice(12,14),l=`${r}-${t}-${a} ${n}:${s}:${u}`,T=m(),d=pr(l,"yyyy-MM-dd HH:mm:ss",T);return ur(d)?d:void 0};var uo=(e,o)=>{let r=_(e),t=_(o);if(!r||!t)return 0;let a=r.getFullYear(),n=r.getMonth(),s=r.getDate(),u=t.getHours(),l=t.getMinutes(),T=t.getSeconds(),d=new Date(a,n,s,u,l,T,0);return c(d)};import{setHours as go,setMinutes as fo,setSeconds as yo}from"date-fns";var To=({dataAposta:e})=>{let o=yo(fo(go(_(e)||m(),0),0),0),r=yo(fo(go(_(e)||m(),23),59),59);return{dataInicio:c(o),dataFim:c(r)}};var ho=e=>{let o=e;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(o||0)},xo=e=>{let o=e;o=o.replace(/\D/g,"");let r=parseFloat(o||"0");return r/=100,r};var vo=e=>{if(e.length===0)return[[]];let o=new Set;for(let r=0;r<e.length;r++){let t=e[r],a=[...e.slice(0,r),...e.slice(r+1)],n=vo(a);for(let s of n)o.add([t,...s])}return Array.from(o)},pe=e=>{let o=e.toString().split(""),r=vo(o),t=new Set(r.map(a=>a.join("")));return Array.from(t)};import{format as gr}from"date-fns";var C=(e,o)=>{if(!e)return"N/A";let r=_(e);return r?gr(r,o||"dd/MM/yyyy"):"N/A"};var Ao=e=>{let o=e.map(Number);if(o.length===0)return"";o.sort((n,s)=>n-s);let r="",t=o[0],a=t;for(let n=1;n<=o.length;n++)n<o.length&&o[n]===a+1?a=o[n]:(t===a?r+=t:r+=`${t} ao ${a}`,n<o.length&&(r+=", ",t=o[n],a=t));return r};var J=e=>{let o=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return`${e?`${e}-`:""}${o()+o()}-${o()}-${o()}-${o()}-${o()}${o()}${o()}`};var ue=(e,o)=>(e=Math.ceil(e),o=Math.floor(o),Math.floor(Math.random()*(o-e+1))+e);var Do=(e,o=1e3)=>{let r=[];for(let t=0;t<e.length;t+=o){let a=e.slice(t,t+o);r.push(a)}return r};var _o=e=>new Promise(o=>setTimeout(o,e));var Z=e=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");var Eo=(e,o)=>Z(e).includes(Z(o));var So=e=>e?e.trim().split(/\s+/).filter(t=>t.length>=2).slice(0,2).map(t=>t[0].toUpperCase()).join(""):"";var bo=e=>`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`;var Po=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))):Number(Number(e||"0").toFixed(2)));var No=e=>(e*=100,`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`),Io=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))/100):Number(Number(e||"0").toFixed(2))/100);var Ro=e=>e.replace(/[^0-9]/g,"");var j=e=>({id:e?.id||"",id_integer:e?.id_integer||"",horario:e?.horario||0,bloqueio:e?.bloqueio||0,bancaId:e?.bancaId||"",ativo:e?.ativo??!0,inativo_no_dia:e?.inativo_no_dia||[],description:e?.description||"",somente_no_feriado:e?.somente_no_feriado||0,createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),days:{0:e?.days?.[0]??!1,1:e?.days?.[1]??!1,2:e?.days?.[2]??!1,3:e?.days?.[3]??!1,4:e?.days?.[4]??!1,5:e?.days?.[5]??!1,6:e?.days?.[6]??!1}});var ze={};U(ze,{arredondarParaCima:()=>G,calculaValoresDosNumeros:()=>he,calcularValorDeNumero:()=>ye,formatarNumero:()=>F,generateDescargas:()=>Ve,gerarDezenas:()=>Co,getCreatedBySystem:()=>y,getLimiteSimulado:()=>wo,getNumeroId:()=>fe,getNumerosAcimaDoLimite:()=>Go,getPremioFormato:()=>Te,getPropsEnvioId:()=>xe,getPropsEnvioIdOld:()=>ve,getPropsPrefix:()=>W,getPropsVP:()=>Ae,getSomaEnvio:()=>ge,getSomaProps:()=>Lo,getSomaVP:()=>Bo,getTiposJogos:()=>Q,sortNumeros:()=>Oo});var F=(e,o)=>{let r="",t=e.length-1,a=o.length-1;for(;a>=0;)o[a]==="#"?(r=e[t]+r,t--):o[a]==="-"&&(r="-"+r),a--;return r};var Fe=(e,o)=>{let r=o,t=e?.envioIds?.length>0?e.envioIds[e.envioIds.length-1]:"";return w({...e,id:r,premio:e.premio,amount:e.amount,numeros:[e.numero],amountEnviadoParaAssociacao:e.amountEnviadoParaAssociacao,valorAEnviarParaAssociacao:e.valorAEnviarParaAssociacao,envioId:t,dataAposta:e.dataAposta,bancaId:e.bancaId,valorArredondado:e.valorArredondado,limiteJogoReal:e.limiteJogoReal,limiteJogoSimulado:e.limiteJogoSimulado,valorJogo:e.valorJogo})};var we=(e,o)=>{let r=o?G(Number(e[o])):G(e.amount);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${r}`};var Ve=(e,o)=>{let r={};return Object.entries(e).forEach(([,t])=>{let a=we(t,o);r[a]?r[a].numeros.push(t.numero):r[a]=Fe(t,a)}),r};var Co=e=>{let o=[];e.forEach(a=>{let n=f[a.name];a.numbers.forEach(s=>{if(n.id==="dezena"){let T=s.split("-");for(let d of T){if(d.length<n.format.length)continue;let v=F(d,n.format);o.push(v)}return}let u=s.replaceAll("-","");if(u.length<n.format.replaceAll("-","").length)return;let l=F(u,n.format);o.push(l)})});let r=new Set(o);return Array.from(r)};var ge=e=>{let o=0;return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o+=t)}),o};var Bo=e=>{let o=0,r=0;Object.entries(e).forEach(([a,n])=>{a.startsWith("vp_")&&typeof n=="number"&&(o+=n,n>0&&(r+=1))});let t=ge(e);return o-=t,{soma:o,quantidadeDePulesMaiorQueZero:r,somaEnviadoParaAssociacao:t}};var fe=e=>{let{dataAposta:o,jogo:r,numero:t,bancaId:a,premio:n,descarregado:s}=e,u=f[r],l=u.markAll?t:F(t,u.format),T=s?"true":"false";return(a?`${a}_`:"")+`${o}_${r}_${n}_${l}_${T}`};var Q=e=>e.replaceAll(".invertida","").split("@");var ye=({quantidadeDeNumeros:e,tipoJogo:o,valorPremio:r,quantidadeDePremios:t})=>{let a=f[o],n=Q(o),s=r/(n.length||1);return s/=e,a.markAll||(s/=t||1),t===0&&(s=0),s};var Te=e=>e===1?N[1].id:e===2?N[2].id:e===3?N[3].id:e===4?N[4].id:e===5?N[5].id:N["1-5"].id;var he=e=>{let o={},r=m(),t=c(r);for(let a of e.bets){let n=Q(a.name),s=a.numbers.length;for(let u of n)for(let l of a.numbers)for(let T of a.prizes)for(let d of T.prizes){let v=f[u],O=ye({valorPremio:T.value,tipoJogo:a.name,quantidadeDeNumeros:s,quantidadeDePremios:T.prizes.length}),R=Te(d),q=l;v.markAll?R="1-5":q=F(l,v.format);let h=fe({numero:l,bancaId:e.bancaId,dataAposta:e.dateBet,jogo:u,premio:R});o?.[h]||(o[h]=V({id:h,numero:q,premio:R,created:t,bancaId:e.bancaId,amount:0,valorArredondado:0,dataAposta:e.dateBet,tipo_jogo:u,[`${"vp_"}${e.id}`]:0}));let $=Number(O.toFixed(2));v.markAll?(o[h][`${"vp_"}${e.id}`]=$,o[h].amount=$,o[h].valorArredondado=G($)):(o[h][`${"vp_"}${e.id}`]+=$,o[h].amount+=$,o[h].valorArredondado+=G($))}}return{numeros:o}};var Mo=2,Go=(e,o,r)=>e.map(t=>{let a=X.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=X.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),u=Number(t.amount.toFixed(Mo)),l=Number(s.toFixed(Mo)),T=u-l;return u>l?{numero:t,diferenca:T}:null}).filter(Boolean);var G=e=>{let o=Math.round(e*100),r=o%5;return r!==0&&(o+=5-r),o/100};var Oo=e=>{let o=Object.values(e).sort((r,t)=>{let a=f[r.tipo_jogo].order,n=f[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:r.amount>t.amount?-1:1});return Object.fromEntries(o.map(r=>[r.id,r]))};var xe=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var ve=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Ae=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.startsWith("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var W=e=>{let o={vp_:{},[z]:{},[M]:{}},r=I(Ae(e)),t=I(xe(e)),a=I(ve(e));return o["vp_"]=I(r),o[z]=I(t),o[M]=I(a),o};var Lo=e=>{let o=0;return Object.values(e).forEach(r=>{o+=r}),o};var De=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Ue={};U(Ue,{calcularValorJogoPeloLimite:()=>Fo,getLimiteJogoPeloTipoJogo:()=>De,getValorJogoPeloTipoJogo:()=>_e});var Fo=(e,o)=>e/(o||1);var _e=(e,o)=>Object.values(e).find(r=>r.type_game===o);var wo=(e,o,r)=>{let t=_e(o,e),n=(De(r,e)?.limit||0)/(t?.value||1);return Number(n.toFixed(2))};var $e={};U($e,{extracaoEstaAtivaBoolean:()=>Qo,extracaoEstaAtivaTryCatch:()=>Ne,getAvailableTimes:()=>$o,getProximaExtracaoDisponivelParaAposta:()=>Xo,pegarExtracoes:()=>Pe});import{format as qe,getDay as hr}from"date-fns";var Je={};U(Je,{calculateAmount:()=>Ee,calculateAmountGame:()=>Se,fazerJogo:()=>zo,formatPuleId:()=>Vo,getBetDateToNumber:()=>B,getFormattedPuleId:()=>Uo,getGamesUnicosList:()=>Jo,getGamesUnicosObjeto:()=>qo,invertGame:()=>be});var Ee=e=>{let o=0;return e.forEach(r=>{o+=r.value}),o};var Se=e=>{let o=0;return e.forEach(r=>{o+=Ee(r.prizes)}),o};import{setHours as fr,setMinutes as yr,setSeconds as Tr}from"date-fns";var B=(e,o)=>{let t=_(o),a=_(e);return!a||!t?0:(a=fr(a,t.getHours()),a=yr(a,t.getMinutes()),a=Tr(a,0),c(a))};var Vo=e=>e<1e3?e.toString().padStart(4,"0"):e.toString();var Uo=e=>{let o=e.split("-");return o[o.length-1]};var be=e=>{let o=I(e);for(let r=0;r<o.bets.length;r++){let t=o.bets[r];if(t.name==="milhar.invertida"||t.name==="centena.invertida"||t.name==="milhar.invertida@centena.invertida"){let a=t.numbers,n=[];for(let s of a){let u=pe(s);n.push(...u)}t={...t,numbers:I(n)},o.bets[r]=t}}return o};var zo=(e,o,r,t,a)=>{let n=k({...e,id:a,creator:o,dateBet:B(r,t.horario),totalAmount:Se(e.bets),extracao:t}),s=be(n),{numeros:u}=he(s);return{numeros:u,game:n}};var Jo=()=>Object.values(f).filter(e=>!e.id.includes("@")&&!e.id.includes("invertida")),qo=()=>Object.values(f).filter(r=>!r.id.includes("@")&&!r.id.includes("invertida")).reduce((r,t)=>(r[t.id]=t,r),{});var $o=(e,o,r,t,a)=>{let n=B(o,20241001e6),s=e.filter(d=>d.ativo&&!d.inativo_no_dia.includes(n)),u=_(n),l=[],T=s.filter(d=>d.somente_no_feriado===n);return T.length>0?l=[...T]:l=s.filter(d=>u&&d.days[hr(u)]&&d.somente_no_feriado===0),r&&(l=[...s]),t&&u&&a&&qe(a,"dd/MM/yyyy")===qe(u,"dd/MM/yyyy")&&(l=l.filter(d=>Number(qe(a,"HHmm"))<Number(C(d.bloqueio,"HHmm")))),l.sort((d,v)=>Number(C(d.horario,"HHmm"))<Number(C(v.horario,"HHmm"))?-1:1)};import{format as xr,getDay as vr}from"date-fns";var Pe=({extracoes:e,dataAposta:o=c(m()),dataAgora:r=c(m()),retornar:t="do_dia",pegar:a="bloqueio"})=>{let n=h=>a==="horario"?h.horario:a==="bloqueio"?h.bloqueio:0,s=B(o,20241001e6),u=B(r,20241001e6),l=_(s);if(!l)throw new Error("dataApostaDate \xE9 obrigat\xF3ria!");let T=e.filter(h=>h.ativo&&!h.inativo_no_dia.includes(s)),d=T.filter(h=>h.somente_no_feriado===s),v=d.length>0?d:T.filter(h=>h.days[vr(l)]&&h.somente_no_feriado===0);if(t==="do_dia")return v.sort(ko);let O=_(r);if(!O)throw new Error("dataAgoraDate \xE9 obrigat\xF3ria!");let R=Number(xr(O,"HHmm"));return(t==="proximas"?v.filter(h=>s===u?R<Number(C(n(h),"HHmm")):s>u):t==="anteriores"?v.filter(h=>u===s?R>=Number(C(n(h),"HHmm")):s<u):[]).sort(ko)},ko=(e,o)=>Number(C(e.horario,"HHmm"))-Number(C(o.horario,"HHmm"));import{getDay as Ho}from"date-fns";var Ne=(e,o)=>{if(!o.ativo)throw new Error("Extra\xE7\xE3o n\xE3o est\xE1 ativa.");if(o.inativo_no_dia.includes(e))throw new Error("Extra\xE7\xE3o est\xE1 inativa no dia da aposta.");if(o.somente_no_feriado!==0&&o.somente_no_feriado!==e)throw new Error("Extra\xE7\xE3o n\xE3o funciona neste feriado.");let r=_(e);if(!r)throw new Error("Data da aposta inv\xE1lida.");if(!o.days[Ho(r)]){let a=["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"][Ho(r)];throw new Error(`Extra\xE7\xE3o n\xE3o funciona neste dia da semana (${a}).`)}};var Qo=(e,o)=>{try{return Ne(e,o),!0}catch{return!1}};var Xo=(e,o,r)=>{if(!e||e.length===0)return;let t=Pe({extracoes:e,dataAgora:o,dataAposta:o,retornar:"do_dia"});if(t.length===0)return;if(!r)return t[0];let a=t.findIndex(n=>{let s=o,u=n.horario,l=B(s,u);return r?.dataSorteio&&r.dataSorteio===l});return a!==-1?t[a+1]:t[0]};var eo={};U(eo,{getLimitsRest:()=>Ko,getPermission:()=>Wo,isAdm:()=>ke,isAdmOrSubAdm:()=>Xe,isAssociacao:()=>He,isCambista:()=>Ke,isCambistaTalao:()=>We,isDigitador:()=>Ze,isDigitadorAdm:()=>Ye,isDigitadorOrDigitadorAdm:()=>je,isSuperAdm:()=>Qe});var Ar=["admin"],Dr=["admin","sub_admin"],_r=["associacao"],Er=["super_admin"],Sr=["cambista_talao"],br=["cambista"],Pr=["digitador_adm"],Nr=["digitador"],Ir=["digitador","digitador_adm"],ke=e=>Ar.includes(e.role),He=e=>_r.includes(e.role),Qe=e=>Er.includes(e.role),Xe=e=>Dr.includes(e.role),We=e=>Sr.includes(e.role),Ke=e=>br.includes(e.role),Ye=e=>Pr.includes(e.role),Ze=e=>Nr.includes(e.role),je=e=>Ir.includes(e.role),Wo={isAdm:ke,isAssociacao:He,isSuperAdm:Qe,isAdmOrSubAdm:Xe,isCambistaTalao:We,isCambista:Ke,isDigitadorAdm:Ye,isDigitador:Ze,isDigitadorOrDigitadorAdm:je};var Ko=e=>{let o=0,r=0;return Object.values(e.jogos.hoje).forEach(t=>o+=t),Object.values(e.jogos.pre).forEach(t=>r+=t),{hoje:o,pre:r}};var ro={};U(ro,{generateDescarga:()=>Fe,generateDescargas:()=>Ve,getDescargaIdPeloEnvio:()=>Or,getDescargaIdPeloNumero:()=>we,getDescargasAcimaDoLimite:()=>Cr,getPropsEnvioId:()=>Mr,getPropsEnvioIdOldDescarga:()=>Gr,getPropsVPDescarga:()=>Br,getTotalGeralDescarga:()=>oo,sortDescargas:()=>Rr});var Rr=e=>{let o=Object.values(e).sort((r,t)=>{let a=f[r.tipo_jogo].order,n=f[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:t.amount-r.amount});return Object.fromEntries(o.map(r=>[r.id,r]))};var Yo=2,Cr=(e,o,r)=>e.map(t=>{let a=X.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=X.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),u=Number(t.amount.toFixed(Yo)),l=Number(s.toFixed(Yo)),T=u-l;return u>l?{descarga:t,diferenca:T}:null}).filter(Boolean);var Br=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.split("_").includes("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var Mr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Gr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Or=(e,o)=>{let r=`${M}${o}`,t=e[r];if(t==null)throw new Error(`Valor do envio '${o}' n\xE3o encontrado no n\xFAmero.`);if(typeof t!="number")throw new Error(`Valor do envio '${o}' deve ser um n\xFAmero.`);let a=G(t);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${a}_envio_${o}`};var oo=(e,o)=>{let r={jogos:{},totalBruto:0,totalLiquido:0,totalComissao:0},t=Object.entries(e),a=Object.values(o),n=a.find(s=>s.type_game==="restante");for(let[s,u]of t){let l=u??0,T=a.find(d=>s===d.type_game);if(r.totalBruto+=l,T){let d=Oe[s],v=l*(T.porcentagem/100),O=l-v;r.jogos[s]={totalEnviado:l,totalComissao:v,totalLiquido:O,ordem:d?.order||0,tipo:s,label:d?.label||s},r.totalLiquido+=O,r.totalComissao+=v}else if(r.jogos.restante||(r.jogos.restante={totalEnviado:0,totalLiquido:0,totalComissao:0,ordem:9,tipo:"restante",label:"Restante"}),r.jogos.restante.totalEnviado+=l,n){let d=l*(n.porcentagem/100),v=l-d;r.jogos.restante.totalLiquido+=v,r.jogos.restante.totalComissao+=d,r.totalLiquido+=v,r.totalComissao+=d}else r.jogos.restante.totalLiquido+=l,r.totalLiquido+=l}return r};var ao={};U(ao,{agruparEnvioPorExtracao:()=>Lr,criarEstruturaJogo:()=>Ie,getComissoesDoEnvio:()=>to});var Ie=(e,o)=>({totalEnviado:o.totalEnviado,totalLiquido:o.totalLiquido,totalComissao:o.totalComissao,ordem:o.ordem,tipo:o.tipo,label:o.label});var ee=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",porcentagem:e?.porcentagem||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var to=e=>{let o={};for(let r of e){let t=ee({...r,id:r.id||J()});o[t.id]=t}return o};var Lr=({envios:e})=>{let o=[],r=Object.values(e);for(let t of r){let a=to(t.comissoesDescarga),n=t.extracao.id,s=o.find(l=>l.extracao.id===n),u=oo(t.totalGeralJogos,a);if(!s)o.push({extracao:t.extracao,jogos:Object.entries(u.jogos).reduce((l,[T,d])=>(l[T]=Ie(T,d),l),{}),totalBruto:u.totalBruto,totalLiquido:u.totalLiquido,totalComissao:u.totalComissao});else{for(let[l,T]of Object.entries(u.jogos)){let d=s.jogos;d[l]?d[l]={totalEnviado:Number(d[l].totalEnviado)+Number(T.totalEnviado),totalLiquido:Number(d[l].totalLiquido)+Number(T.totalLiquido),totalComissao:Number(d[l].totalComissao)+Number(T.totalComissao),ordem:T.ordem,tipo:T.tipo,label:T.label}:d[l]=Ie(l,T)}s.totalBruto+=Number(u.totalBruto),s.totalLiquido+=Number(u.totalLiquido),s.totalComissao+=Number(u.totalComissao)}}return o};var X={numbers:ze,extracao:$e,descarga:ro,games:Je,users:eo,limite_jogos:Ue,utils:Le,envio:ao};var oe=e=>({id:e?.id||"",id_integer:e?.id_integer||"",extracaoIds:e?.extracaoIds||[],content:e?.content||"",visualizacao:e?.visualizacao||"jogo_hoje",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),date:{from:e?.date?.from||0,to:e?.date?.to||0},fixa:e?.date?.to===0||e?.date?.from===0,tipo:e?.tipo||[],updated:e?.updated||c(m()),created:e?.created||c(m())});var re=e=>({id:e?.id||"",id_integer:e?.id_integer||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",horario:e?.extracao?.horario||0,description:e?.extracao?.description||""},milhares:{1:e?.milhares?.[1]??"",2:e?.milhares?.[2]??"",3:e?.milhares?.[3]??"",4:e?.milhares?.[4]??"",5:e?.milhares?.[5]??""},grupos:{1:e?.grupos?.[1]??"",2:e?.grupos?.[2]??"",3:e?.grupos?.[3]??"",4:e?.grupos?.[4]??"",5:e?.grupos?.[5]??""},bichos:{1:e?.bichos?.[1]??"",2:e?.bichos?.[2]??"",3:e?.bichos?.[3]??"",4:e?.bichos?.[4]??"",5:e?.bichos?.[5]??""},liberado:e?.liberado??!1,dataSorteio:e?.dataSorteio||0});var te=e=>({id:e?.id||"",id_integer:e?.id_integer||"",comission:e?.comission??0,name:e?.name||"",responsible:e?.responsible||"",codigo_rota:e?.codigo_rota||"",tipo:e?.tipo||"cambista",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var K=e=>({id:e?.id??"",id_integer:e?.id_integer||"",active:e?.active??!0,bet_limit:e?.bet_limit??0,comission:e?.comission??0,bancaId:e?.bancaId||"",photoURL:e?.photoURL||"",name:e?.name||"",sessionId:e?.sessionId||"",codigo_cambista:e?.codigo_cambista||"",deviceId:e?.deviceId||"",role:e?.role||b.cambista.id,pre_date_limit:e?.pre_date_limit||0,dispositivos:{dispositivoIdAtual:e?.dispositivos?.dispositivoIdAtual||"",listaDispositivosConectados:e?.dispositivos?.listaDispositivosConectados||[]},route:{id:e?.route?.id||"",name:e?.route?.name||"",tipo:e?.route?.tipo||b.cambista.id},type_games:e?.type_games?e?.type_games.filter(o=>f?.[o]?.id):[],login:e?.login||"",jogos:{hoje:e?.jogos?.hoje||{},pre:e?.jogos?.pre||{}},preferences:{pdfLegado:e?.preferences?.pdfLegado??!1},permissoes:{podeCancelarPule:e?.permissoes?.podeCancelarPule??!1,podeReservar:e?.permissoes?.podeReservar??!1,podeJogarSurpresinha:e?.permissoes?.podeJogarSurpresinha??!0},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ae=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",value:e?.value??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var k=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",origem_pule_id:e?.origem_pule_id||"",bets:e.bets||[],creator:{id:e?.creator?.id||"",id_integer:e?.creator?.id_integer||"",codigo_cambista:e?.creator?.codigo_cambista||"",name:e?.creator?.name||"",role:e?.creator?.role||b.cambista.id,login:e?.creator?.login||"",comission:e?.creator?.comission||0,route:{id:e?.creator?.route?.id||"",name:e?.creator?.route?.name||"",tipo:e?.creator?.route?.tipo||b.cambista.id}},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),totalAmount:e?.totalAmount||0,bancaId:e?.bancaId||"",codigoAuth:e?.codigoAuth||ue(1e5,999999).toString(),cancel:{canceled:e?.cancel?.canceled??!1,canceledAt:e?.cancel?.canceledAt||0,reason:e?.cancel?.reason||""},valorNumerosNaPule:e?.valorNumerosNaPule||{},infoJogos:e?.infoJogos||[],tiposJogos:e?.tiposJogos||{},reservada:e?.reservada||!1,dias_disponiveis:e?.dias_disponiveis||[],dateBet:e?.dateBet||0,status:e.status||Me.JOGADA.id,statusReason:e?.statusReason||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0}});var V=(e={})=>{let o=N[e?.premio||"1"].order,r=f[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",id_integer:e?.id_integer||"",envioIds:e?.envioIds||[],ordemPremioExibicao:o,ordemJogoExibicao:r,numero:e?.numero||"",amount:e?.amount||0,premio:e?.premio||"1",bancaId:e?.bancaId||"",valorArredondado:e?.valorArredondado||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),descarregado:e?.descarregado??!1,dataAposta:e?.dataAposta||0},a=W(e);return t={...t,...a["vp_"],...a[z],...a[M]},t};var Fr=(e={})=>({name:e?.name||"milhar",numbers:e?.numbers||[],prizes:e?.prizes||[]});var ie=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",pule:{id:e?.pule?.id||"",id_integer:e?.pule?.id_integer||"",created:e?.pule?.created||0,cancel:{canceled:e?.pule?.cancel?.canceled||!1,canceledAt:e?.pule?.cancel?.canceledAt||0,reason:e?.pule?.cancel?.reason||""},createdBy:{id:e?.pule?.createdBy?.id||"",id_integer:e?.pule?.createdBy?.id_integer||"",role:e?.pule?.createdBy?.role||"cambista",name:e?.pule?.createdBy?.name||"",login:e?.pule?.createdBy?.login||""},creator:{id:e?.pule?.creator?.id||"",id_integer:e?.pule?.creator?.id_integer||"",codigo_cambista:e?.pule?.creator?.codigo_cambista||"",login:e?.pule?.creator?.login||"",name:e?.pule?.creator?.name||"",role:e?.pule?.creator?.role||"cambista",comission:e?.pule?.creator?.comission||0,route:{id:e?.pule?.creator?.route?.id||"",name:e?.pule?.creator?.route?.name||"",tipo:e?.pule?.creator?.route?.tipo||"cambista"}}},premiosItems:e?.premiosItems||[],valorTotalPremio:e?.valorTotalPremio||0,valorTotalPremioBanca:e?.valorTotalPremioBanca||0,valorTotalPremioAssociacao:e?.valorTotalPremioAssociacao||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var H=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,descargas:e?.descargas||{},link_pdf:e?.link_pdf||"",bancaId:e.bancaId||"",visualizado:e?.visualizado||!1,createdBy:y(e?.createdBy),created:e?.created||0,updated:e?.updated||0});var se=(e={})=>({id:e?.id||"",nome:e?.nome||"",settings:{urlLogo:e?.settings?.urlLogo||"",urlLogoImpressao:e?.settings?.urlLogoImpressao||"",urlBackground:e?.settings?.urlBackground||"",backgroundColor:e?.settings?.backgroundColor||""},endereco:{cep:e?.endereco?.cep||"",logradouro:e?.endereco?.logradouro||"",numero:e?.endereco?.numero||"",bairro:e?.endereco?.bairro||"",cidade:e?.endereco?.cidade||"",estado:e?.endereco?.estado||""},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ne=(e={})=>({id:e?.id||"",tipo:e?.tipo||"add",bancaId:e?.bancaId||"",message:e?.message||"",colecao:e?.colecao||"",documentId:e?.documentId||"",author:y(e?.author),document:e?.document||{},updated:e?.updated||c(m()),created:e?.created||c(m())});var ce=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",limit:e?.limit??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var me=e=>({id:e?.id||"",id_integer:e?.id_integer||"",visualizado:e?.visualizado||!1,banca:{id:e?.banca?.id||"",nome:e?.banca?.nome||""},dataAposta:e?.dataAposta||0,totalGeralJogos:{milhar:e?.totalGeralJogos?.milhar??0,centena:e?.totalGeralJogos?.centena||0,dezena:e?.totalGeralJogos?.dezena||0,grupo:e?.totalGeralJogos?.grupo||0,"terno.dezena":e?.totalGeralJogos?.["terno.dezena"]||0,"terno.grupo":e?.totalGeralJogos?.["terno.grupo"]||0,"duque.dezena":e?.totalGeralJogos?.["duque.dezena"]||0,"duque.grupo":e?.totalGeralJogos?.["duque.grupo"]||0},extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0},devolvidoPor:{id:e?.devolvidoPor?.id||"",id_integer:e?.devolvidoPor?.id_integer||"",name:e?.devolvidoPor?.name||"",login:e?.devolvidoPor?.login||""},bancaId:e?.bancaId||"",description:e?.description||"",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),status:e?.status||Ge.ENVIANDO.id,totalEnviados:e?.totalEnviados||0,totalRegistros:e?.totalRegistros||0,progresso:e?.progresso||0,mensagem:e?.mensagem||"",concluidoEm:e?.concluidoEm||0,ultimaAtualizacao:e?.ultimaAtualizacao||0,metricas:{tempoMinimo:e?.metricas?.tempoMinimo||0,tempoMaximo:e?.metricas?.tempoMaximo||0,tempoMedio:e?.metricas?.tempoMedio||0,duracaoTotal:e?.metricas?.duracaoTotal||0,tempoEstimado:e?.metricas?.tempoEstimado||0,velocidadeProcessamento:e?.metricas?.velocidadeProcessamento||0,textosFormatados:{duracaoTotalText:e?.metricas?.textosFormatados?.duracaoTotalText||"",tempoMinimoText:e?.metricas?.textosFormatados?.tempoMinimoText||"",tempoMaximoText:e?.metricas?.textosFormatados?.tempoMaximoText||"",tempoMedioText:e?.metricas?.textosFormatados?.tempoMedioText||"",tempoEstimadoText:e?.metricas?.textosFormatados?.tempoEstimadoText||""}},atualizadoEm:e?.atualizadoEm||0,erro:e?.erro||"",iniciadoEm:e?.iniciadoEm||0,user:{id:e?.user?.id||"",id_integer:e?.user?.id_integer||"",name:e?.user?.name||"",login:e?.user?.login||""},valoresJogos:e?.valoresJogos||[],limitesJogos:e?.limitesJogos||[],comissoesDescarga:e?.comissoesDescarga||[]});var w=(e={})=>{let o=N[e?.premio||"1"].order,r=f[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",ordemJogoExibicao:r,ordemPremioExibicao:o,numeros:e?.numeros||[],quantidadeDeNumeros:e?.quantidadeDeNumeros||0,bancaId:e?.bancaId||"",amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,envioId:e?.envioId||"",amount:e?.amount||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,valorArredondado:e?.valorArredondado||0,dataAposta:e?.dataAposta||0,premio:e?.premio||"1",tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m())},a=W(e);return t={...t,...a["vp_"],...a[z],...a[M]},t};var de=(e={})=>({id:e?.id||"",userId:e?.userId||"",createdBy:e?.createdBy||y(),created:e?.created||c(m()),updated:e?.updated||c(m()),deviceId:e?.deviceId||"",bancaId:e?.bancaId||"",deviceName:e?.deviceName||"",status:e?.status||"EM_ESPERA",ultimoLogin:e?.ultimoLogin||0,plataforma:e?.plataforma||"mobile",ip:e?.ip||"",versaoApp:e?.versaoApp||""});var le=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",numero:e?.numero||"",premio:e?.premio||"",tipo_jogo:e?.tipo_jogo||"milhar",valorPremioAReceber:e?.valorPremioAReceber||0,valorEnviadoParaAssociacao:e?.valorEnviadoParaAssociacao||0,limiteTipoJogo:e?.limiteTipoJogo||0,valorTipoJogo:e?.valorTipoJogo||0,pulesGanhadoras:e?.pulesGanhadoras||{},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var io=e=>({id:e?.id||"",id_integer:e?.id_integer||"",bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",horario:e?.extracao?.horario||0,bloqueio:e?.extracao?.bloqueio||0},rota:{id:e?.rota?.id||"",id_integer:e?.rota?.id_integer||"",codigo_rota:e?.rota?.codigo_rota||"",name:e?.rota?.name||"",tipo:e?.rota?.tipo||b.cambista_talao.id,comission:e?.rota?.comission||0},cambistasIds:e?.cambistasIds||[],dataAposta:e?.dataAposta||0,valorTotalVendas:e?.valorTotalVendas||0,valorTotalPremios:e?.valorTotalPremios||0,valorTotalComissao:e?.valorTotalComissao||0,status:e?.status||Y.vendas.id,puleIdsPremios:e?.puleIdsPremios||[],createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var so=e=>({id:e?.id||"",id_integer:e?.id_integer||"",guiaId:e?.guiaId||"",bancaId:e?.bancaId||"",extracaoId:e?.extracaoId||"",rotaId:e?.rotaId||"",cambista:{id:e?.cambista?.id||"",id_integer:e?.cambista?.id_integer||"",codigo_cambista:e?.cambista?.codigo_cambista||"",name:e?.cambista?.name||"",login:e?.cambista?.login||"",role:e?.cambista?.role||b.cambista_talao.id,comission:e?.cambista?.comission||0},valor:e?.valor||0,valorComissao:e?.valorComissao||0,pulePremiadaId:e?.pulePremiadaId||"",tipo:e?.tipo||Y.vendas.id,dataAposta:e?.dataAposta||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var no=e=>({id:e?.id||"",id_integer:e?.id_integer||"",tipo_jogo:e?.tipo_jogo||"all",limite:e?.limite||0,bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var wr={mensagens:oe,users:K,guias:io,guias_items:so,limites_numero_aposta:no,valores_jogos:ae,limites_jogos:ce,pules:k,extracoes:j,resultados:re,rotas:te,envios_descarga:me,numeros:V,numeros_enviados:V,descargas:w,descargas_associacao:w,premiacoes:ie,premiacoes_associacao:le,pdf_descargas:H,pdf_descargas_associacao:H,bancas:se,auditLogs:ne,dispositivos:de,comissoes_descarga:ee};var Vr={mensagens:!0,users:!0,guias:!0,guias_items:!0,valores_jogos:!0,limites_jogos:!0,pules:!0,limites_numero_aposta:!0,extracoes:!0,resultados:!0,rotas:!0,envios_descarga:!0,numeros:!1,numeros_enviados:!1,descargas:!1,descargas_associacao:!1,premiacoes:!1,premiacoes_associacao:!1,pdf_descargas:!1,pdf_descargas_associacao:!1,bancas:!0,auditLogs:!1,dispositivos:!0,comissoes_descarga:!0};var Ur={auditLogs:365,mensagens:60,guias:15,guias_items:15,pules:60,resultados:60,envios_descarga:60,numeros:60,descargas:60,descargas_associacao:60,premiacoes:60,premiacoes_associacao:60,pdf_descargas:60,pdf_descargas_associacao:60,limites_numero_aposta:null,users:null,valores_jogos:null,limites_jogos:null,extracoes:null,rotas:null,numeros_enviados:null,bancas:null,dispositivos:null,comissoes_descarga:null};var co=class{cache=new Map;ttl;maxSize;constructor(o=3e5,r=1e3){this.ttl=o,this.maxSize=r}get(o){let r=this.cache.get(o);return r?Date.now()-r.timestamp>this.ttl?(this.cache.delete(o),null):r.data:null}set(o,r){if(this.cache.size>=this.maxSize){let t=this.cache.keys().next().value;t&&this.cache.delete(t)}this.cache.set(o,{data:r,timestamp:Date.now()})}delete(o){this.cache.delete(o)}clear(){this.cache.clear()}};function D(e,o,r){let{collectionName:t,model:a,idSearchStrategy:n,isolation:s,cache:u,authorization:l,generateId:T}=r,d=u?.enabled?new co(u.ttl,u.maxSize):null,v=p=>{if(!l?.enabled)return;let g=l.getUserRole(),x=l.allowedRoles[p];if(!(!x||x.length===0)){if(!g)throw l.onUnauthorized?.(p,g),new Error(`\u274C N\xE3o autorizado: Opera\xE7\xE3o '${p}' requer autentica\xE7\xE3o na cole\xE7\xE3o '${t}'`);if(!x.includes(g))throw l.onUnauthorized?.(p,g),new Error(`\u274C N\xE3o autorizado: Role '${g}' n\xE3o tem permiss\xE3o para '${p}' na cole\xE7\xE3o '${t}'. Roles permitidas: ${x.join(", ")}`)}},O=()=>{if(!s?.enabled)return[];let p=s.getValue();return p?[{field:s.fieldName,operator:"==",value:p}]:[]},R=p=>{let g=[];O().forEach(({field:E,operator:P,value:L})=>{g.push(o.where(E.toString(),P,L))}),p?.where?.forEach(({field:E,operator:P,value:L})=>{g.push(o.where(E.toString(),P,L))}),p?.orderBy?.forEach(({field:E,direction:P})=>{g.push(o.orderBy(E.toString(),P))}),p?.limit&&g.push(o.limit(p.limit)),p?.startAfter!==void 0&&g.push(o.startAfter(p.startAfter)),p?.startAt!==void 0&&g.push(o.startAt(p.startAt)),p?.endBefore!==void 0&&g.push(o.endBefore(p.endBefore)),p?.endAt!==void 0&&g.push(o.endAt(p.endAt));let A=o.collection(e,t);return o.query(A,...g)},q=async p=>{switch(n.type){case"documentId":return o.doc(e,t,p);case"field":let g=R({where:[{field:n.fieldName,operator:"==",value:p}],limit:1}),x=await o.getDocs(g);if(x.empty)throw new Error(`Document not found with ${String(n.fieldName)}: ${p}`);return x.docs[0].ref;case"custom":return n.resolver(p);default:throw new Error(`Unknown idSearchStrategy: ${n.type}`)}},h=(p,...g)=>{let x=s?.enabled?`_${s.getValue()}`:"";return`${t}${x}_${p}_${JSON.stringify(g)}`};return{get:async p=>{try{if(v("read"),d){let A=h("get",p),E=d.get(A);if(E)return E}let g;if(n.type==="documentId"){let A=o.doc(e,t,p);g=await o.getDoc(A)}else if(n.type==="field"){let A=R({where:[{field:n.fieldName,operator:"==",value:p}],limit:1});g=(await o.getDocs(A)).docs[0]||null}else{let A=await q(p);g=await o.getDoc(A)}if(!g?.exists())return null;let x=a(g.data());if(d){let A=h("get",p);d.set(A,x)}return x}catch(g){return console.error(`Error getting document ${p}:`,g),null}},getAll:async p=>{try{v("read");let g=R(p),x=await o.getDocs(g),A={};return x.forEach(E=>{let P=a(E.data());A[P.id]=P}),A}catch(g){return console.error("Error getting all documents:",g),{}}},listen:(p,g)=>{v("read");let x=R(p);return o.onSnapshot(x,A=>{let E={};A.forEach(P=>{let L=a(P.data());E[L.id]=L}),g(E)})},add:async p=>{try{v("write");let g=p.id||T?.()||o.generateId(),x={...p,id:g};s?.enabled&&s.getValue()&&(x[s.fieldName]=s.getValue());let A=o.doc(e,t,g),E=a(x);return await o.setDoc(A,E),d&&d.delete(h("get",g)),g}catch(g){throw console.error("Error adding document:",g),g}},update:async(p,g)=>{try{v("write");let x=await q(p),A={...g};s?.enabled&&s.getValue()&&(A[s.fieldName]=s.getValue()),await o.updateDoc(x,A),d&&d.delete(h("get",p))}catch(x){throw console.error(`Error updating document ${p}:`,x),x}},remove:async p=>{try{v("delete");let g=await q(p);await o.deleteDoc(g),d&&d.delete(h("get",p))}catch(g){throw console.error(`Error removing document ${p}:`,g),g}},batch:async p=>{try{new Set(p.map(A=>A.operation)).forEach(A=>{v(A==="delete"?"delete":"write")});let x=o.writeBatch(e);for(let{id:A,data:E,operation:P}of p){let L=A||T?.()||o.generateId(),Ce=o.doc(e,t,L),Be={...E,id:L};s?.enabled&&s.getValue()&&(Be[s.fieldName]=s.getValue());let er=a(Be);switch(P){case"add":o.batchSet(x,Ce,er);break;case"update":o.batchUpdate(x,Ce,Be);break;case"delete":o.batchDelete(x,Ce);break}}await o.batchCommit(x),d&&d.clear()}catch(g){throw console.error("Error in batch operation:",g),g}},clearCache:()=>d?.clear(),getCacheSize:()=>d?.cache.size||0}}var Zo=e=>{try{return e&&typeof e.getFirestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.query=="function"&&typeof e.where=="function"?"v9-modular":e&&typeof e.firestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.batch=="function"?"v8":e&&e.initializeApp&&typeof e.initializeApp=="function"?"v9-modular":"unknown"}catch(o){return console.warn("Erro ao detectar vers\xE3o do Firebase:",o),"unknown"}},jo=e=>({collection:(o,r)=>e.collection(o,r),doc:(o,r,...t)=>e.doc(o,r,...t),query:(o,...r)=>e.query(o,...r),where:(o,r,t)=>e.where(o,r,t),orderBy:(o,r="asc")=>e.orderBy(o,r),limit:o=>e.limit(o),startAfter:(...o)=>e.startAfter(...o),startAt:(...o)=>e.startAt(...o),endBefore:(...o)=>e.endBefore(...o),endAt:(...o)=>e.endAt(...o),getDocs:e.getDocs,getDoc:e.getDoc,setDoc:e.setDoc,updateDoc:e.updateDoc,deleteDoc:e.deleteDoc,writeBatch:e.writeBatch,batchSet:(o,r,t)=>o.set(r,t),batchUpdate:(o,r,t)=>o.update(r,t),batchDelete:(o,r)=>o.delete(r),batchCommit:o=>o.commit(),onSnapshot:e.onSnapshot,generateId:()=>J()}),mo=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>J()}),Re=e=>{let o=Zo(e);switch(console.log(`\u{1F525} Firebase version detected: ${o}`),o){case"v9-modular":return jo(e);case"v8":return mo();default:return console.warn("\u26A0\uFE0F Firebase version not detected, falling back to v8 adapter"),mo()}},zr=(e,o,r)=>{let t=Re(e);return D(o,t,r)},lo=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>J()});var Jr=(e,o={enabled:!0,ttl:3e5,maxSize:1e3},r)=>{let t=n=>({...n,isolation:e?{enabled:!0,fieldName:"bancaId",getValue:e}:void 0,cache:o,authorization:r?.[n.collectionName]}),a=n=>({...n,cache:o,authorization:r?.[n.collectionName]});return{users_associacao:a({collectionName:"users",model:K,idSearchStrategy:{type:"documentId"}}),users:t({collectionName:"users",model:K,idSearchStrategy:{type:"documentId"}}),bancas:a({collectionName:"bancas",model:se,idSearchStrategy:{type:"documentId"}}),extracoes:t({collectionName:"extracoes",model:j,idSearchStrategy:{type:"documentId"}}),resultados:t({collectionName:"resultados",model:re,idSearchStrategy:{type:"documentId"}}),mensagens:t({collectionName:"mensagens",model:oe,idSearchStrategy:{type:"documentId"}}),rotas:t({collectionName:"rotas",model:te,idSearchStrategy:{type:"documentId"}}),valores_jogos:t({collectionName:"valores_jogos",model:ae,idSearchStrategy:{type:"documentId"}}),limites_jogos:t({collectionName:"limites_jogos",model:ce,idSearchStrategy:{type:"documentId"}}),pules:t({collectionName:"pules",model:k,idSearchStrategy:{type:"documentId"}}),numeros:t({collectionName:"numeros",model:V,idSearchStrategy:{type:"documentId"}}),numeros_enviados:t({collectionName:"numeros_enviados",model:V,idSearchStrategy:{type:"documentId"}}),descargas:t({collectionName:"descargas",model:w,idSearchStrategy:{type:"documentId"}}),descargas_associacao:t({collectionName:"descargas_associacao",model:w,idSearchStrategy:{type:"documentId"}}),premiacoes:t({collectionName:"premiacoes",model:ie,idSearchStrategy:{type:"documentId"}}),premiacoes_associacao:t({collectionName:"premiacoes_associacao",model:le,idSearchStrategy:{type:"documentId"}}),pdf_descargas:t({collectionName:"pdf_descargas",model:H,idSearchStrategy:{type:"documentId"}}),pdf_descargas_associacao:t({collectionName:"pdf_descargas_associacao",model:H,idSearchStrategy:{type:"documentId"}}),auditLogs:t({collectionName:"auditLogs",model:ne,idSearchStrategy:{type:"documentId"}}),envios_descarga:t({collectionName:"envios_descarga",model:me,idSearchStrategy:{type:"documentId"}}),dispositivos:t({collectionName:"dispositivos",model:de,idSearchStrategy:{type:"documentId"}})}};function po(e){let{db:o,adapter:r,getBancaId:t,cacheConfig:a,authorizationConfigs:n}=e,s=Jr(t,a,n);return{users_associacao:D(o,r,s.users_associacao),users:D(o,r,s.users),bancas:D(o,r,s.bancas),extracoes:D(o,r,s.extracoes),resultados:D(o,r,s.resultados),mensagens:D(o,r,s.mensagens),rotas:D(o,r,s.rotas),valores_jogos:D(o,r,s.valores_jogos),limites_jogos:D(o,r,s.limites_jogos),pules:D(o,r,s.pules),numeros:D(o,r,s.numeros),numeros_enviados:D(o,r,s.numeros_enviados),descargas:D(o,r,s.descargas),descargas_associacao:D(o,r,s.descargas_associacao),premiacoes:D(o,r,s.premiacoes),premiacoes_associacao:D(o,r,s.premiacoes_associacao),pdf_descargas:D(o,r,s.pdf_descargas),pdf_descargas_associacao:D(o,r,s.pdf_descargas_associacao),auditLogs:D(o,r,s.auditLogs),envios_descarga:D(o,r,s.envios_descarga),dispositivos:D(o,r,s.dispositivos)}}function qr(e){return po({...e,adapter:Re(e.firebaseInstance)})}function $r(e){return po({...e,adapter:lo()})}export{ne as AuditLogModel,se as BancaModel,Fr as BetModel,Oe as COMISSOES_PADRAO,ee as ComissaoDescargaModel,w as DescargaModel,de as DeviceModel,rr as EXTRACAO,me as EnvioDescargaModel,j as ExtracaoModel,f as GAMES,tr as GRUPOS_BICHOS,k as GameModel,so as GuiaItemModel,io as GuiaModel,nr as KEYBOARD,ce as LimitGameModel,no as LimiteNumeroApostaModel,ar as MESSAGES,oe as MessageModel,V as NumberModel,H as PDFModel,z as PREFIX_ENVIO,M as PREFIX_ENVIO_OLD,S as PREFIX_NUMBER,N as PREMIOS,le as PremiacaoAssociacaoModel,ie as PremiacaoModel,b as ROLES,re as ResultadoModel,te as RouteModel,Ge as STATUS_DESCARGA,cr as STATUS_DEVICE,Y as STATUS_GUIA,Me as STATUS_PULE,ir as TIPO_VISUALIZACAO,K as UserModel,sr as VISUALIZACAO,ae as ValueGameModel,Lr as agruparEnvioPorExtracao,G as arredondarParaCima,he as calculaValoresDosNumeros,ye as calcularValorDeNumero,Fo as calcularValorJogoPeloLimite,Ee as calculateAmount,Se as calculateAmountGame,I as clone,wr as collections,Ur as collectionsRetentionDays,Vr as collectionsToAudit,uo as combineDateTime,zr as createAutoRepo,D as createGenericRepo,lo as createReactNativeAdapter,$r as createReactNativeRepoFactory,po as createRepoFactory,mo as createV8Adapter,jo as createV9ModularAdapter,Re as createWebAdapter,qr as createWebRepoFactory,Ie as criarEstruturaJogo,c as dateToNumber,_o as delay,Zo as detectFirebaseVersion,Do as dividirArray,Qo as extracaoEstaAtivaBoolean,Ne as extracaoEstaAtivaTryCatch,zo as fazerJogo,Vo as formatPuleId,F as formatarNumero,ho as formatterBRL,bo as formatterPercentage,No as formatterPercentageDecimal,X as functionsCore,Ve as generateDescargas,J as generateId,Co as gerarDezenas,pe as getAllCombinations,$o as getAvailableTimes,B as getBetDateToNumber,ue as getCodigoAuth,to as getComissoesDoEnvio,y as getCreatedBySystem,To as getDataInicioFim,Uo as getFormattedPuleId,Jo as getGamesUnicosList,qo as getGamesUnicosObjeto,So as getInitials,De as getLimiteJogoPeloTipoJogo,wo as getLimiteSimulado,Ko as getLimitsRest,fe as getNumeroId,Go as getNumerosAcimaDoLimite,Wo as getPermission,Te as getPremioFormato,xe as getPropsEnvioId,ve as getPropsEnvioIdOld,W as getPropsPrefix,Ae as getPropsVP,Xo as getProximaExtracaoDisponivelParaAposta,ge as getSomaEnvio,Lo as getSomaProps,Bo as getSomaVP,Q as getTiposJogos,_e as getValorJogoPeloTipoJogo,be as invertGame,ke as isAdm,Xe as isAdmOrSubAdm,He as isAssociacao,Ke as isCambista,We as isCambistaTalao,Ze as isDigitador,Ye as isDigitadorAdm,je as isDigitadorOrDigitadorAdm,Qe as isSuperAdm,Eo as matchNormalized,Z as normalize,_ as numberToDate,Ao as numbersSelectedFormated,xo as parserBRL,Po as parserPercentage,Io as parserPercentageDecimal,Pe as pegarExtracoes,m as pegarHorarioSaoPaulo,Ro as removerLetters,C as showFormatDate,Oo as sortNumeros};
|
|
1
|
+
var or=Object.defineProperty;var U=(e,o)=>{for(var r in o)or(e,r,{get:o[r],enumerable:!0})};var rr=[13,16,19];var f={milhar:{id:"milhar",label:"Milhar",sigla:"M",format:"####",formatDigitar:"####",markAll:!1,max:0,order:1,showPerLine:6},centena:{id:"centena",label:"Centena",sigla:"C",format:"###",formatDigitar:"###",markAll:!1,max:0,order:2,showPerLine:7},dezena:{id:"dezena",label:"Dezena",sigla:"D",format:"##",formatDigitar:"##",markAll:!1,max:0,order:3,showPerLine:0},grupo:{id:"grupo",label:"Grupo",sigla:"G",max:25,format:"##",formatDigitar:"##",markAll:!1,order:4,showPerLine:0},"terno.dezena":{id:"terno.dezena",label:"Terno de Dezena",sigla:"TD",format:"##-##-##",formatDigitar:"######",markAll:!0,max:0,order:5,showPerLine:3},"terno.grupo":{id:"terno.grupo",label:"Terno de Grupo",sigla:"TG",max:25,format:"##-##-##",formatDigitar:"######",markAll:!0,order:6,showPerLine:3},"duque.dezena":{id:"duque.dezena",label:"Duque de Dezena",sigla:"DD",format:"##-##",formatDigitar:"####",markAll:!0,max:0,order:7,showPerLine:5},"duque.grupo":{id:"duque.grupo",label:"Duque de Grupo",sigla:"DG",max:25,format:"##-##",formatDigitar:"####",markAll:!0,order:8,showPerLine:5},"milhar.invertida":{id:"milhar.invertida",label:"Milhar Invertida",sigla:"MI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena.invertida":{id:"centena.invertida",label:"Centena Invertida",sigla:"CI",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7},"milhar@centena":{id:"milhar@centena",label:"Milhar Centena",sigla:"MC",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar.invertida@centena.invertida":{id:"milhar.invertida@centena.invertida",label:"Milhar e Centena Invertidas",sigla:"MCI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@dezena":{id:"milhar@dezena",label:"Milhar e Dezena",sigla:"MD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@centena@dezena":{id:"milhar@centena@dezena",label:"Milhar, Centena e Dezena",sigla:"MCD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena@dezena":{id:"centena@dezena",label:"Centena Dezena",sigla:"CD",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7}};var i={"01":"Avestruz","02":"\xC1guia","03":"Burro","04":"Borboleta","05":"Cachorro","06":"Cabra","07":"Carneiro","08":"Camelo","09":"Cobra",10:"Coelho",11:"Cavalo",12:"Elefante",13:"Galo",14:"Gato",15:"Jacar\xE9",16:"Le\xE3o",17:"Macaco",18:"Porco",19:"Pav\xE3o",20:"Peru",21:"Touro",22:"Tigre",23:"Urso",24:"Veado",25:"Vaca"},tr={"01":{grupo:"01",bicho:i["01"]},"02":{grupo:"01",bicho:i["01"]},"03":{grupo:"01",bicho:i["01"]},"04":{grupo:"01",bicho:i["01"]},"05":{grupo:"02",bicho:i["02"]},"06":{grupo:"02",bicho:i["02"]},"07":{grupo:"02",bicho:i["02"]},"08":{grupo:"02",bicho:i["02"]},"09":{grupo:"03",bicho:i["03"]},10:{grupo:"03",bicho:i["03"]},11:{grupo:"03",bicho:i["03"]},12:{grupo:"03",bicho:i["03"]},13:{grupo:"04",bicho:i["04"]},14:{grupo:"04",bicho:i["04"]},15:{grupo:"04",bicho:i["04"]},16:{grupo:"04",bicho:i["04"]},17:{grupo:"05",bicho:i["05"]},18:{grupo:"05",bicho:i["05"]},19:{grupo:"05",bicho:i["05"]},20:{grupo:"05",bicho:i["05"]},21:{grupo:"06",bicho:i["06"]},22:{grupo:"06",bicho:i["06"]},23:{grupo:"06",bicho:i["06"]},24:{grupo:"06",bicho:i["06"]},25:{grupo:"07",bicho:i["07"]},26:{grupo:"07",bicho:i["07"]},27:{grupo:"07",bicho:i["07"]},28:{grupo:"07",bicho:i["07"]},29:{grupo:"08",bicho:i["08"]},30:{grupo:"08",bicho:i["08"]},31:{grupo:"08",bicho:i["08"]},32:{grupo:"08",bicho:i["08"]},33:{grupo:"09",bicho:i["09"]},34:{grupo:"09",bicho:i["09"]},35:{grupo:"09",bicho:i["09"]},36:{grupo:"09",bicho:i["09"]},37:{grupo:"10",bicho:i[10]},38:{grupo:"10",bicho:i[10]},39:{grupo:"10",bicho:i[10]},40:{grupo:"10",bicho:i[10]},41:{grupo:"11",bicho:i[11]},42:{grupo:"11",bicho:i[11]},43:{grupo:"11",bicho:i[11]},44:{grupo:"11",bicho:i[11]},45:{grupo:"12",bicho:i[12]},46:{grupo:"12",bicho:i[12]},47:{grupo:"12",bicho:i[12]},48:{grupo:"12",bicho:i[12]},49:{grupo:"13",bicho:i[13]},50:{grupo:"13",bicho:i[13]},51:{grupo:"13",bicho:i[13]},52:{grupo:"13",bicho:i[13]},53:{grupo:"14",bicho:i[14]},54:{grupo:"14",bicho:i[14]},55:{grupo:"14",bicho:i[14]},56:{grupo:"14",bicho:i[14]},57:{grupo:"15",bicho:i[15]},58:{grupo:"15",bicho:i[15]},59:{grupo:"15",bicho:i[15]},60:{grupo:"15",bicho:i[15]},61:{grupo:"16",bicho:i[16]},62:{grupo:"16",bicho:i[16]},63:{grupo:"16",bicho:i[16]},64:{grupo:"16",bicho:i[16]},65:{grupo:"17",bicho:i[17]},66:{grupo:"17",bicho:i[17]},67:{grupo:"17",bicho:i[17]},68:{grupo:"17",bicho:i[17]},69:{grupo:"18",bicho:i[18]},70:{grupo:"18",bicho:i[18]},71:{grupo:"18",bicho:i[18]},72:{grupo:"18",bicho:i[18]},73:{grupo:"19",bicho:i[19]},74:{grupo:"19",bicho:i[19]},75:{grupo:"19",bicho:i[19]},76:{grupo:"19",bicho:i[19]},77:{grupo:"20",bicho:i[20]},78:{grupo:"20",bicho:i[20]},79:{grupo:"20",bicho:i[20]},80:{grupo:"20",bicho:i[20]},81:{grupo:"21",bicho:i[21]},82:{grupo:"21",bicho:i[21]},83:{grupo:"21",bicho:i[21]},84:{grupo:"21",bicho:i[21]},85:{grupo:"22",bicho:i[22]},86:{grupo:"22",bicho:i[22]},87:{grupo:"22",bicho:i[22]},88:{grupo:"22",bicho:i[22]},89:{grupo:"23",bicho:i[23]},90:{grupo:"23",bicho:i[23]},91:{grupo:"23",bicho:i[23]},92:{grupo:"23",bicho:i[23]},93:{grupo:"24",bicho:i[24]},94:{grupo:"24",bicho:i[24]},95:{grupo:"24",bicho:i[24]},96:{grupo:"24",bicho:i[24]},97:{grupo:"25",bicho:i[25]},98:{grupo:"25",bicho:i[25]},99:{grupo:"25",bicho:i[25]},"00":{grupo:"25",bicho:i[25]}};var ar={required:"Obrigat\xF3rio.",list_length_zero:"Selecione pelo menos um item.",incorrect_login:"Usu\xE1rio e/ou senha incorretos!",incorrect_password:"Senha incorreta.",email_already_in_use:"Este login j\xE1 est\xE1 sendo usado!",invalid_device:"Este login j\xE1 est\xE1 sendo usado em outro dispositivo!"};var b={super_admin:{id:"super_admin",label:"Super Administrador"},associacao:{id:"associacao",label:"Associa\xE7\xE3o"},admin:{id:"admin",label:"Administrador"},sub_admin:{id:"sub_admin",label:"Sub-administrador"},digitador_adm:{id:"digitador_adm",label:"Digitador Administrador"},digitador:{id:"digitador",label:"Digitador"},cambista_talao:{id:"cambista_talao",label:"Cambista de tal\xE3o"},cambista:{id:"cambista",label:"Cambista"}};var Be={PROCESSANDO:{id:"PROCESSANDO",label:"PROCESSANDO",color:"green",showSite:!1,ordem:0},JOGADA:{id:"JOGADA",label:"PULES JOGADAS",color:"green",showSite:!0,ordem:1},AGUARDANDO_CANCELAMENTO:{id:"AGUARDANDO_CANCELAMENTO",label:"AGUARDANDO CANCELAMENTO",color:"yellow",showSite:!0,ordem:3},CANCELADA:{id:"CANCELADA",label:"CANCELADAS",color:"red",showSite:!0,ordem:4}};var ir={notificacao:{id:"notificacao",label:"Notifica\xE7\xE3o"},impressao:{id:"impressao",label:"Impress\xE3o"}};var sr={agora:{id:"agora",label:"Agora"},jogo_hoje:{id:"jogo_hoje",label:"Jogo Hoje"},jogo_pre_datado:{id:"jogo_pre_datado",label:"Jogo Pr\xE9-Datado"},resultado:{id:"resultado",label:"Resultado"}};var S="vp_";var B="envio_old_";var z="envio_";var Ge={ENVIANDO:{id:"ENVIANDO",labelBanca:"ENVIANDO",labelAssociacao:"RECEBENDO",color:"blue",showSiteBanca:!0,showSiteAssociacao:!1,order:1},DEVOLVENDO:{id:"DEVOLVENDO",labelBanca:"RECEBENDO",labelAssociacao:"DEVOLVENDO",color:"blue",showSiteBanca:!1,showSiteAssociacao:!1,order:1},ENVIADA:{id:"ENVIADA",labelBanca:"ENVIADA",labelAssociacao:"RECEBIDA",color:"green",showSiteBanca:!0,showSiteAssociacao:!0,order:2},DEVOLVIDA:{id:"DEVOLVIDA",labelBanca:"DEVOLVIDA",labelAssociacao:"DEVOLVIDA",color:"orange",showSiteBanca:!0,showSiteAssociacao:!0,order:3},ERRO:{id:"ERRO",labelBanca:"ERRO",labelAssociacao:"ERRO",color:"red",showSiteBanca:!1,showSiteAssociacao:!1,order:4}};var nr={Enter:{label:"Enter",value:"enter"},Ctrl:{label:"Ctrl",value:"ctrl"},Tab:{label:"Tab",value:"tab"},Space:{label:"\u23B5",value:"space"},Backspace:{label:"Backspace",value:"backspace"},Escape:{label:"Esc",value:"escape"},Delete:{label:"Del",value:"delete"},Backslash:{label:"\\",value:"backslash"},Semicolon:{label:";",value:"semicolon"},CapsLock:{label:"CapsLock",value:"capslock"},Quote:{label:"'",value:"quote"},Comma:{label:",",value:"decimal,comma"},Insert:{label:"Insert",value:"insert"},Home:{label:"Home",value:"home"},End:{label:"End",value:"end"},PageUp:{label:"Page Up",value:"pageup"},PageDown:{label:"Page Down",value:"pagedown"},ArrowUp:{label:"\u2191",value:"arrowup"},ArrowDown:{label:"\u2193",value:"arrowdown"},ArrowLeft:{label:"\u2190",value:"arrowleft"},ArrowRight:{label:"\u2192",value:"arrowright"},NumLock:{label:"Num Lock",value:"numlock"},Dot:{label:".",value:"period,comma"},Divide:{label:"/",value:"slash,divide"},Subtract:{label:"-",value:"minus,subtract"},Multiply:{label:"*",value:"multiply,shift+8"},Add:{label:"+",value:"add,shift+equal"},Equal:{id:"Equal",label:"=",value:"equal"},F1:{label:"F1",value:"f1"},F2:{label:"F2",value:"f2"},F3:{label:"F3",value:"f3"},F4:{label:"F4",value:"f4"},F5:{label:"F5",value:"f5"},F6:{label:"F6",value:"f6"},F7:{label:"F7",value:"f7"},F8:{label:"F8",value:"f8"},F9:{label:"F9",value:"f9"},F10:{label:"F10",value:"f10"},F11:{label:"F11",value:"f11"},F12:{label:"F12",value:"f12"},0:{label:"0",value:"0"},1:{label:"1",value:"1"},2:{label:"2",value:"2"},3:{label:"3",value:"3"},4:{label:"4",value:"4"},5:{label:"5",value:"5"},6:{label:"6",value:"6"},7:{label:"7",value:"7"},8:{label:"8",value:"8"},9:{label:"9",value:"9"},A:{label:"A",value:"a"},B:{label:"B",value:"b"},C:{label:"C",value:"c"},D:{label:"D",value:"d"},E:{label:"E",value:"e"},F:{label:"F",value:"f"},G:{label:"G",value:"g"},H:{label:"H",value:"h"},I:{label:"I",value:"i"},J:{label:"J",value:"j"},K:{label:"K",value:"k"},L:{label:"L",value:"l"},M:{label:"M",value:"m"},N:{label:"N",value:"n"},O:{label:"O",value:"o"},P:{label:"P",value:"p"},Q:{label:"Q",value:"q"},R:{label:"R",value:"r"},S:{label:"S",value:"s"},T:{label:"T",value:"t"},U:{label:"U",value:"u"},V:{label:"V",value:"v"},W:{label:"W",value:"w"},X:{label:"X",value:"x"},Y:{label:"Y",value:"y"},Z:{label:"Z",value:"z"}};var cr={EM_ESPERA:{id:"EM_ESPERA",label:"Esperando aprova\xE7\xE3o",color:"orange"},APROVADO:{id:"APROVADO",label:"Aprovado",color:"green"},BLOQUEADO:{id:"BLOQUEADO",label:"Bloqueado",color:"red"}};var N={1:{id:"1",order:1,label:"1\xBA Pr\xEAmio",labelShort:"1\xBA"},2:{id:"2",order:2,label:"2\xBA Pr\xEAmio",labelShort:"2\xBA"},3:{id:"3",order:3,label:"3\xBA Pr\xEAmio",labelShort:"3\xBA"},4:{id:"4",order:4,label:"4\xBA Pr\xEAmio",labelShort:"4\xBA"},5:{id:"5",order:5,label:"5\xBA Pr\xEAmio",labelShort:"5\xBA"},"1-5":{id:"1-5",order:6,label:"1\xBA ao 5\xBA Pr\xEAmio",labelShort:"1\xBA ao 5\xBA"}};var Oe={[f.milhar.id]:{id:f.milhar.id,label:f.milhar.label,order:1},[f.centena.id]:{id:f.centena.id,label:f.centena.label,order:2},[f.dezena.id]:{id:f.dezena.id,label:f.dezena.label,order:3},[f.grupo.id]:{id:f.grupo.id,label:f.grupo.label,order:4},[f["terno.dezena"].id]:{id:f["terno.dezena"].id,label:f["terno.dezena"].label,order:5},[f["terno.grupo"].id]:{id:f["terno.grupo"].id,label:f["terno.grupo"].label,order:6},[f["duque.dezena"].id]:{id:f["duque.dezena"].id,label:f["duque.dezena"].label,order:7},[f["duque.grupo"].id]:{id:f["duque.grupo"].id,label:f["duque.grupo"].label,order:8},restante:{id:"restante",label:"Restante",order:9}};var Y={vendas:{id:"vendas",label:"Vendas",color:"red",showSite:!0,ordem:1},premios:{id:"premios",label:"Pr\xEAmios",color:"red",showSite:!0,ordem:2},revisando:{id:"revisando",label:"Revisando",color:"blue",showSite:!0,ordem:3},concluida:{id:"concluida",label:"Conclu\xEDda",color:"green",showSite:!0,ordem:4}};var y=e=>({id:e?.id||"",id_integer:e?.id_integer||"",role:e?.role||b.super_admin.id,name:e?.name||"Gerado automaticamente pelo sistema",login:e?.login||""});var Le={};U(Le,{clone:()=>I,combineDateTime:()=>uo,dateToNumber:()=>c,delay:()=>_o,dividirArray:()=>Do,formatterBRL:()=>ho,formatterPercentage:()=>bo,formatterPercentageDecimal:()=>No,generateId:()=>J,getAllCombinations:()=>pe,getCodigoAuth:()=>ue,getDataInicioFim:()=>To,getInitials:()=>So,matchNormalized:()=>Eo,normalize:()=>Z,numberToDate:()=>_,numbersSelectedFormated:()=>Ao,parserBRL:()=>xo,parserPercentage:()=>Po,parserPercentageDecimal:()=>Io,pegarHorarioSaoPaulo:()=>m,removerLetters:()=>Ro,showFormatDate:()=>C});import mr from"clone-deep";var I=e=>mr(e);import{isValid as dr}from"date-fns";var c=e=>{if(!e||!dr(e))return 0;let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return+`${o}${r}${t}${a}${n}${s}`};import{parse as pr,isValid as ur}from"date-fns";import lr from"moment-timezone";var m=()=>{let e=lr.tz(new Date,"America/Sao_Paulo").format("DD_MM_YYYY_HH_mm_ss_SSS"),[o,r,t,a,n,s,u]=e.split("_");return new Date(Number(t),Number(r)-1,Number(o),Number(a),Number(n),Number(s),Number(u))};var _=e=>{if(!e)return;let o=e.toString(),r=o.slice(0,4),t=o.slice(4,6),a=o.slice(6,8),n=o.slice(8,10),s=o.slice(10,12),u=o.slice(12,14),l=`${r}-${t}-${a} ${n}:${s}:${u}`,T=m(),d=pr(l,"yyyy-MM-dd HH:mm:ss",T);return ur(d)?d:void 0};var uo=(e,o)=>{let r=_(e),t=_(o);if(!r||!t)return 0;let a=r.getFullYear(),n=r.getMonth(),s=r.getDate(),u=t.getHours(),l=t.getMinutes(),T=t.getSeconds(),d=new Date(a,n,s,u,l,T,0);return c(d)};import{setHours as go,setMinutes as fo,setSeconds as yo}from"date-fns";var To=({dataAposta:e})=>{let o=yo(fo(go(_(e)||m(),0),0),0),r=yo(fo(go(_(e)||m(),23),59),59);return{dataInicio:c(o),dataFim:c(r)}};var ho=e=>{let o=e;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(o||0)},xo=e=>{let o=e;o=o.replace(/\D/g,"");let r=parseFloat(o||"0");return r/=100,r};var vo=e=>{if(e.length===0)return[[]];let o=new Set;for(let r=0;r<e.length;r++){let t=e[r],a=[...e.slice(0,r),...e.slice(r+1)],n=vo(a);for(let s of n)o.add([t,...s])}return Array.from(o)},pe=e=>{let o=e.toString().split(""),r=vo(o),t=new Set(r.map(a=>a.join("")));return Array.from(t)};import{format as gr}from"date-fns";var C=(e,o)=>{if(!e)return"N/A";let r=_(e);return r?gr(r,o||"dd/MM/yyyy"):"N/A"};var Ao=e=>{let o=e.map(Number);if(o.length===0)return"";o.sort((n,s)=>n-s);let r="",t=o[0],a=t;for(let n=1;n<=o.length;n++)n<o.length&&o[n]===a+1?a=o[n]:(t===a?r+=t:r+=`${t} ao ${a}`,n<o.length&&(r+=", ",t=o[n],a=t));return r};var J=e=>{let o=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return`${e?`${e}-`:""}${o()+o()}-${o()}-${o()}-${o()}-${o()}${o()}${o()}`};var ue=(e,o)=>(e=Math.ceil(e),o=Math.floor(o),Math.floor(Math.random()*(o-e+1))+e);var Do=(e,o=1e3)=>{let r=[];for(let t=0;t<e.length;t+=o){let a=e.slice(t,t+o);r.push(a)}return r};var _o=e=>new Promise(o=>setTimeout(o,e));var Z=e=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");var Eo=(e,o)=>Z(e).includes(Z(o));var So=e=>e?e.trim().split(/\s+/).filter(t=>t.length>=2).slice(0,2).map(t=>t[0].toUpperCase()).join(""):"";var bo=e=>`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`;var Po=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))):Number(Number(e||"0").toFixed(2)));var No=e=>(e*=100,`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`),Io=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))/100):Number(Number(e||"0").toFixed(2))/100);var Ro=e=>e.replace(/[^0-9]/g,"");var j=e=>({id:e?.id||"",id_integer:e?.id_integer||"",horario:e?.horario||0,bloqueio:e?.bloqueio||0,bancaId:e?.bancaId||"",ativo:e?.ativo??!0,inativo_no_dia:e?.inativo_no_dia||[],description:e?.description||"",somente_no_feriado:e?.somente_no_feriado||0,createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),days:{0:e?.days?.[0]??!1,1:e?.days?.[1]??!1,2:e?.days?.[2]??!1,3:e?.days?.[3]??!1,4:e?.days?.[4]??!1,5:e?.days?.[5]??!1,6:e?.days?.[6]??!1}});var ze={};U(ze,{arredondarParaCima:()=>G,calculaValoresDosNumeros:()=>he,calcularValorDeNumero:()=>ye,formatarNumero:()=>F,generateDescargas:()=>Ve,gerarDezenas:()=>Co,getCreatedBySystem:()=>y,getLimiteSimulado:()=>wo,getNumeroId:()=>fe,getNumerosAcimaDoLimite:()=>Go,getPremioFormato:()=>Te,getPropsEnvioId:()=>xe,getPropsEnvioIdOld:()=>ve,getPropsPrefix:()=>W,getPropsVP:()=>Ae,getSomaEnvio:()=>ge,getSomaProps:()=>Lo,getSomaVP:()=>Mo,getTiposJogos:()=>Q,sortNumeros:()=>Oo});var F=(e,o)=>{let r="",t=e.length-1,a=o.length-1;for(;a>=0;)o[a]==="#"?(r=e[t]+r,t--):o[a]==="-"&&(r="-"+r),a--;return r};var Fe=(e,o)=>{let r=o,t=e?.envioIds?.length>0?e.envioIds[e.envioIds.length-1]:"";return w({...e,id:r,premio:e.premio,amount:e.amount,numeros:[e.numero],amountEnviadoParaAssociacao:e.amountEnviadoParaAssociacao,valorAEnviarParaAssociacao:e.valorAEnviarParaAssociacao,envioId:t,dataAposta:e.dataAposta,bancaId:e.bancaId,valorArredondado:e.valorArredondado,limiteJogoReal:e.limiteJogoReal,limiteJogoSimulado:e.limiteJogoSimulado,valorJogo:e.valorJogo})};var we=(e,o)=>{let r=o?G(Number(e[o])):G(e.amount);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${r}`};var Ve=(e,o)=>{let r={};return Object.entries(e).forEach(([,t])=>{let a=we(t,o);r[a]?r[a].numeros.push(t.numero):r[a]=Fe(t,a)}),r};var Co=e=>{let o=[];e.forEach(a=>{let n=f[a.name];a.numbers.forEach(s=>{if(n.id==="dezena"){let T=s.split("-");for(let d of T){if(d.length<n.format.length)continue;let v=F(d,n.format);o.push(v)}return}let u=s.replaceAll("-","");if(u.length<n.format.replaceAll("-","").length)return;let l=F(u,n.format);o.push(l)})});let r=new Set(o);return Array.from(r)};var ge=e=>{let o=0;return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o+=t)}),o};var Mo=e=>{let o=0,r=0;Object.entries(e).forEach(([a,n])=>{a.startsWith("vp_")&&typeof n=="number"&&(o+=n,n>0&&(r+=1))});let t=ge(e);return o-=t,{soma:o,quantidadeDePulesMaiorQueZero:r,somaEnviadoParaAssociacao:t}};var fe=e=>{let{dataAposta:o,jogo:r,numero:t,bancaId:a,premio:n,descarregado:s}=e,u=f[r],l=u.markAll?t:F(t,u.format),T=s?"true":"false";return(a?`${a}_`:"")+`${o}_${r}_${n}_${l}_${T}`};var Q=e=>e.replaceAll(".invertida","").split("@");var ye=({quantidadeDeNumeros:e,tipoJogo:o,valorPremio:r,quantidadeDePremios:t})=>{let a=f[o],n=Q(o),s=r/(n.length||1);return s/=e,a.markAll||(s/=t||1),t===0&&(s=0),s};var Te=e=>e===1?N[1].id:e===2?N[2].id:e===3?N[3].id:e===4?N[4].id:e===5?N[5].id:N["1-5"].id;var he=e=>{let o={},r=m(),t=c(r);for(let a of e.bets){let n=Q(a.name),s=a.numbers.length;for(let u of n)for(let l of a.numbers)for(let T of a.prizes)for(let d of T.prizes){let v=f[u],O=ye({valorPremio:T.value,tipoJogo:a.name,quantidadeDeNumeros:s,quantidadeDePremios:T.prizes.length}),R=Te(d),q=l;v.markAll?R="1-5":q=F(l,v.format);let h=fe({numero:l,bancaId:e.bancaId,dataAposta:e.dateBet,jogo:u,premio:R});o?.[h]||(o[h]=V({id:h,numero:q,premio:R,created:t,bancaId:e.bancaId,amount:0,valorArredondado:0,dataAposta:e.dateBet,tipo_jogo:u,[`${"vp_"}${e.id}`]:0}));let $=Number(O.toFixed(2));v.markAll?(o[h][`${"vp_"}${e.id}`]=$,o[h].amount=$,o[h].valorArredondado=G($)):(o[h][`${"vp_"}${e.id}`]+=$,o[h].amount+=$,o[h].valorArredondado+=G($))}}return{numeros:o}};var Bo=2,Go=(e,o,r)=>e.map(t=>{let a=X.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=X.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),u=Number(t.amount.toFixed(Bo)),l=Number(s.toFixed(Bo)),T=u-l;return u>l?{numero:t,diferenca:T}:null}).filter(Boolean);var G=e=>{let o=Math.round(e*100),r=o%5;return r!==0&&(o+=5-r),o/100};var Oo=e=>{let o=Object.values(e).sort((r,t)=>{let a=f[r.tipo_jogo].order,n=f[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:r.amount>t.amount?-1:1});return Object.fromEntries(o.map(r=>[r.id,r]))};var xe=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var ve=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Ae=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.startsWith("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var W=e=>{let o={vp_:{},[z]:{},[B]:{}},r=I(Ae(e)),t=I(xe(e)),a=I(ve(e));return o["vp_"]=I(r),o[z]=I(t),o[B]=I(a),o};var Lo=e=>{let o=0;return Object.values(e).forEach(r=>{o+=r}),o};var De=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Ue={};U(Ue,{calcularValorJogoPeloLimite:()=>Fo,getLimiteJogoPeloTipoJogo:()=>De,getValorJogoPeloTipoJogo:()=>_e});var Fo=(e,o)=>e/(o||1);var _e=(e,o)=>Object.values(e).find(r=>r.type_game===o);var wo=(e,o,r)=>{let t=_e(o,e),n=(De(r,e)?.limit||0)/(t?.value||1);return Number(n.toFixed(2))};var $e={};U($e,{extracaoEstaAtivaBoolean:()=>Qo,extracaoEstaAtivaTryCatch:()=>Ne,getAvailableTimes:()=>$o,getProximaExtracaoDisponivelParaAposta:()=>Xo,pegarExtracoes:()=>Pe});import{format as qe,getDay as hr}from"date-fns";var Je={};U(Je,{calculateAmount:()=>Ee,calculateAmountGame:()=>Se,fazerJogo:()=>zo,formatPuleId:()=>Vo,getBetDateToNumber:()=>M,getFormattedPuleId:()=>Uo,getGamesUnicosList:()=>Jo,getGamesUnicosObjeto:()=>qo,invertGame:()=>be});var Ee=e=>{let o=0;return e.forEach(r=>{o+=r.value}),o};var Se=e=>{let o=0;return e.forEach(r=>{o+=Ee(r.prizes)}),o};import{setHours as fr,setMinutes as yr,setSeconds as Tr}from"date-fns";var M=(e,o)=>{let t=_(o),a=_(e);return!a||!t?0:(a=fr(a,t.getHours()),a=yr(a,t.getMinutes()),a=Tr(a,0),c(a))};var Vo=e=>e<1e3?e.toString().padStart(4,"0"):e.toString();var Uo=e=>{let o=e.split("-");return o[o.length-1]};var be=e=>{let o=I(e);for(let r=0;r<o.bets.length;r++){let t=o.bets[r];if(t.name==="milhar.invertida"||t.name==="centena.invertida"||t.name==="milhar.invertida@centena.invertida"){let a=t.numbers,n=[];for(let s of a){let u=pe(s);n.push(...u)}t={...t,numbers:I(n)},o.bets[r]=t}}return o};var zo=(e,o,r,t,a)=>{let n=k({...e,id:a,creator:o,dateBet:M(r,t.horario),totalAmount:Se(e.bets),extracao:t}),s=be(n),{numeros:u}=he(s);return{numeros:u,game:n}};var Jo=()=>Object.values(f).filter(e=>!e.id.includes("@")&&!e.id.includes("invertida")),qo=()=>Object.values(f).filter(r=>!r.id.includes("@")&&!r.id.includes("invertida")).reduce((r,t)=>(r[t.id]=t,r),{});var $o=(e,o,r,t,a)=>{let n=M(o,20241001e6),s=e.filter(d=>d.ativo&&!d.inativo_no_dia.includes(n)),u=_(n),l=[],T=s.filter(d=>d.somente_no_feriado===n);return T.length>0?l=[...T]:l=s.filter(d=>u&&d.days[hr(u)]&&d.somente_no_feriado===0),r&&(l=[...s]),t&&u&&a&&qe(a,"dd/MM/yyyy")===qe(u,"dd/MM/yyyy")&&(l=l.filter(d=>Number(qe(a,"HHmm"))<Number(C(d.bloqueio,"HHmm")))),l.sort((d,v)=>Number(C(d.horario,"HHmm"))<Number(C(v.horario,"HHmm"))?-1:1)};import{format as xr,getDay as vr}from"date-fns";var Pe=({extracoes:e,dataAposta:o=c(m()),dataAgora:r=c(m()),retornar:t="do_dia",pegar:a="bloqueio"})=>{let n=h=>a==="horario"?h.horario:a==="bloqueio"?h.bloqueio:0,s=M(o,20241001e6),u=M(r,20241001e6),l=_(s);if(!l)throw new Error("dataApostaDate \xE9 obrigat\xF3ria!");let T=e.filter(h=>h.ativo&&!h.inativo_no_dia.includes(s)),d=T.filter(h=>h.somente_no_feriado===s),v=d.length>0?d:T.filter(h=>h.days[vr(l)]&&h.somente_no_feriado===0);if(t==="do_dia")return v.sort(ko);let O=_(r);if(!O)throw new Error("dataAgoraDate \xE9 obrigat\xF3ria!");let R=Number(xr(O,"HHmm"));return(t==="proximas"?v.filter(h=>s===u?R<Number(C(n(h),"HHmm")):s>u):t==="anteriores"?v.filter(h=>u===s?R>=Number(C(n(h),"HHmm")):s<u):[]).sort(ko)},ko=(e,o)=>Number(C(e.horario,"HHmm"))-Number(C(o.horario,"HHmm"));import{getDay as Ho}from"date-fns";var Ne=(e,o)=>{if(!o.ativo)throw new Error("Extra\xE7\xE3o n\xE3o est\xE1 ativa.");if(o.inativo_no_dia.includes(e))throw new Error("Extra\xE7\xE3o est\xE1 inativa no dia da aposta.");if(o.somente_no_feriado!==0&&o.somente_no_feriado!==e)throw new Error("Extra\xE7\xE3o n\xE3o funciona neste feriado.");let r=_(e);if(!r)throw new Error("Data da aposta inv\xE1lida.");if(!o.days[Ho(r)]){let a=["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"][Ho(r)];throw new Error(`Extra\xE7\xE3o n\xE3o funciona neste dia da semana (${a}).`)}};var Qo=(e,o)=>{try{return Ne(e,o),!0}catch{return!1}};var Xo=(e,o,r)=>{if(!e||e.length===0)return;let t=Pe({extracoes:e,dataAgora:o,dataAposta:o,retornar:"do_dia"});if(t.length===0)return;if(!r)return t[0];let a=t.findIndex(n=>{let s=o,u=n.horario,l=M(s,u);return r?.dataSorteio&&r.dataSorteio===l});return a!==-1?t[a+1]:t[0]};var eo={};U(eo,{getLimitsRest:()=>Ko,getPermission:()=>Wo,isAdm:()=>ke,isAdmOrSubAdm:()=>Xe,isAssociacao:()=>He,isCambista:()=>Ke,isCambistaTalao:()=>We,isDigitador:()=>Ze,isDigitadorAdm:()=>Ye,isDigitadorOrDigitadorAdm:()=>je,isSuperAdm:()=>Qe});var Ar=["admin"],Dr=["admin","sub_admin"],_r=["associacao"],Er=["super_admin"],Sr=["cambista_talao"],br=["cambista"],Pr=["digitador_adm"],Nr=["digitador"],Ir=["digitador","digitador_adm"],ke=e=>Ar.includes(e.role),He=e=>_r.includes(e.role),Qe=e=>Er.includes(e.role),Xe=e=>Dr.includes(e.role),We=e=>Sr.includes(e.role),Ke=e=>br.includes(e.role),Ye=e=>Pr.includes(e.role),Ze=e=>Nr.includes(e.role),je=e=>Ir.includes(e.role),Wo={isAdm:ke,isAssociacao:He,isSuperAdm:Qe,isAdmOrSubAdm:Xe,isCambistaTalao:We,isCambista:Ke,isDigitadorAdm:Ye,isDigitador:Ze,isDigitadorOrDigitadorAdm:je};var Ko=e=>{let o=0,r=0;return Object.values(e.jogos.hoje).forEach(t=>o+=t),Object.values(e.jogos.pre).forEach(t=>r+=t),{hoje:o,pre:r}};var ro={};U(ro,{generateDescarga:()=>Fe,generateDescargas:()=>Ve,getDescargaIdPeloEnvio:()=>Or,getDescargaIdPeloNumero:()=>we,getDescargasAcimaDoLimite:()=>Cr,getPropsEnvioId:()=>Br,getPropsEnvioIdOldDescarga:()=>Gr,getPropsVPDescarga:()=>Mr,getTotalGeralDescarga:()=>oo,sortDescargas:()=>Rr});var Rr=e=>{let o=Object.values(e).sort((r,t)=>{let a=f[r.tipo_jogo].order,n=f[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:t.amount-r.amount});return Object.fromEntries(o.map(r=>[r.id,r]))};var Yo=2,Cr=(e,o,r)=>e.map(t=>{let a=X.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=X.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),u=Number(t.amount.toFixed(Yo)),l=Number(s.toFixed(Yo)),T=u-l;return u>l?{descarga:t,diferenca:T}:null}).filter(Boolean);var Mr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.split("_").includes("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var Br=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Gr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Or=(e,o)=>{let r=`${B}${o}`,t=e[r];if(t==null)throw new Error(`Valor do envio '${o}' n\xE3o encontrado no n\xFAmero.`);if(typeof t!="number")throw new Error(`Valor do envio '${o}' deve ser um n\xFAmero.`);let a=G(t);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${a}_envio_${o}`};var oo=(e,o)=>{let r={jogos:{},totalBruto:0,totalLiquido:0,totalComissao:0},t=Object.entries(e),a=Object.values(o),n=a.find(s=>s.type_game==="restante");for(let[s,u]of t){let l=u??0,T=a.find(d=>s===d.type_game);if(r.totalBruto+=l,T){let d=Oe[s],v=l*(T.porcentagem/100),O=l-v;r.jogos[s]={totalEnviado:l,totalComissao:v,totalLiquido:O,ordem:d?.order||0,tipo:s,label:d?.label||s},r.totalLiquido+=O,r.totalComissao+=v}else if(r.jogos.restante||(r.jogos.restante={totalEnviado:0,totalLiquido:0,totalComissao:0,ordem:9,tipo:"restante",label:"Restante"}),r.jogos.restante.totalEnviado+=l,n){let d=l*(n.porcentagem/100),v=l-d;r.jogos.restante.totalLiquido+=v,r.jogos.restante.totalComissao+=d,r.totalLiquido+=v,r.totalComissao+=d}else r.jogos.restante.totalLiquido+=l,r.totalLiquido+=l}return r};var ao={};U(ao,{agruparEnvioPorExtracao:()=>Lr,criarEstruturaJogo:()=>Ie,getComissoesDoEnvio:()=>to});var Ie=(e,o)=>({totalEnviado:o.totalEnviado,totalLiquido:o.totalLiquido,totalComissao:o.totalComissao,ordem:o.ordem,tipo:o.tipo,label:o.label});var ee=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",porcentagem:e?.porcentagem||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var to=e=>{let o={};for(let r of e){let t=ee({...r,id:r.id||J()});o[t.id]=t}return o};var Lr=({envios:e})=>{let o=[],r=Object.values(e);for(let t of r){let a=to(t.comissoesDescarga),n=t.extracao.id,s=o.find(l=>l.extracao.id===n),u=oo(t.totalGeralJogos,a);if(!s)o.push({extracao:t.extracao,jogos:Object.entries(u.jogos).reduce((l,[T,d])=>(l[T]=Ie(T,d),l),{}),totalBruto:u.totalBruto,totalLiquido:u.totalLiquido,totalComissao:u.totalComissao});else{for(let[l,T]of Object.entries(u.jogos)){let d=s.jogos;d[l]?d[l]={totalEnviado:Number(d[l].totalEnviado)+Number(T.totalEnviado),totalLiquido:Number(d[l].totalLiquido)+Number(T.totalLiquido),totalComissao:Number(d[l].totalComissao)+Number(T.totalComissao),ordem:T.ordem,tipo:T.tipo,label:T.label}:d[l]=Ie(l,T)}s.totalBruto+=Number(u.totalBruto),s.totalLiquido+=Number(u.totalLiquido),s.totalComissao+=Number(u.totalComissao)}}return o};var X={numbers:ze,extracao:$e,descarga:ro,games:Je,users:eo,limite_jogos:Ue,utils:Le,envio:ao};var oe=e=>({id:e?.id||"",id_integer:e?.id_integer||"",extracaoIds:e?.extracaoIds||[],content:e?.content||"",visualizacao:e?.visualizacao||"jogo_hoje",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),date:{from:e?.date?.from||0,to:e?.date?.to||0},fixa:e?.date?.to===0||e?.date?.from===0,tipo:e?.tipo||[],updated:e?.updated||c(m()),created:e?.created||c(m())});var re=e=>({id:e?.id||"",id_integer:e?.id_integer||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",horario:e?.extracao?.horario||0,description:e?.extracao?.description||""},milhares:{1:e?.milhares?.[1]??"",2:e?.milhares?.[2]??"",3:e?.milhares?.[3]??"",4:e?.milhares?.[4]??"",5:e?.milhares?.[5]??""},grupos:{1:e?.grupos?.[1]??"",2:e?.grupos?.[2]??"",3:e?.grupos?.[3]??"",4:e?.grupos?.[4]??"",5:e?.grupos?.[5]??""},bichos:{1:e?.bichos?.[1]??"",2:e?.bichos?.[2]??"",3:e?.bichos?.[3]??"",4:e?.bichos?.[4]??"",5:e?.bichos?.[5]??""},liberado:e?.liberado??!1,dataSorteio:e?.dataSorteio||0});var te=e=>({id:e?.id||"",id_integer:e?.id_integer||"",comission:e?.comission??0,name:e?.name||"",responsible:e?.responsible||"",codigo_rota:e?.codigo_rota||"",tipo:e?.tipo||"cambista",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var K=e=>({id:e?.id??"",id_integer:e?.id_integer||"",active:e?.active??!0,bet_limit:e?.bet_limit??0,comission:e?.comission??0,bancaId:e?.bancaId||"",photoURL:e?.photoURL||"",name:e?.name||"",sessionId:e?.sessionId||"",codigo_cambista:e?.codigo_cambista||"",deviceId:e?.deviceId||"",role:e?.role||b.cambista.id,pre_date_limit:e?.pre_date_limit||0,dispositivos:{dispositivoIdAtual:e?.dispositivos?.dispositivoIdAtual||"",listaDispositivosConectados:e?.dispositivos?.listaDispositivosConectados||[]},route:{id:e?.route?.id||"",name:e?.route?.name||"",tipo:e?.route?.tipo||b.cambista.id},type_games:e?.type_games?e?.type_games.filter(o=>f?.[o]?.id):[],login:e?.login||"",jogos:{hoje:e?.jogos?.hoje||{},pre:e?.jogos?.pre||{}},preferences:{darkMode:e?.preferences?.darkMode??!1,pdfLegado:e?.preferences?.pdfLegado??!1},permissoes:{podeEnviarParaAssociacao:e?.permissoes?.podeEnviarParaAssociacao??!1,podeCancelarPule:e?.permissoes?.podeCancelarPule??!1,podeReservar:e?.permissoes?.podeReservar??!1,podeJogarSurpresinha:e?.permissoes?.podeJogarSurpresinha??!0},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ae=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",value:e?.value??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var k=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",origem_pule_id:e?.origem_pule_id||"",bets:e.bets||[],creator:{id:e?.creator?.id||"",id_integer:e?.creator?.id_integer||"",codigo_cambista:e?.creator?.codigo_cambista||"",name:e?.creator?.name||"",role:e?.creator?.role||b.cambista.id,login:e?.creator?.login||"",comission:e?.creator?.comission||0,route:{id:e?.creator?.route?.id||"",name:e?.creator?.route?.name||"",tipo:e?.creator?.route?.tipo||b.cambista.id}},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),totalAmount:e?.totalAmount||0,bancaId:e?.bancaId||"",codigoAuth:e?.codigoAuth||ue(1e5,999999).toString(),cancel:{canceled:e?.cancel?.canceled??!1,canceledAt:e?.cancel?.canceledAt||0,reason:e?.cancel?.reason||""},valorNumerosNaPule:e?.valorNumerosNaPule||{},infoJogos:e?.infoJogos||[],tiposJogos:e?.tiposJogos||{},reservada:e?.reservada||!1,dias_disponiveis:e?.dias_disponiveis||[],dateBet:e?.dateBet||0,status:e.status||Be.JOGADA.id,statusReason:e?.statusReason||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0}});var V=(e={})=>{let o=N[e?.premio||"1"].order,r=f[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",id_integer:e?.id_integer||"",envioIds:e?.envioIds||[],ordemPremioExibicao:o,ordemJogoExibicao:r,numero:e?.numero||"",amount:e?.amount||0,premio:e?.premio||"1",bancaId:e?.bancaId||"",valorArredondado:e?.valorArredondado||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),descarregado:e?.descarregado??!1,dataAposta:e?.dataAposta||0},a=W(e);return t={...t,...a["vp_"],...a[z],...a[B]},t};var Fr=(e={})=>({name:e?.name||"milhar",numbers:e?.numbers||[],prizes:e?.prizes||[]});var ie=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",pule:{id:e?.pule?.id||"",id_integer:e?.pule?.id_integer||"",created:e?.pule?.created||0,cancel:{canceled:e?.pule?.cancel?.canceled||!1,canceledAt:e?.pule?.cancel?.canceledAt||0,reason:e?.pule?.cancel?.reason||""},createdBy:{id:e?.pule?.createdBy?.id||"",id_integer:e?.pule?.createdBy?.id_integer||"",role:e?.pule?.createdBy?.role||"cambista",name:e?.pule?.createdBy?.name||"",login:e?.pule?.createdBy?.login||""},creator:{id:e?.pule?.creator?.id||"",id_integer:e?.pule?.creator?.id_integer||"",codigo_cambista:e?.pule?.creator?.codigo_cambista||"",login:e?.pule?.creator?.login||"",name:e?.pule?.creator?.name||"",role:e?.pule?.creator?.role||"cambista",comission:e?.pule?.creator?.comission||0,route:{id:e?.pule?.creator?.route?.id||"",name:e?.pule?.creator?.route?.name||"",tipo:e?.pule?.creator?.route?.tipo||"cambista"}}},premiosItems:e?.premiosItems||[],valorTotalPremio:e?.valorTotalPremio||0,valorTotalPremioBanca:e?.valorTotalPremioBanca||0,valorTotalPremioAssociacao:e?.valorTotalPremioAssociacao||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var H=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,descargas:e?.descargas||{},link_pdf:e?.link_pdf||"",bancaId:e.bancaId||"",visualizado:e?.visualizado||!1,createdBy:y(e?.createdBy),created:e?.created||0,updated:e?.updated||0});var se=(e={})=>({id:e?.id||"",nome:e?.nome||"",settings:{urlLogo:e?.settings?.urlLogo||"",urlLogoImpressao:e?.settings?.urlLogoImpressao||"",urlBackground:e?.settings?.urlBackground||"",backgroundColor:e?.settings?.backgroundColor||""},endereco:{cep:e?.endereco?.cep||"",logradouro:e?.endereco?.logradouro||"",numero:e?.endereco?.numero||"",bairro:e?.endereco?.bairro||"",cidade:e?.endereco?.cidade||"",estado:e?.endereco?.estado||""},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ne=(e={})=>({id:e?.id||"",tipo:e?.tipo||"add",bancaId:e?.bancaId||"",message:e?.message||"",colecao:e?.colecao||"",documentId:e?.documentId||"",author:y(e?.author),document:e?.document||{},updated:e?.updated||c(m()),created:e?.created||c(m())});var ce=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",limit:e?.limit??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var me=e=>({id:e?.id||"",id_integer:e?.id_integer||"",visualizado:e?.visualizado||!1,banca:{id:e?.banca?.id||"",nome:e?.banca?.nome||""},dataAposta:e?.dataAposta||0,totalGeralJogos:{milhar:e?.totalGeralJogos?.milhar??0,centena:e?.totalGeralJogos?.centena||0,dezena:e?.totalGeralJogos?.dezena||0,grupo:e?.totalGeralJogos?.grupo||0,"terno.dezena":e?.totalGeralJogos?.["terno.dezena"]||0,"terno.grupo":e?.totalGeralJogos?.["terno.grupo"]||0,"duque.dezena":e?.totalGeralJogos?.["duque.dezena"]||0,"duque.grupo":e?.totalGeralJogos?.["duque.grupo"]||0},extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0},devolvidoPor:{id:e?.devolvidoPor?.id||"",id_integer:e?.devolvidoPor?.id_integer||"",name:e?.devolvidoPor?.name||"",login:e?.devolvidoPor?.login||""},bancaId:e?.bancaId||"",description:e?.description||"",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),status:e?.status||Ge.ENVIANDO.id,totalEnviados:e?.totalEnviados||0,totalRegistros:e?.totalRegistros||0,progresso:e?.progresso||0,mensagem:e?.mensagem||"",concluidoEm:e?.concluidoEm||0,ultimaAtualizacao:e?.ultimaAtualizacao||0,metricas:{tempoMinimo:e?.metricas?.tempoMinimo||0,tempoMaximo:e?.metricas?.tempoMaximo||0,tempoMedio:e?.metricas?.tempoMedio||0,duracaoTotal:e?.metricas?.duracaoTotal||0,tempoEstimado:e?.metricas?.tempoEstimado||0,velocidadeProcessamento:e?.metricas?.velocidadeProcessamento||0,textosFormatados:{duracaoTotalText:e?.metricas?.textosFormatados?.duracaoTotalText||"",tempoMinimoText:e?.metricas?.textosFormatados?.tempoMinimoText||"",tempoMaximoText:e?.metricas?.textosFormatados?.tempoMaximoText||"",tempoMedioText:e?.metricas?.textosFormatados?.tempoMedioText||"",tempoEstimadoText:e?.metricas?.textosFormatados?.tempoEstimadoText||""}},atualizadoEm:e?.atualizadoEm||0,erro:e?.erro||"",iniciadoEm:e?.iniciadoEm||0,user:{id:e?.user?.id||"",id_integer:e?.user?.id_integer||"",name:e?.user?.name||"",login:e?.user?.login||""},valoresJogos:e?.valoresJogos||[],limitesJogos:e?.limitesJogos||[],comissoesDescarga:e?.comissoesDescarga||[]});var w=(e={})=>{let o=N[e?.premio||"1"].order,r=f[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",ordemJogoExibicao:r,ordemPremioExibicao:o,numeros:e?.numeros||[],quantidadeDeNumeros:e?.quantidadeDeNumeros||0,bancaId:e?.bancaId||"",amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,envioId:e?.envioId||"",amount:e?.amount||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,valorArredondado:e?.valorArredondado||0,dataAposta:e?.dataAposta||0,premio:e?.premio||"1",tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m())},a=W(e);return t={...t,...a["vp_"],...a[z],...a[B]},t};var de=(e={})=>({id:e?.id||"",userId:e?.userId||"",createdBy:e?.createdBy||y(),created:e?.created||c(m()),updated:e?.updated||c(m()),deviceId:e?.deviceId||"",bancaId:e?.bancaId||"",deviceName:e?.deviceName||"",status:e?.status||"EM_ESPERA",ultimoLogin:e?.ultimoLogin||0,plataforma:e?.plataforma||"mobile",ip:e?.ip||"",versaoApp:e?.versaoApp||""});var le=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",numero:e?.numero||"",premio:e?.premio||"",tipo_jogo:e?.tipo_jogo||"milhar",valorPremioAReceber:e?.valorPremioAReceber||0,valorEnviadoParaAssociacao:e?.valorEnviadoParaAssociacao||0,limiteTipoJogo:e?.limiteTipoJogo||0,valorTipoJogo:e?.valorTipoJogo||0,pulesGanhadoras:e?.pulesGanhadoras||{},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var io=e=>({id:e?.id||"",id_integer:e?.id_integer||"",bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",horario:e?.extracao?.horario||0,bloqueio:e?.extracao?.bloqueio||0},rota:{id:e?.rota?.id||"",id_integer:e?.rota?.id_integer||"",codigo_rota:e?.rota?.codigo_rota||"",name:e?.rota?.name||"",tipo:e?.rota?.tipo||b.cambista_talao.id,comission:e?.rota?.comission||0},cambistasIds:e?.cambistasIds||[],dataAposta:e?.dataAposta||0,valorTotalVendas:e?.valorTotalVendas||0,valorTotalPremios:e?.valorTotalPremios||0,valorTotalComissao:e?.valorTotalComissao||0,status:e?.status||Y.vendas.id,puleIdsPremios:e?.puleIdsPremios||[],createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var so=e=>({id:e?.id||"",id_integer:e?.id_integer||"",guiaId:e?.guiaId||"",bancaId:e?.bancaId||"",extracaoId:e?.extracaoId||"",rotaId:e?.rotaId||"",cambista:{id:e?.cambista?.id||"",id_integer:e?.cambista?.id_integer||"",codigo_cambista:e?.cambista?.codigo_cambista||"",name:e?.cambista?.name||"",login:e?.cambista?.login||"",role:e?.cambista?.role||b.cambista_talao.id,comission:e?.cambista?.comission||0},valor:e?.valor||0,valorComissao:e?.valorComissao||0,pulePremiadaId:e?.pulePremiadaId||"",tipo:e?.tipo||Y.vendas.id,dataAposta:e?.dataAposta||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var no=e=>({id:e?.id||"",id_integer:e?.id_integer||"",tipo_jogo:e?.tipo_jogo||"all",limite:e?.limite||0,bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var wr={mensagens:oe,users:K,guias:io,guias_items:so,limites_numero_aposta:no,valores_jogos:ae,limites_jogos:ce,pules:k,extracoes:j,resultados:re,rotas:te,envios_descarga:me,numeros:V,numeros_enviados:V,descargas:w,descargas_associacao:w,premiacoes:ie,premiacoes_associacao:le,pdf_descargas:H,pdf_descargas_associacao:H,bancas:se,auditLogs:ne,dispositivos:de,comissoes_descarga:ee};var Vr={mensagens:!0,users:!0,guias:!0,guias_items:!0,valores_jogos:!0,limites_jogos:!0,pules:!0,limites_numero_aposta:!0,extracoes:!0,resultados:!0,rotas:!0,envios_descarga:!0,numeros:!1,numeros_enviados:!1,descargas:!1,descargas_associacao:!1,premiacoes:!1,premiacoes_associacao:!1,pdf_descargas:!1,pdf_descargas_associacao:!1,bancas:!0,auditLogs:!1,dispositivos:!0,comissoes_descarga:!0};var Ur={auditLogs:365,mensagens:60,guias:15,guias_items:15,pules:60,resultados:60,envios_descarga:60,numeros:60,descargas:60,descargas_associacao:60,premiacoes:60,premiacoes_associacao:60,pdf_descargas:60,pdf_descargas_associacao:60,limites_numero_aposta:null,users:null,valores_jogos:null,limites_jogos:null,extracoes:null,rotas:null,numeros_enviados:null,bancas:null,dispositivos:null,comissoes_descarga:null};var co=class{cache=new Map;ttl;maxSize;constructor(o=3e5,r=1e3){this.ttl=o,this.maxSize=r}get(o){let r=this.cache.get(o);return r?Date.now()-r.timestamp>this.ttl?(this.cache.delete(o),null):r.data:null}set(o,r){if(this.cache.size>=this.maxSize){let t=this.cache.keys().next().value;t&&this.cache.delete(t)}this.cache.set(o,{data:r,timestamp:Date.now()})}delete(o){this.cache.delete(o)}clear(){this.cache.clear()}};function D(e,o,r){let{collectionName:t,model:a,idSearchStrategy:n,isolation:s,cache:u,authorization:l,generateId:T}=r,d=u?.enabled?new co(u.ttl,u.maxSize):null,v=p=>{if(!l?.enabled)return;let g=l.getUserRole(),x=l.allowedRoles[p];if(!(!x||x.length===0)){if(!g)throw l.onUnauthorized?.(p,g),new Error(`\u274C N\xE3o autorizado: Opera\xE7\xE3o '${p}' requer autentica\xE7\xE3o na cole\xE7\xE3o '${t}'`);if(!x.includes(g))throw l.onUnauthorized?.(p,g),new Error(`\u274C N\xE3o autorizado: Role '${g}' n\xE3o tem permiss\xE3o para '${p}' na cole\xE7\xE3o '${t}'. Roles permitidas: ${x.join(", ")}`)}},O=()=>{if(!s?.enabled)return[];let p=s.getValue();return p?[{field:s.fieldName,operator:"==",value:p}]:[]},R=p=>{let g=[];O().forEach(({field:E,operator:P,value:L})=>{g.push(o.where(E.toString(),P,L))}),p?.where?.forEach(({field:E,operator:P,value:L})=>{g.push(o.where(E.toString(),P,L))}),p?.orderBy?.forEach(({field:E,direction:P})=>{g.push(o.orderBy(E.toString(),P))}),p?.limit&&g.push(o.limit(p.limit)),p?.startAfter!==void 0&&g.push(o.startAfter(p.startAfter)),p?.startAt!==void 0&&g.push(o.startAt(p.startAt)),p?.endBefore!==void 0&&g.push(o.endBefore(p.endBefore)),p?.endAt!==void 0&&g.push(o.endAt(p.endAt));let A=o.collection(e,t);return o.query(A,...g)},q=async p=>{switch(n.type){case"documentId":return o.doc(e,t,p);case"field":let g=R({where:[{field:n.fieldName,operator:"==",value:p}],limit:1}),x=await o.getDocs(g);if(x.empty)throw new Error(`Document not found with ${String(n.fieldName)}: ${p}`);return x.docs[0].ref;case"custom":return n.resolver(p);default:throw new Error(`Unknown idSearchStrategy: ${n.type}`)}},h=(p,...g)=>{let x=s?.enabled?`_${s.getValue()}`:"";return`${t}${x}_${p}_${JSON.stringify(g)}`};return{get:async p=>{try{if(v("read"),d){let A=h("get",p),E=d.get(A);if(E)return E}let g;if(n.type==="documentId"){let A=o.doc(e,t,p);g=await o.getDoc(A)}else if(n.type==="field"){let A=R({where:[{field:n.fieldName,operator:"==",value:p}],limit:1});g=(await o.getDocs(A)).docs[0]||null}else{let A=await q(p);g=await o.getDoc(A)}if(!g?.exists())return null;let x=a(g.data());if(d){let A=h("get",p);d.set(A,x)}return x}catch(g){return console.error(`Error getting document ${p}:`,g),null}},getAll:async p=>{try{v("read");let g=R(p),x=await o.getDocs(g),A={};return x.forEach(E=>{let P=a(E.data());A[P.id]=P}),A}catch(g){return console.error("Error getting all documents:",g),{}}},listen:(p,g)=>{v("read");let x=R(p);return o.onSnapshot(x,A=>{let E={};A.forEach(P=>{let L=a(P.data());E[L.id]=L}),g(E)})},add:async p=>{try{v("write");let g=p.id||T?.()||o.generateId(),x={...p,id:g};s?.enabled&&s.getValue()&&(x[s.fieldName]=s.getValue());let A=o.doc(e,t,g),E=a(x);return await o.setDoc(A,E),d&&d.delete(h("get",g)),g}catch(g){throw console.error("Error adding document:",g),g}},update:async(p,g)=>{try{v("write");let x=await q(p),A={...g};s?.enabled&&s.getValue()&&(A[s.fieldName]=s.getValue()),await o.updateDoc(x,A),d&&d.delete(h("get",p))}catch(x){throw console.error(`Error updating document ${p}:`,x),x}},remove:async p=>{try{v("delete");let g=await q(p);await o.deleteDoc(g),d&&d.delete(h("get",p))}catch(g){throw console.error(`Error removing document ${p}:`,g),g}},batch:async p=>{try{new Set(p.map(A=>A.operation)).forEach(A=>{v(A==="delete"?"delete":"write")});let x=o.writeBatch(e);for(let{id:A,data:E,operation:P}of p){let L=A||T?.()||o.generateId(),Ce=o.doc(e,t,L),Me={...E,id:L};s?.enabled&&s.getValue()&&(Me[s.fieldName]=s.getValue());let er=a(Me);switch(P){case"add":o.batchSet(x,Ce,er);break;case"update":o.batchUpdate(x,Ce,Me);break;case"delete":o.batchDelete(x,Ce);break}}await o.batchCommit(x),d&&d.clear()}catch(g){throw console.error("Error in batch operation:",g),g}},clearCache:()=>d?.clear(),getCacheSize:()=>d?.cache.size||0}}var Zo=e=>{try{return e&&typeof e.getFirestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.query=="function"&&typeof e.where=="function"?"v9-modular":e&&typeof e.firestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.batch=="function"?"v8":e&&e.initializeApp&&typeof e.initializeApp=="function"?"v9-modular":"unknown"}catch(o){return console.warn("Erro ao detectar vers\xE3o do Firebase:",o),"unknown"}},jo=e=>({collection:(o,r)=>e.collection(o,r),doc:(o,r,...t)=>e.doc(o,r,...t),query:(o,...r)=>e.query(o,...r),where:(o,r,t)=>e.where(o,r,t),orderBy:(o,r="asc")=>e.orderBy(o,r),limit:o=>e.limit(o),startAfter:(...o)=>e.startAfter(...o),startAt:(...o)=>e.startAt(...o),endBefore:(...o)=>e.endBefore(...o),endAt:(...o)=>e.endAt(...o),getDocs:e.getDocs,getDoc:e.getDoc,setDoc:e.setDoc,updateDoc:e.updateDoc,deleteDoc:e.deleteDoc,writeBatch:e.writeBatch,batchSet:(o,r,t)=>o.set(r,t),batchUpdate:(o,r,t)=>o.update(r,t),batchDelete:(o,r)=>o.delete(r),batchCommit:o=>o.commit(),onSnapshot:e.onSnapshot,generateId:()=>J()}),mo=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>J()}),Re=e=>{let o=Zo(e);switch(console.log(`\u{1F525} Firebase version detected: ${o}`),o){case"v9-modular":return jo(e);case"v8":return mo();default:return console.warn("\u26A0\uFE0F Firebase version not detected, falling back to v8 adapter"),mo()}},zr=(e,o,r)=>{let t=Re(e);return D(o,t,r)},lo=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>J()});var Jr=(e,o={enabled:!0,ttl:3e5,maxSize:1e3},r)=>{let t=n=>({...n,isolation:e?{enabled:!0,fieldName:"bancaId",getValue:e}:void 0,cache:o,authorization:r?.[n.collectionName]}),a=n=>({...n,cache:o,authorization:r?.[n.collectionName]});return{users_associacao:a({collectionName:"users",model:K,idSearchStrategy:{type:"documentId"}}),users:t({collectionName:"users",model:K,idSearchStrategy:{type:"documentId"}}),bancas:a({collectionName:"bancas",model:se,idSearchStrategy:{type:"documentId"}}),extracoes:t({collectionName:"extracoes",model:j,idSearchStrategy:{type:"documentId"}}),resultados:t({collectionName:"resultados",model:re,idSearchStrategy:{type:"documentId"}}),mensagens:t({collectionName:"mensagens",model:oe,idSearchStrategy:{type:"documentId"}}),rotas:t({collectionName:"rotas",model:te,idSearchStrategy:{type:"documentId"}}),valores_jogos:t({collectionName:"valores_jogos",model:ae,idSearchStrategy:{type:"documentId"}}),limites_jogos:t({collectionName:"limites_jogos",model:ce,idSearchStrategy:{type:"documentId"}}),pules:t({collectionName:"pules",model:k,idSearchStrategy:{type:"documentId"}}),numeros:t({collectionName:"numeros",model:V,idSearchStrategy:{type:"documentId"}}),numeros_enviados:t({collectionName:"numeros_enviados",model:V,idSearchStrategy:{type:"documentId"}}),descargas:t({collectionName:"descargas",model:w,idSearchStrategy:{type:"documentId"}}),descargas_associacao:t({collectionName:"descargas_associacao",model:w,idSearchStrategy:{type:"documentId"}}),premiacoes:t({collectionName:"premiacoes",model:ie,idSearchStrategy:{type:"documentId"}}),premiacoes_associacao:t({collectionName:"premiacoes_associacao",model:le,idSearchStrategy:{type:"documentId"}}),pdf_descargas:t({collectionName:"pdf_descargas",model:H,idSearchStrategy:{type:"documentId"}}),pdf_descargas_associacao:t({collectionName:"pdf_descargas_associacao",model:H,idSearchStrategy:{type:"documentId"}}),auditLogs:t({collectionName:"auditLogs",model:ne,idSearchStrategy:{type:"documentId"}}),envios_descarga:t({collectionName:"envios_descarga",model:me,idSearchStrategy:{type:"documentId"}}),dispositivos:t({collectionName:"dispositivos",model:de,idSearchStrategy:{type:"documentId"}})}};function po(e){let{db:o,adapter:r,getBancaId:t,cacheConfig:a,authorizationConfigs:n}=e,s=Jr(t,a,n);return{users_associacao:D(o,r,s.users_associacao),users:D(o,r,s.users),bancas:D(o,r,s.bancas),extracoes:D(o,r,s.extracoes),resultados:D(o,r,s.resultados),mensagens:D(o,r,s.mensagens),rotas:D(o,r,s.rotas),valores_jogos:D(o,r,s.valores_jogos),limites_jogos:D(o,r,s.limites_jogos),pules:D(o,r,s.pules),numeros:D(o,r,s.numeros),numeros_enviados:D(o,r,s.numeros_enviados),descargas:D(o,r,s.descargas),descargas_associacao:D(o,r,s.descargas_associacao),premiacoes:D(o,r,s.premiacoes),premiacoes_associacao:D(o,r,s.premiacoes_associacao),pdf_descargas:D(o,r,s.pdf_descargas),pdf_descargas_associacao:D(o,r,s.pdf_descargas_associacao),auditLogs:D(o,r,s.auditLogs),envios_descarga:D(o,r,s.envios_descarga),dispositivos:D(o,r,s.dispositivos)}}function qr(e){return po({...e,adapter:Re(e.firebaseInstance)})}function $r(e){return po({...e,adapter:lo()})}export{ne as AuditLogModel,se as BancaModel,Fr as BetModel,Oe as COMISSOES_PADRAO,ee as ComissaoDescargaModel,w as DescargaModel,de as DeviceModel,rr as EXTRACAO,me as EnvioDescargaModel,j as ExtracaoModel,f as GAMES,tr as GRUPOS_BICHOS,k as GameModel,so as GuiaItemModel,io as GuiaModel,nr as KEYBOARD,ce as LimitGameModel,no as LimiteNumeroApostaModel,ar as MESSAGES,oe as MessageModel,V as NumberModel,H as PDFModel,z as PREFIX_ENVIO,B as PREFIX_ENVIO_OLD,S as PREFIX_NUMBER,N as PREMIOS,le as PremiacaoAssociacaoModel,ie as PremiacaoModel,b as ROLES,re as ResultadoModel,te as RouteModel,Ge as STATUS_DESCARGA,cr as STATUS_DEVICE,Y as STATUS_GUIA,Be as STATUS_PULE,ir as TIPO_VISUALIZACAO,K as UserModel,sr as VISUALIZACAO,ae as ValueGameModel,Lr as agruparEnvioPorExtracao,G as arredondarParaCima,he as calculaValoresDosNumeros,ye as calcularValorDeNumero,Fo as calcularValorJogoPeloLimite,Ee as calculateAmount,Se as calculateAmountGame,I as clone,wr as collections,Ur as collectionsRetentionDays,Vr as collectionsToAudit,uo as combineDateTime,zr as createAutoRepo,D as createGenericRepo,lo as createReactNativeAdapter,$r as createReactNativeRepoFactory,po as createRepoFactory,mo as createV8Adapter,jo as createV9ModularAdapter,Re as createWebAdapter,qr as createWebRepoFactory,Ie as criarEstruturaJogo,c as dateToNumber,_o as delay,Zo as detectFirebaseVersion,Do as dividirArray,Qo as extracaoEstaAtivaBoolean,Ne as extracaoEstaAtivaTryCatch,zo as fazerJogo,Vo as formatPuleId,F as formatarNumero,ho as formatterBRL,bo as formatterPercentage,No as formatterPercentageDecimal,X as functionsCore,Ve as generateDescargas,J as generateId,Co as gerarDezenas,pe as getAllCombinations,$o as getAvailableTimes,M as getBetDateToNumber,ue as getCodigoAuth,to as getComissoesDoEnvio,y as getCreatedBySystem,To as getDataInicioFim,Uo as getFormattedPuleId,Jo as getGamesUnicosList,qo as getGamesUnicosObjeto,So as getInitials,De as getLimiteJogoPeloTipoJogo,wo as getLimiteSimulado,Ko as getLimitsRest,fe as getNumeroId,Go as getNumerosAcimaDoLimite,Wo as getPermission,Te as getPremioFormato,xe as getPropsEnvioId,ve as getPropsEnvioIdOld,W as getPropsPrefix,Ae as getPropsVP,Xo as getProximaExtracaoDisponivelParaAposta,ge as getSomaEnvio,Lo as getSomaProps,Mo as getSomaVP,Q as getTiposJogos,_e as getValorJogoPeloTipoJogo,be as invertGame,ke as isAdm,Xe as isAdmOrSubAdm,He as isAssociacao,Ke as isCambista,We as isCambistaTalao,Ze as isDigitador,Ye as isDigitadorAdm,je as isDigitadorOrDigitadorAdm,Qe as isSuperAdm,Eo as matchNormalized,Z as normalize,_ as numberToDate,Ao as numbersSelectedFormated,xo as parserBRL,Po as parserPercentage,Io as parserPercentageDecimal,Pe as pegarExtracoes,m as pegarHorarioSaoPaulo,Ro as removerLetters,C as showFormatDate,Oo as sortNumeros};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|