{"version":3,"sources":["webpack:///./node_modules/enumify/dist/src/index.js"],"names":["Object","defineProperty","exports","value","Enumify","enumKeys","enumValues","key","entries","this","push","enumKey","enumOrdinal","length","str","index","indexOf","Symbol","iterator","constructor","name"],"mappings":"6GACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtD,MAAMC,EACF,mBACI,MAAMC,EAAW,GACXC,EAAa,GAEnB,IAAK,MAAOC,EAAKJ,KAAUH,OAAOQ,QAAQC,MACtCJ,EAASK,KAAKH,GACdJ,EAAMQ,QAAUJ,EAChBJ,EAAMS,YAAcN,EAAWO,OAC/BP,EAAWI,KAAKP,GAGpBM,KAAKJ,SAAWA,EAChBI,KAAKH,WAAaA,EAItB,mBAAmBQ,GACf,MAAMC,EAAQN,KAAKJ,SAASW,QAAQF,GACpC,GAAIC,GAAS,EACT,OAAON,KAAKH,WAAWS,GAI/B,OAAQE,OAAOC,YACX,OAAOT,KAAKH,WAAWW,OAAOC,YAElC,WACI,OAAOT,KAAKU,YAAYC,KAAO,IAAMX,KAAKE,SAGlDT,EAAQE,QAAUA","file":"js/npm.enumify.e581ee43.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Enumify {\n static closeEnum() {\n const enumKeys = [];\n const enumValues = [];\n // Traverse the enum entries\n for (const [key, value] of Object.entries(this)) {\n enumKeys.push(key);\n value.enumKey = key;\n value.enumOrdinal = enumValues.length;\n enumValues.push(value);\n }\n // Important: only add more static properties *after* processing the enum entries\n this.enumKeys = enumKeys;\n this.enumValues = enumValues;\n // TODO: prevent instantiation now. Freeze `this`?\n }\n /** Use case: parsing enum values */\n static enumValueOf(str) {\n const index = this.enumKeys.indexOf(str);\n if (index >= 0) {\n return this.enumValues[index];\n }\n return undefined;\n }\n static [Symbol.iterator]() {\n return this.enumValues[Symbol.iterator]();\n }\n toString() {\n return this.constructor.name + '.' + this.enumKey;\n }\n}\nexports.Enumify = Enumify;\n//# sourceMappingURL=index.js.map"],"sourceRoot":""}