@senior-gestao-empresarial/erpx-components 0.0.0-develop-3bab051d
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/bundles/senior-gestao-empresarial-erpx-components.umd.js +37665 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +17 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -0
- package/components/breadcrumb/breadcrumb.component.d.ts +21 -0
- package/components/breadcrumb/breadcrumb.module.d.ts +2 -0
- package/components/breadcrumb/index.d.ts +2 -0
- package/components/focus/focus.service.d.ts +4 -0
- package/components/lote-serie/erp-lote-serie.component.d.ts +183 -0
- package/components/lote-serie/erp-lote-serie.module.d.ts +2 -0
- package/components/lote-serie/erp-lote-serie.service.d.ts +137 -0
- package/components/lote-serie/index.d.ts +2 -0
- package/components/rateio-editor/erp-rateio-editor.component.d.ts +202 -0
- package/components/rateio-editor/erp-rateio-editor.converter.d.ts +18 -0
- package/components/rateio-editor/erp-rateio-editor.module.d.ts +2 -0
- package/components/rateio-editor/erp-rateio-editor.service.d.ts +17 -0
- package/components/rateio-editor/erp-rateio-editor.types.d.ts +171 -0
- package/components/rateio-editor/index.d.ts +4 -0
- package/components/resumo/erp-resumo.component.d.ts +17 -0
- package/components/resumo/erp-resumo.module.d.ts +2 -0
- package/components/resumo/erp-resumo.service.d.ts +2 -0
- package/components/resumo/index.d.ts +2 -0
- package/components/tributos/calculators/effective-tax-rate-calculator.d.ts +34 -0
- package/components/tributos/calculators/gross-amount-calculator.d.ts +20 -0
- package/components/tributos/calculators/tax-amount-calculator.d.ts +54 -0
- package/components/tributos/erp-tributos.component.d.ts +215 -0
- package/components/tributos/erp-tributos.module.d.ts +2 -0
- package/components/tributos/erp-tributos.service.d.ts +10 -0
- package/components/tributos/erp-tributos.types.d.ts +286 -0
- package/components/tributos/index.d.ts +12 -0
- package/components/tributos/mappings/enum-tip-imp-cst-mapping.d.ts +2 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.d.ts +15 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.d.ts +28 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.d.ts +30 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.d.ts +6 -0
- package/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/rules.service.d.ts +19 -0
- package/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.d.ts +16 -0
- package/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.d.ts +12 -0
- package/components/tributos/rules/status/registries/purchase-order-status-rules.registry.d.ts +12 -0
- package/components/tributos/rules/status/registries/sale-order-status-rules.registry.d.ts +8 -0
- package/components/tributos/rules/status/registries/status-rules.registry.d.ts +15 -0
- package/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/tax-classification-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/tax-rate-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/taxable-base-status-rule.d.ts +5 -0
- package/components/tributos/rules/types/available-fields.d.ts +2 -0
- package/components/tributos/rules/types/available-taxes.d.ts +1 -0
- package/components/tributos/rules/types/field-calculation-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/field-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/field-status-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/rule-payload.d.ts +9 -0
- package/components/tributos/rules/types/schemas/incoming-invoice.schema.d.ts +235 -0
- package/components/tributos/rules/types/schemas/outgoing-invoice.schema.d.ts +349 -0
- package/components/tributos/rules/types/schemas/purchase-order.schema.d.ts +26 -0
- package/components/tributos/rules/types/schemas/sale-order.schema.d.ts +131 -0
- package/components/tributos/rules/types/strategies-by-document.d.ts +12 -0
- package/components/tributos/rules/types/strategies.d.ts +4 -0
- package/components/tributos/rules/types/tax-rule.d.ts +4 -0
- package/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.d.ts +20 -0
- package/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.d.ts +14 -0
- package/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.d.ts +14 -0
- package/components/tributos/rules/validation/registries/validation-rules.registry.d.ts +15 -0
- package/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.d.ts +6 -0
- package/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.d.ts +6 -0
- package/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.d.ts +6 -0
- package/components/tributos/services/tax-rounding.service.d.ts +5 -0
- package/components/tributos/stores/tax.store.d.ts +10 -0
- package/components/tributos/tax-reform-utilities.d.ts +36 -0
- package/components/tributos/types/context.d.ts +7 -0
- package/components/tributos/types/controllership-incoming-invoice-context.d.ts +5 -0
- package/components/tributos/types/controllership-incoming-invoice.d.ts +3 -0
- package/components/tributos/types/controllership-outgoing-invoice-context.d.ts +5 -0
- package/components/tributos/types/controllership-outgoing-invoice.d.ts +3 -0
- package/components/tributos/types/credit-invoice-type.d.ts +1 -0
- package/components/tributos/types/debit-invoice-type.d.ts +1 -0
- package/components/tributos/types/group.d.ts +6 -0
- package/components/tributos/types/incoming-invoice-context.d.ts +5 -0
- package/components/tributos/types/incoming-invoice-item.d.ts +4 -0
- package/components/tributos/types/incoming-invoice-type.d.ts +1 -0
- package/components/tributos/types/incoming-invoice.d.ts +11 -0
- package/components/tributos/types/item-type.d.ts +1 -0
- package/components/tributos/types/outgoing-Invoice.d.ts +11 -0
- package/components/tributos/types/outgoing-invoice-context.d.ts +5 -0
- package/components/tributos/types/outgoing-invoice-item.d.ts +4 -0
- package/components/tributos/types/outgoing-invoice-type.d.ts +1 -0
- package/components/tributos/types/purchase-order-context.d.ts +5 -0
- package/components/tributos/types/purchase-order-type.d.ts +1 -0
- package/components/tributos/types/purchase-order.d.ts +8 -0
- package/components/tributos/types/sale-order-context.d.ts +5 -0
- package/components/tributos/types/sale-order-type.d.ts +1 -0
- package/components/tributos/types/sale-order.d.ts +8 -0
- package/components/tributos/types/tax.d.ts +8 -0
- package/components/utils/breakpoints.d.ts +10 -0
- package/components/utils/export-utils.d.ts +6 -0
- package/components/utils/index.d.ts +3 -0
- package/components/utils/loading-context.d.ts +7 -0
- package/components/utils/utils.d.ts +4 -0
- package/core/entities/entity-service.d.ts +32 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.d.ts +36 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.d.ts +40 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.d.ts +2 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.d.ts +11 -0
- package/core/enums/enum-classificacao-tributaria.d.ts +4 -0
- package/core/enums/enum-tipo-calculo-imposto.d.ts +5 -0
- package/core/enums/enum-tipo-documento-parametros.d.ts +7 -0
- package/core/enums/enum-tipo-documento.d.ts +10 -0
- package/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.d.ts +5 -0
- package/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.d.ts +8 -0
- package/esm2015/components/breadcrumb/breadcrumb.component.js +86 -0
- package/esm2015/components/breadcrumb/breadcrumb.module.js +17 -0
- package/esm2015/components/breadcrumb/index.js +3 -0
- package/esm2015/components/focus/focus.service.js +32 -0
- package/esm2015/components/lote-serie/erp-lote-serie.component.js +1772 -0
- package/esm2015/components/lote-serie/erp-lote-serie.module.js +47 -0
- package/esm2015/components/lote-serie/erp-lote-serie.service.js +94 -0
- package/esm2015/components/lote-serie/index.js +3 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.component.js +794 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.converter.js +52 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.module.js +40 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.service.js +49 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.types.js +5 -0
- package/esm2015/components/rateio-editor/index.js +4 -0
- package/esm2015/components/resumo/erp-resumo.component.js +19 -0
- package/esm2015/components/resumo/erp-resumo.module.js +25 -0
- package/esm2015/components/resumo/erp-resumo.service.js +13 -0
- package/esm2015/components/resumo/index.js +2 -0
- package/esm2015/components/tributos/calculators/effective-tax-rate-calculator.js +53 -0
- package/esm2015/components/tributos/calculators/gross-amount-calculator.js +37 -0
- package/esm2015/components/tributos/calculators/tax-amount-calculator.js +87 -0
- package/esm2015/components/tributos/erp-tributos.component.js +5176 -0
- package/esm2015/components/tributos/erp-tributos.module.js +33 -0
- package/esm2015/components/tributos/erp-tributos.service.js +23 -0
- package/esm2015/components/tributos/erp-tributos.types.js +268 -0
- package/esm2015/components/tributos/index.js +4 -0
- package/esm2015/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3102 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4516 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +294 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1464 -0
- package/esm2015/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +48 -0
- package/esm2015/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +55 -0
- package/esm2015/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +83 -0
- package/esm2015/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +74 -0
- package/esm2015/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +72 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +244 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +74 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +170 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +100 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +124 -0
- package/esm2015/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +292 -0
- package/esm2015/components/tributos/rules/rules.service.js +61 -0
- package/esm2015/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1076 -0
- package/esm2015/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1317 -0
- package/esm2015/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +62 -0
- package/esm2015/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +18 -0
- package/esm2015/components/tributos/rules/status/registries/status-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +39 -0
- package/esm2015/components/tributos/rules/status/rules/tax-classification-status-rule.js +94 -0
- package/esm2015/components/tributos/rules/status/rules/tax-rate-status-rule.js +61 -0
- package/esm2015/components/tributos/rules/status/rules/taxable-base-status-rule.js +65 -0
- package/esm2015/components/tributos/rules/types/available-fields.js +1 -0
- package/esm2015/components/tributos/rules/types/available-taxes.js +1 -0
- package/esm2015/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/field-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/rule-payload.js +1 -0
- package/esm2015/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1816 -0
- package/esm2015/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2750 -0
- package/esm2015/components/tributos/rules/types/schemas/purchase-order.schema.js +150 -0
- package/esm2015/components/tributos/rules/types/schemas/sale-order.schema.js +879 -0
- package/esm2015/components/tributos/rules/types/strategies-by-document.js +1 -0
- package/esm2015/components/tributos/rules/types/strategies.js +1 -0
- package/esm2015/components/tributos/rules/types/tax-rule.js +1 -0
- package/esm2015/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3606 -0
- package/esm2015/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5452 -0
- package/esm2015/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +270 -0
- package/esm2015/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1392 -0
- package/esm2015/components/tributos/rules/validation/registries/validation-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +73 -0
- package/esm2015/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +78 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +902 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +401 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +719 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +300 -0
- package/esm2015/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +717 -0
- package/esm2015/components/tributos/services/tax-rounding.service.js +18 -0
- package/esm2015/components/tributos/stores/tax.store.js +19 -0
- package/esm2015/components/tributos/tax-reform-utilities.js +243 -0
- package/esm2015/components/tributos/types/context.js +1 -0
- package/esm2015/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/controllership-incoming-invoice.js +1 -0
- package/esm2015/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/controllership-outgoing-invoice.js +1 -0
- package/esm2015/components/tributos/types/credit-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/debit-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/group.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-item.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice.js +1 -0
- package/esm2015/components/tributos/types/item-type.js +1 -0
- package/esm2015/components/tributos/types/outgoing-Invoice.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-item.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/purchase-order-context.js +1 -0
- package/esm2015/components/tributos/types/purchase-order-type.js +1 -0
- package/esm2015/components/tributos/types/purchase-order.js +1 -0
- package/esm2015/components/tributos/types/sale-order-context.js +1 -0
- package/esm2015/components/tributos/types/sale-order-type.js +1 -0
- package/esm2015/components/tributos/types/sale-order.js +1 -0
- package/esm2015/components/tributos/types/tax.js +2 -0
- package/esm2015/components/utils/breakpoints.js +11 -0
- package/esm2015/components/utils/export-utils.js +71 -0
- package/esm2015/components/utils/index.js +4 -0
- package/esm2015/components/utils/loading-context.js +20 -0
- package/esm2015/components/utils/utils.js +18 -0
- package/esm2015/core/entities/entity-service.js +91 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +62 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +24 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +24 -0
- package/esm2015/core/enums/enum-classificacao-tributaria.js +6 -0
- package/esm2015/core/enums/enum-tipo-calculo-imposto.js +7 -0
- package/esm2015/core/enums/enum-tipo-documento-parametros.js +9 -0
- package/esm2015/core/enums/enum-tipo-documento.js +12 -0
- package/esm2015/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
- package/esm2015/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
- package/esm2015/locale/fallback.js +56 -0
- package/esm2015/public-api.js +8 -0
- package/esm2015/senior-gestao-empresarial-erpx-components.js +58 -0
- package/esm5/components/breadcrumb/breadcrumb.component.js +91 -0
- package/esm5/components/breadcrumb/breadcrumb.module.js +20 -0
- package/esm5/components/breadcrumb/index.js +3 -0
- package/esm5/components/focus/focus.service.js +35 -0
- package/esm5/components/lote-serie/erp-lote-serie.component.js +1830 -0
- package/esm5/components/lote-serie/erp-lote-serie.module.js +50 -0
- package/esm5/components/lote-serie/erp-lote-serie.service.js +96 -0
- package/esm5/components/lote-serie/index.js +3 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.component.js +861 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.converter.js +68 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.module.js +43 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.service.js +51 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.types.js +5 -0
- package/esm5/components/rateio-editor/index.js +4 -0
- package/esm5/components/resumo/erp-resumo.component.js +22 -0
- package/esm5/components/resumo/erp-resumo.module.js +28 -0
- package/esm5/components/resumo/erp-resumo.service.js +16 -0
- package/esm5/components/resumo/index.js +2 -0
- package/esm5/components/tributos/calculators/effective-tax-rate-calculator.js +58 -0
- package/esm5/components/tributos/calculators/gross-amount-calculator.js +39 -0
- package/esm5/components/tributos/calculators/tax-amount-calculator.js +91 -0
- package/esm5/components/tributos/erp-tributos.component.js +5296 -0
- package/esm5/components/tributos/erp-tributos.module.js +36 -0
- package/esm5/components/tributos/erp-tributos.service.js +24 -0
- package/esm5/components/tributos/erp-tributos.types.js +268 -0
- package/esm5/components/tributos/index.js +4 -0
- package/esm5/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3104 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4518 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +296 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1466 -0
- package/esm5/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +60 -0
- package/esm5/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +77 -0
- package/esm5/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +92 -0
- package/esm5/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +83 -0
- package/esm5/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +87 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +286 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +89 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +241 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +118 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +200 -0
- package/esm5/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +330 -0
- package/esm5/components/tributos/rules/rules.service.js +139 -0
- package/esm5/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1078 -0
- package/esm5/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1319 -0
- package/esm5/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +64 -0
- package/esm5/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +19 -0
- package/esm5/components/tributos/rules/status/registries/status-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +43 -0
- package/esm5/components/tributos/rules/status/rules/tax-classification-status-rule.js +106 -0
- package/esm5/components/tributos/rules/status/rules/tax-rate-status-rule.js +68 -0
- package/esm5/components/tributos/rules/status/rules/taxable-base-status-rule.js +72 -0
- package/esm5/components/tributos/rules/types/available-fields.js +1 -0
- package/esm5/components/tributos/rules/types/available-taxes.js +1 -0
- package/esm5/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/field-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/rule-payload.js +1 -0
- package/esm5/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1817 -0
- package/esm5/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2751 -0
- package/esm5/components/tributos/rules/types/schemas/purchase-order.schema.js +151 -0
- package/esm5/components/tributos/rules/types/schemas/sale-order.schema.js +880 -0
- package/esm5/components/tributos/rules/types/strategies-by-document.js +1 -0
- package/esm5/components/tributos/rules/types/strategies.js +1 -0
- package/esm5/components/tributos/rules/types/tax-rule.js +1 -0
- package/esm5/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3608 -0
- package/esm5/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5454 -0
- package/esm5/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +272 -0
- package/esm5/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1394 -0
- package/esm5/components/tributos/rules/validation/registries/validation-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +77 -0
- package/esm5/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +86 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +968 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +433 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +774 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +323 -0
- package/esm5/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +772 -0
- package/esm5/components/tributos/services/tax-rounding.service.js +23 -0
- package/esm5/components/tributos/stores/tax.store.js +26 -0
- package/esm5/components/tributos/tax-reform-utilities.js +249 -0
- package/esm5/components/tributos/types/context.js +1 -0
- package/esm5/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
- package/esm5/components/tributos/types/controllership-incoming-invoice.js +1 -0
- package/esm5/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
- package/esm5/components/tributos/types/controllership-outgoing-invoice.js +1 -0
- package/esm5/components/tributos/types/credit-invoice-type.js +1 -0
- package/esm5/components/tributos/types/debit-invoice-type.js +1 -0
- package/esm5/components/tributos/types/group.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-context.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-item.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-type.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice.js +1 -0
- package/esm5/components/tributos/types/item-type.js +1 -0
- package/esm5/components/tributos/types/outgoing-Invoice.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-context.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-item.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-type.js +1 -0
- package/esm5/components/tributos/types/purchase-order-context.js +1 -0
- package/esm5/components/tributos/types/purchase-order-type.js +1 -0
- package/esm5/components/tributos/types/purchase-order.js +1 -0
- package/esm5/components/tributos/types/sale-order-context.js +1 -0
- package/esm5/components/tributos/types/sale-order-type.js +1 -0
- package/esm5/components/tributos/types/sale-order.js +1 -0
- package/esm5/components/tributos/types/tax.js +2 -0
- package/esm5/components/utils/breakpoints.js +11 -0
- package/esm5/components/utils/export-utils.js +78 -0
- package/esm5/components/utils/index.js +4 -0
- package/esm5/components/utils/loading-context.js +22 -0
- package/esm5/components/utils/utils.js +20 -0
- package/esm5/core/entities/entity-service.js +98 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +67 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +27 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +27 -0
- package/esm5/core/enums/enum-classificacao-tributaria.js +6 -0
- package/esm5/core/enums/enum-tipo-calculo-imposto.js +7 -0
- package/esm5/core/enums/enum-tipo-documento-parametros.js +9 -0
- package/esm5/core/enums/enum-tipo-documento.js +12 -0
- package/esm5/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
- package/esm5/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
- package/esm5/locale/fallback.js +56 -0
- package/esm5/public-api.js +8 -0
- package/esm5/senior-gestao-empresarial-erpx-components.js +58 -0
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +36350 -0
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -0
- package/fesm5/senior-gestao-empresarial-erpx-components.js +37396 -0
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -0
- package/locale/fallback.d.ts +55 -0
- package/package.json +23 -0
- package/public-api.d.ts +7 -0
- package/senior-gestao-empresarial-erpx-components.d.ts +57 -0
- package/senior-gestao-empresarial-erpx-components.metadata.json +1 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { __decorate, __read } from "tslib";
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { combineLatest } from 'rxjs';
|
|
4
|
+
import { distinctUntilChanged, map, skip, startWith } from 'rxjs/operators';
|
|
5
|
+
import { EnumTipoTributo } from '../../../erp-tributos.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
var TaxSituationCalculationRule = /** @class */ (function () {
|
|
8
|
+
function TaxSituationCalculationRule() {
|
|
9
|
+
}
|
|
10
|
+
TaxSituationCalculationRule.prototype.apply = function (_a) {
|
|
11
|
+
var document = _a.context.document, group = _a.group, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
12
|
+
switch (taxType) {
|
|
13
|
+
case EnumTipoTributo.CBS_ESTORNO_CREDITO:
|
|
14
|
+
{
|
|
15
|
+
var _c = group.item.find(function (_a) {
|
|
16
|
+
var name = _a.name;
|
|
17
|
+
return name === EnumTipoTributo.IBS_ESTORNO_CREDITO;
|
|
18
|
+
}), ibsEstornoCreditoFormGroup = _c.formGroup, ibsEstornoCreditoFormField = _c.formField;
|
|
19
|
+
var dataKey_1 = ibsEstornoCreditoFormField.find(function (_a) {
|
|
20
|
+
var name = _a.name;
|
|
21
|
+
return name === 'situacaoTributaria';
|
|
22
|
+
}).dataKey;
|
|
23
|
+
combineLatest([
|
|
24
|
+
ibsEstornoCreditoFormGroup
|
|
25
|
+
.get('situacaoTributaria')
|
|
26
|
+
.valueChanges.pipe(startWith(ibsEstornoCreditoFormGroup.get('situacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
27
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_1]) === (current === null || current === void 0 ? void 0 : current[dataKey_1]);
|
|
28
|
+
}))
|
|
29
|
+
])
|
|
30
|
+
.pipe(skip(1), map(function (_a) {
|
|
31
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
32
|
+
return [taxSituation];
|
|
33
|
+
}))
|
|
34
|
+
.subscribe(function (_a) {
|
|
35
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
36
|
+
formGroup
|
|
37
|
+
.get('situacaoTributaria')
|
|
38
|
+
.setValue(taxSituation);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case EnumTipoTributo.IBS_ESTORNO_CREDITO:
|
|
43
|
+
{
|
|
44
|
+
var _d = group.item.find(function (_a) {
|
|
45
|
+
var name = _a.name;
|
|
46
|
+
return name === EnumTipoTributo.CBS_ESTORNO_CREDITO;
|
|
47
|
+
}), cbsEstornoCreditoFormGroup = _d.formGroup, cbsEstornoCreditoFormField = _d.formField;
|
|
48
|
+
var dataKey_2 = cbsEstornoCreditoFormField.find(function (_a) {
|
|
49
|
+
var name = _a.name;
|
|
50
|
+
return name === 'situacaoTributaria';
|
|
51
|
+
}).dataKey;
|
|
52
|
+
combineLatest([
|
|
53
|
+
cbsEstornoCreditoFormGroup
|
|
54
|
+
.get('situacaoTributaria')
|
|
55
|
+
.valueChanges.pipe(startWith(cbsEstornoCreditoFormGroup.get('situacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
56
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_2]) === (current === null || current === void 0 ? void 0 : current[dataKey_2]);
|
|
57
|
+
}))
|
|
58
|
+
])
|
|
59
|
+
.pipe(skip(1), map(function (_a) {
|
|
60
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
61
|
+
return [taxSituation];
|
|
62
|
+
}))
|
|
63
|
+
.subscribe(function (_a) {
|
|
64
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
65
|
+
formGroup
|
|
66
|
+
.get('situacaoTributaria')
|
|
67
|
+
.setValue(taxSituation);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
case EnumTipoTributo.CBS_AJUSTE:
|
|
72
|
+
{
|
|
73
|
+
var _e = group.item.find(function (_a) {
|
|
74
|
+
var name = _a.name;
|
|
75
|
+
return name === EnumTipoTributo.IBS_AJUSTE;
|
|
76
|
+
}), ibsAjusteFormGroup = _e.formGroup, ibsAjusteFormField = _e.formField;
|
|
77
|
+
var dataKey_3 = ibsAjusteFormField.find(function (_a) {
|
|
78
|
+
var name = _a.name;
|
|
79
|
+
return name === 'situacaoTributaria';
|
|
80
|
+
}).dataKey;
|
|
81
|
+
combineLatest([
|
|
82
|
+
ibsAjusteFormGroup
|
|
83
|
+
.get('situacaoTributaria')
|
|
84
|
+
.valueChanges.pipe(startWith(ibsAjusteFormGroup.get('situacaoTributaria')
|
|
85
|
+
.value), distinctUntilChanged(function (old, current) {
|
|
86
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_3]) === (current === null || current === void 0 ? void 0 : current[dataKey_3]);
|
|
87
|
+
}))
|
|
88
|
+
])
|
|
89
|
+
.pipe(skip(1), map(function (_a) {
|
|
90
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
91
|
+
return [taxSituation];
|
|
92
|
+
}))
|
|
93
|
+
.subscribe(function (_a) {
|
|
94
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
95
|
+
formGroup
|
|
96
|
+
.get('situacaoTributaria')
|
|
97
|
+
.setValue(taxSituation);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case EnumTipoTributo.IBS_AJUSTE:
|
|
102
|
+
{
|
|
103
|
+
var _f = group.item.find(function (_a) {
|
|
104
|
+
var name = _a.name;
|
|
105
|
+
return name === EnumTipoTributo.CBS_AJUSTE;
|
|
106
|
+
}), cbsAjusteFormGroup = _f.formGroup, cbsAjusteFormField = _f.formField;
|
|
107
|
+
var dataKey_4 = cbsAjusteFormField.find(function (_a) {
|
|
108
|
+
var name = _a.name;
|
|
109
|
+
return name === 'situacaoTributaria';
|
|
110
|
+
}).dataKey;
|
|
111
|
+
combineLatest([
|
|
112
|
+
cbsAjusteFormGroup
|
|
113
|
+
.get('situacaoTributaria')
|
|
114
|
+
.valueChanges.pipe(startWith(cbsAjusteFormGroup.get('situacaoTributaria')
|
|
115
|
+
.value), distinctUntilChanged(function (old, current) {
|
|
116
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_4]) === (current === null || current === void 0 ? void 0 : current[dataKey_4]);
|
|
117
|
+
}))
|
|
118
|
+
])
|
|
119
|
+
.pipe(skip(1), map(function (_a) {
|
|
120
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
121
|
+
return [taxSituation];
|
|
122
|
+
}))
|
|
123
|
+
.subscribe(function (_a) {
|
|
124
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
125
|
+
formGroup
|
|
126
|
+
.get('situacaoTributaria')
|
|
127
|
+
.setValue(taxSituation);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case EnumTipoTributo.CBS_TRANSFERENCIA_CREDITO:
|
|
132
|
+
{
|
|
133
|
+
var _g = group.item.find(function (_a) {
|
|
134
|
+
var name = _a.name;
|
|
135
|
+
return name === EnumTipoTributo.IBS_TRANSFERENCIA_CREDITO;
|
|
136
|
+
}), ibsTransferenciaCreditoFormGroup = _g.formGroup, ibsTransferenciaCreditoFormField = _g.formField;
|
|
137
|
+
var dataKey_5 = ibsTransferenciaCreditoFormField.find(function (_a) {
|
|
138
|
+
var name = _a.name;
|
|
139
|
+
return name === 'situacaoTributaria';
|
|
140
|
+
}).dataKey;
|
|
141
|
+
combineLatest([
|
|
142
|
+
ibsTransferenciaCreditoFormGroup
|
|
143
|
+
.get('situacaoTributaria')
|
|
144
|
+
.valueChanges.pipe(startWith(ibsTransferenciaCreditoFormGroup.get('situacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
145
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_5]) === (current === null || current === void 0 ? void 0 : current[dataKey_5]);
|
|
146
|
+
}))
|
|
147
|
+
])
|
|
148
|
+
.pipe(skip(1), map(function (_a) {
|
|
149
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
150
|
+
return [taxSituation];
|
|
151
|
+
}))
|
|
152
|
+
.subscribe(function (_a) {
|
|
153
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
154
|
+
formGroup
|
|
155
|
+
.get('situacaoTributaria')
|
|
156
|
+
.setValue(taxSituation);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case EnumTipoTributo.IBS_TRANSFERENCIA_CREDITO:
|
|
161
|
+
{
|
|
162
|
+
var _h = group.item.find(function (_a) {
|
|
163
|
+
var name = _a.name;
|
|
164
|
+
return name === EnumTipoTributo.CBS_TRANSFERENCIA_CREDITO;
|
|
165
|
+
}), cbsTransferenciaCreditoFormGroup = _h.formGroup, cbsTransferenciaCreditoFormField = _h.formField;
|
|
166
|
+
var dataKey_6 = cbsTransferenciaCreditoFormField.find(function (_a) {
|
|
167
|
+
var name = _a.name;
|
|
168
|
+
return name === 'situacaoTributaria';
|
|
169
|
+
}).dataKey;
|
|
170
|
+
combineLatest([
|
|
171
|
+
cbsTransferenciaCreditoFormGroup
|
|
172
|
+
.get('situacaoTributaria')
|
|
173
|
+
.valueChanges.pipe(startWith(cbsTransferenciaCreditoFormGroup.get('situacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
174
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_6]) === (current === null || current === void 0 ? void 0 : current[dataKey_6]);
|
|
175
|
+
}))
|
|
176
|
+
])
|
|
177
|
+
.pipe(skip(1), map(function (_a) {
|
|
178
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
179
|
+
return [taxSituation];
|
|
180
|
+
}))
|
|
181
|
+
.subscribe(function (_a) {
|
|
182
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
183
|
+
formGroup
|
|
184
|
+
.get('situacaoTributaria')
|
|
185
|
+
.setValue(taxSituation);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
default:
|
|
190
|
+
throw new Error("Regra TaxSituationCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
TaxSituationCalculationRule.ɵprov = i0.ɵɵdefineInjectable({ factory: function TaxSituationCalculationRule_Factory() { return new TaxSituationCalculationRule(); }, token: TaxSituationCalculationRule, providedIn: "root" });
|
|
194
|
+
TaxSituationCalculationRule = __decorate([
|
|
195
|
+
Injectable({ providedIn: 'root' })
|
|
196
|
+
], TaxSituationCalculationRule);
|
|
197
|
+
return TaxSituationCalculationRule;
|
|
198
|
+
}());
|
|
199
|
+
export { TaxSituationCalculationRule };
|
|
200
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGF4LXNpdHVhdGlvbi1jYWxjdWxhdGlvbi1ydWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHNlbmlvci1nZXN0YW8tZW1wcmVzYXJpYWwvZXJweC1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy90cmlidXRvcy9ydWxlcy9jYWxjdWxhdGlv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xcbiAgICAgICAgZ3JvdXAsXG4gICAgICAgIGl0ZW06IHsgbmFtZTogdGF4VHlwZSwgZm9ybUdyb3VwIH1cbiAgICB9OiBSdWxlUGF5bG9hZCk6IHZvaWQge1xuICAgICAgICBzd2l0Y2ggKHRheFR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLkNCU19FU1RPUk5PX0NSRURJVE86XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXA6IGlic0VzdG9ybm9DcmVkaXRvRm9ybUdyb3VwLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUZpZWxkOiBpYnNFc3Rvcm5vQ3JlZGl0b0Zvcm1GaWVsZFxuICAgICAgICAgICAgICAgICAgICB9ID0gZ3JvdXAuaXRlbS5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPT09IEVudW1UaXBvVHJpYnV0by5JQlNfRVNUT1JOT19DUkVESVRPXG4gICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBkYXRhS2V5IH0gPSBpYnNFc3Rvcm5vQ3JlZGl0b0Zvcm1GaWVsZC5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PiBuYW1lID09PSAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICApIGFzIExvb2t1cEZpZWxkO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoW1xuICAgICAgICAgICAgICAgICAgICAgICAgaWJzRXN0b3Jub0NyZWRpdG9Gb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdzaXR1YWNhb1RyaWJ1dGFyaWEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWJzRXN0b3Jub0NyZWRpdG9Gb3JtR3JvdXAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXR1YWNhb1RyaWJ1dGFyaWEnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9sZCwgY3VycmVudCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGQ/LltkYXRhS2V5XSA9PT0gY3VycmVudD8uW2RhdGFLZXldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2lwKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcCgoW3RheFNpdHVhdGlvbl0pID0+IFt0YXhTaXR1YXRpb25dIGFzIGNvbnN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoW3RheFNpdHVhdGlvbl0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRheFNpdHVhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5JQlNfRVNUT1JOT19DUkVESVRPOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwOiBjYnNFc3Rvcm5vQ3JlZGl0b0Zvcm1Hcm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1GaWVsZDogY2JzRXN0b3Jub0NyZWRpdG9Gb3JtRmllbGRcbiAgICAgICAgICAgICAgICAgICAgfSA9IGdyb3VwLml0ZW0uZmluZChcbiAgICAgICAgICAgICAgICAgICAgICAgICh7IG5hbWUgfSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lID09PSBFbnVtVGlwb1RyaWJ1dG8uQ0JTX0VTVE9STk9fQ1JFRElUT1xuICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgZGF0YUtleSB9ID0gY2JzRXN0b3Jub0NyZWRpdG9Gb3JtRmllbGQuZmluZChcbiAgICAgICAgICAgICAgICAgICAgICAgICh7IG5hbWUgfSkgPT4gbmFtZSA9PT0gJ3NpdHVhY2FvVHJpYnV0YXJpYSdcbiAgICAgICAgICAgICAgICAgICAgKSBhcyBMb29rdXBGaWVsZDtcblxuICAgICAgICAgICAgICAgICAgICBjb21iaW5lTGF0ZXN0KFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNic0VzdG9ybm9DcmVkaXRvRm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNic0VzdG9ybm9DcmVkaXRvRm9ybUdyb3VwLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvbGQsIGN1cnJlbnQpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2xkPy5bZGF0YUtleV0gPT09IGN1cnJlbnQ/LltkYXRhS2V5XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tpcCgxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXAoKFt0YXhTaXR1YXRpb25dKSA9PiBbdGF4U2l0dWF0aW9uXSBhcyBjb25zdClcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKFt0YXhTaXR1YXRpb25dKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoJ3NpdHVhY2FvVHJpYnV0YXJpYScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZSh0YXhTaXR1YXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBFbnVtVGlwb1RyaWJ1dG8uQ0JTX0FKVVNURTpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cDogaWJzQWp1c3RlRm9ybUdyb3VwLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUZpZWxkOiBpYnNBanVzdGVGb3JtRmllbGRcbiAgICAgICAgICAgICAgICAgICAgfSA9IGdyb3VwLml0ZW0uZmluZChcbiAgICAgICAgICAgICAgICAgICAgICAgICh7IG5hbWUgfSkgPT4gbmFtZSA9PT0gRW51bVRpcG9UcmlidXRvLklCU19BSlVTVEVcbiAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGRhdGFLZXkgfSA9IGlic0FqdXN0ZUZvcm1GaWVsZC5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PiBuYW1lID09PSAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICApIGFzIExvb2t1cEZpZWxkO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoW1xuICAgICAgICAgICAgICAgICAgICAgICAgaWJzQWp1c3RlRm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlic0FqdXN0ZUZvcm1Hcm91cC5nZXQoJ3NpdHVhY2FvVHJpYnV0YXJpYScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9sZCwgY3VycmVudCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGQ/LltkYXRhS2V5XSA9PT0gY3VycmVudD8uW2RhdGFLZXldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2lwKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcCgoW3RheFNpdHVhdGlvbl0pID0+IFt0YXhTaXR1YXRpb25dIGFzIGNvbnN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoW3RheFNpdHVhdGlvbl0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRheFNpdHVhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5JQlNfQUpVU1RFOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwOiBjYnNBanVzdGVGb3JtR3JvdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtRmllbGQ6IGNic0FqdXN0ZUZvcm1GaWVsZFxuICAgICAgICAgICAgICAgICAgICB9ID0gZ3JvdXAuaXRlbS5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PiBuYW1lID09PSBFbnVtVGlwb1RyaWJ1dG8uQ0JTX0FKVVNURVxuICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgZGF0YUtleSB9ID0gY2JzQWp1c3RlRm9ybUZpZWxkLmZpbmQoXG4gICAgICAgICAgICAgICAgICAgICAgICAoeyBuYW1lIH0pID0+IG5hbWUgPT09ICdzaXR1YWNhb1RyaWJ1dGFyaWEnXG4gICAgICAgICAgICAgICAgICAgICkgYXMgTG9va3VwRmllbGQ7XG5cbiAgICAgICAgICAgICAgICAgICAgY29tYmluZUxhdGVzdChbXG4gICAgICAgICAgICAgICAgICAgICAgICBjYnNBanVzdGVGb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdzaXR1YWNhb1RyaWJ1dGFyaWEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2JzQWp1c3RlRm9ybUdyb3VwLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzdGluY3RVbnRpbENoYW5nZWQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob2xkLCBjdXJyZW50KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9sZD8uW2RhdGFLZXldID09PSBjdXJyZW50Py5bZGF0YUtleV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNraXAoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwKChbdGF4U2l0dWF0aW9uXSkgPT4gW3RheFNpdHVhdGlvbl0gYXMgY29uc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKChbdGF4U2l0dWF0aW9uXSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdzaXR1YWNhb1RyaWJ1dGFyaWEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGF4U2l0dWF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLkNCU19UUkFOU0ZFUkVOQ0lBX0NSRURJVE86XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXA6IGlic1RyYW5zZmVyZW5jaWFDcmVkaXRvRm9ybUdyb3VwLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUZpZWxkOiBpYnNUcmFuc2ZlcmVuY2lhQ3JlZGl0b0Zvcm1GaWVsZFxuICAgICAgICAgICAgICAgICAgICB9ID0gZ3JvdXAuaXRlbS5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPT09IEVudW1UaXBvVHJpYnV0by5JQlNfVFJBTlNGRVJFTkNJQV9DUkVESVRPXG4gICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBkYXRhS2V5IH0gPSBpYnNUcmFuc2ZlcmVuY2lhQ3JlZGl0b0Zvcm1GaWVsZC5maW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSB9KSA9PiBuYW1lID09PSAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICApIGFzIExvb2t1cEZpZWxkO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoW1xuICAgICAgICAgICAgICAgICAgICAgICAgaWJzVHJhbnNmZXJlbmNpYUNyZWRpdG9Gb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdzaXR1YWNhb1RyaWJ1dGFyaWEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWJzVHJhbnNmZXJlbmNpYUNyZWRpdG9Gb3JtR3JvdXAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzaXR1YWNhb1RyaWJ1dGFyaWEnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9sZCwgY3VycmVudCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGQ/LltkYXRhS2V5XSA9PT0gY3VycmVudD8uW2RhdGFLZXldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2lwKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcCgoW3RheFNpdHVhdGlvbl0pID0+IFt0YXhTaXR1YXRpb25dIGFzIGNvbnN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoW3RheFNpdHVhdGlvbl0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRheFNpdHVhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5JQlNfVFJBTlNGRVJFTkNJQV9DUkVESVRPOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwOiBjYnNUcmFuc2ZlcmVuY2lhQ3JlZGl0b0Zvcm1Hcm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1GaWVsZDogY2JzVHJhbnNmZXJlbmNpYUNyZWRpdG9Gb3JtRmllbGRcbiAgICAgICAgICAgICAgICAgICAgfSA9IGdyb3VwLml0ZW0uZmluZChcbiAgICAgICAgICAgICAgICAgICAgICAgICh7IG5hbWUgfSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lID09PSBFbnVtVGlwb1RyaWJ1dG8uQ0JTX1RSQU5TRkVSRU5DSUFfQ1JFRElUT1xuICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgZGF0YUtleSB9ID0gY2JzVHJhbnNmZXJlbmNpYUNyZWRpdG9Gb3JtRmllbGQuZmluZChcbiAgICAgICAgICAgICAgICAgICAgICAgICh7IG5hbWUgfSkgPT4gbmFtZSA9PT0gJ3NpdHVhY2FvVHJpYnV0YXJpYSdcbiAgICAgICAgICAgICAgICAgICAgKSBhcyBMb29rdXBGaWVsZDtcblxuICAgICAgICAgICAgICAgICAgICBjb21iaW5lTGF0ZXN0KFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNic1RyYW5zZmVyZW5jaWFDcmVkaXRvRm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNic1RyYW5zZmVyZW5jaWFDcmVkaXRvRm9ybUdyb3VwLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvbGQsIGN1cnJlbnQpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2xkPy5bZGF0YUtleV0gPT09IGN1cnJlbnQ/LltkYXRhS2V5XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tpcCgxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXAoKFt0YXhTaXR1YXRpb25dKSA9PiBbdGF4U2l0dWF0aW9uXSBhcyBjb25zdClcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKFt0YXhTaXR1YXRpb25dKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoJ3NpdHVhY2FvVHJpYnV0YXJpYScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZSh0YXhTaXR1YXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIGBSZWdyYSBUYXhTaXR1YXRpb25DYWxjdWxhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|