1 line
35 KiB
Plaintext
1 line
35 KiB
Plaintext
{"version":3,"names":["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","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","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\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 : 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, 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 } else if (kind === 3 /* GETTER */) {\n desc = {\n get: decInfo[3],\n };\n } else if (kind === 4 /* SETTER */) {\n desc = {\n set: decInfo[3],\n };\n } else {\n desc = {\n value: decInfo[3],\n };\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":";;;;;;AAyBA,SAASA,oCAAoC,CAC3CC,WAAW,EACXC,IAAI,EACJC,QAAQ,EACRC,oBAAoB,EACpB;EACA,OAAO;IACLC,WAAW,EAAE,UAAUC,GAAG,EAAE;MAC1BC,qBAAqB,CAACH,oBAAoB,EAAE,aAAa,CAAC;MAC1DI,qBAAqB,CAACF,GAAG,CAAC;MAE1B,IAAIG,cAAc,GAAGR,WAAW,CAACK,GAAG,CAAC;MAErC,IAAIG,cAAc,KAAK,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;MAE5C,IAAIP,IAAI,KAAK,CAAC,EAAe;QAC3B,IAAIQ,GAAG,GAAGD,cAAc,CAACE,MAAM;QAC/B,IAAID,GAAG,KAAK,KAAK,CAAC,EAAE;UAClB,OAAOA,GAAG,CAACP,QAAQ,CAAC;QACtB;MACF,CAAC,MAAM,IAAID,IAAI,KAAK,CAAC,EAAgB;QACnC,IAAIU,IAAI,GAAGH,cAAc,CAACI,OAAO;QACjC,I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