sysone-api-mapper 1.0.25 → 1.0.27

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/.gitlab-ci.yml CHANGED
@@ -5,9 +5,6 @@ stages:
5
5
  variables:
6
6
  # Uses version 16 but may be cahnged
7
7
  NODE_VERSION: "16"
8
- # Registry configuration for NPM Gitlab packages
9
- #NPM_CONFIG_REGISTRY: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
10
- #NPM_CONFIG_USERCONFIG: "${CI_PROJECT_DIR}/.npmrc"
11
8
 
12
9
  # Cache node_modules for speeding up posterior builds
13
10
  cache:
@@ -35,7 +32,6 @@ publish_package:
35
32
  stage: publish
36
33
  image: node:${NODE_VERSION}
37
34
  script:
38
- - npm version patch --no-git-tag-version
39
35
  - echo "registry=https://gitlab.sysone.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc
40
36
  - echo "//gitlab.sysone.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
41
37
  - npm publish
@@ -1,2 +1,2 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{apiCall:()=>A,apiMapper:()=>oe,axiosInstance:()=>n,endpoints:()=>E});const r=require("axios"),n=e.n(r)().create({});var o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u="PARTY_MODULE",l="INTERMEDIARY_MODULE",c="COMMERCIAL_STRUCTURE_MODULE",s="POLICY_MODULE",d="GET",p="POST",m="PUT",E=(a(a(a(a(a(a(a(a(a(a(o={GET_ACTIVITIES:"GET_ACTIVITIES",GET_PRACTICES:"GET_PRACTICES",SEARCH_INDIVIDUALS:"SEARCH_INDIVIDUALS",CREATE_INDIVIDUAL:"CREATE_INDIVIDUAL",GET_IDENTIFICATION_TYPES:"GET_IDENTIFICATION_TYPES",GET_RELATIONS:"GET_RELATIONS",GET_NOTES:"GET_NOTES",GET_FILES:"GET_FILES",GET_SECTORS:"GET_SECTORS",GET_FISCAL_CATEGORIES:"GET_FISCAL_CATEGORIES",GET_MAIL_TYPES:"GET_MAIL_TYPES",GET_PHONE_TYPES:"GET_PHONE_TYPES",UPDATE_NOTES:"UPDATE_NOTES",UPDATE_FILES:"UPDATE_FILES",ADD_RELATION_WITH_EXISTING_PARTY:"ADD_RELATION_WITH_EXISTING_PARTY",GET_RELATIONS_BY_PARTY_CODE:"GET_RELATIONS_BY_PARTY_CODE",REMOVE_RELATION:"REMOVE_RELATION",GET_FILE:"GET_FILE",GET_ORGANIZATION_TYPES:"GET_ORGANIZATION_TYPES",SEARCH_ORGANIZATION:"SEARCH_ORGANIZATION",CREATE_ORGANIZATION:"CREATE_ORGANIZATION",GET_ORGANIZATION_BY_CODE:"GET_ORGANIZATION_BY_CODE",UPDATE_ORGANIZATION:"UPDATE_ORGANIZATION",ADD_RELATION_WITH_NEW_ORGANIZATION:"ADD_RELATION_WITH_NEW_ORGANIZATION",GET_PERSON_BY_CODE:"GET_PERSON_BY_CODE",GET_GENDERS:"GET_GENDERS",GET_MARITAL_STATUSES:"GET_MARITAL_STATUSES",GET_WORKER_TYPES:"GET_WORKER_TYPES",GET_ECONOMIC_CLASSES:"GET_ECONOMIC_CLASSES",SEARCH_PERSON:"SEARCH_PERSON",UPDATE_PERSON:"UPDATE_PERSON",GET_RELATION_TYPES:"GET_RELATION_TYPES",ADD_RELATION_WITH_NEW_PERSON:"ADD_RELATION_WITH_NEW_PERSON",GET_POLICY_PROCESSES:"GET_POLICY_PROCESSES",GET_COUNTRIES:"GET_COUNTRIES",GET_COUNTRY_BY_CODE:"GET_COUNTRY_BY_CODE",GET_PROVINCES:"GET_PROVINCES",GET_CITIES:"GET_CITIES",GET_POSTAL_CODES:"GET_POSTAL_CODES",GET_ADDRESSES_BY_PARTY_CODE:"GET_ADDRESSES_BY_PARTY_CODE",GET_ADDRESS_TYPES:"GET_ADDRESS_TYPES",GET_PAYMENT_METHODS_BY_PARTY_CODE:"GET_PAYMENT_METHODS_BY_PARTY_CODE",GET_CREDIT_CARD_TYPES:"GET_CREDIT_CARD_TYPES",GET_CARD_PROVIDERS:"GET_CARD_PROVIDERS",UPDATE_PAYMENTS:"UPDATE_PAYMENTS",GET_BANKS:"GET_BANKS",GET_CURRENCIES:"GET_CURRENCIES",GET_BANK_ACCOUNT_TYPES:"GET_BANK_ACCOUNT_TYPES",GET_BANK_BRANCHES:"GET_BANK_BRANCHES",GET_PERSON_INTERMEDIARY_BY_CODE:"GET_PERSON_INTERMEDIARY_BY_CODE",GET_ORGANIZATION_INTERMEDIARY_BY_CODE:"GET_ORGANIZATION_INTERMEDIARY_BY_CODE",GET_INTERMEDIARIES_GROUPS:"GET_INTERMEDIARIES_GROUPS",GET_INTERMEDIARIES_ROLES:"GET_INTERMEDIARIES_ROLES",GET_INTERMEDIARY_STRUCTURES:"GET_INTERMEDIARY_STRUCTURES",SEARCH_INTERMEDIARIES:"SEARCH_INTERMEDIARIES",SEARCH_ACCOUNT_OFFICERS:"SEARCH_ACCOUNT_OFFICERS",GET_INTERMEDIARIES_STATES:"GET_INTERMEDIARIES_STATES",GET_INTERMEDIARIES_TYPES:"GET_INTERMEDIARIES_TYPES",CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY:"CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY",CREATE_INTERMEDIARY_WITH_WITH_PERSON:"CREATE_INTERMEDIARY_WITH_WITH_PERSON",CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION:"CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION",UPDATE_INTERMEDIARY:"UPDATE_INTERMEDIARY",CREATE_COMMERCIAL_STRUCTURE:"CREATE_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURE_STATUSES:"GET_COMMERCIAL_STRUCTURE_STATUSES",SEARCH_COMMERCIAL_STRUCTURE:"SEARCH_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURES_BY_CODE:"GET_COMMERCIAL_STRUCTURES_BY_CODE",UPDATE_COMMERCIAL_STRUCTURE:"UPDATE_COMMERCIAL_STRUCTURE",UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES:"UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES",GET_POLICY_SECTIONS:"GET_POLICY_SECTIONS",GET_POLICY_SUBSECTIONS:"GET_POLICY_SUBSECTIONS"},"GET_POLICY_PROCESSES","GET_POLICY_PROCESSES"),"GET_POLICY_PRODUCTS","GET_POLICY_PRODUCTS"),"GET_VALIDITY_TYPES","GET_VALIDITY_TYPES"),"GET_POLICY_CARACTERS","GET_POLICY_CARACTERS"),"GET_POLICY_TYPE_OF_DOCUMENTATION","GET_POLICY_TYPE_OF_DOCUMENTATION"),"GET_PAYMENT_FREQUENCIES","GET_PAYMENT_FREQUENCIES"),"GET_ASSOCIATE_TERMS_CONDITION","GET_ASSOCIATE_TERMS_CONDITION"),"GET_ASSOCIATE_EXPENSES","GET_ASSOCIATE_EXPENSES"),"GET_ASSOCIATE_COVERAGE","GET_ASSOCIATE_COVERAGE"),"GET_COVERAGES","GET_COVERAGES"),a(a(a(a(a(a(a(a(a(a(o,"GET_EXPENSEVALUES","GET_EXPENSEVALUES"),"GET_MORTALITY_TABLE","GET_MORTALITY_TABLE"),"CREATE_POLICY_STEP1","CREATE_POLICY_STEP1"),"CREATE_POLICY_STEP2","CREATE_POLICY_STEP2"),"CREATE_POLICY_STEP3","CREATE_POLICY_STEP3"),"CREATE_POLICY_STEP4","CREATE_POLICY_STEP4"),"CREATE_POLICY_STEP5","CREATE_POLICY_STEP5"),"CREATE_POLICY_STEP6","CREATE_POLICY_STEP6"),"CREATE_POLICY_STEP7","CREATE_POLICY_STEP7"),"CREATE_POLICY_STEP8","CREATE_POLICY_STEP8"),a(a(a(a(a(a(a(a(a(a(o,"CREATE_POLICY_STEP9","CREATE_POLICY_STEP9"),"CREATE_POLICY_STEP10","CREATE_POLICY_STEP10"),"CREATE_POLICY_STEP11","CREATE_POLICY_STEP11"),"GET_STEP1_DATA","GET_STEP1_DATA"),"GET_STEP2_DATA","GET_STEP2_DATA"),"GET_STEP3_DATA","GET_STEP3_DATA"),"GET_STEP4_DATA","GET_STEP4_DATA"),"GET_STEP5_DATA","GET_STEP5_DATA"),"GET_STEP6_DATA","GET_STEP6_DATA"),"GET_STEP7_DATA","GET_STEP7_DATA"),a(a(a(a(a(a(a(a(a(a(o,"GET_STEP9_DATA","GET_STEP9_DATA"),"GET_STEP11_DATA","GET_STEP11_DATA"),"GET_STEP11_FILE","GET_STEP11_FILE"),"UPDATE_POLICY_STEP1","UPDATE_POLICY_STEP1"),"GET_ISURED_PERSONS","GET_ISURED_PERSONS"),"UPDATE_PARTY","UPDATE_PARTY"),"GET_POLICY_DETAILS","GET_POLICY_DETAILS"),"UPDATE_PAYMENTS","UPDATE_PAYMENTS"),"CREATE_POLICY_RISK","CREATE_POLICY_RISK"),"ACTIVATE_POLICY","ACTIVATE_POLICY"),a(a(a(a(a(a(a(a(a(a(o,"COMPLETE_POLICY","COMPLETE_POLICY"),"SET_POLICY_BUILDING","SET_POLICY_BUILDING"),"SEARCH_POLICIES","SEARCH_POLICIES"),"SEARCH_POLICY_GENERAL_CONDITIONS","SEARCH_POLICY_GENERAL_CONDITIONS"),"GET_ASSURED_LIST","GET_ASSURED_LIST"),"GET_ADHERENTS","GET_ADHERENTS"),"GET_ADHERENTS_BY_OWNER","GET_ADHERENTS_BY_OWNER"),"GET_OWNERS","GET_OWNERS"),"GET_POLICY_ROLES","GET_POLICY_ROLES"),"CREATE_PRODUCT","CREATE_PRODUCT")),v=[{endpoint:E.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:p,module:u},{endpoint:E.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:d,module:u},{endpoint:E.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:d,module:u},{endpoint:E.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:d,module:u},{endpoint:E.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:d,module:u},{endpoint:E.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:d,module:u},{endpoint:E.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:d,module:u},{endpoint:E.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:d,module:u},{endpoint:E.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:m,module:u},{endpoint:E.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:m,module:u},{endpoint:E.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:m,module:u},{endpoint:E.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:m,module:u},{endpoint:E.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:d,module:u},{endpoint:E.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:d,module:u},{endpoint:E.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:d,module:u},{endpoint:E.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:p,module:u},{endpoint:E.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:m,module:u},{endpoint:E.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:m,module:u},{endpoint:E.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:m,module:u},{endpoint:E.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:d,module:u},{endpoint:E.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:d,module:u},{endpoint:E.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:d,module:u},{endpoint:E.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:d,module:u},{endpoint:E.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:d,module:u},{endpoint:E.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:m,module:u},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:u},{endpoint:E.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:d,module:u},{endpoint:E.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:d,module:u},{endpoint:E.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:d,module:u},{endpoint:E.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:d,module:u},{endpoint:E.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:d,module:u},{endpoint:E.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:d,module:u},{endpoint:E.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:d,module:u},{endpoint:E.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:d,module:u},{endpoint:E.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:d,module:u},{endpoint:E.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:d,module:u},{endpoint:E.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:m,module:u},{endpoint:E.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:d,module:u},{endpoint:E.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:d,module:u},{endpoint:E.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:d,module:u},{endpoint:E.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:d,module:u},{endpoint:E.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:d,module:l},{endpoint:E.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:d,module:l},{endpoint:E.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:d,module:l},{endpoint:E.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:d,module:l},{endpoint:E.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:p,module:l},{endpoint:E.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:m,module:l},{endpoint:E.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:d,module:c},{endpoint:E.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:p,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:d,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:m,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:m,module:c},{endpoint:E.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:d,module:s},{endpoint:E.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:d,module:s},{endpoint:E.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:d,module:s},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:s},{endpoint:E.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:d,module:s},{endpoint:E.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:d,module:s},{endpoint:E.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:d,module:s},{endpoint:E.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:d,module:s},{endpoint:E.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:d,module:s},{endpoint:E.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:d,module:s},{endpoint:E.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:d,module:s},{endpoint:E.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:d,module:s},{endpoint:E.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:d,module:s},{endpoint:E.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:d,module:s},{endpoint:E.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:d,module:s},{endpoint:E.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:p,module:s},{endpoint:E.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:m,module:s},{endpoint:E.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:d,module:s},{endpoint:E.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:d,module:s},{endpoint:E.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:d,module:s},{endpoint:E.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:d,module:s},{endpoint:E.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:d,module:s},{endpoint:E.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:d,module:s},{endpoint:E.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:d,module:s},{endpoint:E.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:d,module:s},{endpoint:E.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:m,module:s},{endpoint:E.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:d,module:s},{endpoint:E.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:m,module:s},{endpoint:E.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:d,module:s},{endpoint:E.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:p,module:s},{endpoint:E.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:m,module:s},{endpoint:E.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:m,module:s},{endpoint:E.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:m,module:s},{endpoint:E.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:d,module:s},{endpoint:E.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:d,module:s},{endpoint:E.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:d,module:s},{endpoint:E.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:d,module:s},{endpoint:E.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:d,module:l},{endpoint:E.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:p,module:"CONFIGURATOR_MODULE"}];function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof T?t:T,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",y={};function T(){}function _(){}function A(){}var N={};c(N,a,(function(){return this}));var S=Object.getPrototypeOf,I=S&&S(S(G([])));I&&I!==r&&n.call(I,a)&&(N=I);var O=A.prototype=T.prototype=Object.create(N);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==h(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(h(t)+" is not iterable")}return _.prototype=A,o(O,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:_,configurable:!0}),_.displayName=c(A,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var T=function(e,t){try{var n={title:"",errors:[]};if(t instanceof r.AxiosError){var o,i,a=t.response,u=a.status,l=null===(o=JSON.parse(localStorage.getItem("modules_info")).find((function(t){return t.code===e.module})))||void 0===o||null===(o=o.services)||void 0===o||null===(o=o.find((function(t){return t.name.toUpperCase()===e.serviceName.toUpperCase()&&t.httpMethod.toUpperCase()===e.method.toUpperCase()})))||void 0===o?void 0:o.errors.find((function(e){return e.httpStatus===u}));n.title=(null==l?void 0:l.content)||a.data.message;var c=null===(i=a.data.errorMessages)||void 0===i?void 0:i.map((function(e){var t,r=null==l||null===(t=l.subErrors)||void 0===t?void 0:t.find((function(t){return t.errorType===e.fieldError&&t.fieldName===e.fieldName}));return(null==r?void 0:r.content)||(null==e?void 0:e.error)}));n.errors=c||[]}else n.title=t.message}catch(t){throw console.error(t),t}},_=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},A=function(){var e,t=(e=f().mark((function e(t,r){var o,i,a,u,l=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>2&&void 0!==l[2]?l[2]:null,i=v.find((function(e){return e.endpoint===t})),e.prev=2,i){e.next=5;break}throw new Error("Service does not exists");case 5:a=_(i.url,r),e.t0=i.method,e.next=e.t0===d?9:e.t0===p?13:e.t0===m?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,n.get(a,{params:o});case 11:case 15:case 19:case 23:return u=e.sent,e.abrupt("return",u.data);case 13:return e.next=15,n.post(a,o);case 17:return e.next=19,n.put(a,o);case 21:return e.next=23,n.delete(a,o);case 25:throw u=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 27:e.next=33;break;case 29:throw e.prev=29,e.t1=e.catch(2),T(i,e.t1),e.t1;case 33:case"end":return e.stop()}}),e,null,[[2,29]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,I=A&&A(A(G([])));I&&I!==r&&n.call(I,a)&&(_=I);var O=T.prototype=f.prototype=Object.create(_);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==N(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(N(t)+" is not iterable")}return y.prototype=T,o(O,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function I(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var O=function(){var e,t=(e=S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={values:null==t||null===(r=t.claims)||void 0===r?void 0:r.map((function(e){return{claimNumber:e.claimNumber.toString(),policyNumber:e.policyNumber,creationDate:e.claimDate,status:{name:e.status,code:"N/A"}}}))},e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();const g=require("moment");var R=e.n(g);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){P=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(G([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(C(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function D(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){D(i,n,o,a,u,"next",e)}function u(e){D(i,n,o,a,u,"throw",e)}a(void 0)}))}}var b=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:t.insureds.length,totalActive:null,values:t.insureds.map((function(e){return{code:e.code,number:e.id,firstName:e.firstName||e.name,lastName:e.lastName,type:{code:"T"===e.role.code?"OWNER":"ADHERENT",name:"T"===e.role.code?"Titular":"Adherente"},status:{code:"ACTIVE",name:"Activo"},insuredAmount:e.insuredAmount,inclusionDate:e.entranceDate,exclusionDate:e.cancellationDate,identification:{value:e.identification.number,type:{name:e.identification.type.name,code:e.identification.type.code}}}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.endorsements.map((function(e){return{number:e.number,validityFrom:e.dateFrom?R()(e.dateFrom,"DD/MM/YYYY").toISOString():null,validityTo:e.dateTo?R()(e.dateTo,"DD/MM/YYYY").toISOString():null,activeDate:"N/A",type:{code:"N/A",name:e.detail,group:{code:"N/A",name:"N/A"}}}})),total:t.endorsements.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.policies.map((function(e){var t,r,n,o,i,a,u,l,c,s;return{number:e.number,validityFrom:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,validityTo:"N/A",ingress:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,holder:{name:(null===(t=e.holder)||void 0===t?void 0:t.name)||(null===(r=e.holder)||void 0===r?void 0:r.firstName),identifications:{values:[{value:(null===(n=e.holder)||void 0===n||null===(n=n.identification)||void 0===n?void 0:n.number)||null,type:{name:(null===(o=e.holder)||void 0===o||null===(o=o.identification)||void 0===o||null===(o=o.type)||void 0===o?void 0:o.name)||null,code:(null===(i=e.holder)||void 0===i||null===(i=i.identification)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.code)||null},default:!0}]}},code:"N/A",alias:"N/A",product:{code:(null===(a=e.section)||void 0===a?void 0:a.code.toString())||null,name:(null===(u=e.section)||void 0===u?void 0:u.name)||null,subsection:{name:"N/A",code:"N/A",section:{name:(null===(l=e.section)||void 0===l?void 0:l.name)||null,code:(null===(c=e.section)||void 0===c?void 0:c.code)||null}}},process:{name:(null===(s=e.status)||void 0===s?void 0:s.name)||null,code:"N/A"}}})),total:t.totalRecord||null},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(e){return{ANNUAL:6,MONTHLY:1,QUARTERLY:3,SEMI_ANNUAL:5}[e]||6},U=function(e){return{SC_SC:534,VI_VI_VIDA_IND_1:120,OTRO_CODIGO:0}[e]||404};function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(j(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function q(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function F(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){q(i,n,o,a,u,"next",e)}function u(e){q(i,n,o,a,u,"throw",e)}a(void 0)}))}}var B=function(){var e=F(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={quotations:t.quotations.map((function(e){var t,r;return{code:"N/A",creationDate:"N/A",email:"N/A",expirationDate:"N/A",number:e.quotationNumber||null,paymentFrequency:{name:"N/A",code:"N/A"},product:{code:(null===(t=e.productCode)||void 0===t?void 0:t.toString())||null,name:"N/A",subsection:{code:"N/A",name:"N/A",section:{code:(null===(r=e.sectionCode)||void 0===r?void 0:r.toString())||null,name:"N/A"}},version:0},status:{code:"N/A",name:"N/A"}}})),total:"N/A"},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=F(k().mark((function e(t){var r,n,o,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={code:(null===(r=t.quotationNumber)||void 0===r?void 0:r.toString())||null,number:t.activityCode||0,creationDate:t.vigencyDateFrom||null,expirationDate:t.vigencyDateTo||null,validity:{code:"N/A",name:"N/A",months:"N/A"},status:{code:"N/A",name:"N/A"},paymentFrequency:{name:"N/A",code:"N/A",months:0},email:"N/A",phone:"N/A",intermediary:{code:"N/A",name:"N/A",roles:{}},commercialStructure:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:"N/A",name:"N/A",licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"},group:{name:"N/A",code:"N/A"}}]}},product:{name:"N/A",code:(null==t||null===(n=t.productCode)||void 0===n?void 0:n.toString())||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:"N/A",code:(null==t||null===(o=t.sectionCode)||void 0===o?void 0:o.toString())||null,type:{name:"N/A",code:"N/A"},category:{name:"N/A",code:"N/A"}}},status:{code:"N/A",name:"N/A"},currency:{name:"N/A",code:"N/A",mnemonic:"N/A",symbol:"N/A"}},productSegment:{coverages:[],expenses:[],name:"N/A",code:"N/A",version:0,description:"N/A"},values:{risks:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:{name:"N/A",code:"N/A"},value:0}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{},adherents:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:"N/A",code:"N/A"}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{}}]}],expenses:[{type:{name:"N/A",code:"N/A"},value:0}],groupedEconomicValues:[{type:{name:"N/A",code:"N/A"},value:0}],commercialAgreement:{}}},e.abrupt("return",i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(e){return e?{sectionCode:17,paymentTypeCode:x(e.paymentFrequencyCode),productCode:U(e.productCode),provinceCode:1}:null},W=function(e){var t,r;return e?{sectionCode:17,paymentTypeCode:x(e.paymentFrequencyCode),productCode:U(e.productCode),provinceCode:1,birthdate:null===(t=e.risks[0])||void 0===t?void 0:t.birthDate,insuredAmount:(null===(r=e.risks[0])||void 0===r||null===(r=r.coverages[0])||void 0===r||null===(r=r.values.find((function(e){return"INSURED_AMOUNT"===e.code})))||void 0===r?void 0:r.value)||0}:null},Z=function(){var e=F(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.activities.map((function(e){return{code:e.code,name:e.name}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K="GET",X="POST",Q={GET_ACTIVITY:{default:{url:"party/v1/sectors",method:K,source:"https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/activity",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return Z(e)}}},GET_CLAIMS:{default:{url:"claim/v1/claims",method:K,source:"https://apidoc.sysone.com/claim/v1/open-api.html",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"claim/v1/claim",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",requestMapper:null,responseMapper:function(e){return O(e)}}},GET_ENDORSEMENTS:{default:{url:"policy/v1/policies/{0}/endorsements",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/endorsements",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return G(e)}}},GET_INSUREDS:{default:{url:"policy-life/v1/policies/{0}/insureds",method:K,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/policy-insured",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds",requestMapper:function(e){return{mappedParams:(t=e,{code:t.number||void 0,name:t.firstName||void 0})};var t},responseMapper:function(e){return b(e)}}},GET_POLICIES:{default:{url:"policy/v1/policies",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",requestMapper:function(e){return{mappedParams:(t=e,{sort:"TomadorCodigo",orderType:"desc",pageNumber:t.page||1,pageSize:t.pageSize||10,allPolicies:null})};var t},responseMapper:function(e){return w(e)}}},GET_POLICY_HOME_COLLECTIVE_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_HOME_INDIVIDUAL_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_POLICY_LIFE_COLLECTIVE_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_LIFE_INDIVIDUAL_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_QUOTATION_BY_CODE:{default:{url:"quotation/v1/quotations/{0}",method:K,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan/{0}",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return H(e)}}},GET_QUOTATIONS:{default:{url:"quotation/v1/quotations",method:K,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-variable-plan",requestMapper:function(e){return{mappedParams:(t=e,{number:t.quotationNumber})};var t},responseMapper:function(e){return B(e)}}},GET_PAYMENT_METHODS:{},POST_INSURED_UPDATE:{default:{url:"policy-life/v1/policies/{0}/insureds",method:X,requestMapper:null,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post",responseMapper:function(e){return e}},cnp:{url:"v1/policy-collective/{0}/{1}/insureds",method:X,requestMapper:null,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds",responseMapper:function(e){return{salary:"string"==typeof(t=e).salary?t.salary:String(t.salary),identification:"string"==typeof t.identification?t.identification:String(t.identification)};var t}}},POST_CREATE_QUOTATION_STANDARD_PLAN:{default:{url:"quotation/v1/quotations",method:X,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan",method:X,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan",requestMapper:function(e){return{mappedBody:V(e)}},responseMapper:function(e){return e}}},POST_CREATE_QUOTATION_VARIABLE_PLAN:{default:{url:"quotation/v1/quotations",method:X,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:X,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan",requestMapper:function(e){return{mappedBody:W(e)}},responseMapper:function(e){return e}}},CREATE_INSURED:{}};function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function J(){J=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==z(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(z(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function re(e,t,r){return(t=function(e){var t=function(e){if("object"!=z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==z(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ne={default:{baseURL:"https://app-dev.sysone.com/",headers:re(re(re({},"X-Tenant","sysone"),"X-User","sysone"),"X-Api-Key","PYRxE7iBUFCFcDmTwIFGEkvSMzJ88hSU4uWG0DL0ebk1CYVamsa6phIlsECQQMqkM0XXtZ5K1L85cyr3MgkIhtjlIh4niBsagiVRjzIaqNKxSU2N8Y7KaZLItDB2oDTc")},cnp:{baseURL:"http://api-test.cnp.com.ar/",headers:re(re(re(re({},"X-Chanel","cnp"),"X-Agent","299"),"X-Client","cnp"),"Ocp-Apim-Subscription-Key","5e0a100bd5804b058fc119729177cefd")}},oe=function(){var e,t=(e=J().mark((function e(t,r,o){var i,a,u,l,c,s,d,p,m,E,v,h,f=arguments;return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=f.length>3&&void 0!==f[3]?f[3]:null,e.prev=1,u=Q[t]){e.next=5;break}throw new Error("Endpoint no configurado: ".concat(t));case 5:l=null!==(a=u[r])&&void 0!==a?a:u.default,c="cnp"===r?ne[r]:ee(ee({},ne.default),{},{headers:ee(ee({},ne.default.headers),{},re(re({},"X-Tenant",r),"X-User",r))}),c=ee(ee({},c),{},{validateStatus:function(e){return e<500}}),s=ie(l.url,o),e.t0=l.method,e.next=e.t0===K?12:e.t0===X?18:"PUT"===e.t0?24:"DELETE"===e.t0?28:32;break;case 12:return p=l.requestMapper(i),m=p.mappedParams,e.next=16,n.get(s,ee(ee({},c),{},{params:m}));case 16:case 22:case 26:case 30:return d=e.sent,e.abrupt("return",l.responseMapper(d.data));case 18:return p=l.requestMapper(i),v=(E=p).mappedPostParams,h=E.mappedBody,e.next=22,n.post(s,h,ee(ee({},c),{},{params:v}));case 24:return e.next=26,n.put(s,i);case 28:return e.next=30,n.delete(s,i);case 32:throw d=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 34:e.next=39;break;case 36:throw e.prev=36,e.t1=e.catch(1),e.t1;case 39:case"end":return e.stop()}}),e,null,[[1,36]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){te(i,n,o,a,u,"next",e)}function u(e){te(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),ie=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e};module.exports=t})();
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{apiCall:()=>A,apiMapper:()=>ie,axiosInstance:()=>n,endpoints:()=>E});const r=require("axios"),n=e.n(r)().create({});var o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u="PARTY_MODULE",l="INTERMEDIARY_MODULE",c="COMMERCIAL_STRUCTURE_MODULE",s="POLICY_MODULE",d="GET",p="POST",m="PUT",E=(a(a(a(a(a(a(a(a(a(a(o={GET_ACTIVITIES:"GET_ACTIVITIES",GET_PRACTICES:"GET_PRACTICES",SEARCH_INDIVIDUALS:"SEARCH_INDIVIDUALS",CREATE_INDIVIDUAL:"CREATE_INDIVIDUAL",GET_IDENTIFICATION_TYPES:"GET_IDENTIFICATION_TYPES",GET_RELATIONS:"GET_RELATIONS",GET_NOTES:"GET_NOTES",GET_FILES:"GET_FILES",GET_SECTORS:"GET_SECTORS",GET_FISCAL_CATEGORIES:"GET_FISCAL_CATEGORIES",GET_MAIL_TYPES:"GET_MAIL_TYPES",GET_PHONE_TYPES:"GET_PHONE_TYPES",UPDATE_NOTES:"UPDATE_NOTES",UPDATE_FILES:"UPDATE_FILES",ADD_RELATION_WITH_EXISTING_PARTY:"ADD_RELATION_WITH_EXISTING_PARTY",GET_RELATIONS_BY_PARTY_CODE:"GET_RELATIONS_BY_PARTY_CODE",REMOVE_RELATION:"REMOVE_RELATION",GET_FILE:"GET_FILE",GET_ORGANIZATION_TYPES:"GET_ORGANIZATION_TYPES",SEARCH_ORGANIZATION:"SEARCH_ORGANIZATION",CREATE_ORGANIZATION:"CREATE_ORGANIZATION",GET_ORGANIZATION_BY_CODE:"GET_ORGANIZATION_BY_CODE",UPDATE_ORGANIZATION:"UPDATE_ORGANIZATION",ADD_RELATION_WITH_NEW_ORGANIZATION:"ADD_RELATION_WITH_NEW_ORGANIZATION",GET_PERSON_BY_CODE:"GET_PERSON_BY_CODE",GET_GENDERS:"GET_GENDERS",GET_MARITAL_STATUSES:"GET_MARITAL_STATUSES",GET_WORKER_TYPES:"GET_WORKER_TYPES",GET_ECONOMIC_CLASSES:"GET_ECONOMIC_CLASSES",SEARCH_PERSON:"SEARCH_PERSON",UPDATE_PERSON:"UPDATE_PERSON",GET_RELATION_TYPES:"GET_RELATION_TYPES",ADD_RELATION_WITH_NEW_PERSON:"ADD_RELATION_WITH_NEW_PERSON",GET_POLICY_PROCESSES:"GET_POLICY_PROCESSES",GET_COUNTRIES:"GET_COUNTRIES",GET_COUNTRY_BY_CODE:"GET_COUNTRY_BY_CODE",GET_PROVINCES:"GET_PROVINCES",GET_CITIES:"GET_CITIES",GET_POSTAL_CODES:"GET_POSTAL_CODES",GET_ADDRESSES_BY_PARTY_CODE:"GET_ADDRESSES_BY_PARTY_CODE",GET_ADDRESS_TYPES:"GET_ADDRESS_TYPES",GET_PAYMENT_METHODS_BY_PARTY_CODE:"GET_PAYMENT_METHODS_BY_PARTY_CODE",GET_CREDIT_CARD_TYPES:"GET_CREDIT_CARD_TYPES",GET_CARD_PROVIDERS:"GET_CARD_PROVIDERS",UPDATE_PAYMENTS:"UPDATE_PAYMENTS",GET_BANKS:"GET_BANKS",GET_CURRENCIES:"GET_CURRENCIES",GET_BANK_ACCOUNT_TYPES:"GET_BANK_ACCOUNT_TYPES",GET_BANK_BRANCHES:"GET_BANK_BRANCHES",GET_PERSON_INTERMEDIARY_BY_CODE:"GET_PERSON_INTERMEDIARY_BY_CODE",GET_ORGANIZATION_INTERMEDIARY_BY_CODE:"GET_ORGANIZATION_INTERMEDIARY_BY_CODE",GET_INTERMEDIARIES_GROUPS:"GET_INTERMEDIARIES_GROUPS",GET_INTERMEDIARIES_ROLES:"GET_INTERMEDIARIES_ROLES",GET_INTERMEDIARY_STRUCTURES:"GET_INTERMEDIARY_STRUCTURES",SEARCH_INTERMEDIARIES:"SEARCH_INTERMEDIARIES",SEARCH_ACCOUNT_OFFICERS:"SEARCH_ACCOUNT_OFFICERS",GET_INTERMEDIARIES_STATES:"GET_INTERMEDIARIES_STATES",GET_INTERMEDIARIES_TYPES:"GET_INTERMEDIARIES_TYPES",CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY:"CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY",CREATE_INTERMEDIARY_WITH_WITH_PERSON:"CREATE_INTERMEDIARY_WITH_WITH_PERSON",CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION:"CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION",UPDATE_INTERMEDIARY:"UPDATE_INTERMEDIARY",CREATE_COMMERCIAL_STRUCTURE:"CREATE_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURE_STATUSES:"GET_COMMERCIAL_STRUCTURE_STATUSES",SEARCH_COMMERCIAL_STRUCTURE:"SEARCH_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURES_BY_CODE:"GET_COMMERCIAL_STRUCTURES_BY_CODE",UPDATE_COMMERCIAL_STRUCTURE:"UPDATE_COMMERCIAL_STRUCTURE",UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES:"UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES",GET_POLICY_SECTIONS:"GET_POLICY_SECTIONS",GET_POLICY_SUBSECTIONS:"GET_POLICY_SUBSECTIONS"},"GET_POLICY_PROCESSES","GET_POLICY_PROCESSES"),"GET_POLICY_PRODUCTS","GET_POLICY_PRODUCTS"),"GET_VALIDITY_TYPES","GET_VALIDITY_TYPES"),"GET_POLICY_CARACTERS","GET_POLICY_CARACTERS"),"GET_POLICY_TYPE_OF_DOCUMENTATION","GET_POLICY_TYPE_OF_DOCUMENTATION"),"GET_PAYMENT_FREQUENCIES","GET_PAYMENT_FREQUENCIES"),"GET_ASSOCIATE_TERMS_CONDITION","GET_ASSOCIATE_TERMS_CONDITION"),"GET_ASSOCIATE_EXPENSES","GET_ASSOCIATE_EXPENSES"),"GET_ASSOCIATE_COVERAGE","GET_ASSOCIATE_COVERAGE"),"GET_COVERAGES","GET_COVERAGES"),a(a(a(a(a(a(a(a(a(a(o,"GET_EXPENSEVALUES","GET_EXPENSEVALUES"),"GET_MORTALITY_TABLE","GET_MORTALITY_TABLE"),"CREATE_POLICY_STEP1","CREATE_POLICY_STEP1"),"CREATE_POLICY_STEP2","CREATE_POLICY_STEP2"),"CREATE_POLICY_STEP3","CREATE_POLICY_STEP3"),"CREATE_POLICY_STEP4","CREATE_POLICY_STEP4"),"CREATE_POLICY_STEP5","CREATE_POLICY_STEP5"),"CREATE_POLICY_STEP6","CREATE_POLICY_STEP6"),"CREATE_POLICY_STEP7","CREATE_POLICY_STEP7"),"CREATE_POLICY_STEP8","CREATE_POLICY_STEP8"),a(a(a(a(a(a(a(a(a(a(o,"CREATE_POLICY_STEP9","CREATE_POLICY_STEP9"),"CREATE_POLICY_STEP10","CREATE_POLICY_STEP10"),"CREATE_POLICY_STEP11","CREATE_POLICY_STEP11"),"GET_STEP1_DATA","GET_STEP1_DATA"),"GET_STEP2_DATA","GET_STEP2_DATA"),"GET_STEP3_DATA","GET_STEP3_DATA"),"GET_STEP4_DATA","GET_STEP4_DATA"),"GET_STEP5_DATA","GET_STEP5_DATA"),"GET_STEP6_DATA","GET_STEP6_DATA"),"GET_STEP7_DATA","GET_STEP7_DATA"),a(a(a(a(a(a(a(a(a(a(o,"GET_STEP9_DATA","GET_STEP9_DATA"),"GET_STEP11_DATA","GET_STEP11_DATA"),"GET_STEP11_FILE","GET_STEP11_FILE"),"UPDATE_POLICY_STEP1","UPDATE_POLICY_STEP1"),"GET_ISURED_PERSONS","GET_ISURED_PERSONS"),"UPDATE_PARTY","UPDATE_PARTY"),"GET_POLICY_DETAILS","GET_POLICY_DETAILS"),"UPDATE_PAYMENTS","UPDATE_PAYMENTS"),"CREATE_POLICY_RISK","CREATE_POLICY_RISK"),"ACTIVATE_POLICY","ACTIVATE_POLICY"),a(a(a(a(a(a(a(a(a(a(o,"COMPLETE_POLICY","COMPLETE_POLICY"),"SET_POLICY_BUILDING","SET_POLICY_BUILDING"),"SEARCH_POLICIES","SEARCH_POLICIES"),"SEARCH_POLICY_GENERAL_CONDITIONS","SEARCH_POLICY_GENERAL_CONDITIONS"),"GET_ASSURED_LIST","GET_ASSURED_LIST"),"GET_ADHERENTS","GET_ADHERENTS"),"GET_ADHERENTS_BY_OWNER","GET_ADHERENTS_BY_OWNER"),"GET_OWNERS","GET_OWNERS"),"GET_POLICY_ROLES","GET_POLICY_ROLES"),"CREATE_PRODUCT","CREATE_PRODUCT")),v=[{endpoint:E.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:p,module:u},{endpoint:E.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:d,module:u},{endpoint:E.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:d,module:u},{endpoint:E.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:d,module:u},{endpoint:E.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:d,module:u},{endpoint:E.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:d,module:u},{endpoint:E.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:d,module:u},{endpoint:E.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:d,module:u},{endpoint:E.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:m,module:u},{endpoint:E.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:m,module:u},{endpoint:E.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:m,module:u},{endpoint:E.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:m,module:u},{endpoint:E.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:d,module:u},{endpoint:E.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:d,module:u},{endpoint:E.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:d,module:u},{endpoint:E.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:p,module:u},{endpoint:E.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:m,module:u},{endpoint:E.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:m,module:u},{endpoint:E.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:m,module:u},{endpoint:E.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:d,module:u},{endpoint:E.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:d,module:u},{endpoint:E.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:d,module:u},{endpoint:E.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:d,module:u},{endpoint:E.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:d,module:u},{endpoint:E.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:m,module:u},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:u},{endpoint:E.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:d,module:u},{endpoint:E.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:d,module:u},{endpoint:E.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:d,module:u},{endpoint:E.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:d,module:u},{endpoint:E.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:d,module:u},{endpoint:E.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:d,module:u},{endpoint:E.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:d,module:u},{endpoint:E.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:d,module:u},{endpoint:E.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:d,module:u},{endpoint:E.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:d,module:u},{endpoint:E.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:m,module:u},{endpoint:E.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:d,module:u},{endpoint:E.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:d,module:u},{endpoint:E.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:d,module:u},{endpoint:E.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:d,module:u},{endpoint:E.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:d,module:l},{endpoint:E.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:d,module:l},{endpoint:E.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:d,module:l},{endpoint:E.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:d,module:l},{endpoint:E.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:p,module:l},{endpoint:E.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:m,module:l},{endpoint:E.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:d,module:c},{endpoint:E.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:p,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:d,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:m,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:m,module:c},{endpoint:E.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:d,module:s},{endpoint:E.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:d,module:s},{endpoint:E.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:d,module:s},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:s},{endpoint:E.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:d,module:s},{endpoint:E.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:d,module:s},{endpoint:E.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:d,module:s},{endpoint:E.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:d,module:s},{endpoint:E.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:d,module:s},{endpoint:E.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:d,module:s},{endpoint:E.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:d,module:s},{endpoint:E.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:d,module:s},{endpoint:E.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:d,module:s},{endpoint:E.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:d,module:s},{endpoint:E.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:d,module:s},{endpoint:E.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:p,module:s},{endpoint:E.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:m,module:s},{endpoint:E.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:d,module:s},{endpoint:E.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:d,module:s},{endpoint:E.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:d,module:s},{endpoint:E.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:d,module:s},{endpoint:E.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:d,module:s},{endpoint:E.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:d,module:s},{endpoint:E.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:d,module:s},{endpoint:E.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:d,module:s},{endpoint:E.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:m,module:s},{endpoint:E.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:d,module:s},{endpoint:E.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:m,module:s},{endpoint:E.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:d,module:s},{endpoint:E.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:p,module:s},{endpoint:E.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:m,module:s},{endpoint:E.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:m,module:s},{endpoint:E.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:m,module:s},{endpoint:E.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:d,module:s},{endpoint:E.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:d,module:s},{endpoint:E.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:d,module:s},{endpoint:E.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:d,module:s},{endpoint:E.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:d,module:l},{endpoint:E.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:p,module:"CONFIGURATOR_MODULE"}];function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof T?t:T,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",y={};function T(){}function _(){}function A(){}var N={};c(N,a,(function(){return this}));var S=Object.getPrototypeOf,I=S&&S(S(G([])));I&&I!==r&&n.call(I,a)&&(N=I);var O=A.prototype=T.prototype=Object.create(N);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(f(t)+" is not iterable")}return _.prototype=A,o(O,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:_,configurable:!0}),_.displayName=c(A,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var T=function(e,t){try{var n={title:"",errors:[]};if(t instanceof r.AxiosError){var o,i,a=t.response,u=a.status,l=null===(o=JSON.parse(localStorage.getItem("modules_info")).find((function(t){return t.code===e.module})))||void 0===o||null===(o=o.services)||void 0===o||null===(o=o.find((function(t){return t.name.toUpperCase()===e.serviceName.toUpperCase()&&t.httpMethod.toUpperCase()===e.method.toUpperCase()})))||void 0===o?void 0:o.errors.find((function(e){return e.httpStatus===u}));n.title=(null==l?void 0:l.content)||a.data.message;var c=null===(i=a.data.errorMessages)||void 0===i?void 0:i.map((function(e){var t,r=null==l||null===(t=l.subErrors)||void 0===t?void 0:t.find((function(t){return t.errorType===e.fieldError&&t.fieldName===e.fieldName}));return(null==r?void 0:r.content)||(null==e?void 0:e.error)}));n.errors=c||[]}else n.title=t.message}catch(t){throw console.error(t),t}},_=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},A=function(){var e,t=(e=h().mark((function e(t,r){var o,i,a,u,l=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>2&&void 0!==l[2]?l[2]:null,i=v.find((function(e){return e.endpoint===t})),e.prev=2,i){e.next=5;break}throw new Error("Service does not exists");case 5:a=_(i.url,r),e.t0=i.method,e.next=e.t0===d?9:e.t0===p?13:e.t0===m?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,n.get(a,{params:o});case 11:case 15:case 19:case 23:return u=e.sent,e.abrupt("return",u.data);case 13:return e.next=15,n.post(a,o);case 17:return e.next=19,n.put(a,o);case 21:return e.next=23,n.delete(a,o);case 25:throw u=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 27:e.next=33;break;case 29:throw e.prev=29,e.t1=e.catch(2),T(i,e.t1),e.t1;case 33:case"end":return e.stop()}}),e,null,[[2,29]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",f={};function h(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,I=A&&A(A(G([])));I&&I!==r&&n.call(I,a)&&(_=I);var O=T.prototype=h.prototype=Object.create(_);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==N(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(N(t)+" is not iterable")}return y.prototype=T,o(O,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),f}},t}function I(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var O=function(){var e,t=(e=S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={values:null==t||null===(r=t.claims)||void 0===r?void 0:r.map((function(e){return{claimNumber:e.claimNumber.toString(),policyNumber:e.policyNumber,creationDate:e.claimDate,status:{name:e.status,code:"N/A"}}}))},e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();const g=require("moment");var R=e.n(g);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){P=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",f={};function h(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(G([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=h.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(C(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),f}},t}function D(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){D(i,n,o,a,u,"next",e)}function u(e){D(i,n,o,a,u,"throw",e)}a(void 0)}))}}var b=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:t.insureds.length,totalActive:null,values:t.insureds.map((function(e){return{code:e.code,number:e.id,firstName:e.firstName||e.name,lastName:e.lastName,type:{code:"T"===e.role.code?"OWNER":"ADHERENT",name:"T"===e.role.code?"Titular":"Adherente"},status:{code:"ACTIVE",name:"Activo"},insuredAmount:e.insuredAmount,inclusionDate:e.entranceDate,exclusionDate:e.cancellationDate,identification:{value:e.identification.number,type:{name:e.identification.type.name,code:e.identification.type.code}}}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.endorsements.map((function(e){return{number:e.number,validityFrom:e.dateFrom?R()(e.dateFrom,"DD/MM/YYYY").toISOString():null,validityTo:e.dateTo?R()(e.dateTo,"DD/MM/YYYY").toISOString():null,activeDate:"N/A",type:{code:"N/A",name:e.detail,group:{code:"N/A",name:"N/A"}}}})),total:t.endorsements.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.policies.map((function(e){var t,r,n,o,i,a,u,l,c,s;return{number:e.number,validityFrom:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,validityTo:"N/A",ingress:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,holder:{name:(null===(t=e.holder)||void 0===t?void 0:t.name)||(null===(r=e.holder)||void 0===r?void 0:r.firstName),identifications:{values:[{value:(null===(n=e.holder)||void 0===n||null===(n=n.identification)||void 0===n?void 0:n.number)||null,type:{name:(null===(o=e.holder)||void 0===o||null===(o=o.identification)||void 0===o||null===(o=o.type)||void 0===o?void 0:o.name)||null,code:(null===(i=e.holder)||void 0===i||null===(i=i.identification)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.code)||null},default:!0}]}},code:"N/A",alias:"N/A",product:{code:(null===(a=e.section)||void 0===a?void 0:a.code.toString())||null,name:(null===(u=e.section)||void 0===u?void 0:u.name)||null,subsection:{name:"N/A",code:"N/A",section:{name:(null===(l=e.section)||void 0===l?void 0:l.name)||null,code:(null===(c=e.section)||void 0===c?void 0:c.code)||null}}},process:{name:(null===(s=e.status)||void 0===s?void 0:s.name)||null,code:"N/A"}}})),total:t.totalRecord||null},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,f,h,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(f=t.paymentMethod)||void 0===f?void 0:f.name)?{values:[{code:"N/A",name:(null==t||null===(h=t.currency)||void 0===h?void 0:h.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,f,h,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(f=t.paymentMethod)||void 0===f?void 0:f.name)?{values:[{code:"N/A",name:(null==t||null===(h=t.currency)||void 0===h?void 0:h.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(e){return{ANNUAL:6,MONTHLY:1,QUARTERLY:3,SEMI_ANNUAL:5}[e]||6},U=function(e){return{SC_SC:534,VI_VI_VIDA_IND_1:120,OTRO_CODIGO:0}[e]||404};function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function q(){q=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",f={};function h(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=h.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(j(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),f}},t}function k(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function F(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){k(i,n,o,a,u,"next",e)}function u(e){k(i,n,o,a,u,"throw",e)}a(void 0)}))}}var B=function(){var e=F(q().mark((function e(t){var r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={quotations:t.quotations.map((function(e){var t,r;return{code:"N/A",creationDate:"N/A",email:"N/A",expirationDate:"N/A",number:e.quotationNumber||null,paymentFrequency:{name:"N/A",code:"N/A"},product:{code:(null===(t=e.productCode)||void 0===t?void 0:t.toString())||null,name:"N/A",subsection:{code:"N/A",name:"N/A",section:{code:(null===(r=e.sectionCode)||void 0===r?void 0:r.toString())||null,name:"N/A"}},version:0},status:{code:"N/A",name:"N/A"}}})),total:"N/A"},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=F(q().mark((function e(t){var r,n,o,i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={code:(null===(r=t.quotationNumber)||void 0===r?void 0:r.toString())||null,number:t.activityCode||0,creationDate:t.vigencyDateFrom||null,expirationDate:t.vigencyDateTo||null,validity:{code:"N/A",name:"N/A",months:"N/A"},status:{code:"N/A",name:"N/A"},paymentFrequency:{name:"N/A",code:"N/A",months:0},email:"N/A",phone:"N/A",intermediary:{code:"N/A",name:"N/A",roles:{}},commercialStructure:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:"N/A",name:"N/A",licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"},group:{name:"N/A",code:"N/A"}}]}},product:{name:"N/A",code:(null==t||null===(n=t.productCode)||void 0===n?void 0:n.toString())||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:"N/A",code:(null==t||null===(o=t.sectionCode)||void 0===o?void 0:o.toString())||null,type:{name:"N/A",code:"N/A"},category:{name:"N/A",code:"N/A"}}},status:{code:"N/A",name:"N/A"},currency:{name:"N/A",code:"N/A",mnemonic:"N/A",symbol:"N/A"}},productSegment:{coverages:[],expenses:[],name:"N/A",code:"N/A",version:0,description:"N/A"},values:{risks:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:{name:"N/A",code:"N/A"},value:0}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{},adherents:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:"N/A",code:"N/A"}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{}}]}],expenses:[{type:{name:"N/A",code:"N/A"},value:0}],groupedEconomicValues:[{type:{name:"N/A",code:"N/A"},value:0}],commercialAgreement:{}}},e.abrupt("return",i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(e){return e?{sectionCode:17,paymentTypeCode:x(e.paymentFrequencyCode),productCode:U(e.productCode),provinceCode:1}:null},W=function(e){var t,r;return e?{sectionCode:17,paymentTypeCode:x(e.paymentFrequencyCode),productCode:U(e.productCode),provinceCode:1,birthdate:null===(t=e.risks[0])||void 0===t?void 0:t.birthDate,insuredAmount:(null===(r=e.risks[0])||void 0===r||null===(r=r.coverages[0])||void 0===r||null===(r=r.values.find((function(e){return"INSURED_AMOUNT"===e.code})))||void 0===r?void 0:r.value)||0}:null},Z=function(){var e=F(q().mark((function e(t){var r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.activities.map((function(e){return{code:e.code,name:e.name}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K="GET",Q="POST",X={GET_ACTIVITY:{default:{url:"party/v1/sectors",method:K,source:"https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/activity",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return Z(e)}}},GET_CLAIMS:{default:{url:"claim/v1/claims",method:K,source:"https://apidoc.sysone.com/claim/v1/open-api.html",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"claim/v1/claim",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",requestMapper:null,responseMapper:function(e){return O(e)}}},GET_ENDORSEMENTS:{default:{url:"policy/v1/policies/{0}/endorsements",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/endorsements",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return G(e)}}},GET_INSUREDS:{default:{url:"policy-life/v1/policies/{0}/insureds",method:K,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/policy-insured",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds",requestMapper:function(e){return{mappedParams:(t=e,{code:t.number||void 0,name:t.firstName||void 0})};var t},responseMapper:function(e){return b(e)}}},GET_POLICIES:{default:{url:"policy/v1/policies",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",requestMapper:function(e){return{mappedParams:(t=e,{sort:"TomadorCodigo",orderType:"desc",pageNumber:t.page||1,pageSize:t.pageSize||10,allPolicies:null})};var t},responseMapper:function(e){return w(e)}}},GET_POLICY_HOME_COLLECTIVE_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_HOME_INDIVIDUAL_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_POLICY_LIFE_COLLECTIVE_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_LIFE_INDIVIDUAL_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:K,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_QUOTATION_BY_CODE:{default:{url:"quotation/v1/quotations/{0}",method:K,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan/{0}",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return H(e)}}},GET_QUOTATIONS:{default:{url:"quotation/v1/quotations",method:K,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:K,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-variable-plan",requestMapper:function(e){return{mappedParams:(t=e,{number:t.quotationNumber})};var t},responseMapper:function(e){return B(e)}}},GET_PAYMENT_METHODS:{},POST_INSURED_UPDATE:{default:{url:"policy-life/v1/policies/{0}/insureds",method:Q,requestMapper:null,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post",responseMapper:function(e){return e}},cnp:{url:"v1/policy-collective/{0}/{1}/insureds",method:Q,requestMapper:null,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds",responseMapper:function(e){return{salary:"string"==typeof(t=e).salary?t.salary:String(t.salary),identification:"string"==typeof t.identification?t.identification:String(t.identification)};var t}}},POST_CREATE_QUOTATION_STANDARD_PLAN:{default:{url:"quotation/v1/quotations",method:Q,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan",method:Q,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan",requestMapper:function(e){return{mappedBody:V(e)}},responseMapper:function(e){return e}}},POST_CREATE_QUOTATION_VARIABLE_PLAN:{default:{url:"quotation/v1/quotations",method:Q,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:Q,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan",requestMapper:function(e){return{mappedBody:W(e)}},responseMapper:function(e){return e}}},CREATE_INSURED:{}};const z=require("dotenv");function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function $(){$=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",f={};function h(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=h.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==J(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(J(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),f}},t}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e,t,r){return(t=function(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}e.n(z)().config();var oe=JSON.parse("'{")["api-mapper"],ie=function(){var e,t=(e=$().mark((function e(t,r,o){var i,a,u,l,c,s,d,p,m,E,v,f,h=arguments;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=h.length>3&&void 0!==h[3]?h[3]:null,e.prev=1,u=X[t]){e.next=5;break}throw new Error("Endpoint no configurado: ".concat(t));case 5:if(l=null!==(a=u[r])&&void 0!==a?a:u.default,oe){e.next=8;break}throw new Error("No se pudo cargar la configuración del API Mapper");case 8:c="cnp"===r?oe.cnp:te(te({},oe.default),{},{headers:te(te({},oe.default.headers),{},re(re({},"X-Tenant",r),"X-User",r))}),c=te(te({},c),{},{validateStatus:function(e){return e<500}}),s=ae(l.url,o),e.t0=l.method,e.next=e.t0===K?14:e.t0===Q?20:"PUT"===e.t0?26:"DELETE"===e.t0?30:34;break;case 14:return p=l.requestMapper(i),m=p.mappedParams,e.next=18,n.get(s,te(te({},c),{},{params:m}));case 18:case 24:case 28:case 32:return d=e.sent,e.abrupt("return",l.responseMapper(d.data));case 20:return p=l.requestMapper(i),v=(E=p).mappedPostParams,f=E.mappedBody,e.next=24,n.post(s,f,te(te({},c),{},{params:v}));case 26:return e.next=28,n.put(s,i);case 30:return e.next=32,n.delete(s,i);case 34:throw d=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 36:e.next=41;break;case 38:throw e.prev=38,e.t1=e.catch(1),e.t1;case 41:case"end":return e.stop()}}),e,null,[[1,38]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ne(i,n,o,a,u,"next",e)}function u(e){ne(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),ae=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e};module.exports=t})();
@@ -1 +1 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,16 +1,26 @@
1
1
  const path = require("path");
2
2
  const pkg = require("../package.json");
3
3
  const nodeExternals = require("webpack-node-externals");
4
+ const Dotenv = require("dotenv-webpack");
5
+ const webpack = require("webpack");
6
+
4
7
  module.exports = {
5
8
  mode: "development",
6
9
  entry: "./index.js",
7
10
  output: {
8
11
  path: path.resolve(__dirname, "dist"),
9
12
  filename: "index.js",
10
- libraryTarget: "commonjs2", //<- to which version are we compiling js
13
+ libraryTarget: "commonjs2",
11
14
  },
12
15
  resolve: {
13
16
  extensions: [".tsx", ".ts", ".jsx", ".js", ".json"],
17
+ fallback: {
18
+ path: require.resolve("path-browserify"),
19
+ os: require.resolve("os-browserify/browser"),
20
+ fs: false,
21
+ crypto: false,
22
+ process: require.resolve("process/browser.js"),
23
+ },
14
24
  },
15
25
  module: {
16
26
  rules: [
@@ -33,6 +43,16 @@ module.exports = {
33
43
  },
34
44
  ],
35
45
  },
36
- target: "node",
46
+ plugins: [
47
+ new Dotenv({
48
+ path: path.resolve(__dirname, "../.env"),
49
+ systemvars: true,
50
+ safe: true,
51
+ }),
52
+ new webpack.ProvidePlugin({
53
+ process: "process/browser",
54
+ }),
55
+ ],
56
+ target: "web",
37
57
  externals: [nodeExternals()],
38
58
  };
@@ -1,6 +1,9 @@
1
- const path = require("path"); // <-get absolute location for saving
1
+ const path = require("path");
2
2
  const pkg = require("../package.json");
3
3
  const nodeExternals = require("webpack-node-externals");
4
+ const Dotenv = require("dotenv-webpack");
5
+ const webpack = require("webpack");
6
+
4
7
  module.exports = {
5
8
  mode: "production",
6
9
  entry: "./index.js",
@@ -11,8 +14,12 @@ module.exports = {
11
14
  },
12
15
  resolve: {
13
16
  extensions: [".tsx", ".ts", ".jsx", ".js", ".json"],
14
- alias: {
15
- react: path.resolve(__dirname, "./node_modules/react"),
17
+ fallback: {
18
+ path: require.resolve("path-browserify"),
19
+ os: require.resolve("os-browserify/browser"),
20
+ fs: false,
21
+ crypto: false,
22
+ process: require.resolve("process/browser"),
16
23
  },
17
24
  },
18
25
  module: {
@@ -36,6 +43,16 @@ module.exports = {
36
43
  },
37
44
  ],
38
45
  },
46
+ plugins: [
47
+ new Dotenv({
48
+ path: path.resolve(__dirname, "../.env"),
49
+ systemvars: true,
50
+ safe: true,
51
+ }),
52
+ new webpack.ProvidePlugin({
53
+ process: "process/browser",
54
+ }),
55
+ ],
39
56
  target: "node",
40
57
  externals: [nodeExternals()],
41
58
  };
package/package.json CHANGED
@@ -1,37 +1,43 @@
1
1
  {
2
2
  "name": "sysone-api-mapper",
3
- "version": "1.0.25",
4
- "description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
3
+ "version": "1.0.27",
4
+ "description": "Paquete mapper para portal de productores",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "start": "node src/server.js",
8
8
  "dev": "nodemon src/server.js",
9
- "build": "webpack --config config/webpack.prod.js",
9
+ "build": "webpack --config config/webpack.dev.js",
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
11
11
  },
12
12
  "keywords": [],
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "axios": "^1.6.0",
17
- "cors": "^2.8.5",
18
- "dotenv": "^16.0.3",
19
- "express": "^4.21.2",
20
- "webpack": "^5.57.1",
21
- "webpack-cli": "^5.0.1",
22
- "webpack-node-externals": "^3.0.0",
23
16
  "@babel/core": "^7.21.0",
24
17
  "@babel/plugin-proposal-class-properties": "^7.18.6",
25
18
  "@babel/preset-env": "^7.20.2",
26
19
  "@babel/preset-react": "^7.18.6",
27
20
  "antd": "^4.21.4",
21
+ "axios": "^1.6.0",
28
22
  "babel-loader": "^9.1.2",
23
+ "cors": "^2.8.5",
24
+ "dotenv": "^16.0.3",
25
+ "express": "^4.21.2",
26
+ "os-browserify": "^0.3.0",
27
+ "path-browserify": "^1.0.1",
28
+ "process": "^0.11.10",
29
29
  "react": "^17.0.2",
30
- "react-dom": "^17.0.2"
30
+ "react-dom": "^17.0.2",
31
+ "webpack": "^5.57.1",
32
+ "webpack-cli": "^5.0.1",
33
+ "webpack-node-externals": "^3.0.0"
31
34
  },
32
35
  "devDependencies": {
36
+ "dotenv-webpack": "^8.1.0",
33
37
  "jest": "^29.7.0",
34
- "nodemon": "^2.0.22"
38
+ "nodemon": "^2.0.22",
39
+ "os-browserify": "^0.3.0",
40
+ "path-browserify": "^1.0.1"
35
41
  },
36
42
  "repository": {
37
43
  "type": "git",
@@ -1,28 +1,39 @@
1
1
  import axiosInstance from "../../axiosInstance";
2
2
  import { methods, tenantsConfig } from "./endpointsConfig";
3
+ import dotenv from "dotenv";
4
+
5
+ // Cargar variables de entorno
6
+ dotenv.config();
7
+
8
+ // Obtener y parsear la configuración del archivo .env
9
+ const API_MAPPER = process.env.API_MAPPER || {};
10
+ // Acceder específicamente a la configuración de api-mapper
11
+
12
+ console.log("variable API_MAPPER desde Paquete de sysone", API_MAPPER);
3
13
 
4
- // Momentaneo para probar CNP -
5
14
  const configs = {
6
15
  default: {
7
- baseURL: "https://app-dev.sysone.com/",
16
+ baseURL: API_MAPPER.default.baseURL,
8
17
  headers: {
9
- ["X-Tenant"]: "sysone",
10
- ["X-User"]: "sysone",
11
- ["X-Api-Key"]:
12
- "PYRxE7iBUFCFcDmTwIFGEkvSMzJ88hSU4uWG0DL0ebk1CYVamsa6phIlsECQQMqkM0XXtZ5K1L85cyr3MgkIhtjlIh4niBsagiVRjzIaqNKxSU2N8Y7KaZLItDB2oDTc",
18
+ ["X-Tenant"]: API_MAPPER.default.headers["X-Tenant"],
19
+ ["X-User"]: API_MAPPER.default.headers["X-User"],
20
+ ["X-Api-Key"]: API_MAPPER.default.headers["X-Api-Key"],
13
21
  },
14
22
  },
15
23
  cnp: {
16
- baseURL: "http://api-test.cnp.com.ar/",
24
+ baseURL: API_MAPPER.cnp.baseURL,
17
25
  headers: {
18
- ["X-Chanel"]: "cnp",
19
- ["X-Agent"]: "299",
20
- ["X-Client"]: "cnp",
21
- ["Ocp-Apim-Subscription-Key"]: "5e0a100bd5804b058fc119729177cefd",
26
+ ["X-Channel"]: API_MAPPER.cnp.headers["X-Chanel"],
27
+ ["X-Agent"]: API_MAPPER.cnp.headers["X-Agent"],
28
+ ["X-Client"]: API_MAPPER.cnp.headers["X-Client"],
29
+ ["Ocp-Apim-Subscription-Key"]:
30
+ API_MAPPER.cnp.headers["Ocp-Apim-Subscription-Key"],
22
31
  },
23
32
  },
24
33
  };
25
34
 
35
+ // Momentaneo para probar CNP test
36
+
26
37
  export const apiMapper = async (
27
38
  endpointCode,
28
39
  tenant,
@@ -37,8 +48,13 @@ export const apiMapper = async (
37
48
  const endpointData = configData[tenant] ?? configData.default;
38
49
  let config;
39
50
 
51
+ // Validar que se haya cargado la configuración
52
+ if (!configs) {
53
+ throw new Error("No se pudo cargar la configuración del API Mapper");
54
+ }
55
+
40
56
  if (tenant === "cnp") {
41
- config = configs[tenant];
57
+ config = configs.cnp;
42
58
  } else {
43
59
  // Para cualquier otro tenant, usar config default pero sobreescribir X-Tenant y X-User
44
60
  config = {
@@ -1,93 +0,0 @@
1
- # api-mapper
2
-
3
-
4
-
5
- ## Getting started
6
-
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
-
16
- ```
17
- cd existing_repo
18
- git remote add origin https://gitlab.sysone.com/sysone-cloud-ready/sales-platform/api-mapper.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](https://gitlab.sysone.com/sysone-cloud-ready/sales-platform/api-mapper/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
-
47
- # Editing this README
48
-
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
-
51
- ## Suggestions for a good README
52
-
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
-
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
88
-
89
- ## License
90
- For open source projects, say how it is licensed.
91
-
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.