'use strict';require('reflect-metadata');var l=Object.defineProperty;var o=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var d=(t,e,n)=>e in t?l(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n,c=(t,e)=>{for(var n in e||(e={}))f.call(e,n)&&d(t,n,e[n]);if(o)for(var n of o(e))g.call(e,n)&&d(t,n,e[n]);return t};var s=Symbol("fieldsResourcesMetadata");function F(t){return function(e,n){var r;let a=Object.assign({},Reflect.getMetadata(s,e)||{}),i=String((r=Reflect.getMetadata("design:type",e,n))==null?void 0:r.name).toLowerCase();t.type===void 0&&(t.type=["string","number","boolean","date"].includes(i)?i:"text"),a[n]=c({name:n},Object.assign({},t)),Reflect.defineMetadata(s,a,e);}}function I(t){let e=Reflect.getMetadata(s,t.prototype);return Object.assign({},e)}function p(t){let e=Reflect.getMetadata(s,t.constructor);return Object.assign({},e)}exports.Field=F;exports.fieldsMetaData=s;exports.getFields=p;exports.getFieldsFromTarget=I;