"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./base-iCmnU-fv.cjs"),p=require("./Element_Event_resize-DA_sUt40.cjs"),_=require("./Element_Event_drag-L_ZT9whD.cjs"),c=require("./day-BzMalBXj.cjs"),h=require("./axios-DZoeNi6y.cjs"),C=require("./echart-Cs3rQ-e9.cjs"),D=require("./promise-BtoePzHD.cjs"),u=require("./tooltip-Dj_ol2ax.cjs"),f=require("./i18n_zh_CN-DTZIQXOQ.cjs"),E=require("./i18n_en-D-5antzy.cjs"),B={Drag:_.Drag,Resize:p.Resize};class T{_type;_typeDef;_packageData;constructor(){this._type="zh_cn",this._typeDef="zh_cn",this._packageData={zh_cn:f.ZHCN,en:E.EN}}initMerge(e){const t=o.CommonBase.isEmpty(e.type);return t||(this._type=e.type),o.CommonBase.isEmpty(e.packageData)||(t?this._packageData[this._typeDef]=o.CommonBase.getJsonMergeDeep(this._packageData[this._typeDef],e.packageData):this._packageData=o.CommonBase.getJsonMergeDeep(this._packageData,e.packageData)),{type:this._type,packageData:this._packageData}}_getType(){let e=this._type;return o.CommonBase.isEmpty(e)&&(e=this._typeDef),{type:e,def:this._typeDef}}_getData(e){let t={};const s=this._packageData;if(e)t=s[e];else{const a=this._getType();o.CommonBase.isExistJsonKey(s,a.type)&&(t=s[a.type]),o.CommonBase.isEmpty(t)&&(t=s[a.def])}return t}_getKeyValue(e,t){let s;if(o.CommonBase.isExistValue(e,".")){const a=o.CommonBase.split(e,".");let m=o.CommonBase.getJsonClone(t,!0);a.forEach((r,i)=>{const n=m[r];i===a.length-1?m=n:m=o.CommonBase.isEmpty(n)?{}:n}),s=m}else s=t[e];return s}_getKey(e,t){let s;const a=t?this._getData(t):this._getData();return o.CommonBase.isEmpty(a)||(s=this._getKeyValue(e,a),o.CommonBase.isObject(s)&&(s=o.CommonBase.getJsonClone(s,!0))),s}getType(){return this._getType()}getAll(){return this._getData()}getCommon(){const e=this._getKey("common"),t=this._getKey("common",this._typeDef);return o.CommonBase.getJsonMergeDeep(t||{},e||{})}getValue(e){let t=this._getKey(e);return o.CommonBase.isEmpty(t)&&(t=this._getKey(e,this._typeDef)),t}getPage(e){let t={};const s=this.getCommon();if(e==="common")t=s;else{const a=this._getKey(e,this._typeDef),m=this._getKey(e),r=o.CommonBase.getJsonMergeDeep(a,m);let i={};if(o.CommonBase.isExistValue(e,".")){const n=o.CommonBase.split(e,".");n[n.length-1]="common";const g=n.join("."),l=this._getKey(g,this._typeDef),y=this._getKey(g);i=o.CommonBase.getJsonMergeDeep(l,y)}t=o.CommonBase.getJsonMerge(r,{common:s,pageCommon:i})}return t}setType(e){switch(this._type=e,e){case"zh_cn":c.CommDay.objDay.locale("zh-cn");break;case"en":c.CommDay.objDay.locale("en");break}}}const K=new T;exports.CommonBase=o.CommonBase;exports.CommonTools=p.CommonTools;exports.CommonElement=_.CommonElement;exports.CommonDay=c.CommDay;exports.CommonAxios=h.axios;exports.CommonEchart=C.echart;exports.CommonPromise=D.CommonPromise;exports.CommonTooltip=u.Tooltip;exports.CommonElementEvent=B;exports.CommonI18n=K;
//# sourceMappingURL=index.cjs.map
