@thingjs/xplugin-bundle
Version:
xplugin-bundle ThingJS-X 插件描述文件
1 lines • 13.1 kB
JavaScript
var e=self,t=()=>(()=>{"use strict";var _={555:(e,t,n)=>{n.d(t,{default:()=>a});var i=n(671),r=n(144),t=n(942),a=function(){function e(){(0,i.Z)(this,e)}return(0,r.Z)(e,null,[{key:"getSceneLabel",value:function(){return this.map.get(e.SCENE)}},{key:"getEarthLabel",value:function(){return this.map.get(e.EARTH)}},{key:"getThemeLabel",value:function(){return this.map.get(e.THEME)}},{key:"getPrefabLabel",value:function(){return this.map.get(e.PREFAB)}},{key:"getPluginbLabel",value:function(){return this.map.get(e.PLUGIN)}},{key:"getAttachmentLabel",value:function(){return this.map.get(e.ATTACHMENT)}},{key:"getChartLabel",value:function(){return this.map.get(e.CHART)}},{key:"getDashboardLabel",value:function(){return this.map.get(e.DASHBOARD)}},{key:"getTopoLabel",value:function(){return this.map.get(e.TOPO)}},{key:"getMaterialLabel",value:function(){return this.map.get(e.MATERIAL)}}]),e}();(0,t.Z)(a,"SCENE","scene"),(0,t.Z)(a,"EARTH","earth"),(0,t.Z)(a,"THEME","theme"),(0,t.Z)(a,"PREFAB","prefab"),(0,t.Z)(a,"PLUGIN","plugin"),(0,t.Z)(a,"ATTACHMENT","attachment"),(0,t.Z)(a,"CHART","chart"),(0,t.Z)(a,"DASHBOARD","dashboard"),(0,t.Z)(a,"TOPO","topo"),(0,t.Z)(a,"MATERIAL","material"),(0,t.Z)(a,"map",(new Map).set(a.SCENE,"园区场景或普通场景").set(a.EARTH,"地球扩展的场景或地图").set(a.THEME,"效果模板").set(a.PREFAB,"预制件").set(a.PLUGIN,"插件").set(a.ATTACHMENT,"标记").set(a.CHART,"图表").set(a.DASHBOARD,"大屏").set(a.TOPO,"拓扑").set(a.MATERIAL,"素材"))},261:(e,t,n)=>{n.d(t,{default:()=>u});var i=n(671),r=n(144),a=n(942),u=function(){function e(){(0,i.Z)(this,e)}return(0,r.Z)(e,null,[{key:"getLayerLabel",value:function(){return this.map.get(e.LAYER)}},{key:"getBusinessLabel",value:function(){return this.map.get(e.BUSINESS)}},{key:"getActionLabel",value:function(){return this.map.get(e.ACTION)}},{key:"getPanelLabel",value:function(){return this.map.get(e.PANEL)}},{key:"getControlLabel",value:function(){return this.map.get(e.CONTROL)}},{key:"getCoreLabel",value:function(){return this.map.get(e.CORE)}},{key:"getSkinLabel",value:function(){return this.map.get(e.SKIN)}},{key:"getSkin",value:function(){return new(function(){return(0,r.Z)(function e(){(0,i.Z)(this,e),(0,a.Z)(this,"BUSINESS_VALUE","skinBusiness"),(0,a.Z)(this,"BUSINESS_LABEL","业务栏"),(0,a.Z)(this,"CHART_PANEL_VALUE","skinChartPanel"),(0,a.Z)(this,"CHART_PANEL_LABEL","图表面板"),(0,a.Z)(this,"LAYER_VALUE","skinLayer"),(0,a.Z)(this,"LAYER_LABEL","场景图层"),(0,a.Z)(this,"DIGITAL_TWIN_PANEL_VALUE","skinDigitalTwinPanel"),(0,a.Z)(this,"DIGITAL_TWIN_PANEL_LABEL","孪生体面板"),(0,a.Z)(this,"CONTROL_VALUE","skinControl"),(0,a.Z)(this,"CONTROL_LABEL","场景控制"),(0,a.Z)(this,"IMAGE_VALUE","skinImage"),(0,a.Z)(this,"IMAGE_LABEL","界面底图")})}())}},{key:"getExpandLabel",value:function(){return this.map.get(e.EXPAND)}},{key:"getPluginChartLabel",value:function(){return this.map.get(e.PLUGINCHART)}},{key:"getZeroChartLabel",value:function(){return this.map.get(e.ZEROCHART)}}]),e}();(0,a.Z)(u,"LAYER","layer"),(0,a.Z)(u,"BUSINESS","business"),(0,a.Z)(u,"ACTION","action"),(0,a.Z)(u,"PANEL","panel"),(0,a.Z)(u,"CONTROL","control"),(0,a.Z)(u,"CORE","core"),(0,a.Z)(u,"SKIN","skin"),(0,a.Z)(u,"EXPAND","expand"),(0,a.Z)(u,"PLUGINCHART","pluginChart"),(0,a.Z)(u,"ZEROCHART","zeroChart"),(0,a.Z)(u,"map",(new Map).set(u.LAYER,"场景图层插件").set(u.BUSINESS,"业务").set(u.ACTION,"操作原子").set(u.PANEL,"孪生体面板").set(u.CONTROL,"场景控制").set(u.CORE,"系统插件").set(u.SKIN,"界面模板").set(u.EXPAND,"扩展插件"))},671:(e,t,n)=>{n.d(t,{Z:()=>function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}})},144:(e,t,n)=>{function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}n.d(t,{Z:()=>function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}})},942:(e,t,n)=>{n.d(t,{Z:()=>function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}})}},n={};function i(e){var t=n[e];return(void 0!==t?t:(t=n[e]={exports:{}},_[e](t,t.exports,i),t)).exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u,o,e,s,r,a,l,h,c,f,p,y,v,d,g,w,W,B,b,k,E,m,A,T,L,Z,x,O,H,P,t,D={};function U(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}function N(e,t){return(t=U(e,t,"get")).get?t.get.call(e):t.value}function C(e,t,n){t=U(e,t,"set");if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return(G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t,n){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function j(e,t,n){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function I(e,t,n){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}return i.d(D,{default:()=>t}),u=i(671),o=i(144),e=i(942),s=i(261),r=new WeakMap,a=new WeakMap,l=new WeakMap,h=new WeakMap,c=new WeakMap,f=new WeakMap,p=function(){function i(e){var t,n;if((0,u.Z)(this,i),M(this,r,{writable:!0,value:void 0}),M(this,a,{writable:!0,value:void 0}),M(this,l,{writable:!0,value:void 0}),M(this,h,{writable:!0,value:"北京优锘科技有限公司 版权所有"}),M(this,c,{writable:!0,value:(new Date).toLocaleString()}),M(this,f,{writable:!0,value:(t=new WeakMap,n=new WeakMap,new(function(){function e(){(0,u.Z)(this,e),M(this,t,{writable:!0,value:void 0}),M(this,n,{writable:!0,value:void 0})}return(0,o.Z)(e,[{key:"setRTypeGroup",value:function(e){return C(this,t,e),this}},{key:"setRType",value:function(e){return C(this,n,e),this}},{key:"rTypeGroup",get:function(){return N(this,t)}},{key:"rType",get:function(){return N(this,n)}},{key:"toJSON",get:function(){return{rTypeGroup:this.rTypeGroup,rType:this.rType}}}]),e}()))}),""===e||null==e)throw new EvalError("resources bundle initialization failed, missing necessary information [bundle:: pluginType]");C(this,r,e)}return(0,o.Z)(i,[{key:"setPluginType",value:function(e){return C(this,r,e),this}},{key:"setTheme",value:function(e){return C(this,a,e),this}},{key:"setThemePath",value:function(e){return C(this,l,e),this}},{key:"setLicense",value:function(e){return C(this,h,e),this}},{key:"pluginType",get:function(){return N(this,r)}},{key:"theme",get:function(){return N(this,a)}},{key:"themePath",get:function(){return N(this,l)}},{key:"license",get:function(){return N(this,h)}},{key:"date",get:function(){return N(this,c)}},{key:"extend",get:function(){return N(this,f)}}]),i}(),y=new WeakMap,v=new WeakMap,d=new WeakMap,g=new WeakMap,w=new WeakMap,W=function(){function t(e){(0,u.Z)(this,t),j(this,y,{writable:!0,value:void 0}),j(this,v,{writable:!0,value:new Set}),j(this,d,{writable:!0,value:void 0}),j(this,g,{writable:!0,value:"Revision"}),j(this,w,{writable:!0,value:"./resources/preview.png"}),e&&C(this,d,new p(e)),C(this,y,"0"),N(this,v).add("frame.js")}return(0,o.Z)(t,[{key:"setUseStandard",value:function(e){return C(this,y,e),this}},{key:"setPreview",value:function(e){return null!=e&&e.includes("preview")?C(this,w,"./resources/".concat(e)):(console.warn("参数无效,预览图文件名称必须以 preview 开始,格式为: preview*.*"),C(this,w,"./resources/preview.png")),this}},{key:"setThingjsX",value:function(e){return C(this,d,e),this}},{key:"addEncryptFile",value:function(e){return e&&N(this,v).add(e),N(this,v)}},{key:"removeEncryptFile",value:function(e){return e&&N(this,v).delete(e),N(this,v)}},{key:"useStandard",get:function(){return N(this,y)}},{key:"encryptFiles",get:function(){return Array.from(N(this,v))}},{key:"thingjsX",get:function(){return N(this,d)}},{key:"standard",get:function(){return N(this,g)}},{key:"preview",get:function(){return N(this,w)}}]),t}(),B=i(555),b=new WeakMap,k=new WeakMap,E=new WeakMap,m=new WeakMap,A=new WeakMap,T=new WeakMap,L=new WeakMap,Z=new WeakMap,x=function(){function r(e,t,n,i){if((0,u.Z)(this,r),I(this,b,{writable:!0,value:void 0}),I(this,k,{writable:!0,value:void 0}),I(this,E,{writable:!0,value:void 0}),I(this,m,{writable:!0,value:"1.0.0"}),I(this,A,{writable:!0,value:void 0}),I(this,T,{writable:!0,value:void 0}),I(this,L,{writable:!0,value:"frame.js"}),I(this,Z,{writable:!0,value:(new Map).set("thingjs","1.2.7.17").set("dpdVersion",">1.0.2 <=2.3.4")}),""===e||null==e)throw new EvalError("resources bundle initialization failed, missing necessary information 『 bundle:: id 』");if(""===n||null==n)throw new EvalError("resources bundle initialization failed, missing necessary information 『 bundle:: type 』");C(this,b,e),C(this,k,t),C(this,E,n),C(this,A,i)}return(0,o.Z)(r,[{key:"addDependencies",value:function(e,t){if(e&&t)return N(this,Z).set(e,t),this;throw new EvalError("resources bundle addDependencies failed, missing necessary information [bundle:: @param libraryName , @param version]")}},{key:"setId",value:function(e){return C(this,b,e),this}},{key:"setName",value:function(e){return C(this,k,e),this}},{key:"setType",value:function(e){return C(this,E,e),this}},{key:"setVersion",value:function(e){return C(this,m,e),this}},{key:"setAuthor",value:function(e){return C(this,A,e),this}},{key:"setDescription",value:function(e){return C(this,T,e),this}},{key:"id",get:function(){return N(this,b)}},{key:"name",get:function(){return N(this,k)}},{key:"type",get:function(){return N(this,E)}},{key:"version",get:function(){return N(this,m)}},{key:"author",get:function(){return N(this,A)}},{key:"main",get:function(){return N(this,L)}},{key:"description",get:function(){return N(this,T)}},{key:"dependencies",get:function(){return N(this,Z)}}]),r}(),O=new WeakMap,H=function(){var e=a,t=x;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t);var n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),r=function(){var e=S(n),t=i?(t=S(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments);if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(this)};function a(e,t,n){(0,u.Z)(this,a);var t=R(e=r.call(this,e,t,B.default.PLUGIN)),i=O;if(i.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object");return i.set(t,{writable:!0,value:void 0}),C(R(e),O,new W(n)),e}return(0,o.Z)(a,[{key:"external",get:function(){return N(this,O)}},{key:"toJSON",value:function(){var n={};return this.dependencies.forEach(function(e,t){n[t]=e}),{name:this.name,type:this.type||"plugin",id:this.id,version:this.version,author:this.author,description:this.description,main:this.main,dependencies:n,external:{"use-standard":N(this,O).useStandard,"encrypt-files":N(this,O).encryptFiles,standard:N(this,O).standard,preview:N(this,O).preview,"thingjs-x":{"plugin-type":N(this,O).thingjsX.pluginType,theme:N(this,O).thingjsX.theme,"theme-path":N(this,O).thingjsX.themePath,license:N(this,O).thingjsX.license,date:N(this,O).thingjsX.date,extend:N(this,O).thingjsX.extend.toJSON}}}}}]),a}(),P=new WeakMap,t=function(){function a(e,t,n,i){(0,u.Z)(this,a);var r=P;if(r.has(this))throw new TypeError("Cannot initialize the same private elements twice on an object");r.set(this,{writable:!0,value:void 0}),C(this,P,new H(e||"xxx",t||"xxx",s.default.CONTROL)),N(this,P).setAuthor(n||""),N(this,P).setVersion(i||"1.0.0")}return(0,o.Z)(a,[{key:"bundle",get:function(){return N(this,P)}},{key:"toJSON",value:function(){return N(this,P).toJSON()}}]),a}(),(0,e.Z)(t,"CLASSTYPE","BundlePluginControl"),D.default})();"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["plugin/BundlePluginControl"]=t():e["plugin/BundlePluginControl"]=t();