Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / config / config.service.js
1 const a837_0x1697=['number','string','replace','NODE_ENV','lodash','boolean','reduce','undefined','production','toLowerCase','env'];(function(_0x189224,_0x16976e){const _0x34496c=function(_0x1b44f3){while(--_0x1b44f3){_0x189224['push'](_0x189224['shift']());}};_0x34496c(++_0x16976e);}(a837_0x1697,0x18e));const a837_0x3449=function(_0x189224,_0x16976e){_0x189224=_0x189224-0x0;let _0x34496c=a837_0x1697[_0x189224];return _0x34496c;};const _0x59a593=a837_0x3449,{camelCase}=require(_0x59a593('0x2')),{validKeys}=require('./env_definitions'),VALID_KEYS=validKeys;function toBoolean(_0x1b44f3,_0x829455=![]){const _0x2e845b=_0x59a593;return typeof _0x1b44f3===_0x2e845b('0x5')?_0x829455:Boolean(typeof _0x1b44f3===_0x2e845b('0xa')?_0x1b44f3[_0x2e845b('0x7')]()==='true':_0x1b44f3);}function toNumber(_0x3af6a0,_0x3b6572=null){const _0x320e9b=_0x59a593,_0x136b82=typeof _0x3af6a0===_0x320e9b('0x5')||_0x3af6a0===null?NaN:Number(_0x3af6a0);return isNaN(_0x136b82)?_0x3b6572:_0x136b82;}function toString(_0x2925b5,_0x40123a=''){const _0x358861=_0x59a593;return typeof _0x2925b5===_0x358861('0x5')||_0x2925b5===null?_0x40123a:String(_0x2925b5);}function getPropertiesConfiguration(){const _0x245efa=_0x59a593,_0x1b0c6b={'enumerable':!![],'configurable':![],'writable':![]};return VALID_KEYS[_0x245efa('0x4')]((_0x5e1b9e,{env:_0x9b93ba,type:_0x85405a,defaultValue:_0x49265b})=>{const _0x1c5ad1=_0x245efa;let _0x276b5c=null;const _0x2d22f9=process[_0x1c5ad1('0x8')][_0x9b93ba];switch(_0x85405a){case _0x1c5ad1('0x3'):_0x276b5c=toBoolean(_0x2d22f9,_0x49265b);break;case _0x1c5ad1('0x9'):_0x276b5c=toNumber(_0x2d22f9,_0x49265b);break;case _0x1c5ad1('0xa'):_0x276b5c=toString(_0x2d22f9,_0x49265b);break;default:break;}if(_0x9b93ba===_0x1c5ad1('0x1'))_0x5e1b9e={..._0x5e1b9e,'isProduction':{'value':_0x276b5c===_0x1c5ad1('0x6'),..._0x1b0c6b},'isTest':{'value':_0x276b5c==='test',..._0x1b0c6b},'environment':{'value':_0x276b5c,..._0x1b0c6b}};else{const _0x5412dd=camelCase(_0x9b93ba[_0x1c5ad1('0x0')](/^XC_/,''));_0x5e1b9e={..._0x5e1b9e,[_0x5412dd]:{'value':_0x276b5c,..._0x1b0c6b}};}return _0x5e1b9e;},{});}let configService=null;function getConfigService(){if(configService===null){configService={};const _0x5dad88=getPropertiesConfiguration();Object['defineProperties'](configService,_0x5dad88);}return configService;}module['exports']={'getConfigService':getConfigService};