qauMaWeb/node_modules/.cache/babel-loader/c38e84a314cc11ecf7e1ab0e1a7...

1 line
30 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.regexp.test.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.string.sub.js\";\nimport \"core-js/modules/es.error.cause.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar TYPE_DELIMITER = '.';\nvar IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';\nvar IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___';\n/**\r\n * Notice, parseClassType('') should returns {main: '', sub: ''}\r\n * @public\r\n */\n\nexport function parseClassType(componentType) {\n var ret = {\n main: '',\n sub: ''\n };\n\n if (componentType) {\n var typeArr = componentType.split(TYPE_DELIMITER);\n ret.main = typeArr[0] || '';\n ret.sub = typeArr[1] || '';\n }\n\n return ret;\n}\n/**\r\n * @public\r\n */\n\nfunction checkClassType(componentType) {\n zrUtil.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType \"' + componentType + '\" illegal');\n}\n\nexport function isExtendedClass(clz) {\n return !!(clz && clz[IS_EXTENDED_CLASS]);\n}\n/**\r\n * Implements `ExtendableConstructor` for `rootClz`.\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & ExtendableConstructor\r\n * enableClassExtend(Xxx as XxxConstructor);\r\n * ```\r\n */\n\nexport function enableClassExtend(rootClz, mandatoryMethods) {\n rootClz.$constructor = rootClz; // FIXME: not necessary?\n\n rootClz.extend = function (proto) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.each(mandatoryMethods, function (method) {\n if (!proto[method]) {\n console.warn('Method `' + method + '` should be implemented' + (proto.type ? ' in ' + proto.type : '') + '.');\n }\n });\n }\n\n var superClass = this;\n var ExtendedClass;\n\n if (isESClass(superClass)) {\n ExtendedClass =\n /** @class */\n function (_super) {\n __extends(class_1, _super);\n\n function class_1() {\n return _super.apply(this, arguments) || this;\n }\n\n return class_1;\n }(superClass);\n } else {\n // For backward compat, we both support ts class inheritance and this\n // \"extend\" approach.\n // The constructor should keep the same behavior as ts class inheritance:\n // If this constructor/$constructor is not declared, auto invoke the super\n // constructor.\n // If this constructor/$constructor is declared, it is responsible for\n // calling the super constructor.\n ExtendedClass = function ExtendedClass() {\n (proto.$constructor || superClass).apply(this, arguments);\n };\n\n zrUtil.inherits(ExtendedClass, this);\n }\n\n zrUtil.extend(ExtendedClass.prototype, proto);\n ExtendedClass[IS_EXTENDED_CLASS] = true;\n ExtendedClass.extend = this.extend;\n ExtendedClass.superCall = superCall;\n ExtendedClass.superApply = superApply;\n ExtendedClass.superClass = superClass;\n return ExtendedClass;\n };\n}\n\nfunction isESClass(fn) {\n return zrUtil.isFunction(fn) && /^class\\s/.test(Function.prototype.toString.call(fn));\n}\n/**\r\n * A work around to both support ts extend and this extend mechanism.\r\n * on sub-class.\r\n * @usage\r\n * ```ts\r\n * class Component { ... }\r\n * classUtil.enableClassExtend(Component);\r\n * classUtil.enableClassManagement(Component, {registerWhenExtend: true});\r\n *\r\n * class Series extends Component { ... }\r\n * // Without calling `markExtend`, `registerWhenExtend` will not work.\r\n * Component.markExtend(Series);\r\n * ```\r\n */\n\n\nexport function mountExtend(SubClz, SupperClz) {\n SubClz.extend = SupperClz.extend;\n} // A random offset.\n\nvar classBase = Math.round(Math.random() * 10);\n/**\r\n * Implements `CheckableConstructor` for `target`.\r\n * Can not use instanceof, consider different scope by\r\n * cross domain or es module import in ec extensions.\r\n * Mount a method \"isInstance()\" to Clz.\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & CheckableConstructor;\r\n * enableClassCheck(Xxx as XxxConstructor)\r\n * ```\r\n */\n\nexport function enableClassCheck(target) {\n var classAttr = ['__\\0is_clz', classBase++].join('_');\n target.prototype[classAttr] = true;\n\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(!target.isInstance, 'The method \"is\" can not be defined.');\n }\n\n target.isInstance = function (obj) {\n return !!(obj && obj[classAttr]);\n };\n} // superCall should have class info, which can not be fetch from 'this'.\n// Consider this case:\n// class A has method f,\n// class B inherits class A, overrides method f, f call superApply('f'),\n// class C inherits class B, do not overrides method f,\n// then when method of class C is called, dead loop occured.\n\nfunction superCall(context, methodName) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n return this.superClass.prototype[methodName].apply(context, args);\n}\n\nfunction superApply(context, methodName, args) {\n return this.superClass.prototype[methodName].apply(context, args);\n}\n/**\r\n * Implements `ClassManager` for `target`\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & ClassManager\r\n * enableClassManagement(Xxx as XxxConstructor);\r\n * ```\r\n */\n\n\nexport function enableClassManagement(target) {\n /**\r\n * Component model classes\r\n * key: componentType,\r\n * value:\r\n * componentClass, when componentType is 'xxx'\r\n * or Object.<subKey, componentClass>, when componentType is 'xxx.yy'\r\n */\n var storage = {};\n\n target.registerClass = function (clz) {\n // `type` should not be a \"instance memeber\".\n // If using TS class, should better declared as `static type = 'series.pie'`.\n // otherwise users have to mount `type` on prototype manually.\n // For backward compat and enable instance visit type via `this.type`,\n // we stil support fetch `type` from prototype.\n var componentFullType = clz.type || clz.prototype.type;\n\n if (componentFullType) {\n checkClassType(componentFullType); // If only static type declared, we assign it to prototype mandatorily.\n\n clz.prototype.type = componentFullType;\n var componentTypeInfo = parseClassType(componentFullType);\n\n if (!componentTypeInfo.sub) {\n if (process.env.NODE_ENV !== 'production') {\n if (storage[componentTypeInfo.main]) {\n console.warn(componentTypeInfo.main + ' exists.');\n }\n }\n\n storage[componentTypeInfo.main] = clz;\n } else if (componentTypeInfo.sub !== IS_CONTAINER) {\n var container = makeContainer(componentTypeInfo);\n container[componentTypeInfo.sub] = clz;\n }\n }\n\n return clz;\n };\n\n target.getClass = function (mainType, subType, throwWhenNotFound) {\n var clz = storage[mainType];\n\n if (clz && clz[IS_CONTAINER]) {\n clz = subType ? clz[subType] : null;\n }\n\n if (throwWhenNotFound && !clz) {\n throw new Error(!subType ? mainType + '.' + 'type should be specified.' : 'Component ' + mainType + '.' + (subType || '') + ' is used but not imported.');\n }\n\n return clz;\n };\n\n target.getClassesByMainType = function (componentType) {\n var componentTypeInfo = parseClassType(componentType);\n var result = [];\n var obj = storage[componentTypeInfo.main];\n\n if (obj && obj[IS_CONTAINER]) {\n zrUtil.each(obj, function (o, type) {\n type !== IS_CONTAINER && result.push(o);\n });\n } else {\n result.push(obj);\n }\n\n return result;\n };\n\n target.hasClass = function (componentType) {\n // Just consider componentType.main.\n var componentTypeInfo = parseClassType(componentType);\n return !!storage[componentTypeInfo.main];\n };\n /**\r\n * @return Like ['aa', 'bb'], but can not be ['aa.xx']\r\n */\n\n\n target.getAllClassMainTypes = function () {\n var types = [];\n zrUtil.each(storage, function (obj, type) {\n types.push(type);\n });\n return types;\n };\n /**\r\n * If a main type is container and has sub types\r\n */\n\n\n target.hasSubTypes = function (componentType) {\n var componentTypeInfo = parseClassType(componentType);\n var obj = storage[componentTypeInfo.main];\n return obj && obj[IS_CONTAINER];\n };\n\n function makeContainer(componentTypeInfo) {\n var container = storage[componentTypeInfo.main];\n\n if (!container || !container[IS_CONTAINER]) {\n container = storage[componentTypeInfo.main] = {};\n container[IS_CONTAINER] = true;\n }\n\n return container;\n }\n} // /**\n// * @param {string|Array.<string>} properties\n// */\n// export function setReadOnly(obj, properties) {\n// FIXME It seems broken in IE8 simulation of IE11\n// if (!zrUtil.isArray(properties)) {\n// properties = properties != null ? [properties] : [];\n// }\n// zrUtil.each(properties, function (prop) {\n// let value = obj[prop];\n// Object.defineProperty\n// && Object.defineProperty(obj, prop, {\n// value: value, writable: false\n// });\n// zrUtil.isArray(obj[prop])\n// && Object.freeze\n// && Object.freeze(obj[prop]);\n// });\n// }","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/util/clazz.js"],"names":["__extends","zrUtil","TYPE_DELIMITER","IS_CONTAINER","IS_EXTENDED_CLASS","parseClassType","componentType","ret","main","sub","typeArr","split","checkClassType","assert","test","isExtendedClass","clz","enableClassExtend","rootClz","mandatoryMethods","$constructor","extend","proto","process","env","NODE_ENV","each","method","console","warn","type","superClass","ExtendedClass","isESClass","_super","class_1","apply","arguments","inherits","prototype","superCall","superApply","fn","isFunction","Function","toString","call","mountExtend","SubClz","SupperClz","classBase","Math","round","random","enableClassCheck","target","classAttr","join","isInstance","obj","context","methodName","args","_i","length","enableClassManagement","storage","registerClass","componentFullType","componentTypeInfo","container","makeContainer","getClass","mainType","subType","throwWhenNotFound","Error","getClassesByMainType","result","o","push","hasClass","getAllClassMainTypes","types","hasSubTypes"],"mappings":";;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,OAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,0BAAxB;AACA,IAAIC,cAAc,GAAG,GAArB;AACA,IAAIC,YAAY,GAAG,gCAAnB;AACA,IAAIC,iBAAiB,GAAG,0BAAxB;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,cAAT,CAAwBC,aAAxB,EAAuC;AAC5C,MAAIC,GAAG,GAAG;AACRC,IAAAA,IAAI,EAAE,EADE;AAERC,IAAAA,GAAG,EAAE;AAFG,GAAV;;AAKA,MAAIH,aAAJ,EAAmB;AACjB,QAAII,OAAO,GAAGJ,aAAa,CAACK,KAAd,CAAoBT,cAApB,CAAd;AACAK,IAAAA,GAAG,CAACC,IAAJ,GAAWE,OAAO,CAAC,CAAD,CAAP,IAAc,EAAzB;AACAH,IAAAA,GAAG,CAACE,GAAJ,GAAUC,OAAO,CAAC,CAAD,CAAP,IAAc,EAAxB;AACD;;AAED,SAAOH,GAAP;AACD;AACD;AACA;AACA;;AAEA,SAASK,cAAT,CAAwBN,aAAxB,EAAuC;AACrCL,EAAAA,MAAM,CAACY,MAAP,CAAc,qCAAqCC,IAArC,CAA0CR,aAA1C,CAAd,EAAwE,oBAAoBA,aAApB,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AAK,CAACH,IAAN,CAAWlD,IAAX;AACD,KAFD;AAGA,WAAOqD,KAAP;AACD,GAND;AAOA;AACF;AACA;;;AAGE5B,EAAAA,MAAM,CAAC6B,WAAP,GAAqB,UAAU9E,aAAV,EAAyB;AAC5C,QAAI+D,iBAAiB,GAAGhE,cAAc,CAACC,aAAD,CAAtC;AACA,QAAIqD,GAAG,GAAGO,OAAO,CAACG,iBAAiB,CAAC7D,IAAnB,CAAjB;AACA,WAAOmD,GAAG,IAAIA,GAAG,CAACxD,YAAD,CAAjB;AACD,GAJD;;AAMA,WAASoE,aAAT,CAAuBF,iBAAvB,EAA0C;AACxC,QAAIC,SAAS,GAAGJ,OAAO,CAACG,iBAAiB,CAAC7D,IAAnB,CAAvB;;AAEA,QAAI,CAAC8D,SAAD,IAAc,CAACA,SAAS,CAACnE,YAAD,CAA5B,EAA4C;AAC1CmE,MAAAA,SAAS,GAAGJ,OAAO,CAACG,iBAAiB,CAAC7D,IAAnB,CAAP,GAAkC,EAA9C;AACA8D,MAAAA,SAAS,CAACnE,YAAD,CAAT,GAA0B,IAA1B;AACD;;AAED,WAAOmE,SAAP;AACD;AACF,C,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport { __extends } from \"tslib\";\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nvar TYPE_DELIMITER = '.';\r\nvar IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';\r\nvar IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___';\r\n/**\r\n * Notice, parseClassType('') should returns {main: '', sub: ''}\r\n * @public\r\n */\r\n\r\nexport function parseClassType(componentType) {\r\n var ret = {\r\n main: '',\r\n sub: ''\r\n };\r\n\r\n if (componentType) {\r\n var typeArr = componentType.split(TYPE_DELIMITER);\r\n ret.main = typeArr[0] || '';\r\n ret.sub = typeArr[1] || '';\r\n }\r\n\r\n return ret;\r\n}\r\n/**\r\n * @public\r\n */\r\n\r\nfunction checkClassType(componentType) {\r\n zrUtil.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType \"' + componentType + '\" illegal');\r\n}\r\n\r\nexport function isExtendedClass(clz) {\r\n return !!(clz && clz[IS_EXTENDED_CLASS]);\r\n}\r\n/**\r\n * Implements `ExtendableConstructor` for `rootClz`.\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & ExtendableConstructor\r\n * enableClassExtend(Xxx as XxxConstructor);\r\n * ```\r\n */\r\n\r\nexport function enableClassExtend(rootClz, mandatoryMethods) {\r\n rootClz.$constructor = rootClz; // FIXME: not necessary?\r\n\r\n rootClz.extend = function (proto) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n zrUtil.each(mandatoryMethods, function (method) {\r\n if (!proto[method]) {\r\n console.warn('Method `' + method + '` should be implemented' + (proto.type ? ' in ' + proto.type : '') + '.');\r\n }\r\n });\r\n }\r\n\r\n var superClass = this;\r\n var ExtendedClass;\r\n\r\n if (isESClass(superClass)) {\r\n ExtendedClass =\r\n /** @class */\r\n function (_super) {\r\n __extends(class_1, _super);\r\n\r\n function class_1() {\r\n return _super.apply(this, arguments) || this;\r\n }\r\n\r\n return class_1;\r\n }(superClass);\r\n } else {\r\n // For backward compat, we both support ts class inheritance and this\r\n // \"extend\" approach.\r\n // The constructor should keep the same behavior as ts class inheritance:\r\n // If this constructor/$constructor is not declared, auto invoke the super\r\n // constructor.\r\n // If this constructor/$constructor is declared, it is responsible for\r\n // calling the super constructor.\r\n ExtendedClass = function () {\r\n (proto.$constructor || superClass).apply(this, arguments);\r\n };\r\n\r\n zrUtil.inherits(ExtendedClass, this);\r\n }\r\n\r\n zrUtil.extend(ExtendedClass.prototype, proto);\r\n ExtendedClass[IS_EXTENDED_CLASS] = true;\r\n ExtendedClass.extend = this.extend;\r\n ExtendedClass.superCall = superCall;\r\n ExtendedClass.superApply = superApply;\r\n ExtendedClass.superClass = superClass;\r\n return ExtendedClass;\r\n };\r\n}\r\n\r\nfunction isESClass(fn) {\r\n return zrUtil.isFunction(fn) && /^class\\s/.test(Function.prototype.toString.call(fn));\r\n}\r\n/**\r\n * A work around to both support ts extend and this extend mechanism.\r\n * on sub-class.\r\n * @usage\r\n * ```ts\r\n * class Component { ... }\r\n * classUtil.enableClassExtend(Component);\r\n * classUtil.enableClassManagement(Component, {registerWhenExtend: true});\r\n *\r\n * class Series extends Component { ... }\r\n * // Without calling `markExtend`, `registerWhenExtend` will not work.\r\n * Component.markExtend(Series);\r\n * ```\r\n */\r\n\r\n\r\nexport function mountExtend(SubClz, SupperClz) {\r\n SubClz.extend = SupperClz.extend;\r\n} // A random offset.\r\n\r\nvar classBase = Math.round(Math.random() * 10);\r\n/**\r\n * Implements `CheckableConstructor` for `target`.\r\n * Can not use instanceof, consider different scope by\r\n * cross domain or es module import in ec extensions.\r\n * Mount a method \"isInstance()\" to Clz.\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & CheckableConstructor;\r\n * enableClassCheck(Xxx as XxxConstructor)\r\n * ```\r\n */\r\n\r\nexport function enableClassCheck(target) {\r\n var classAttr = ['__\\0is_clz', classBase++].join('_');\r\n target.prototype[classAttr] = true;\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n zrUtil.assert(!target.isInstance, 'The method \"is\" can not be defined.');\r\n }\r\n\r\n target.isInstance = function (obj) {\r\n return !!(obj && obj[classAttr]);\r\n };\r\n} // superCall should have class info, which can not be fetch from 'this'.\r\n// Consider this case:\r\n// class A has method f,\r\n// class B inherits class A, overrides method f, f call superApply('f'),\r\n// class C inherits class B, do not overrides method f,\r\n// then when method of class C is called, dead loop occured.\r\n\r\nfunction superCall(context, methodName) {\r\n var args = [];\r\n\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n\r\n return this.superClass.prototype[methodName].apply(context, args);\r\n}\r\n\r\nfunction superApply(context, methodName, args) {\r\n return this.superClass.prototype[methodName].apply(context, args);\r\n}\r\n/**\r\n * Implements `ClassManager` for `target`\r\n *\r\n * @usage\r\n * ```ts\r\n * class Xxx {}\r\n * type XxxConstructor = typeof Xxx & ClassManager\r\n * enableClassManagement(Xxx as XxxConstructor);\r\n * ```\r\n */\r\n\r\n\r\nexport function enableClassManagement(target) {\r\n /**\r\n * Component model classes\r\n * key: componentType,\r\n * value:\r\n * componentClass, when componentType is 'xxx'\r\n * or Object.<subKey, componentClass>, when componentType is 'xxx.yy'\r\n */\r\n var storage = {};\r\n\r\n target.registerClass = function (clz) {\r\n // `type` should not be a \"instance memeber\".\r\n // If using TS class, should better declared as `static type = 'series.pie'`.\r\n // otherwise users have to mount `type` on prototype manually.\r\n // For backward compat and enable instance visit type via `this.type`,\r\n // we stil support fetch `type` from prototype.\r\n var componentFullType = clz.type || clz.prototype.type;\r\n\r\n if (componentFullType) {\r\n checkClassType(componentFullType); // If only static type declared, we assign it to prototype mandatorily.\r\n\r\n clz.prototype.type = componentFullType;\r\n var componentTypeInfo = parseClassType(componentFullType);\r\n\r\n if (!componentTypeInfo.sub) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (storage[componentTypeInfo.main]) {\r\n console.warn(componentTypeInfo.main + ' exists.');\r\n }\r\n }\r\n\r\n storage[componentTypeInfo.main] = clz;\r\n } else if (componentTypeInfo.sub !== IS_CONTAINER) {\r\n var container = makeContainer(componentTypeInfo);\r\n container[componentTypeInfo.sub] = clz;\r\n }\r\n }\r\n\r\n return clz;\r\n };\r\n\r\n target.getClass = function (mainType, subType, throwWhenNotFound) {\r\n var clz = storage[mainType];\r\n\r\n if (clz && clz[IS_CONTAINER]) {\r\n clz = subType ? clz[subType] : null;\r\n }\r\n\r\n if (throwWhenNotFound && !clz) {\r\n throw new Error(!subType ? mainType + '.' + 'type should be specified.' : 'Component ' + mainType + '.' + (subType || '') + ' is used but not imported.');\r\n }\r\n\r\n return clz;\r\n };\r\n\r\n target.getClassesByMainType = function (componentType) {\r\n var componentTypeInfo = parseClassType(componentType);\r\n var result = [];\r\n var obj = storage[componentTypeInfo.main];\r\n\r\n if (obj && obj[IS_CONTAINER]) {\r\n zrUtil.each(obj, function (o, type) {\r\n type !== IS_CONTAINER && result.push(o);\r\n });\r\n } else {\r\n result.push(obj);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n target.hasClass = function (componentType) {\r\n // Just consider componentType.main.\r\n var componentTypeInfo = parseClassType(componentType);\r\n return !!storage[componentTypeInfo.main];\r\n };\r\n /**\r\n * @return Like ['aa', 'bb'], but can not be ['aa.xx']\r\n */\r\n\r\n\r\n target.getAllClassMainTypes = function () {\r\n var types = [];\r\n zrUtil.each(storage, function (obj, type) {\r\n types.push(type);\r\n });\r\n return types;\r\n };\r\n /**\r\n * If a main type is container and has sub types\r\n */\r\n\r\n\r\n target.hasSubTypes = function (componentType) {\r\n var componentTypeInfo = parseClassType(componentType);\r\n var obj = storage[componentTypeInfo.main];\r\n return obj && obj[IS_CONTAINER];\r\n };\r\n\r\n function makeContainer(componentTypeInfo) {\r\n var container = storage[componentTypeInfo.main];\r\n\r\n if (!container || !container[IS_CONTAINER]) {\r\n container = storage[componentTypeInfo.main] = {};\r\n container[IS_CONTAINER] = true;\r\n }\r\n\r\n return container;\r\n }\r\n} // /**\r\n// * @param {string|Array.<string>} properties\r\n// */\r\n// export function setReadOnly(obj, properties) {\r\n// FIXME It seems broken in IE8 simulation of IE11\r\n// if (!zrUtil.isArray(properties)) {\r\n// properties = properties != null ? [properties] : [];\r\n// }\r\n// zrUtil.each(properties, function (prop) {\r\n// let value = obj[prop];\r\n// Object.defineProperty\r\n// && Object.defineProperty(obj, prop, {\r\n// value: value, writable: false\r\n// });\r\n// zrUtil.isArray(obj[prop])\r\n// && Object.freeze\r\n// && Object.freeze(obj[prop]);\r\n// });\r\n// }"]},"metadata":{},"sourceType":"module"}