1 line
36 KiB
Plaintext
1 line
36 KiB
Plaintext
{"version":3,"names":["_setFunctionName","require","_toPropertyKey","old_createMetadataMethodsForProperty","metadataMap","kind","property","decoratorFinishedRef","getMetadata","key","old_assertNotFinished","old_assertMetadataKey","metadataForKey","pub","public","priv","private","get","Object","hasOwnProperty","call","constructor","setMetadata","value","Map","set","old_convertMetadataMapToFinal","obj","parentMetadataMap","Symbol","metadata","for","metadataKeys","getOwnPropertySymbols","length","i","metaForKey","parentMetaForKey","parentPub","setPrototypeOf","privArr","Array","from","values","parentPriv","concat","old_createAddInitializerMethod","initializers","addInitializer","initializer","old_assertCallable","push","old_memberDec","dec","name","desc","isStatic","isPrivate","kindStr","ctx","toPropertyKey","v","metadataKind","metadataName","access","assign","fnName","Error","TypeError","fn","hint","old_assertValidReturnValue","type","undefined","init","old_getInit","console","warn","old_applyMemberDec","ret","base","decInfo","decs","prefix","setFunctionName","getOwnPropertyDescriptor","newValue","newInit","instance","ownInitializers","originalInitializer","args","defineProperty","old_applyMemberDecs","Class","protoMetadataMap","staticMetadataMap","decInfos","protoInitializers","staticInitializers","existingProtoNonFields","existingStaticNonFields","isArray","prototype","existingNonFields","existingKind","old_pushInitializers","old_applyClassDecs","targetClass","classDecs","newClass","nextNewClass","applyDecs","memberDecs"],"sources":["../../src/helpers/applyDecs.js"],"sourcesContent":["/* @minVersion 7.17.8 */\n/* @onlyBabel7 */\n\nimport setFunctionName from \"setFunctionName\";\nimport toPropertyKey from \"toPropertyKey\";\n/**\n * NOTE: This is an old version of the helper, used for 2021-12 decorators.\n * Updates should be done in applyDecs2203R.js.\n */\n\n/**\n Enums are used in this file, but not assigned to vars to avoid non-hoistable values\n\n CONSTRUCTOR = 0;\n PUBLIC = 1;\n PRIVATE = 2;\n\n FIELD = 0;\n ACCESSOR = 1;\n METHOD = 2;\n GETTER = 3;\n SETTER = 4;\n\n STATIC = 5;\n\n CLASS = 10; // only used in assertValidReturnValue\n*/\n\nfunction old_createMetadataMethodsForProperty(\n metadataMap,\n kind,\n property,\n decoratorFinishedRef,\n) {\n return {\n getMetadata: function (key) {\n old_assertNotFinished(decoratorFinishedRef, \"getMetadata\");\n old_assertMetadataKey(key);\n\n var metadataForKey = metadataMap[key];\n\n if (metadataForKey === void 0) return void 0;\n\n if (kind === 1 /* PUBLIC */) {\n var pub = metadataForKey.public;\n if (pub !== void 0) {\n return pub[property];\n }\n } else if (kind === 2 /* PRIVATE */) {\n var priv = metadataForKey.private;\n if (priv !== void 0) {\n return priv.get(property);\n }\n } else if (Object.hasOwnProperty.call(metadataForKey, \"constructor\")) {\n return metadataForKey.constructor;\n }\n },\n setMetadata: function (key, value) {\n old_assertNotFinished(decoratorFinishedRef, \"setMetadata\");\n old_assertMetadataKey(key);\n\n var metadataForKey = metadataMap[key];\n\n if (metadataForKey === void 0) {\n metadataForKey = metadataMap[key] = {};\n }\n\n if (kind === 1 /* PUBLIC */) {\n var pub = metadataForKey.public;\n\n if (pub === void 0) {\n pub = metadataForKey.public = {};\n }\n\n pub[property] = value;\n } else if (kind === 2 /* PRIVATE */) {\n var priv = metadataForKey.priv;\n\n if (priv === void 0) {\n priv = metadataForKey.private = new Map();\n }\n\n priv.set(property, value);\n } else {\n metadataForKey.constructor = value;\n }\n },\n };\n}\n\nfunction old_convertMetadataMapToFinal(obj, metadataMap) {\n var parentMetadataMap = obj[Symbol.metadata || Symbol.for(\"Symbol.metadata\")];\n var metadataKeys = Object.getOwnPropertySymbols(metadataMap);\n\n if (metadataKeys.length === 0) return;\n\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i];\n var metaForKey = metadataMap[key];\n var parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null;\n\n var pub = metaForKey.public;\n var parentPub = parentMetaForKey ? parentMetaForKey.public : null;\n\n if (pub && parentPub) {\n Object.setPrototypeOf(pub, parentPub);\n }\n\n var priv = metaForKey.private;\n\n if (priv) {\n var privArr = Array.from(priv.values());\n var parentPriv = parentMetaForKey ? parentMetaForKey.private : null;\n\n if (parentPriv) {\n privArr = privArr.concat(parentPriv);\n }\n\n metaForKey.private = privArr;\n }\n\n if (parentMetaForKey) {\n Object.setPrototypeOf(metaForKey, parentMetaForKey);\n }\n }\n\n if (parentMetadataMap) {\n Object.setPrototypeOf(metadataMap, parentMetadataMap);\n }\n\n obj[Symbol.metadata || Symbol.for(\"Symbol.metadata\")] = metadataMap;\n}\n\nfunction old_createAddInitializerMethod(initializers, decoratorFinishedRef) {\n return function addInitializer(initializer) {\n old_assertNotFinished(decoratorFinishedRef, \"addInitializer\");\n old_assertCallable(initializer, \"An initializer\");\n initializers.push(initializer);\n };\n}\n\nfunction old_memberDec(\n dec,\n name,\n desc,\n metadataMap,\n initializers,\n kind,\n isStatic,\n isPrivate,\n value,\n) {\n var kindStr;\n\n switch (kind) {\n case 1 /* ACCESSOR */:\n kindStr = \"accessor\";\n break;\n case 2 /* METHOD */:\n kindStr = \"method\";\n break;\n case 3 /* GETTER */:\n kindStr = \"getter\";\n break;\n case 4 /* SETTER */:\n kindStr = \"setter\";\n break;\n default:\n kindStr = \"field\";\n }\n\n var ctx = {\n kind: kindStr,\n name: isPrivate ? \"#\" + name : toPropertyKey(name),\n isStatic: isStatic,\n isPrivate: isPrivate,\n };\n\n var decoratorFinishedRef = { v: false };\n\n if (kind !== 0 /* FIELD */) {\n ctx.addInitializer = old_createAddInitializerMethod(\n initializers,\n decoratorFinishedRef,\n );\n }\n\n var metadataKind, metadataName;\n\n if (isPrivate) {\n metadataKind = 2 /* PRIVATE */;\n metadataName = Symbol(name);\n\n var access = {};\n\n if (kind === 0 /* FIELD */) {\n access.get = desc.get;\n access.set = desc.set;\n } else if (kind === 2 /* METHOD */) {\n access.get = function () {\n return desc.value;\n };\n } else {\n // replace with values that will go through the final getter and setter\n if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) {\n access.get = function () {\n return desc.get.call(this);\n };\n }\n\n if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) {\n access.set = function (v) {\n desc.set.call(this, v);\n };\n }\n }\n\n ctx.access = access;\n } else {\n metadataKind = 1 /* PUBLIC */;\n metadataName = name;\n }\n\n try {\n return dec(\n value,\n Object.assign(\n ctx,\n old_createMetadataMethodsForProperty(\n metadataMap,\n metadataKind,\n metadataName,\n decoratorFinishedRef,\n ),\n ),\n );\n } finally {\n decoratorFinishedRef.v = true;\n }\n}\n\nfunction old_assertNotFinished(decoratorFinishedRef, fnName) {\n if (decoratorFinishedRef.v) {\n throw new Error(\n \"attempted to call \" + fnName + \" after decoration was finished\",\n );\n }\n}\n\nfunction old_assertMetadataKey(key) {\n if (typeof key !== \"symbol\") {\n throw new TypeError(\"Metadata keys must be symbols, received: \" + key);\n }\n}\n\nfunction old_assertCallable(fn, hint) {\n if (typeof fn !== \"function\") {\n throw new TypeError(hint + \" must be a function\");\n }\n}\n\nfunction old_assertValidReturnValue(kind, value) {\n var type = typeof value;\n\n if (kind === 1 /* ACCESSOR */) {\n if (type !== \"object\" || value === null) {\n throw new TypeError(\n \"accessor decorators must return an object with get, set, or init properties or void 0\",\n );\n }\n if (value.get !== undefined) {\n old_assertCallable(value.get, \"accessor.get\");\n }\n if (value.set !== undefined) {\n old_assertCallable(value.set, \"accessor.set\");\n }\n if (value.init !== undefined) {\n old_assertCallable(value.init, \"accessor.init\");\n }\n if (value.initializer !== undefined) {\n old_assertCallable(value.initializer, \"accessor.initializer\");\n }\n } else if (type !== \"function\") {\n var hint;\n if (kind === 0 /* FIELD */) {\n hint = \"field\";\n } else if (kind === 10 /* CLASS */) {\n hint = \"class\";\n } else {\n hint = \"method\";\n }\n throw new TypeError(hint + \" decorators must return a function or void 0\");\n }\n}\n\nfunction old_getInit(desc) {\n var initializer;\n if (\n (initializer = desc.init) == null &&\n (initializer = desc.initializer) &&\n typeof console !== \"undefined\"\n ) {\n console.warn(\".initializer has been renamed to .init as of March 2022\");\n }\n return initializer;\n}\n\nfunction old_applyMemberDec(\n ret,\n base,\n decInfo,\n name,\n kind,\n isStatic,\n isPrivate,\n metadataMap,\n initializers,\n) {\n var decs = decInfo[0];\n\n var desc, initializer, prefix, value;\n\n if (isPrivate) {\n if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {\n desc = {\n get: decInfo[3],\n set: decInfo[4],\n };\n prefix = \"get\";\n } else if (kind === 3 /* GETTER */) {\n desc = {\n get: decInfo[3],\n };\n prefix = \"get\";\n } else if (kind === 4 /* SETTER */) {\n desc = {\n set: decInfo[3],\n };\n prefix = \"set\";\n } else {\n desc = {\n value: decInfo[3],\n };\n }\n if (kind !== 0 /* FIELD */) {\n if (kind === 1 /* ACCESSOR */) {\n setFunctionName(decInfo[4], \"#\" + name, \"set\");\n }\n setFunctionName(decInfo[3], \"#\" + name, prefix);\n }\n } else if (kind !== 0 /* FIELD */) {\n desc = Object.getOwnPropertyDescriptor(base, name);\n }\n\n if (kind === 1 /* ACCESSOR */) {\n value = {\n get: desc.get,\n set: desc.set,\n };\n } else if (kind === 2 /* METHOD */) {\n value = desc.value;\n } else if (kind === 3 /* GETTER */) {\n value = desc.get;\n } else if (kind === 4 /* SETTER */) {\n value = desc.set;\n }\n\n var newValue, get, set;\n\n if (typeof decs === \"function\") {\n newValue = old_memberDec(\n decs,\n name,\n desc,\n metadataMap,\n initializers,\n kind,\n isStatic,\n isPrivate,\n value,\n );\n\n if (newValue !== void 0) {\n old_assertValidReturnValue(kind, newValue);\n\n if (kind === 0 /* FIELD */) {\n initializer = newValue;\n } else if (kind === 1 /* ACCESSOR */) {\n initializer = old_getInit(newValue);\n get = newValue.get || value.get;\n set = newValue.set || value.set;\n\n value = { get: get, set: set };\n } else {\n value = newValue;\n }\n }\n } else {\n for (var i = decs.length - 1; i >= 0; i--) {\n var dec = decs[i];\n\n newValue = old_memberDec(\n dec,\n name,\n desc,\n metadataMap,\n initializers,\n kind,\n isStatic,\n isPrivate,\n value,\n );\n\n if (newValue !== void 0) {\n old_assertValidReturnValue(kind, newValue);\n var newInit;\n\n if (kind === 0 /* FIELD */) {\n newInit = newValue;\n } else if (kind === 1 /* ACCESSOR */) {\n newInit = old_getInit(newValue);\n get = newValue.get || value.get;\n set = newValue.set || value.set;\n\n value = { get: get, set: set };\n } else {\n value = newValue;\n }\n\n if (newInit !== void 0) {\n if (initializer === void 0) {\n initializer = newInit;\n } else if (typeof initializer === \"function\") {\n initializer = [initializer, newInit];\n } else {\n initializer.push(newInit);\n }\n }\n }\n }\n }\n\n if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {\n if (initializer === void 0) {\n // If the initializer was void 0, sub in a dummy initializer\n initializer = function (instance, init) {\n return init;\n };\n } else if (typeof initializer !== \"function\") {\n var ownInitializers = initializer;\n\n initializer = function (instance, init) {\n var value = init;\n\n for (var i = 0; i < ownInitializers.length; i++) {\n value = ownInitializers[i].call(instance, value);\n }\n\n return value;\n };\n } else {\n var originalInitializer = initializer;\n\n initializer = function (instance, init) {\n return originalInitializer.call(instance, init);\n };\n }\n\n ret.push(initializer);\n }\n\n if (kind !== 0 /* FIELD */) {\n if (kind === 1 /* ACCESSOR */) {\n desc.get = value.get;\n desc.set = value.set;\n } else if (kind === 2 /* METHOD */) {\n desc.value = value;\n } else if (kind === 3 /* GETTER */) {\n desc.get = value;\n } else if (kind === 4 /* SETTER */) {\n desc.set = value;\n }\n\n if (isPrivate) {\n if (kind === 1 /* ACCESSOR */) {\n ret.push(function (instance, args) {\n return value.get.call(instance, args);\n });\n ret.push(function (instance, args) {\n return value.set.call(instance, args);\n });\n } else if (kind === 2 /* METHOD */) {\n ret.push(value);\n } else {\n ret.push(function (instance, args) {\n return value.call(instance, args);\n });\n }\n } else {\n Object.defineProperty(base, name, desc);\n }\n }\n}\n\nfunction old_applyMemberDecs(\n ret,\n Class,\n protoMetadataMap,\n staticMetadataMap,\n decInfos,\n) {\n var protoInitializers;\n var staticInitializers;\n\n var existingProtoNonFields = new Map();\n var existingStaticNonFields = new Map();\n\n for (var i = 0; i < decInfos.length; i++) {\n var decInfo = decInfos[i];\n\n // skip computed property names\n if (!Array.isArray(decInfo)) continue;\n\n var kind = decInfo[1];\n var name = decInfo[2];\n var isPrivate = decInfo.length > 3;\n\n var isStatic = kind >= 5; /* STATIC */\n var base;\n var metadataMap;\n var initializers;\n\n if (isStatic) {\n base = Class;\n metadataMap = staticMetadataMap;\n kind = kind - 5 /* STATIC */;\n // initialize staticInitializers when we see a non-field static member\n if (kind !== 0 /* FIELD */) {\n staticInitializers = staticInitializers || [];\n initializers = staticInitializers;\n }\n } else {\n base = Class.prototype;\n metadataMap = protoMetadataMap;\n // initialize protoInitializers when we see a non-field member\n if (kind !== 0 /* FIELD */) {\n protoInitializers = protoInitializers || [];\n initializers = protoInitializers;\n }\n }\n\n if (kind !== 0 /* FIELD */ && !isPrivate) {\n var existingNonFields = isStatic\n ? existingStaticNonFields\n : existingProtoNonFields;\n\n var existingKind = existingNonFields.get(name) || 0;\n\n if (\n existingKind === true ||\n (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ ||\n (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */\n ) {\n throw new Error(\n \"Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: \" +\n name,\n );\n } else if (!existingKind && kind > 2 /* METHOD */) {\n existingNonFields.set(name, kind);\n } else {\n existingNonFields.set(name, true);\n }\n }\n\n old_applyMemberDec(\n ret,\n base,\n decInfo,\n name,\n kind,\n isStatic,\n isPrivate,\n metadataMap,\n initializers,\n );\n }\n\n old_pushInitializers(ret, protoInitializers);\n old_pushInitializers(ret, staticInitializers);\n}\n\nfunction old_pushInitializers(ret, initializers) {\n if (initializers) {\n ret.push(function (instance) {\n for (var i = 0; i < initializers.length; i++) {\n initializers[i].call(instance);\n }\n return instance;\n });\n }\n}\n\nfunction old_applyClassDecs(ret, targetClass, metadataMap, classDecs) {\n if (classDecs.length > 0) {\n var initializers = [];\n var newClass = targetClass;\n var name = targetClass.name;\n\n for (var i = classDecs.length - 1; i >= 0; i--) {\n var decoratorFinishedRef = { v: false };\n\n try {\n var ctx = Object.assign(\n {\n kind: \"class\",\n name: name,\n addInitializer: old_createAddInitializerMethod(\n initializers,\n decoratorFinishedRef,\n ),\n },\n old_createMetadataMethodsForProperty(\n metadataMap,\n 0 /* CONSTRUCTOR */,\n name,\n decoratorFinishedRef,\n ),\n );\n var nextNewClass = classDecs[i](newClass, ctx);\n } finally {\n decoratorFinishedRef.v = true;\n }\n\n if (nextNewClass !== undefined) {\n old_assertValidReturnValue(10 /* CLASS */, nextNewClass);\n newClass = nextNewClass;\n }\n }\n\n ret.push(newClass, function () {\n for (var i = 0; i < initializers.length; i++) {\n initializers[i].call(newClass);\n }\n });\n }\n}\n\n/**\n Basic usage:\n\n applyDecs(\n Class,\n [\n // member decorators\n [\n dec, // dec or array of decs\n 0, // kind of value being decorated\n 'prop', // name of public prop on class containing the value being decorated,\n '#p', // the name of the private property (if is private, void 0 otherwise),\n ]\n ],\n [\n // class decorators\n dec1, dec2\n ]\n )\n ```\n\n Fully transpiled example:\n\n ```js\n @dec\n class Class {\n @dec\n a = 123;\n\n @dec\n #a = 123;\n\n @dec\n @dec2\n accessor b = 123;\n\n @dec\n accessor #b = 123;\n\n @dec\n c() { console.log('c'); }\n\n @dec\n #c() { console.log('privC'); }\n\n @dec\n get d() { console.log('d'); }\n\n @dec\n get #d() { console.log('privD'); }\n\n @dec\n set e(v) { console.log('e'); }\n\n @dec\n set #e(v) { console.log('privE'); }\n }\n\n\n // becomes\n let initializeInstance;\n let initializeClass;\n\n let initA;\n let initPrivA;\n\n let initB;\n let initPrivB, getPrivB, setPrivB;\n\n let privC;\n let privD;\n let privE;\n\n let Class;\n class _Class {\n static {\n let ret = applyDecs(\n this,\n [\n [dec, 0, 'a'],\n [dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v],\n [[dec, dec2], 1, 'b'],\n [dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v],\n [dec, 2, 'c'],\n [dec, 2, 'c', () => console.log('privC')],\n [dec, 3, 'd'],\n [dec, 3, 'd', () => console.log('privD')],\n [dec, 4, 'e'],\n [dec, 4, 'e', () => console.log('privE')],\n ],\n [\n dec\n ]\n )\n\n initA = ret[0];\n\n initPrivA = ret[1];\n\n initB = ret[2];\n\n initPrivB = ret[3];\n getPrivB = ret[4];\n setPrivB = ret[5];\n\n privC = ret[6];\n\n privD = ret[7];\n\n privE = ret[8];\n\n initializeInstance = ret[9];\n\n Class = ret[10]\n\n initializeClass = ret[11];\n }\n\n a = (initializeInstance(this), initA(this, 123));\n\n #a = initPrivA(this, 123);\n\n #bData = initB(this, 123);\n get b() { return this.#bData }\n set b(v) { this.#bData = v }\n\n #privBData = initPrivB(this, 123);\n get #b() { return getPrivB(this); }\n set #b(v) { setPrivB(this, v); }\n\n c() { console.log('c'); }\n\n #c(...args) { return privC(this, ...args) }\n\n get d() { console.log('d'); }\n\n get #d() { return privD(this); }\n\n set e(v) { console.log('e'); }\n\n set #e(v) { privE(this, v); }\n }\n\n initializeClass(Class);\n */\nexport default function applyDecs(targetClass, memberDecs, classDecs) {\n var ret = [];\n var staticMetadataMap = {};\n\n var protoMetadataMap = {};\n\n old_applyMemberDecs(\n ret,\n targetClass,\n protoMetadataMap,\n staticMetadataMap,\n memberDecs,\n );\n\n old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap);\n\n old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs);\n\n old_convertMetadataMapToFinal(targetClass, staticMetadataMap);\n\n return ret;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAwBA,SAASE,oCAAoCA,CAC3CC,WAAW,EACXC,IAAI,EACJC,QAAQ,EACRC,oBAAoB,EACpB;EACA,OAAO;IACLC,WAAW,EAAE,SAAAA,CAAUC,GAAG,EAAE;MAC1BC,qBAAqB,CAACH,oBAAoB,EAAE,aAAa,CAAC;MAC1DI,qBAAqB,CAACF,GAAG,CAA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