@syhr/sy-three 1.0.0-rc.13 → 1.0.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- "use strict";require('./sy-three.css');var Bt=Object.defineProperty,Gt=Object.defineProperties;var Vt=Object.getOwnPropertyDescriptors;var Fe=Object.getOwnPropertySymbols;var zt=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable;var Ae=(n,e,t)=>e in n?Bt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,k=(n,e)=>{for(var t in e||(e={}))zt.call(e,t)&&Ae(n,t,e[t]);if(Fe)for(var t of Fe(e))Kt.call(e,t)&&Ae(n,t,e[t]);return n},le=(n,e)=>Gt(n,Vt(e));var Q=(n,e,t)=>Ae(n,typeof e!="symbol"?e+"":e,t);var m=(n,e,t)=>new Promise((r,s)=>{var o=c=>{try{l(t.next(c))}catch(h){s(h)}},a=c=>{try{l(t.throw(c))}catch(h){s(h)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);l((t=t.apply(n,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("vue"),__$t__=require("qs"),Wt=require("axios"),qt=require("mitt");require("dayjs");const jt=require("lodash-es");require("crypto-js");const Z=require("gm-crypto"),Y=require("element-plus");require("@element-plus/icons-vue");const be=require("pinia"),Xt=require("three/examples/jsm/renderers/CSS2DRenderer.js"),F=require("three-edit-cores"),T=require("localforage"),Yt=require("three/addons/environments/RoomEnvironment.js"),ue={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},Ne={ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"}};var _e={};/*!
1
+ "use strict";require('./sy-three.css');var jt=Object.defineProperty,qt=Object.defineProperties;var Xt=Object.getOwnPropertyDescriptors;var We=Object.getOwnPropertySymbols;var Yt=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable;var ve=(n,e,t)=>e in n?jt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e)=>{for(var t in e||(e={}))Yt.call(e,t)&&ve(n,t,e[t]);if(We)for(var t of We(e))Jt.call(e,t)&&ve(n,t,e[t]);return n},v=(n,e)=>qt(n,Xt(e));var ae=(n,e,t)=>ve(n,typeof e!="symbol"?e+"":e,t);var f=(n,e,t)=>new Promise((r,a)=>{var s=c=>{try{d(t.next(c))}catch(p){a(p)}},o=c=>{try{d(t.throw(c))}catch(p){a(p)}},d=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,o);d((t=t.apply(n,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("vue"),Qt=require("qs"),Zt=require("axios"),en=require("mitt"),tn=require("dayjs"),nn=require("lodash-es");require("crypto-js");const ie=require("gm-crypto"),ne=require("element-plus");require("@element-plus/icons-vue");const He=require("pinia"),rn=require("three/examples/jsm/renderers/CSS2DRenderer.js"),z=require("three-edit-cores"),k=require("localforage"),an=require("three/addons/environments/RoomEnvironment.js"),xe={YX:6},Q={OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO"},Ee={Emit:7},_e={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},y={TEXT:"TEXT",NORMAL:"NORMAL",MP4:"MP4",TIME:"TIME",AUDIO:"AUDIO",RADIO:"RADIO",TABLE:"TABLE",INPUT:"INPUT",BUTTON:"BUTTON",CAMERA:"CAMERA",SELECT:"SELECT",SENSOR:"SENSOR",SLIDER:"SLIDER",SWITCH:"SWITCH",CHECKBOX:"CHECKBOX",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",VIDEO_STREAM:"VIDEO_STREAM"},je={ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"}};var Se={};/*!
2
2
  * vite-plugin-qiankun.js v1.0.14
3
3
  * (c) 2021-2022 Teng Mao Qing
4
4
  * Released under the MIT License.
5
- */Object.defineProperty(_e,"__esModule",{value:!0});var re=typeof window!="undefined"?window.proxy||window:{},st=function(n){re!=null&&re.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),re.qiankunName&&(window.moudleQiankunAppLifeCycles[re.qiankunName]=n))};_e.default=st;var ge=_e.qiankunWindow=re;_e.renderWithQiankun=st;function Jt(){return window.__POWERED_BY_WUJIE__||window.$wujie?ue.WUJIE:window.__POWERED_BY_QIANKUN__||ge!=null&&ge.__POWERED_BY_QIANKUN__?ue.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?ue.MICROAPP:ue.NONE}const it="/",at=window.meta.app.encrypt;Jt();const Qt=location.origin;var Ke,$e,We,qe,je,Xe,Ye,Je,Qe,Ze,et,tt;const ot={savePath:(($e=(Ke=window.meta)==null?void 0:Ke.graph)==null?void 0:$e.savePath)||"/cockpit/drawing",graphPenPath:((qe=(We=window.meta)==null?void 0:We.graph)==null?void 0:qe.graphPenPath)||"/cockpit/graph",templatePath:((Xe=(je=window.meta)==null?void 0:je.graph)==null?void 0:Xe.templatePath)||"/cockpit/template",graphImgUploadPath:((Je=(Ye=window.meta)==null?void 0:Ye.graph)==null?void 0:Je.graphImgUploadPath)||"/cockpit/upload",threeSavePath:((Ze=(Qe=window.meta)==null?void 0:Qe.graph)==null?void 0:Ze.threeSavePath)||"/cockpit/threed",threeModelPath:((tt=(et=window.meta)==null?void 0:et.graph)==null?void 0:tt.threeModelPath)||"/cockpit/models"};var nt;const w=Wt.create({baseURL:Qt,timeout:((nt=window.meta.axios)==null?void 0:nt.timeout)||6e4,withCredentials:!1,paramsSerializer:n=>__$t__.stringify(n)});w.interceptors.request.use(n=>(n.headers["x-token"]="ewoglCJhbGcilDogpc3",n),n=>Promise.reject(n));w.interceptors.response.use(n=>{const{data:e}=n;return Promise.resolve(e)},n=>Promise.reject(n));function Zt(n,e={},t={}){return new Promise(r=>{w.get(n,k({params:e},t)).then(s=>r({res:s,err:null})).catch(s=>r({res:null,err:s}))})}function en(n,e={},t={}){return new Promise(r=>{w.post(n,e,t).then(s=>r({res:s,err:null})).catch(s=>r({res:null,err:s}))})}function tn(n,e={},t={}){return w.get(n,k({params:e},t))}function nn(n,e={},t={}){return w.post(n,e,t)}function rn(n,e={}){return w.get(`/filehandle/${n}`,{params:e})}function sn(n,e={},t={}){return w.post(`/filehandle/${n}`,e,t)}function an(n,e={}){return w.get(`/user/${n}`,{params:e})}function on(n,e={},t={}){return w.post(`/user/${n}`,e,t)}function cn(n,e={}){return w.get(`${n}`,e.local?{params:e,baseURL:it}:{params:e})}function ln(n,e={}){return w.get(`/media/${n}/`,{params:e})}function un(n,e={},t={}){return w.post(`/media/${n}/`,e,t)}function dn(n,e={}){return w.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,{params:e})}function hn(n,e={},t={}){return w.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,e,t)}function mn(n,e={}){return w.get(`/history/${n}`,{params:e})}function fn(n,e={},t={}){return w.post(`/history/${n}`,e,t)}function pn(n,e={}){return w.get(`/scada/${n}`,{params:e})}function _n(n,e={},t={}){return w.post(`/scada/${n}`,e,t)}function En(n,e={}){return w.get(`/common/factory/${n}`,{params:e})}function An(n,e={},t={}){return w.post(`/common/factory/${n}`,e,t)}function gn(n,e={}){return w.get(`/factory/${n}`,{params:e})}function wn(n,e={},t={}){return w.post(`/factory/${n}`,e,t)}function Sn(n,e={}){return w.get(`/pd/${n}`,{params:e})}function In(n,e={},t={}){return w.post(`/pd/${n}`,e,t)}const $={getApi:Zt,postApi:en,getFileApi:rn,postFileApi:sn,getBaseApi:tn,postBaseApi:nn,getUserApi:an,postUserApi:on,getGraphApi:cn,getMediaApi:ln,postMediaApi:un,getScadaApi:pn,postScadaApi:_n,getCommonApi:dn,postCommonApi:hn,getHistoryApi:mn,postHistoryApi:fn,getFactoryApi:gn,postFactoryApi:wn,getCommonFactoryApi:En,postCommonFactoryApi:An,getPDApi:Sn,postPDApi:In},fe=qt();class yn{constructor(e={}){this._options=k({url:e.socketUrl,onOpen:null,onClose:null,onError:null,onMessage:null},e),this._client=null,this._isConnect=!1,this._closeClient=!1,this._retryCount=0,this._retryTimes=10,this._retryInterval=1e4,this._retryIntervalObj=null,this._initSockjs()}_initSockjs(){const{url:e,onOpen:t,onClose:r,onError:s,onMessage:o,token:a}=this._options;WebSocket!==void 0?this._client=new WebSocket(e,[a]):this.$message({type:"error",message:"当前浏览器不支持WebSocket推送!"}),this._client.onopen=l=>{this._client.readyState===WebSocket.OPEN&&(this._retryCount=0,this._isConnect=!0,this._closeClient=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null),t&&t(l)},this._client.onclose=l=>{!this._closeClient&&this.retryIntervalStart(),this._isConnect=!1,r&&r(l)},this._client.onerror=l=>{s&&s(l)},this._client.onmessage=l=>{o&&o(l)}}_reconnect(){if(this._retryCount===this._retryTimes){this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null;return}this._client=null,this._initSockjs(),this._retryCount++}retryIntervalStart(){this._closeClient=!0,this._retryIntervalObj||(this._retryIntervalObj=setInterval(()=>{this._reconnect()},this._retryInterval))}sendMsg(e){this._isConnect&&this._client.send(e)}destroy(){this._client&&(this._isConnect=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null,this._closeClient=!0,this._client.close(),this._client=null)}}const Cn=[65535,-99999];function Rn(n){if(typeof n!="string")return!1;const e=/^-?\d+(\.\d+)?$/;return n.trim()!==""&&e.test(n.trim())}function Ie(n){return!["null","undefined"].includes(n)&&n!==void 0&&n!==null&&n!==""}function Dn(n){return typeof n=="number"&&!Cn.includes(n)}const xn=()=>{var r;const n={},e=((r=window.location.href.split("?"))==null?void 0:r[1])||"",t=new URLSearchParams(e);for(const[s,o]of t.entries())n[s]=o;return n};function we(n){return Object.prototype.toString.call(n).slice(8,-1)}function pe(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16))}(function(){if(typeof Object.id=="undefined"){var n=0;Object.id=function(e){return typeof e.__uniqueid=="undefined"&&Object.defineProperty(e,"__uniqueid",{value:++n,enumerable:!1,writable:!1}),e.__uniqueid}}})();function vn(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var r,s,o,a,l,c;for(o=t.length,s=0,r="";s<o;){if(a=t.charCodeAt(s++)&255,s==o){r+=n.charAt(a>>2),r+=n.charAt((a&3)<<4),r+="==";break}if(l=t.charCodeAt(s++),s==o){r+=n.charAt(a>>2),r+=n.charAt((a&3)<<4|(l&240)>>4),r+=n.charAt((l&15)<<2),r+="=";break}c=t.charCodeAt(s++),r+=n.charAt(a>>2),r+=n.charAt((a&3)<<4|(l&240)>>4),r+=n.charAt((l&15)<<2|(c&192)>>6),r+=n.charAt(c&63)}return r},this.decode=function(t){var r,s,o,a,l,c,h;for(c=t.length,l=0,h="";l<c;){do r=e[t.charCodeAt(l++)&255];while(l<c&&r==-1);if(r==-1)break;do s=e[t.charCodeAt(l++)&255];while(l<c&&s==-1);if(s==-1)break;h+=String.fromCharCode(r<<2|(s&48)>>4);do{if(o=t.charCodeAt(l++)&255,o==61)return h;o=e[o]}while(l<c&&o==-1);if(o==-1)break;h+=String.fromCharCode((s&15)<<4|(o&60)>>2);do{if(a=t.charCodeAt(l++)&255,a==61)return h;a=e[a]}while(l<c&&a==-1);if(a==-1)break;h+=String.fromCharCode((o&3)<<6|a)}return h},this.utf16to8=function(t){var r,s,o,a;for(r="",o=t.length,s=0;s<o;s++)a=t.charCodeAt(s),a>=1&&a<=127?r+=t.charAt(s):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},this.utf8to16=function(t){var r,s,o,a,l,c;for(r="",o=t.length,s=0;s<o;)switch(a=t.charCodeAt(s++),a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=t.charAt(s-1);break;case 12:case 13:l=t.charCodeAt(s++),r+=String.fromCharCode((a&31)<<6|l&63);break;case 14:l=t.charCodeAt(s++),c=t.charCodeAt(s++),r+=String.fromCharCode((a&15)<<12|(l&63)<<6|(c&63)<<0);break}return r},this.charToHex=function(t){var r,s,o;for(r="",s=0;s<t.length;)o=t.charCodeAt(s++).toString(16),r+="\\0x"+o,r+=s>0&&s%8==0?`\r
6
- `:", ";return r}}function Tn(){var n=0,e=new Object;this.add=function(t,r){this.containsKey(t)||n++,e[t]=r},this.getValue=function(t){return this.containsKey(t)?e[t]:null},this.remove=function(t){this.containsKey(t)&&delete e[t]&&n--},this.containsKey=function(t){return t in e},this.containsValue=function(t){for(var r in e)if(e[r]==t)return!0;return!1},this.getValues=function(){var t=[];for(var r in e)t.push(e[r]);return t},this.getKeys=function(){var t=[];for(var r in e)t.push(r);return t},this.getSize=function(){return n},this.clear=function(){n=0,e=new Object}}function Pn(n){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new Tn,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var e=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(e)},this.loadModuleCallBack=function(e){if(!e)throw e.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(e,t,r){var s=Object.id(r).toString();this.callbacks_.add(s,r);var o={MsgId:s,Method:e+"|"+n};t&&(o.Param=JSON.stringify(t));var a=JSON.stringify(o);this.connect&&this.ws.send(a)},this.ready=function(e){this.ready_func_=e},this._callback=function(e){var t=JSON.parse(e.data),r=t.MsgId;if(this.callbacks_.containsKey(r)){var s=this.callbacks_.getValue(r);s(t.Result,t.Response),this.callbacks_.remove(r)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:e,DongleInfoNum:t},r){this.exec("Arm_GetDongleInfo",[parseInt(e),parseInt(t)],r)},this.Arm_Enum=function(e){this.exec("Arm_Enum",null,e)},this.Arm_Open=function({Index:e},t){this.exec("Arm_Open",[parseInt(e)],t)},this.Arm_Close=function({Handle:e},t){this.exec("Arm_Close",[parseInt(e)],t)},this.Arm_VerifyPIN=function({Handle:e,UserPin:t,UserType:r},s){this.exec("Arm_VerifyPIN",[parseInt(e),r,t],s)},this.Arm_ResetState=function({Handle:e},t){this.exec("Arm_ResetState",[parseInt(e)],t)},this.Arm_GenRandom=function({Handle:e,RandomLen:t},r){this.exec("Arm_GenRandom",[parseInt(e),parseInt(t)],r)},this.Arm_LEDControl=function({Handle:e,LedFlag:t},r){this.exec("Arm_LEDControl",[parseInt(e),t],r)},this.Arm_SwitchProtocol=function({Handle:e,ProtocolFlag:t},r){this.exec("Arm_SwitchProtocol",[parseInt(e),t],r)},this.Arm_CreateFile=function({Handle:e,FileID:t,FileType:r,AttrBuffer:s},o){this.exec("Arm_CreateFile",[parseInt(e),r,parseInt(t),s],o)},this.Arm_WriteFile=function({Handle:e,FileID:t,FileType:r,FileOffset:s,DataInput:o},a){this.exec("Arm_WriteFile",[parseInt(e),r,parseInt(t),parseInt(s),o],a)},this.Arm_ReadFile0001=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:e,Count:t,ExeFileInfo:r},s){this.exec("Arm_DownloadExeFile",[parseInt(e),parseInt(t),r],s)},this.Arm_RunExeFile=function({Handle:e,FileID:t,InData:r,DataLen:s},o){this.exec("Arm_RunExeFile",[parseInt(e),parseInt(t),r,r.length,parseInt(s)],o)},this.Arm_ReadRunExeFileData=function(e){this.exec("Arm_ReadRunExeFileData",null,e)},this.Arm_DeleteFile=function({Handle:e,FileID:t,FileType:r},s){this.exec("Arm_DeleteFile",[parseInt(e),r,parseInt(t)],s)},this.Arm_WriteData=function({Handle:e,Offset:t,DataInput:r},s){this.exec("Arm_WriteData",[parseInt(e),parseInt(t),r],s)},this.Arm_ReadData=function({Handle:e,Offset:t,ReadLength:r},s){this.exec("Arm_ReadData",[parseInt(e),parseInt(t),r],s)},this.Arm_WriteShareMemory=function({Handle:e,DataInput:t},r){this.exec("Arm_WriteShareMemory",[parseInt(e),t],r)},this.Arm_ReadShareMemory=function({Handle:e},t){this.exec("Arm_ReadShareMemory",[parseInt(e)],t)},this.Arm_GenUniqueKey=function({Handle:e,Seed:t},r){this.exec("Arm_GenUniqueKey",[parseInt(e),t.length,t],r)},this.Arm_ChangePIN=function({Handle:e,NewPIN:t,OldPIN:r,TryCount:s,PinFlag:o},a){this.exec("Arm_ChangePIN",[parseInt(e),o,r,t,parseInt(s)],a)},this.Arm_ResetUserPIN=function({Handle:e,AdminPIN:t},r){this.exec("Arm_ResetUserPIN",[parseInt(e),t],r)},this.Arm_SetUserID=function({Handle:e,UserID:t},r){this.exec("Arm_SetUserID",[parseInt(e),parseInt(t)],r)},this.Arm_GetDeadline=function({Handle:e},t){this.exec("Arm_GetDeadline",[parseInt(e)],t)},this.Arm_SetDeadline=function({Handle:e,SetDeadTime:t},r){this.exec("Arm_SetDeadline",[parseInt(e),parseInt(t)],r)},this.Arm_GetUTCTime=function({Handle:e},t){this.exec("Arm_GetUTCTime",[parseInt(e)],t)},this.Arm_RFS=function({Handle:e},t){this.exec("Arm_RFS",[parseInt(e)],t)},this.Arm_RsaGenPubPriKey=function({Handle:e,RsaFileId:t},r){this.exec("Arm_RsaGenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_EccGenPubPriKey=function({Handle:e,EccFileId:t},r){this.exec("Arm_EccGenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_Sm2GenPubPriKey=function({Handle:e,Sm2FileId:t},r){this.exec("Arm_Sm2GenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_ReadRsaPri=function(e){this.exec("Arm_ReadRsaPri",null,e)},this.Arm_ReadRsaPub=function(e){this.exec("Arm_ReadRsaPub",null,e)},this.Arm_ReadEccPri=function(e){this.exec("Arm_ReadEccPri",null,e)},this.Arm_ReadEccPub=function(e){this.exec("Arm_ReadEccPub",null,e)},this.Arm_ReadSm2Pri=function(e){this.exec("Arm_ReadSm2Pri",null,e)},this.Arm_ReadSm2Pub=function(e){this.exec("Arm_ReadSm2Pub",null,e)},this.Arm_RsaPri=function({Handle:e,RsaPri_Flag:t,RsaPriInData:r,RsaPriFileID:s,RsaPriFileSize:o},a){this.exec("Arm_RsaPri",[parseInt(e),parseInt(s),parseInt(o),t,r],a)},this.Arm_RsaPub=function({Handle:e,RsaPubKey:t,RsaPub_Flag:r,RsaPubInData:s,RsaPubFileSize:o},a){this.exec("Arm_RsaPub",[parseInt(e),parseInt(o),r,t,t.length,s],a)},this.Arm_EccSign=function({Handle:e,HashData:t,EccFileId:r},s){this.exec("Arm_EccSign",[parseInt(e),parseInt(r),t],s)},this.Arm_EccVerify=function({Handle:e,HashData:t,EccPubKey:r,EccSignData:s},o){this.exec("Arm_EccVerify",[parseInt(e),r,r.length,t,s],o)},this.Arm_Sm2Sign=function({Handle:e,HashData:t,Sm2FileId:r},s){this.exec("Arm_Sm2Sign",[parseInt(e),parseInt(r),t],s)},this.Arm_Sm2Verify=function({Handle:e,HashData:t,Sm2PubKey:r,Sm2SignData:s},o){this.exec("Arm_Sm2Verify",[parseInt(e),r,r.length,t,s],o)},this.Arm_TDES=function({Handle:e,Tdes_Flag:t,TdesFileID:r,TdesInData:s},o){this.exec("Arm_TDES",[parseInt(e),parseInt(r),t,s],o)},this.Arm_SM4=function({Handle:e,Sm4_Flag:t,Sm4FileID:r,Sm4InData:s},o){this.exec("Arm_SM4",[parseInt(e),parseInt(r),t,s],o)},this.Arm_HASH=function({Handle:e,Hash_Flag:t,HashInData:r},s){this.exec("Arm_HASH",[parseInt(e),t,r],s)},this.Arm_Seed=function({Handle:e,SeedData:t,SeedLength:r},s){this.exec("Arm_Seed",[parseInt(e),r,t],s)},this.Arm_LimitSeedCount=function({Handle:e,SeedCount:t},r){this.exec("Arm_LimitSeedCount",[parseInt(e),parseInt(t)],r)},this.Arm_GenMotherKey=function({Handle:e,SeedLen:t,SeedForPID:r,SonCount:s,StartUserID:o,AdminTryCount:a,UserPin:l,UserTryCount:c,UpdateRSAPriKey:h},A){this.exec("Arm_GenMotherKey",[parseInt(e),parseInt(t),r,l,parseInt(c),parseInt(a),h,parseInt(o),parseInt(s)],A)},this.Arm_RequestInit=function({Handle:e},t){this.exec("Arm_RequestInit",[parseInt(e)],t)},this.Arm_GetInitDataFromMother=function({Handle:e},t){this.exec("Arm_GetInitDataFromMother",[parseInt(e),Request],t)},this.Arm_InitSon=function({Handle:e,InitData:t},r){this.exec("Arm_InitSon",[parseInt(e),t],r)},this.Arm_SetUpdatePriKey=function({Handle:e,UpdatePriKey:t},r){this.exec("Arm_SetUpdatePriKey",[parseInt(e),t],r)},this.Arm_MakeUpdatePacket=function({Handle:e,HID:t,Func:r,FileID:s,FileType:o,Offset:a,DataLen:l,DataBuffer:c,UpRSAPubKey:h},A){this.exec("Arm_MakeUpdatePacket",[parseInt(e),t,r,o,parseInt(s),parseInt(a),c,h,parseInt(l)],A)},this.Arm_MakeUpdatePacketFromMother=function({Handle:e,HID:t,Func:r,FileID:s,FileType:o,Offset:a,DataLen:l,DataBuffer:c},h){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(e),t,r,o,parseInt(s),parseInt(a),c,parseInt(l)],h)},this.Arm_Update=function({Handle:e,UpdateData:t},r){this.exec("Arm_Update",[parseInt(e),t],r)},this.Arm_Set_DATA_FILE_ATTR=function({Size:e,ReadPriv:t,WritePriv:r},s){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(e),parseInt(t),parseInt(r)],s)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:e,Size:t,Type:r,Priv:s,IsReset:o,IsDecOnRAM:a},l){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[r,parseInt(t),parseInt(e),parseInt(s),parseInt(a),parseInt(o)],l)},this.Arm_Set_KEY_FILE_ATTR=function({Size:e,PrivEnc:t},r){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(e),parseInt(t)],r)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:e,PrivExe:t},r){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(e),parseInt(t)],r)},this.Arm_Set_DATA_LIC=function({ReadPriv:e,WritePriv:t},r){this.exec("Arm_Set_DATA_LIC",[parseInt(e),parseInt(t)],r)},this.Arm_Set_PRIKEY_LIC=function({Count:e,Priv:t,IsReset:r,IsDecOnRAM:s},o){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(e),parseInt(t),parseInt(s),parseInt(r)],o)},this.Arm_Set_KEY_LIC=function({PrivEnc:e},t){this.exec("Arm_Set_KEY_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:e},t){this.exec("Arm_Set_EXE_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:e,FileData:t,FileSize:r,InBuffer:s,CallLimit:o},a){this.exec("Arm_Set_EXE_FILE_INFO",[s,parseInt(r),parseInt(e),parseInt(o),t,t.length],a)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:e},t){this.exec("Arm_Clear_EXE_FILE_INFO",[e],t)}}const bn={HID:0},de={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},Be={USER:0};class ct{constructor(){Q(this,"Base64",new vn);Q(this,"AtlCtrl",null);Q(this,"ArmCount",0);Q(this,"ArmIndex",0);Q(this,"ArmHandle",0);Q(this,"ArmRandom","");try{this.AtlCtrl=new Pn("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(e){console.error(e),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((e,t)=>{this.AtlCtrl.Arm_Enum((r,s)=>{r?(this.ArmCount=+s,e(s)):t(s)})})}armOpen(e=0){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((t,r)=>{this.AtlCtrl.Arm_Open({Index:e},(s,o)=>{s?(this.ArmHandle=+o,t(o)):(this.ArmHandle=o,r(o))})})}armClose(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_Close({Handle:e},(s,o)=>{s?t(o):r(o)})})}armChangePIN(e,t,r=255,s=Be.USER,o=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,l)=>{this.AtlCtrl.Arm_ChangePIN({Handle:o,NewPIN:e,OldPIN:t,TryCount:r,PinFlag:s},(c,h)=>{c&&h==0?(this.ArmPin=e,a(h)):l(h)})})}armGenRandom(e=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:e},(o,a)=>{o?(this.ArmRandom=a,r(a)):s(a)})})}armGetDeadline(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_GetDeadline({Handle:e},(s,o)=>{s?(this.ArmDeadline=o,t(o)):r(o)})})}armGenUniqueKey(e="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:e},(o,a)=>{o?(this.ArmUKey=a,r(a)):s(a)})})}armGetDongleInfo(e=0,t=de.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((r,s)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:e,DongleInfoNum:t},(o,a)=>{if(o){switch(t){case de.USER_ID:this.ArmUid=a;break;case de.PRODUCT_ID:this.ArmPid=a;break;case de.HARDWARE_ID:this.ArmHid=a;break}r(a)}else s(a)})})}armLEDControl(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:e},(o,a)=>{o&&a==0?r(a):s(a)})})}armRFS(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_RFS({Handle:e},(s,o)=>{s&&o==0?t(o):r(o)})})}armReadFile(e="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl[`Arm_ReadFile${e}`]({Handle:t},(o,a)=>{if(o&&a.length>0)try{a=this.Base64.decode(a),r(a)}catch(l){console.error(l),r(a)}else s(a)})})}armResetState(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_ResetState({Handle:e},(s,o)=>{s&&o==0?t(o):r(o)})})}armResetUserPIN(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:e},(o,a)=>{o&&a==0?r(a):s(a)})})}armSetUserID(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:e},(o,a)=>{o&&a==0?r(a):s(a)})})}armSetDeadline(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:e},(o,a)=>{o&&a==0?r(a):s(a)})})}armSwitchProtocol(e=bn.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:e},(o,a)=>{o&&a==0?r(a):s(a)})})}armVerifyPIN(e,t=Be.USER,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((s,o)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:r,UserPin:e,UserType:t},(a,l)=>{a&&l==0?(this.ArmPin=e,s(l)):o(l)})})}armReadData(e=0,t=128,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((s,o)=>{this.AtlCtrl.Arm_ReadData({Handle:r,Offset:e,ReadLength:t},(a,l)=>{a?(this.ArmData=l,s(l)):o(l)})})}armWriteData(e,t=0,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((s,o)=>{this.AtlCtrl.Arm_WriteData({Handle:r,Offset:t,DataInput:e},(a,l)=>{a&&l==0?s(l):o(l)})})}armReadShareMemory(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:e},(s,o)=>{s?(this.ArmData=o,t(o)):r(o)})})}armWriteShareMemory(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,s)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:e},(o,a)=>{o&&a==0?r(a):s(a)})})}}const lt="0123456789abcdeffedcba9876543210",ut="4b0de988570c3a0f",Ln=window.ENCRYPT;let se=Ln&&new ct;function dt(n=16,e="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",r=e.length;for(;n>0;)t+=e[Math.floor(Math.random()*r)],n--;return t}function ht(){return m(this,null,function*(){return se||(se=new ct),new Promise((n,e)=>{se.armEnum().then(t=>{n(+t)}).catch(t=>{Y.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e(t)})})})}jt.throttle(()=>m(exports,null,function*(){const n=yield ht(),e={};if(typeof n!="number"||n<=0)Y.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken();else{const t=yield On();if(!e.token)return;t.length?t.includes(e.ukeyHid)||(Y.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),e.resetToken()):(Y.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken())}}),5e3,{trailing:!1});function Mn(n=0){return m(this,null,function*(){return se?new Promise((e,t)=>{se.armGetDongleInfo(n).then(r=>{r?e(r):(Y.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(r))}).catch(r=>{t(r)})}):Y.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function On(){return m(this,null,function*(){if(!se)return Y.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const n=yield ht();let e=[];for(let t=0;t<n;t++){const r=yield Mn(t);e.push(r)}return e})}dt(16);dt(16);const mt=window.meta.app.inspect?Z.SM4.constants.CBC:Z.SM4.constants.ECB,{publicKey:Vr,privateKey:zr}=Z.SM2.generateKeyPair();function Hn(n,e,t={}){const r=ft(ut),s=t.mode||mt;t=s===Z.SM4.constants.ECB?k({mode:s,inputEncoding:"utf8",outputEncoding:"hex"},t):k({iv:lt,mode:s,inputEncoding:"utf8",outputEncoding:"hex"},t);let o="";try{o=Z.SM4.encrypt(n,r,t)}catch(a){console.log("err: ",a)}return o}function Un(n,e,t={}){const r=ft(ut),s=t.mode||mt;return t=s===Z.SM4.constants.ECB?k({mode:s,inputEncoding:"hex",outputEncoding:"utf8"},t):k({iv:lt,mode:s,inputEncoding:"hex",outputEncoding:"utf8"},t),Z.SM4.decrypt(n,r,t)}function ft(n){return[...n].map(e=>e.charCodeAt().toString(16)).join("")}const oe=n=>{const{onClose:e,customClass:t}=n;return Y.ElMessage(le(k({},n),{center:!0,customClass:`sy-message ${t||""}`,onClose:s=>{e&&e(s)}}))};["success","warning","info","error"].forEach(n=>{oe[n]=e=>oe(typeof e=="string"?{type:n,message:e}:le(k({},e),{type:n}))});be.createPinia();function he(n){return n=at&&Ie(n)?Un(n):n,Ie(n)?JSON.parse(n):n}function Ge(n){return n=at&&Ie(n)?Hn(n):n,JSON.stringify(n)}function ne(n,e,t,r){const s=new StorageEvent("storage",{url:window.location.href,key:n,oldValue:e,newValue:t,storageArea:r});window.dispatchEvent(s)}const Le={getLocal:n=>{try{const e=window.localStorage.getItem(n);return he(e)}catch(e){console.error(e)}},setLocal:(n,e)=>{try{const t=window.localStorage.getItem(n),r=Ge(e);window.localStorage.setItem(n,r),ne(n,t,r,window.localStorage)}catch(t){console.error(t)}},eachLocal:n=>{if(!n||we(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.localStorage.length;e<t;e++){const r=window.localStorage.key(e);n((void 0).getLocal(r),r)}},clearLocal:()=>{window.localStorage.clear(),ne(null,null,null,window.localStorage)},removeLocal:n=>{const e=window.localStorage.getItem(n);window.localStorage.removeItem(n),ne(n,e,null,window.localStorage)},getSession:n=>{try{const e=window.sessionStorage.getItem(n);return he(e)}catch(e){console.error(e)}},setSession:(n,e)=>{try{const t=window.sessionStorage.getItem(n),r=Ge(e);window.sessionStorage.setItem(n,r),ne(n,t,r,window.sessionStorage)}catch(t){console.error(t)}},eachSession:n=>{if(!n||we(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.sessionStorage.length;e<t;e++){const r=window.sessionStorage.key(e);n((void 0).getSession(r),r)}},clearSession:()=>{window.sessionStorage.clear(),ne(null,null,null,window.sessionStorage)},removeSession:n=>{const e=window.sessionStorage.getItem(n);window.sessionStorage.removeItem(n),ne(n,e,null,window.sessionStorage)},onStorageChange:n=>{if(!n||we(n)!=="Function")return console.error("传递参数非函数类型!");const e=t=>{n({url:t.url,key:t.key,newValue:t.newValue?he(t.newValue):null,oldValue:t.oldValue?he(t.oldValue):null,storageArea:t.storageArea})};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},kn=(n,e)=>new Promise((t,r)=>{$.postApi("/filehandle/save",{path:n,data:e}).then(s=>{s.res.success?t(!0):r(!1)})}),Fn='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 512m-500.62222187 0a500.62222187 500.62222187 0 1 0 1001.24444374 0 500.62222187 500.62222187 0 1 0-1001.24444374 0Z" fill="#1afa29" p-id="1156"></path></svg>',Ve='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1657" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 512m-500.62222187 0a500.62222187 500.62222187 0 1 0 1001.24444374 0 500.62222187 500.62222187 0 1 0-1001.24444374 0Z" fill="#808080" p-id="1658"></path></svg>',Nn='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25776" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M377.083 125.44c74.606-135.314 195.292-135.314 269.897 0l346.332 629.394c74.606 135.315 9.508 245.395-145.189 245.395H175.94c-154.697 0-219.428-109.715-145.188-245.395L377.083 125.44z" fill="#FF2D16" p-id="25777"></path><path d="M567.986 328.046c0-31.086-25.234-55.955-55.954-55.955s-55.954 25.235-55.954 55.955v280.137c0 31.086 25.234 55.954 55.954 55.954s55.954-25.234 55.954-55.954V328.046z m-111.908 448h111.908v111.908H456.078z" fill="#FFFFFF" p-id="25778"></path></svg>',Bn={name:"局放测点",label:"局放测点",create:function(n,e){return m(this,null,function*(){const{transformControls:t}=e,r=document.createElement("div"),s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.gap="10px",s.style.position="relative",s.style.zIndex="1";const o=document.createElement("div");o.innerHTML=`
5
+ */Object.defineProperty(Se,"__esModule",{value:!0});var ce=typeof window!="undefined"?window.proxy||window:{},ht=function(n){ce!=null&&ce.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),ce.qiankunName&&(window.moudleQiankunAppLifeCycles[ce.qiankunName]=n))};Se.default=ht;var Te=Se.qiankunWindow=ce;Se.renderWithQiankun=ht;function on(){return window.__POWERED_BY_WUJIE__||window.$wujie?_e.WUJIE:window.__POWERED_BY_QIANKUN__||Te!=null&&Te.__POWERED_BY_QIANKUN__?_e.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?_e.MICROAPP:_e.NONE}const me="/",mt=window.meta.app.encrypt;on();const sn=location.hostname,ln=location.port,cn=location.origin;var Qe,Ze,et,tt,nt,rt,at,it,ot,st,lt,ct;const pt={savePath:((Ze=(Qe=window.meta)==null?void 0:Qe.graph)==null?void 0:Ze.savePath)||"/cockpit/drawing",graphPenPath:((tt=(et=window.meta)==null?void 0:et.graph)==null?void 0:tt.graphPenPath)||"/cockpit/graph",templatePath:((rt=(nt=window.meta)==null?void 0:nt.graph)==null?void 0:rt.templatePath)||"/cockpit/template",graphImgUploadPath:((it=(at=window.meta)==null?void 0:at.graph)==null?void 0:it.graphImgUploadPath)||"/cockpit/upload",threeSavePath:((st=(ot=window.meta)==null?void 0:ot.graph)==null?void 0:st.threeSavePath)||"/cockpit/threed",threeModelPath:((ct=(lt=window.meta)==null?void 0:lt.graph)==null?void 0:ct.threeModelPath)||"/cockpit/models"};var dt;const S=Zt.create({baseURL:cn,timeout:((dt=window.meta.axios)==null?void 0:dt.timeout)||6e4,withCredentials:!1,paramsSerializer:n=>Qt.stringify(n)});S.interceptors.request.use(n=>(n.headers["x-token"]="ewoglCJhbGcilDogpc3",n),n=>Promise.reject(n));S.interceptors.response.use(n=>{const{data:e}=n;return Promise.resolve(e)},n=>Promise.reject(n));function dn(n,e={},t={}){return new Promise(r=>{S.get(n,l({params:e},t)).then(a=>r({res:a,err:null})).catch(a=>r({res:null,err:a}))})}function un(n,e={},t={}){return new Promise(r=>{S.post(n,e,t).then(a=>r({res:a,err:null})).catch(a=>r({res:null,err:a}))})}function hn(n,e={},t={}){return S.get(n,l({params:e},t))}function mn(n,e={},t={}){return S.post(n,e,t)}function pn(n,e={}){return S.get(`/filehandle/${n}`,{params:e})}function fn(n,e={},t={}){return S.post(`/filehandle/${n}`,e,t)}function gn(n,e={}){return S.get(`/user/${n}`,{params:e})}function En(n,e={},t={}){return S.post(`/user/${n}`,e,t)}function _n(n,e={}){return S.get(`${n}`,e.local?{params:e,baseURL:me}:{params:e})}function wn(n,e={}){return S.get(`/media/${n}/`,{params:e})}function An(n,e={},t={}){return S.post(`/media/${n}/`,e,t)}function yn(n,e={}){return S.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,{params:e})}function In(n,e={},t={}){return S.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,e,t)}function Sn(n,e={}){return S.get(`/history/${n}`,{params:e})}function Cn(n,e={},t={}){return S.post(`/history/${n}`,e,t)}function vn(n,e={}){return S.get(`/scada/${n}`,{params:e})}function xn(n,e={},t={}){return S.post(`/scada/${n}`,e,t)}function Tn(n,e={}){return S.get(`/common/factory/${n}`,{params:e})}function Rn(n,e={},t={}){return S.post(`/common/factory/${n}`,e,t)}function Dn(n,e={}){return S.get(`/factory/${n}`,{params:e})}function bn(n,e={},t={}){return S.post(`/factory/${n}`,e,t)}function Pn(n,e={}){return S.get(`/pd/${n}`,{params:e})}function Ln(n,e={},t={}){return S.post(`/pd/${n}`,e,t)}const Y={getApi:dn,postApi:un,getFileApi:pn,postFileApi:fn,getBaseApi:hn,postBaseApi:mn,getUserApi:gn,postUserApi:En,getGraphApi:_n,getMediaApi:wn,postMediaApi:An,getScadaApi:vn,postScadaApi:xn,getCommonApi:yn,postCommonApi:In,getHistoryApi:Sn,postHistoryApi:Cn,getFactoryApi:Dn,postFactoryApi:bn,getCommonFactoryApi:Tn,postCommonFactoryApi:Rn,getPDApi:Pn,postPDApi:Ln},Ie=en();class Mn{constructor(e={}){this._options=l({url:e.socketUrl,onOpen:null,onClose:null,onError:null,onMessage:null},e),this._client=null,this._isConnect=!1,this._closeClient=!1,this._retryCount=0,this._retryTimes=10,this._retryInterval=1e4,this._retryIntervalObj=null,this._initSockjs()}_initSockjs(){const{url:e,onOpen:t,onClose:r,onError:a,onMessage:s,token:o}=this._options;WebSocket!==void 0?this._client=new WebSocket(e,[o]):this.$message({type:"error",message:"当前浏览器不支持WebSocket推送!"}),this._client.onopen=d=>{this._client.readyState===WebSocket.OPEN&&(this._retryCount=0,this._isConnect=!0,this._closeClient=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null),t&&t(d)},this._client.onclose=d=>{!this._closeClient&&this.retryIntervalStart(),this._isConnect=!1,r&&r(d)},this._client.onerror=d=>{a&&a(d)},this._client.onmessage=d=>{s&&s(d)}}_reconnect(){if(this._retryCount===this._retryTimes){this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null;return}this._client=null,this._initSockjs(),this._retryCount++}retryIntervalStart(){this._closeClient=!0,this._retryIntervalObj||(this._retryIntervalObj=setInterval(()=>{this._reconnect()},this._retryInterval))}sendMsg(e){this._isConnect&&this._client.send(e)}destroy(){this._client&&(this._isConnect=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null,this._closeClient=!0,this._client.close(),this._client=null)}}const Nn=[65535,-99999];function On(n){if(typeof n!="string")return!1;const e=/^-?\d+(\.\d+)?$/;return n.trim()!==""&&e.test(n.trim())}function be(n){return!["null","undefined"].includes(n)&&n!==void 0&&n!==null&&n!==""}function kn(n){return typeof n=="number"&&!Nn.includes(n)}const Fn=()=>{var r;const n={},e=((r=window.location.href.split("?"))==null?void 0:r[1])||"",t=new URLSearchParams(e);for(const[a,s]of t.entries())n[a]=s;return n};function Re(n){return Object.prototype.toString.call(n).slice(8,-1)}function pe(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16))}(function(){if(typeof Object.id=="undefined"){var n=0;Object.id=function(e){return typeof e.__uniqueid=="undefined"&&Object.defineProperty(e,"__uniqueid",{value:++n,enumerable:!1,writable:!1}),e.__uniqueid}}})();function Un(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var r,a,s,o,d,c;for(s=t.length,a=0,r="";a<s;){if(o=t.charCodeAt(a++)&255,a==s){r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4),r+="==";break}if(d=t.charCodeAt(a++),a==s){r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4|(d&240)>>4),r+=n.charAt((d&15)<<2),r+="=";break}c=t.charCodeAt(a++),r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4|(d&240)>>4),r+=n.charAt((d&15)<<2|(c&192)>>6),r+=n.charAt(c&63)}return r},this.decode=function(t){var r,a,s,o,d,c,p;for(c=t.length,d=0,p="";d<c;){do r=e[t.charCodeAt(d++)&255];while(d<c&&r==-1);if(r==-1)break;do a=e[t.charCodeAt(d++)&255];while(d<c&&a==-1);if(a==-1)break;p+=String.fromCharCode(r<<2|(a&48)>>4);do{if(s=t.charCodeAt(d++)&255,s==61)return p;s=e[s]}while(d<c&&s==-1);if(s==-1)break;p+=String.fromCharCode((a&15)<<4|(s&60)>>2);do{if(o=t.charCodeAt(d++)&255,o==61)return p;o=e[o]}while(d<c&&o==-1);if(o==-1)break;p+=String.fromCharCode((s&3)<<6|o)}return p},this.utf16to8=function(t){var r,a,s,o;for(r="",s=t.length,a=0;a<s;a++)o=t.charCodeAt(a),o>=1&&o<=127?r+=t.charAt(a):o>2047?(r+=String.fromCharCode(224|o>>12&15),r+=String.fromCharCode(128|o>>6&63),r+=String.fromCharCode(128|o>>0&63)):(r+=String.fromCharCode(192|o>>6&31),r+=String.fromCharCode(128|o>>0&63));return r},this.utf8to16=function(t){var r,a,s,o,d,c;for(r="",s=t.length,a=0;a<s;)switch(o=t.charCodeAt(a++),o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=t.charAt(a-1);break;case 12:case 13:d=t.charCodeAt(a++),r+=String.fromCharCode((o&31)<<6|d&63);break;case 14:d=t.charCodeAt(a++),c=t.charCodeAt(a++),r+=String.fromCharCode((o&15)<<12|(d&63)<<6|(c&63)<<0);break}return r},this.charToHex=function(t){var r,a,s;for(r="",a=0;a<t.length;)s=t.charCodeAt(a++).toString(16),r+="\\0x"+s,r+=a>0&&a%8==0?`\r
6
+ `:", ";return r}}function Hn(){var n=0,e=new Object;this.add=function(t,r){this.containsKey(t)||n++,e[t]=r},this.getValue=function(t){return this.containsKey(t)?e[t]:null},this.remove=function(t){this.containsKey(t)&&delete e[t]&&n--},this.containsKey=function(t){return t in e},this.containsValue=function(t){for(var r in e)if(e[r]==t)return!0;return!1},this.getValues=function(){var t=[];for(var r in e)t.push(e[r]);return t},this.getKeys=function(){var t=[];for(var r in e)t.push(r);return t},this.getSize=function(){return n},this.clear=function(){n=0,e=new Object}}function Bn(n){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new Hn,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var e=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(e)},this.loadModuleCallBack=function(e){if(!e)throw e.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(e,t,r){var a=Object.id(r).toString();this.callbacks_.add(a,r);var s={MsgId:a,Method:e+"|"+n};t&&(s.Param=JSON.stringify(t));var o=JSON.stringify(s);this.connect&&this.ws.send(o)},this.ready=function(e){this.ready_func_=e},this._callback=function(e){var t=JSON.parse(e.data),r=t.MsgId;if(this.callbacks_.containsKey(r)){var a=this.callbacks_.getValue(r);a(t.Result,t.Response),this.callbacks_.remove(r)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:e,DongleInfoNum:t},r){this.exec("Arm_GetDongleInfo",[parseInt(e),parseInt(t)],r)},this.Arm_Enum=function(e){this.exec("Arm_Enum",null,e)},this.Arm_Open=function({Index:e},t){this.exec("Arm_Open",[parseInt(e)],t)},this.Arm_Close=function({Handle:e},t){this.exec("Arm_Close",[parseInt(e)],t)},this.Arm_VerifyPIN=function({Handle:e,UserPin:t,UserType:r},a){this.exec("Arm_VerifyPIN",[parseInt(e),r,t],a)},this.Arm_ResetState=function({Handle:e},t){this.exec("Arm_ResetState",[parseInt(e)],t)},this.Arm_GenRandom=function({Handle:e,RandomLen:t},r){this.exec("Arm_GenRandom",[parseInt(e),parseInt(t)],r)},this.Arm_LEDControl=function({Handle:e,LedFlag:t},r){this.exec("Arm_LEDControl",[parseInt(e),t],r)},this.Arm_SwitchProtocol=function({Handle:e,ProtocolFlag:t},r){this.exec("Arm_SwitchProtocol",[parseInt(e),t],r)},this.Arm_CreateFile=function({Handle:e,FileID:t,FileType:r,AttrBuffer:a},s){this.exec("Arm_CreateFile",[parseInt(e),r,parseInt(t),a],s)},this.Arm_WriteFile=function({Handle:e,FileID:t,FileType:r,FileOffset:a,DataInput:s},o){this.exec("Arm_WriteFile",[parseInt(e),r,parseInt(t),parseInt(a),s],o)},this.Arm_ReadFile0001=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:e,Count:t,ExeFileInfo:r},a){this.exec("Arm_DownloadExeFile",[parseInt(e),parseInt(t),r],a)},this.Arm_RunExeFile=function({Handle:e,FileID:t,InData:r,DataLen:a},s){this.exec("Arm_RunExeFile",[parseInt(e),parseInt(t),r,r.length,parseInt(a)],s)},this.Arm_ReadRunExeFileData=function(e){this.exec("Arm_ReadRunExeFileData",null,e)},this.Arm_DeleteFile=function({Handle:e,FileID:t,FileType:r},a){this.exec("Arm_DeleteFile",[parseInt(e),r,parseInt(t)],a)},this.Arm_WriteData=function({Handle:e,Offset:t,DataInput:r},a){this.exec("Arm_WriteData",[parseInt(e),parseInt(t),r],a)},this.Arm_ReadData=function({Handle:e,Offset:t,ReadLength:r},a){this.exec("Arm_ReadData",[parseInt(e),parseInt(t),r],a)},this.Arm_WriteShareMemory=function({Handle:e,DataInput:t},r){this.exec("Arm_WriteShareMemory",[parseInt(e),t],r)},this.Arm_ReadShareMemory=function({Handle:e},t){this.exec("Arm_ReadShareMemory",[parseInt(e)],t)},this.Arm_GenUniqueKey=function({Handle:e,Seed:t},r){this.exec("Arm_GenUniqueKey",[parseInt(e),t.length,t],r)},this.Arm_ChangePIN=function({Handle:e,NewPIN:t,OldPIN:r,TryCount:a,PinFlag:s},o){this.exec("Arm_ChangePIN",[parseInt(e),s,r,t,parseInt(a)],o)},this.Arm_ResetUserPIN=function({Handle:e,AdminPIN:t},r){this.exec("Arm_ResetUserPIN",[parseInt(e),t],r)},this.Arm_SetUserID=function({Handle:e,UserID:t},r){this.exec("Arm_SetUserID",[parseInt(e),parseInt(t)],r)},this.Arm_GetDeadline=function({Handle:e},t){this.exec("Arm_GetDeadline",[parseInt(e)],t)},this.Arm_SetDeadline=function({Handle:e,SetDeadTime:t},r){this.exec("Arm_SetDeadline",[parseInt(e),parseInt(t)],r)},this.Arm_GetUTCTime=function({Handle:e},t){this.exec("Arm_GetUTCTime",[parseInt(e)],t)},this.Arm_RFS=function({Handle:e},t){this.exec("Arm_RFS",[parseInt(e)],t)},this.Arm_RsaGenPubPriKey=function({Handle:e,RsaFileId:t},r){this.exec("Arm_RsaGenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_EccGenPubPriKey=function({Handle:e,EccFileId:t},r){this.exec("Arm_EccGenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_Sm2GenPubPriKey=function({Handle:e,Sm2FileId:t},r){this.exec("Arm_Sm2GenPubPriKey",[parseInt(e),parseInt(t)],r)},this.Arm_ReadRsaPri=function(e){this.exec("Arm_ReadRsaPri",null,e)},this.Arm_ReadRsaPub=function(e){this.exec("Arm_ReadRsaPub",null,e)},this.Arm_ReadEccPri=function(e){this.exec("Arm_ReadEccPri",null,e)},this.Arm_ReadEccPub=function(e){this.exec("Arm_ReadEccPub",null,e)},this.Arm_ReadSm2Pri=function(e){this.exec("Arm_ReadSm2Pri",null,e)},this.Arm_ReadSm2Pub=function(e){this.exec("Arm_ReadSm2Pub",null,e)},this.Arm_RsaPri=function({Handle:e,RsaPri_Flag:t,RsaPriInData:r,RsaPriFileID:a,RsaPriFileSize:s},o){this.exec("Arm_RsaPri",[parseInt(e),parseInt(a),parseInt(s),t,r],o)},this.Arm_RsaPub=function({Handle:e,RsaPubKey:t,RsaPub_Flag:r,RsaPubInData:a,RsaPubFileSize:s},o){this.exec("Arm_RsaPub",[parseInt(e),parseInt(s),r,t,t.length,a],o)},this.Arm_EccSign=function({Handle:e,HashData:t,EccFileId:r},a){this.exec("Arm_EccSign",[parseInt(e),parseInt(r),t],a)},this.Arm_EccVerify=function({Handle:e,HashData:t,EccPubKey:r,EccSignData:a},s){this.exec("Arm_EccVerify",[parseInt(e),r,r.length,t,a],s)},this.Arm_Sm2Sign=function({Handle:e,HashData:t,Sm2FileId:r},a){this.exec("Arm_Sm2Sign",[parseInt(e),parseInt(r),t],a)},this.Arm_Sm2Verify=function({Handle:e,HashData:t,Sm2PubKey:r,Sm2SignData:a},s){this.exec("Arm_Sm2Verify",[parseInt(e),r,r.length,t,a],s)},this.Arm_TDES=function({Handle:e,Tdes_Flag:t,TdesFileID:r,TdesInData:a},s){this.exec("Arm_TDES",[parseInt(e),parseInt(r),t,a],s)},this.Arm_SM4=function({Handle:e,Sm4_Flag:t,Sm4FileID:r,Sm4InData:a},s){this.exec("Arm_SM4",[parseInt(e),parseInt(r),t,a],s)},this.Arm_HASH=function({Handle:e,Hash_Flag:t,HashInData:r},a){this.exec("Arm_HASH",[parseInt(e),t,r],a)},this.Arm_Seed=function({Handle:e,SeedData:t,SeedLength:r},a){this.exec("Arm_Seed",[parseInt(e),r,t],a)},this.Arm_LimitSeedCount=function({Handle:e,SeedCount:t},r){this.exec("Arm_LimitSeedCount",[parseInt(e),parseInt(t)],r)},this.Arm_GenMotherKey=function({Handle:e,SeedLen:t,SeedForPID:r,SonCount:a,StartUserID:s,AdminTryCount:o,UserPin:d,UserTryCount:c,UpdateRSAPriKey:p},A){this.exec("Arm_GenMotherKey",[parseInt(e),parseInt(t),r,d,parseInt(c),parseInt(o),p,parseInt(s),parseInt(a)],A)},this.Arm_RequestInit=function({Handle:e},t){this.exec("Arm_RequestInit",[parseInt(e)],t)},this.Arm_GetInitDataFromMother=function({Handle:e},t){this.exec("Arm_GetInitDataFromMother",[parseInt(e),Request],t)},this.Arm_InitSon=function({Handle:e,InitData:t},r){this.exec("Arm_InitSon",[parseInt(e),t],r)},this.Arm_SetUpdatePriKey=function({Handle:e,UpdatePriKey:t},r){this.exec("Arm_SetUpdatePriKey",[parseInt(e),t],r)},this.Arm_MakeUpdatePacket=function({Handle:e,HID:t,Func:r,FileID:a,FileType:s,Offset:o,DataLen:d,DataBuffer:c,UpRSAPubKey:p},A){this.exec("Arm_MakeUpdatePacket",[parseInt(e),t,r,s,parseInt(a),parseInt(o),c,p,parseInt(d)],A)},this.Arm_MakeUpdatePacketFromMother=function({Handle:e,HID:t,Func:r,FileID:a,FileType:s,Offset:o,DataLen:d,DataBuffer:c},p){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(e),t,r,s,parseInt(a),parseInt(o),c,parseInt(d)],p)},this.Arm_Update=function({Handle:e,UpdateData:t},r){this.exec("Arm_Update",[parseInt(e),t],r)},this.Arm_Set_DATA_FILE_ATTR=function({Size:e,ReadPriv:t,WritePriv:r},a){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(e),parseInt(t),parseInt(r)],a)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:e,Size:t,Type:r,Priv:a,IsReset:s,IsDecOnRAM:o},d){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[r,parseInt(t),parseInt(e),parseInt(a),parseInt(o),parseInt(s)],d)},this.Arm_Set_KEY_FILE_ATTR=function({Size:e,PrivEnc:t},r){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(e),parseInt(t)],r)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:e,PrivExe:t},r){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(e),parseInt(t)],r)},this.Arm_Set_DATA_LIC=function({ReadPriv:e,WritePriv:t},r){this.exec("Arm_Set_DATA_LIC",[parseInt(e),parseInt(t)],r)},this.Arm_Set_PRIKEY_LIC=function({Count:e,Priv:t,IsReset:r,IsDecOnRAM:a},s){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(e),parseInt(t),parseInt(a),parseInt(r)],s)},this.Arm_Set_KEY_LIC=function({PrivEnc:e},t){this.exec("Arm_Set_KEY_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:e},t){this.exec("Arm_Set_EXE_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:e,FileData:t,FileSize:r,InBuffer:a,CallLimit:s},o){this.exec("Arm_Set_EXE_FILE_INFO",[a,parseInt(r),parseInt(e),parseInt(s),t,t.length],o)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:e},t){this.exec("Arm_Clear_EXE_FILE_INFO",[e],t)}}const Gn={HID:0},we={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},qe={USER:0};class ft{constructor(){ae(this,"Base64",new Un);ae(this,"AtlCtrl",null);ae(this,"ArmCount",0);ae(this,"ArmIndex",0);ae(this,"ArmHandle",0);ae(this,"ArmRandom","");try{this.AtlCtrl=new Bn("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(e){console.error(e),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((e,t)=>{this.AtlCtrl.Arm_Enum((r,a)=>{r?(this.ArmCount=+a,e(a)):t(a)})})}armOpen(e=0){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((t,r)=>{this.AtlCtrl.Arm_Open({Index:e},(a,s)=>{a?(this.ArmHandle=+s,t(s)):(this.ArmHandle=s,r(s))})})}armClose(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_Close({Handle:e},(a,s)=>{a?t(s):r(s)})})}armChangePIN(e,t,r=255,a=qe.USER,s=this.ArmHandle){if(this.AtlCtrl)return new Promise((o,d)=>{this.AtlCtrl.Arm_ChangePIN({Handle:s,NewPIN:e,OldPIN:t,TryCount:r,PinFlag:a},(c,p)=>{c&&p==0?(this.ArmPin=e,o(p)):d(p)})})}armGenRandom(e=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:e},(s,o)=>{s?(this.ArmRandom=o,r(o)):a(o)})})}armGetDeadline(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_GetDeadline({Handle:e},(a,s)=>{a?(this.ArmDeadline=s,t(s)):r(s)})})}armGenUniqueKey(e="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:e},(s,o)=>{s?(this.ArmUKey=o,r(o)):a(o)})})}armGetDongleInfo(e=0,t=we.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((r,a)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:e,DongleInfoNum:t},(s,o)=>{if(s){switch(t){case we.USER_ID:this.ArmUid=o;break;case we.PRODUCT_ID:this.ArmPid=o;break;case we.HARDWARE_ID:this.ArmHid=o;break}r(o)}else a(o)})})}armLEDControl(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:e},(s,o)=>{s&&o==0?r(o):a(o)})})}armRFS(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_RFS({Handle:e},(a,s)=>{a&&s==0?t(s):r(s)})})}armReadFile(e="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl[`Arm_ReadFile${e}`]({Handle:t},(s,o)=>{if(s&&o.length>0)try{o=this.Base64.decode(o),r(o)}catch(d){console.error(d),r(o)}else a(o)})})}armResetState(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_ResetState({Handle:e},(a,s)=>{a&&s==0?t(s):r(s)})})}armResetUserPIN(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:e},(s,o)=>{s&&o==0?r(o):a(o)})})}armSetUserID(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:e},(s,o)=>{s&&o==0?r(o):a(o)})})}armSetDeadline(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:e},(s,o)=>{s&&o==0?r(o):a(o)})})}armSwitchProtocol(e=Gn.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:e},(s,o)=>{s&&o==0?r(o):a(o)})})}armVerifyPIN(e,t=qe.USER,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,s)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:r,UserPin:e,UserType:t},(o,d)=>{o&&d==0?(this.ArmPin=e,a(d)):s(d)})})}armReadData(e=0,t=128,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,s)=>{this.AtlCtrl.Arm_ReadData({Handle:r,Offset:e,ReadLength:t},(o,d)=>{o?(this.ArmData=d,a(d)):s(d)})})}armWriteData(e,t=0,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,s)=>{this.AtlCtrl.Arm_WriteData({Handle:r,Offset:t,DataInput:e},(o,d)=>{o&&d==0?a(d):s(d)})})}armReadShareMemory(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:e},(a,s)=>{a?(this.ArmData=s,t(s)):r(s)})})}armWriteShareMemory(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,a)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:e},(s,o)=>{s&&o==0?r(o):a(o)})})}}const gt="0123456789abcdeffedcba9876543210",Et="4b0de988570c3a0f",Vn=window.ENCRYPT;let de=Vn&&new ft;function _t(n=16,e="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",r=e.length;for(;n>0;)t+=e[Math.floor(Math.random()*r)],n--;return t}function wt(){return f(this,null,function*(){return de||(de=new ft),new Promise((n,e)=>{de.armEnum().then(t=>{n(+t)}).catch(t=>{ne.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e(t)})})})}nn.throttle(()=>f(exports,null,function*(){const n=yield wt(),e={};if(typeof n!="number"||n<=0)ne.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken();else{const t=yield Kn();if(!e.token)return;t.length?t.includes(e.ukeyHid)||(ne.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),e.resetToken()):(ne.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken())}}),5e3,{trailing:!1});function zn(n=0){return f(this,null,function*(){return de?new Promise((e,t)=>{de.armGetDongleInfo(n).then(r=>{r?e(r):(ne.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(r))}).catch(r=>{t(r)})}):ne.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function Kn(){return f(this,null,function*(){if(!de)return ne.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const n=yield wt();let e=[];for(let t=0;t<n;t++){const r=yield zn(t);e.push(r)}return e})}_t(16);_t(16);const At=window.meta.app.inspect?ie.SM4.constants.CBC:ie.SM4.constants.ECB,{publicKey:ia,privateKey:oa}=ie.SM2.generateKeyPair();function $n(n,e,t={}){const r=yt(Et),a=t.mode||At;t=a===ie.SM4.constants.ECB?l({mode:a,inputEncoding:"utf8",outputEncoding:"hex"},t):l({iv:gt,mode:a,inputEncoding:"utf8",outputEncoding:"hex"},t);let s="";try{s=ie.SM4.encrypt(n,r,t)}catch(o){console.log("err: ",o)}return s}function Wn(n,e,t={}){const r=yt(Et),a=t.mode||At;return t=a===ie.SM4.constants.ECB?l({mode:a,inputEncoding:"hex",outputEncoding:"utf8"},t):l({iv:gt,mode:a,inputEncoding:"hex",outputEncoding:"utf8"},t),ie.SM4.decrypt(n,r,t)}function yt(n){return[...n].map(e=>e.charCodeAt().toString(16)).join("")}const fe=n=>{const{onClose:e,customClass:t}=n;return ne.ElMessage(v(l({},n),{center:!0,customClass:`sy-message ${t||""}`,onClose:a=>{e&&e(a)}}))};["success","warning","info","error"].forEach(n=>{fe[n]=e=>fe(typeof e=="string"?{type:n,message:e}:v(l({},e),{type:n}))});He.createPinia();function Ae(n){return n=mt&&be(n)?Wn(n):n,be(n)?JSON.parse(n):n}function Xe(n){return n=mt&&be(n)?$n(n):n,JSON.stringify(n)}function le(n,e,t,r){const a=new StorageEvent("storage",{url:window.location.href,key:n,oldValue:e,newValue:t,storageArea:r});window.dispatchEvent(a)}const Be={getLocal:n=>{try{const e=window.localStorage.getItem(n);return Ae(e)}catch(e){console.error(e)}},setLocal:(n,e)=>{try{const t=window.localStorage.getItem(n),r=Xe(e);window.localStorage.setItem(n,r),le(n,t,r,window.localStorage)}catch(t){console.error(t)}},eachLocal:n=>{if(!n||Re(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.localStorage.length;e<t;e++){const r=window.localStorage.key(e);n((void 0).getLocal(r),r)}},clearLocal:()=>{window.localStorage.clear(),le(null,null,null,window.localStorage)},removeLocal:n=>{const e=window.localStorage.getItem(n);window.localStorage.removeItem(n),le(n,e,null,window.localStorage)},getSession:n=>{try{const e=window.sessionStorage.getItem(n);return Ae(e)}catch(e){console.error(e)}},setSession:(n,e)=>{try{const t=window.sessionStorage.getItem(n),r=Xe(e);window.sessionStorage.setItem(n,r),le(n,t,r,window.sessionStorage)}catch(t){console.error(t)}},eachSession:n=>{if(!n||Re(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.sessionStorage.length;e<t;e++){const r=window.sessionStorage.key(e);n((void 0).getSession(r),r)}},clearSession:()=>{window.sessionStorage.clear(),le(null,null,null,window.sessionStorage)},removeSession:n=>{const e=window.sessionStorage.getItem(n);window.sessionStorage.removeItem(n),le(n,e,null,window.sessionStorage)},onStorageChange:n=>{if(!n||Re(n)!=="Function")return console.error("传递参数非函数类型!");const e=t=>{n({url:t.url,key:t.key,newValue:t.newValue?Ae(t.newValue):null,oldValue:t.oldValue?Ae(t.oldValue):null,storageArea:t.storageArea})};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},jn=(n,e)=>new Promise((t,r)=>{Y.postApi("/filehandle/save",{path:n,data:e}).then(a=>{a.res.success?t(!0):r(!1)})}),qn='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 512m-500.62222187 0a500.62222187 500.62222187 0 1 0 1001.24444374 0 500.62222187 500.62222187 0 1 0-1001.24444374 0Z" fill="#1afa29" p-id="1156"></path></svg>',Ye='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1657" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 512m-500.62222187 0a500.62222187 500.62222187 0 1 0 1001.24444374 0 500.62222187 500.62222187 0 1 0-1001.24444374 0Z" fill="#808080" p-id="1658"></path></svg>',Xn='<svg class="gis-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25776" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M377.083 125.44c74.606-135.314 195.292-135.314 269.897 0l346.332 629.394c74.606 135.315 9.508 245.395-145.189 245.395H175.94c-154.697 0-219.428-109.715-145.188-245.395L377.083 125.44z" fill="#FF2D16" p-id="25777"></path><path d="M567.986 328.046c0-31.086-25.234-55.955-55.954-55.955s-55.954 25.235-55.954 55.955v280.137c0 31.086 25.234 55.954 55.954 55.954s55.954-25.234 55.954-55.954V328.046z m-111.908 448h111.908v111.908H456.078z" fill="#FFFFFF" p-id="25778"></path></svg>',Yn={name:"局放测点",label:"局放测点",create:function(n,e){return f(this,null,function*(){const{transformControls:t}=e,r=document.createElement("div"),a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.style.position="relative",a.style.zIndex="1";const s=document.createElement("div");s.innerHTML=`
7
7
  <div style="display: flex; align-items: flex-end; gap: 10px; color: #FF716C;">
8
8
  <span class="gis-val-${n.valueEleId}" style="font-size: 24px;font-weight: 600;">
9
9
  ${n.value}
10
10
  </span>
11
11
  <span style="font-size: 14px;">dBm</span>
12
12
  </div>
13
- `;const a=document.createElement("div");a.style.width="1.3vw",a.style.height="1.3vw",a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center",a.style.cursor="pointer",a.style.pointerEvents="auto",a.style.userSelect="none",a.innerHTML=Ve;const l=document.createElement("style");l.innerHTML=`
13
+ `;const o=document.createElement("div");o.style.width="1.3vw",o.style.height="1.3vw",o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.cursor="pointer",o.style.pointerEvents="auto",o.style.userSelect="none",o.innerHTML=Ye;const d=document.createElement("style");d.innerHTML=`
14
14
  .gis-icon { width: 100%; height: 100%; display: block; }
15
- `,s.append(l,a,o),r.append(s);const c=document.createElement("div");Object.assign(c.style,{position:"absolute",top:"0",left:"1.8vw",display:"none",flexDirection:"column",gap:"10px",padding:"10px",borderRadius:"4px",border:"1px solid rgba(255, 255, 255, 0.2)",backdropFilter:"blur(12px)",background:"#24262933",minWidth:"12vw",zIndex:999,pointerEvents:"auto"}),n.valueEleId||(n.valueEleId=pe()),n.btnEleId||(n.btnEleId=pe()),c.innerHTML=`
16
- <div style="padding-bottom: 10px; font-size: 16px; color: #ffffff; border-bottom: 1px solid rgba(255, 113, 108, 0.5);white-space: nowrap;">${n.name}</div>
15
+ `,a.append(d,o,s),r.append(a);const c=document.createElement("div");Object.assign(c.style,{position:"absolute",top:"0",left:"1.8vw",display:"none",flexDirection:"column",gap:"10px",padding:"10px",borderRadius:"4px",border:"1px solid rgba(255, 255, 255, 0.2)",backdropFilter:"blur(12px)",background:"#24262933",minWidth:"12vw",zIndex:999,pointerEvents:"auto"}),n.valueEleId||(n.valueEleId=pe()),n.nameElId||(n.nameElId=pe()),n.btnEleId||(n.btnEleId=pe()),c.innerHTML=`
16
+ <div class="gis-name-${n.nameElId}" style="padding-bottom: 10px; font-size: 16px; color: #ffffff; border-bottom: 1px solid rgba(255, 113, 108, 0.5);white-space: nowrap;">${n.name}</div>
17
17
  <div style="font-size: 14px; color: #cae4ff;">幅值峰值</div>
18
18
  <div style="display: flex; justify-content: space-between">
19
19
  <div style="display: flex; align-items: flex-end; gap: 10px; color: #FF716C;">
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  <button type="primary" id="${n.btnEleId}" class="el-button el-button--primary">查看历史</button>
24
24
  </div>
25
- `,c.onmouseenter=()=>{a.isFocus=!0},c.onmouseleave=()=>{a.isFocus=!1,c.style.display="none",r.className=""};const h=new Xt.CSS2DObject(r);h.name=n.name,h.dataId=n.guid,h.userData.params=n,a.onmouseover=()=>{c.style.display="flex",r.className="top-info";const P=document.getElementById(n.btnEleId);P.onclick=()=>{fe.emit("three-event",{type:"pd-history-click",data:h})}},a.onmouseleave=()=>{setTimeout(()=>{a.isFocus||(c.style.display="none",r.className="")},500)},a.onclick=()=>{fe.emit("three-event",{type:"pd-sensor-click",data:h}),n.preview||setTimeout(()=>{t.attach(h)},100)},s.append(c);const A=P=>{P===0?a.innerHTML=Ve:P===1?a.innerHTML=Fn:P===2&&(a.innerHTML=Nn)},M=P=>{const N=document.getElementsByClassName(`gis-val-${n.valueEleId}`);if(N.length)for(let p=0;p<N.length;p++)N[p].innerText=P};return h.changeState=A,h.changeValue=M,setTimeout(()=>{A(n.state),M(n.value)},200),h})},getStorage:function(n){return n.userData.params}};var rt;T.config(k({driver:[T.INDEXEDDB,T.LOCALSTORAGE],name:"SGP7000",size:4980736,storeName:"keyvaluepairs",version:1,description:"SGP7000"},((rt=window.meta.storage)==null?void 0:rt.config)||{}));function Gn(){return{getKey:p=>m(this,null,function*(){return yield T.key(p)}),getKeys:()=>m(this,null,function*(){return yield T.keys()}),getItem:p=>m(this,null,function*(){if(p)return yield T.getItem(p)}),setItem:(p,W)=>m(this,null,function*(){if(p)return yield T.setItem(p,W)}),removeItem:p=>m(this,null,function*(){if(p)return yield T.removeItem(p)}),clearItems:()=>m(this,null,function*(){return yield T.clear()}),iterateItems:(p,W)=>m(this,null,function*(){if(p)return yield T.iterate(p,W)}),getReady:()=>m(this,null,function*(){return yield T.ready()}),getLength:()=>m(this,null,function*(){return yield T.length()}),getDriver:()=>m(this,null,function*(){return yield T.driver()}),setDriver:p=>m(this,null,function*(){if(p)return yield T.setDriver(p)}),setConfig:p=>m(this,null,function*(){if(p)return yield T.config(p)}),dropInstance:p=>m(this,null,function*(){if(p)return yield T.dropInstance(p)}),createInstance:p=>m(this,null,function*(){if(p)return yield T.createInstance(p)})}}const Vn="THREED_LOG_BUFFER",zn="THREED_CURRSCENE",Kn="THREED_ACTIVE_MENU",$n="THREED_PIXEL_RATIO",me="THREED_MODEL_DBNAME",ye="THREED_MODEL_DBSTORE",Wn="THREED_SCENE_PREVIEW",Ce="THREED_MODEL_LOAD_KEY",ae="THREED_PREVIEW_URL_KEY",qn="THREED_ADDON_EDITOR_JSON",jn="THREED_SCENE_STORAGE_SUFFIX",Re={step:.1},Xn=80,pt=30,Yn=1e3,Jn=1200,Qn=3e5,Zn="三维测试",er="灯光",tr=1,nr=["环境光","平行光","点光源","聚光灯","半球光","平面光"],_t=new Set(["syncStatus","disposeTargets","statusMaterials","syncPanelPlacement"]),rr=["AxesHelper","GridHelper","Box3Helper","PerspectiveCamera"],Et=new Set(["GridHelper","AxesHelper","CameraHelper","SpotLightHelper","PointLightHelper","TransformControls","HemisphereLightHelper","DirectionalLightHelper","TransformControlsPlane"]),At=new Set(["CSS2DObject","CSS3DObject"]),sr=Object.assign({"/src/views/threed/models/pd-sensor.js":Bn}),ir=Object.assign({}),ar={环境光:()=>new F.THREE.AmbientLight(16777215,1),平行光:()=>new F.THREE.DirectionalLight(16777215,1),点光源:()=>new F.THREE.PointLight(16777215,1,0,0),聚光灯:()=>new F.THREE.SpotLight(16777215,1,0,Math.PI/6,0,0),半球光:()=>new F.THREE.HemisphereLight(16777215,0,1),平面光:()=>new F.THREE.RectAreaLight(16777215,1,100,100)},or=[{name:"荧光流动",commonUniforms:!0,vertex:"vUv-material",fragment:`
25
+ `,c.onmouseenter=()=>{o.isFocus=!0},c.onmouseleave=()=>{o.isFocus=!1,c.style.display="none",r.className=""};const p=new rn.CSS2DObject(r);p.name=n.name,p.dataId=n.guid,p.userData.params=n,o.onmouseover=()=>{c.style.display="flex",r.className="top-info";const D=document.getElementById(n.btnEleId);D.onclick=()=>{Ie.emit("three-event",{type:"pd-history-click",data:p})}},o.onmouseleave=()=>{setTimeout(()=>{o.isFocus||(c.style.display="none",r.className="")},500)},o.onclick=()=>{Ie.emit("three-event",{type:"pd-sensor-click",data:p}),n.preview||setTimeout(()=>{t.attach(p)},100)},a.append(c);const A=D=>{D===0?o.innerHTML=Ye:D===1?o.innerHTML=qn:D===2&&(o.innerHTML=Xn)},B=D=>{const g=document.getElementsByClassName(`gis-val-${n.valueEleId}`);if(g.length)for(let N=0;N<g.length;N++)g[N].innerText=D},j=D=>{const g=document.getElementsByClassName(`gis-name-${n.nameElId}`);if(g.length)for(let N=0;N<g.length;N++)g[N].innerText=D};return p.changeState=A,p.changeValue=B,p.changeName=j,setTimeout(()=>{A(n.state),B(n.value),j(n.name)},200),p})},getStorage:function(n){return n.userData.params}};var ut;k.config(l({driver:[k.INDEXEDDB,k.LOCALSTORAGE],name:"SGP7000",size:4980736,storeName:"keyvaluepairs",version:1,description:"SGP7000"},((ut=window.meta.storage)==null?void 0:ut.config)||{}));function Jn(){return{getKey:g=>f(this,null,function*(){return yield k.key(g)}),getKeys:()=>f(this,null,function*(){return yield k.keys()}),getItem:g=>f(this,null,function*(){if(g)return yield k.getItem(g)}),setItem:(g,N)=>f(this,null,function*(){if(g)return yield k.setItem(g,N)}),removeItem:g=>f(this,null,function*(){if(g)return yield k.removeItem(g)}),clearItems:()=>f(this,null,function*(){return yield k.clear()}),iterateItems:(g,N)=>f(this,null,function*(){if(g)return yield k.iterate(g,N)}),getReady:()=>f(this,null,function*(){return yield k.ready()}),getLength:()=>f(this,null,function*(){return yield k.length()}),getDriver:()=>f(this,null,function*(){return yield k.driver()}),setDriver:g=>f(this,null,function*(){if(g)return yield k.setDriver(g)}),setConfig:g=>f(this,null,function*(){if(g)return yield k.config(g)}),dropInstance:g=>f(this,null,function*(){if(g)return yield k.dropInstance(g)}),createInstance:g=>f(this,null,function*(){if(g)return yield k.createInstance(g)})}}const Qn="THREED_LOG_BUFFER",Zn="THREED_CURRSCENE",er="THREED_ACTIVE_MENU",tr="THREED_PIXEL_RATIO",ye="THREED_MODEL_DBNAME",Pe="THREED_MODEL_DBSTORE",nr="THREED_SCENE_PREVIEW",Le="THREED_MODEL_LOAD_KEY",he="THREED_PREVIEW_URL_KEY",rr="THREED_ADDON_EDITOR_JSON",ar="THREED_SCENE_STORAGE_SUFFIX",Me={step:.1},ir=80,It=30,or=1e3,sr=1200,lr=3e5,cr="三维测试",dr="灯光",ur=1,hr=["环境光","平行光","点光源","聚光灯","半球光","平面光"],St=new Set(["syncStatus","disposeTargets","statusMaterials","syncPanelPlacement"]),mr=["AxesHelper","GridHelper","Box3Helper","PerspectiveCamera"],Ct=new Set(["GridHelper","AxesHelper","CameraHelper","SpotLightHelper","PointLightHelper","TransformControls","HemisphereLightHelper","DirectionalLightHelper","TransformControlsPlane"]),vt=new Set(["CSS2DObject","CSS3DObject"]),pr=Object.assign({"/src/views/threed/models/pd-sensor.js":Yn}),fr=Object.assign({}),gr={环境光:()=>new z.THREE.AmbientLight(16777215,1),平行光:()=>new z.THREE.DirectionalLight(16777215,1),点光源:()=>new z.THREE.PointLight(16777215,1,0,0),聚光灯:()=>new z.THREE.SpotLight(16777215,1,0,Math.PI/6,0,0),半球光:()=>new z.THREE.HemisphereLight(16777215,0,1),平面光:()=>new z.THREE.RectAreaLight(16777215,1,100,100)},Er=[{name:"荧光流动",commonUniforms:!0,vertex:"vUv-material",fragment:`
26
26
  vec4 o = gl_FragColor.rgba;
27
27
  vec2 u = gl_FragCoord.xy;
28
28
  vec2 v = iResolution.xy;
@@ -60,4 +60,4 @@
60
60
  uv *= 2.0 * ( cos(iTime * 2.0) -2.5);
61
61
  float anim = sin(iTime * 12.0) * 0.1 + 1.0;
62
62
  vec3 col = cheap_star(uv, anim) * vec3(0.35,0.2,0.15);
63
- `,key:"col",commonFinish:!0,render:"iTime+speed"}];let ie=null,V=null,Se=[];const ze=n=>(n==null?void 0:n.name)||(n==null?void 0:n.label)||"",gt=(n={})=>Object.values(n).filter(e=>e&&(e.label||e.name)),cr=gt(sr),lr=gt(ir),ur=()=>({THREED_GUI_PARAMS:Re,THREED_LOG_BUFFER:Vn,THREED_CURRSCENE:zn,THREED_ACTIVE_MENU:Kn,THREED_PIXEL_RATIO:$n,THREED_IMPORT_SIZE:Xn,THREED_LIGHT_TYPES:nr,THREED_EXPORT_BATCH:pt,THREED_RELOAD_DELAY:Yn,THREED_MODEL_DBNAME:me,THREED_MODEL_DBSTORE:ye,THREED_SCENE_PREVIEW:Wn,THREED_USER_DATA_KEYS:_t,THREED_MODEL_LOAD_KEY:Ce,THREED_PREVIEW_URL_KEY:ae,THREED_ADDON_EDITOR_JSON:qn,THREED_EXPORT_NODE_COUNT:Jn,THREED_DEFAULT_SCENE_NAME:Zn,THREED_DEFAULT_ACTIVE_MENU:er,THREED_DEFAULT_PIXEL_RATIO:tr,THREED_EXPORT_VERTEX_COUNT:Qn,THREED_SCENE_EXCLUDE_TYPES:rr,THREED_EXPORT_EXCLUDE_TYPES:Et,THREED_EXPORT_RUNTIME_TYPES:At,THREED_SCENE_STORAGE_SUFFIX:jn});function dr(){const{createInstance:n,dropInstance:e}=Gn(),t="/",r=i=>{const u=URL.createObjectURL(i);return Se.push(u),u},s=()=>{Se.forEach(i=>URL.revokeObjectURL(i)),Se=[]},o=()=>m(this,null,function*(){return yield c(),{clearRequest:a,getAllRequest:p,getRequest:N,status:!0,message:"数据库打开成功",DATABASE:V}}),a=i=>m(this,null,function*(){if(!i)return{status:!1,message:"删除失败"};yield c(),yield V.removeItem(i);const u=yield P();return u.list=u.list.filter(d=>d.name!==i),{status:!0,message:"删除成功"}}),l=(...u)=>m(this,[...u],function*(i=me){V=null,ie=null,yield e({name:i,storeName:ye})}),c=()=>m(this,null,function*(){return V||(ie||(ie=n({name:me,storeName:ye}).then(i=>(V=i,i))),yield ie)}),h=i=>{if(!i)return!1;const u=String(i.message||"");return i.name==="DataError"||u.includes("in-line keys")},A=()=>m(this,null,function*(){V=null,ie=null,yield e({name:me}),yield c()});let M=null;const P=()=>m(this,null,function*(){return window.threeEditorDB?window.threeEditorDB:(M||(M=m(this,null,function*(){const i=yield o(),{data:u}=yield i.getAllRequest();return window.threeEditorDB={db:i,list:u},window.threeEditorDB})),yield M)}),N=i=>m(this,null,function*(){if(!i)return{status:!1,message:"获取失败"};yield c();const u=yield V.getItem(i);if(u!=null&&u.blob&&!i)return{status:!0,message:"获取成功",url:r(u.blob)};if(!i)return{status:!1,message:"获取失败"};const d=yield fetch(i).then(v=>v.blob()),f={blob:d};try{yield V.setItem(i,f)}catch(v){if(!h(v))throw v;yield A(),yield V.setItem(i,f)}const S=yield P(),G=k({name:i},f),D=S.list.findIndex(v=>v.name===i);return D>-1?S.list.splice(D,1,G):S.list.push(G),{status:!0,message:"文件缓存成功",url:r(d)}}),p=()=>m(this,null,function*(){yield c();const i=[];return V&&(yield V.iterate((u,d)=>{i.push(le(k({},u||{}),{name:d}))})),window.threeEditorDB&&(window.threeEditorDB.list=i),{status:!0,message:"获取成功",data:i}}),W=()=>m(this,null,function*(){var d;const{res:i}=yield $.getApi("/filehandle/scan",{path:ot.threeModelPath,extension:"glb,gltf"}),u=[];if(((d=i==null?void 0:i.children)==null?void 0:d.length)>0)for(const f of i.children)u.push({name:f.name,path:"/"+f.path});return u}),ee=()=>window.GUI_PARAMS||Re,te=()=>window.threeEditor||null,_=()=>window.editorJsons||[],g=()=>({width:window.innerWidth||0,height:window.innerHeight||0}),C=()=>cr,I=()=>ar||{},L=()=>window[ae]||"",z=()=>lr,y=()=>window.devicePixelRatio||1,E=()=>window[ae]||"",b=()=>{const i=C(),u=z();return{modelDesigns:i,componentDesigns:u,modelList:i.map(d=>d.label),componentList:u.map(d=>d.label)}},B=(i,u)=>{var d;return(d=i==null?void 0:i.__DESIGNS__)==null?void 0:d.find(f=>f.label===u)},O=(i=0)=>!Number.isFinite(i)||i<=0?"0 B":i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:i<1024*1024*1024?`${(i/1024/1024).toFixed(1)} MB`:`${(i/1024/1024/1024).toFixed(2)} GB`,J=i=>{const u=window[Ce];typeof u=="function"&&u(i)},R=i=>!!i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z),H=i=>{var u,d;return!i||!i.visible||(u=i.userData)!=null&&u.excludeFromExport||i.isTransformControls||i.isHelper||i.isLight||i.isPoints||(d=i.type)!=null&&d.includes("Helper")||Et.has(i.type)||At.has(i.type)||i.isCSS2DObject||i.isCSS3DObject?!1:i.isMesh||i.isGroup||i.isObject3D||i.isLine},K=(i,u)=>i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z)?i:u,q=i=>i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z)&&Number.isFinite(i.w)?i:{x:0,y:0,z:0,w:1},U=i=>{if(!(i!=null&&i.isObject3D))return;const u=K(i.position,{x:0,y:0,z:0});i.position.set(u.x,u.y,u.z);const d=K(i.scale,{x:1,y:1,z:1});i.scale.set(d.x===0?1:d.x,d.y===0?1:d.y,d.z===0?1:d.z);const f=K(i.up,{x:0,y:1,z:0});i.up.set(f.x,f.y,f.z);const S=q(i.quaternion);i.quaternion.set(S.x,S.y,S.z,S.w),i.pivot&&!R(i.pivot)&&delete i.pivot,i.updateMatrix(),i.updateMatrixWorld(!1)},Dt=(i,u="_blank")=>window.open(i,u),xt=(i,u="")=>window.prompt(i,u),vt=()=>window.location.reload(),Tt=()=>document.documentElement.classList.remove("dark"),Pt=i=>{if(!Array.isArray(i==null?void 0:i.__DESIGNS__))return b();const u=[...C(),...z()],d=new Set(i.__DESIGNS__.map(f=>ze(f)));return u.forEach(f=>{const S=ze(f);!S||d.has(S)||(d.add(S),i.__DESIGNS__.unshift(f))}),b()},bt=i=>{if(!Array.isArray(i==null?void 0:i.__GLSLLIB__))return;const u=new Set(i.__GLSLLIB__.map(d=>d==null?void 0:d.name));or.forEach(d=>{u.has(d.name)||(u.add(d.name),i.__GLSLLIB__.push(d))})},Ee=(i={})=>{const u={};return Object.entries(i||{}).forEach(([d,f])=>{if(!(_t.has(d)||typeof f=="function")){if(!f||["string","number","boolean"].includes(typeof f)){u[d]=f;return}if(Array.isArray(f)){try{u[d]=structuredClone(f)}catch(S){return}return}if(!(f.isObject3D||f.isMaterial||f.isTexture||f.nodeType))try{u[d]=structuredClone(f)}catch(S){return}}}),u},Lt=(i=Re)=>{window.GUI_PARAMS=i},Mt=i=>{window.threeEditor=i},Ot=i=>{window.threeEditorDB=i},Ht=i=>{window[Ce]=i},Ut=(i="")=>{window[ae]=i},kt=(i="")=>{window[ae]=i},Me=i=>{var d;const u=[];return(d=i==null?void 0:i.children)==null||d.forEach(f=>{H(f)&&u.push(f)}),u},Oe=(i=[])=>{const u={rootCount:i.length,nodeCount:0,meshCount:0,vertexCount:0,skippedCount:0};return i.forEach(d=>{d.traverse(f=>{var S,G,D;if(H(f)){u.nodeCount+=1,f.isMesh&&(u.meshCount+=1,u.vertexCount+=((D=(G=(S=f.geometry)==null?void 0:S.attributes)==null?void 0:G.position)==null?void 0:D.count)||0);return}f!==d&&(u.skippedCount+=1)})}),u},He=()=>new Promise(i=>requestAnimationFrame(()=>setTimeout(i,0))),Ue=()=>new Promise(i=>{if(typeof window.requestIdleCallback=="function"){window.requestIdleCallback(()=>i(),{timeout:80});return}setTimeout(i,0)}),Ft=(i,u)=>m(this,null,function*(){var S;if(!H(i))return null;const d=i.clone(!1);d.userData=Ee(i.userData),R(i.pivot)?d.pivot=new F.THREE.Vector3(i.pivot.x,i.pivot.y,i.pivot.z):"pivot"in d&&delete d.pivot,U(d);const f=[{source:i,clone:d}];for(;f.length;){const G=f.shift();for(const D of G.source.children){if(!H(D)){u.skippedCount+=1;continue}const v=D.clone(!1);v.userData=Ee(D.userData),R(D.pivot)?v.pivot=new F.THREE.Vector3(D.pivot.x,D.pivot.y,D.pivot.z):"pivot"in v&&delete v.pivot,U(v),G.clone.add(v),f.push({source:D,clone:v}),u.processedCount+=1,u.processedCount%pt===0&&(yield(S=u.onProgress)==null?void 0:S.call(u,{processedCount:u.processedCount,totalCount:u.totalCount,skippedCount:u.skippedCount,progress:18+Math.min(u.processedCount/Math.max(u.totalCount,1)*54,54)}),yield He())}}return d});return{baseUrl:t,getModels:W,getRequest:N,reloadPage:vt,promptInput:xt,waitForIdle:Ue,waitForPaint:He,clearRequest:a,getGuiParams:ee,setGuiParams:Lt,getAllRequest:p,getEditorJsons:_,getThreeEditor:te,formatFileSize:O,setThreeEditor:Mt,removeDarkClass:Tt,openExternalUrl:Dt,getThreedModels:C,getViewportSize:g,buildExportScene:(d,...f)=>m(this,[d,...f],function*(i,u={}){const S=Me(i),G=Oe(S),D=new F.THREE.Scene,v={totalCount:G.nodeCount,processedCount:0,skippedCount:0,onProgress:u.onProgress};for(const Nt of S){const ke=yield Ft(Nt,v);ke&&D.add(ke),yield Ue()}return D.updateMatrixWorld(!0),G.skippedCount+=v.skippedCount,{exportScene:D,exportObjects:S,stats:G}}),createModelDbApi:o,getEditorPreviewSceneUrl:E,sanitizeUserData:Ee,setThreeEditorDB:Ot,findThreedDesign:B,getThreedLightMap:I,collectExportStats:Oe,getPreviewSceneUrl:L,setEditorPreviewSceneUrl:kt,setPreviewSceneUrl:Ut,setModelLoadHander:Ht,isExportableObject:H,deleteThreeEditorDB:l,ensureThreeEditorDB:P,getDevicePixelRatio:y,getThreedComponents:z,collectExportObjects:Me,resetModelDbInstance:A,ensureModelDbInstance:c,getLocalDesignMenuData:b,invokeModelLoadHandler:J,isLegacyInlineKeyError:h,ensureThreedShaderLibrary:bt,ensureThreedDesignRegistry:Pt,createBlobUrl:r,revokeModelObjectUrls:s}}const{THREED_LOG_BUFFER:wt,THREED_CURRSCENE:De,THREED_ACTIVE_MENU:St,THREED_PIXEL_RATIO:It,THREED_SCENE_PREVIEW:yt,THREED_ADDON_EDITOR_JSON:xe,THREED_DEFAULT_SCENE_NAME:hr,THREED_DEFAULT_ACTIVE_MENU:ve,THREED_DEFAULT_PIXEL_RATIO:Te,THREED_SCENE_STORAGE_SUFFIX:mr}=ur(),X=(n,e)=>{const t=Le.getLocal(n);return t==null?e:t},j=(n,e)=>{n&&Le.setLocal(n,e)},fr=n=>{n&&Le.removeLocal(n)},pr=(n,e)=>{var r,s;const t=(r=n==null?void 0:n.trim)==null?void 0:r.call(n);return t&&e.some(o=>o.name===t)?t:((s=e[0])==null?void 0:s.name)||hr},Pe=(n=[])=>Array.isArray(n)?n.filter(e=>typeof e=="string"&&e):[],_r=()=>{const n=[],e=X(De,{name:"",path:""}),t=Number.parseFloat(X(It,Te));return{taskState:{busy:!1,type:"",title:"",message:"",description:"",progress:0},currScene:e,sceneList:n,previewScene:!!X(yt,!1),activeMenuTitle:X(St,ve)||ve,pixelRatio:Number.isFinite(t)&&t>0?t:Te,logarithmicDepthBuffer:X(wt,!0)!==!1,addonEditorJson:Pe(X(xe,[]))}},Ct=be.defineStore("threed",{state:()=>_r(),actions:{getSceneList(n){return m(this,null,function*(){var t;const e=yield $.getCommonApi("threedfloorplan",{limit:1e4,ordering:"-create_time"});if((t=e==null?void 0:e.data)!=null&&t.length){if(this.sceneList=e.data,n){const r=this.sceneList.find(s=>s.org_id===n);r?this.setCurrScene(r):this.setCurrScene({name:"",path:""});return}this.currScene.path?this.sceneList.find(s=>s.id===this.currScene.id)||this.setCurrScene({name:"",path:""}):this.setCurrScene(this.sceneList[0])}else this.sceneList=[],this.setCurrScene({name:"",path:""})})},setSceneList(n){this.sceneList=n},setSceneName(n){this.sceneName=pr(n,this.sceneList),j(De,this.sceneName)},createScene(n,e=""){return m(this,null,function*(){var l,c,h;const t=(c=(l=n.name)==null?void 0:l.trim)==null?void 0:c.call(l);if(!t||this.sceneList.some(A=>A.name===t))return!1;const r=ot.threeSavePath+"/"+pe()+".json",s=pe();if(!(yield $.postCommonApi("query/threedfloorplan/create",{data:[{name:t,path:r,guid:s,org_id:n.org_id,org_name:n.org_name}]})).success)return!1;if(yield kn(r,e)){const A=yield $.postCommonApi("threedfloorplan",{guid:s});if((h=A==null?void 0:A.data)!=null&&h.length)return this.sceneList=[...this.sceneList,A.data[0]],A.data[0]}return!0})},deleteScene(n){return m(this,null,function*(){var r;if(!n)return;if(!(yield $.postCommonApi("query/threedfloorplan/delete",{data:[n]})).success)return!1;const t=this.sceneList.findIndex(s=>s.id===n);return t===-1?!1:(this.sceneList.splice(t,1),((r=this.currScene)==null?void 0:r.id)===n&&this.setCurrScene(this.sceneList[0]||{name:"",path:""}),!0)})},setCurrScene(n){return m(this,null,function*(){this.currScene=n,j(De,this.currScene)})},setPreviewMode(n){this.previewScene=!!n,j(yt,this.previewScene)},setActiveMenuTitle(n){this.activeMenuTitle=n||ve,j(St,this.activeMenuTitle)},setPixelRatio(n){const e=Number.parseFloat(n);this.pixelRatio=Number.isFinite(e)&&e>0?e:Te,j(It,this.pixelRatio)},setLogarithmicDepthBuffer(n){this.logarithmicDepthBuffer=!!n,j(wt,this.logarithmicDepthBuffer)},getSceneStorageKey(n){return`${n||this.sceneName}${mr}`},getSceneStorageParams(n,e=null){return X(this.getSceneStorageKey(n),e)},setSceneStorageParams(n,e){n&&j(this.getSceneStorageKey(n),e)},removeSceneStorageParams(n){n&&fr(this.getSceneStorageKey(n))},resetTaskState(){return m(this,null,function*(){yield new Promise(n=>setTimeout(n,120)),this.taskState={busy:!1,type:"",title:"",message:"",description:"",progress:0}})},getAddonEditorJson(){return this.addonEditorJson=Pe(X(xe,this.addonEditorJson)),this.addonEditorJson},setAddonEditorJson(n){this.addonEditorJson=Pe(n),j(xe,this.addonEditorJson)}}}),Er={backgroundBlurriness:0,backgroundIntensity:1,backgroundUrls:null,environmentEnabled:!1},Ar={fov:50,near:.1,far:1e5,zoom:1,layers:{mask:1},filmOffset:0,filmGauge:35,position:{x:247.72931803058157,y:715.3890430349733,z:789.6794984861216}},gr={outputColorSpace:"srgb",toneMapping:0,toneMappingExposure:1,shadowMap:{enabled:!1,type:1},color:0,opacity:0,sortObjects:!0,localClippingEnabled:!1,autoClear:!0,autoClearColor:!0,renderListCompare:[{name:"stats",enabled:!0},{name:"controls",enabled:!0},{name:"scene",enabled:!0},{name:"css3DRender",enabled:!0},{name:"css2DRender",enabled:!0}]},wr={autoRotate:!1,autoRotateSpeed:2,enableDamping:!0,dampingFactor:.05,minDistance:.01,maxDistance:1e6,maxAzimuthAngle:null,minAzimuthAngle:null,maxPolarAngle:3.141592653589793,minPolarAngle:0,maxTargetRadius:null,minTargetRadius:0,enablePan:!0,panSpeed:1,enableRotate:!0,rotateSpeed:1,enableZoom:!0,zoomSpeed:1,zoomToCursor:!1,target:{x:-38.59603927643809,y:-48.97202695679889,z:-49.19814250541991}},Sr={mode:"translate",space:"world",size:1,showX:!0,showY:!0,showZ:!0,translationSnap:null,rotationSnap:null,scaleSnap:null},Ir={renderWay:"effectComposer",fxaaPass:{enabled:!0,order:60,multPixel:1},outlinePass:{enabled:!0,order:40,edgeStrength:3,edgeGlow:0,edgeThickness:1,pulsePeriod:0,usePatternTexture:!1,visibleEdgeColor:16449071,hiddenEdgeColor:16449071,overlayMaterial:{blending:5,blendEquation:100,blendSrc:201,blendDst:205}},outputPass:{enabled:!0,order:50},saoPass:{enabled:!1,order:10,saoBias:.5,saoIntensity:.01,saoScale:100,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},screenMaskPass:{enabled:!1,order:70,intensity:1,maskColor:16777215,R:.2,sr:1.2},ssrPass:{enabled:!1,order:30,maxDistance:.01,distanceAttenuation:!0,opacity:.5,thickness:.018,fresnel:!0,infiniteThick:!1,bouncing:!1},unrealBloomPass:{enabled:!1,order:20,strength:1.5,radius:.4,threshold:.85}},yr={mode:"transform",openKeyEnable:!0,rightClickMenusEnable:!0,selectChildEnabled:!1,selectChildLevel:1,stats:{showStats:!1,statsMode:0},helpers:{axes:{showAxes:!0,axesLength:1e3},grid:{showGrid:!0,size:1e3,divisions:15,colorCenterLine:4473924,colorGrid:8947848},box3:{useBox3:!0,color:16776960}}},Cr=[],Rr=[],Dr=[],xr=[],vr=[],Tr=[],Pr={},br=[],Lr={viewAngleList:[],clipping:{size:20,clipList:[]}},Mr={scene:Er,perspectiveCamera:Ar,webglRenderer:gr,orbitControls:wr,transformControls:Sr,effectComposer:Ir,handler:yr,lightCores:Cr,innerCores:Rr,modelCores:Dr,drawCores:xr,textCores:vr,particleCores:Tr,geoCores:Pr,designCores:br,other:Lr},Rt=(n,e)=>{const t=n.__vccOpts||n;for(const[r,s]of e)t[r]=s;return t},Or=Object.assign({name:"ThreedEditor"},{__name:"editor",props:{data:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1}},emits:["emit-three-editor","graph-event"],setup(n,{expose:e,emit:t}){var z;const r=t,s=n,o=Ct(),{currScene:a}=be.storeToRefs(o),l=((z=window.meta.threed)==null?void 0:z.draco_path)||it;F.ThreeEditor.dracoPath=l.endsWith("/")?l:`${l}/`;let c=null,h=null,A=!1;const M=x.ref(null),{setGuiParams:P,getDevicePixelRatio:N,ensureThreeEditorDB:p,createBlobUrl:W,revokeModelObjectUrls:ee,ensureThreedDesignRegistry:te}=dr();te(F.ThreeEditor),P({step:.1});const _=()=>{var y;return(y=c==null?void 0:c.renderSceneResize)==null?void 0:y.call(c)},g=()=>m(this,null,function*(){var E,b;if(A)return;let y=Mr;try{if(s.data&&Object.keys(s.data).length)y=s.data;else if((E=a.value)!=null&&E.path){const O=yield $.getApi((b=a.value)==null?void 0:b.path).catch(()=>({}));if(A)return;O.res&&(y=O.res)}const B=yield C(y);if(A)return;c?c.resetEditorStorage(B):c=new F.ThreeEditor(M.value,{fps:null,pixelRatio:N()*o.pixelRatio,webglRenderParams:{antialias:!0,alpha:!0},sceneParams:B})}catch(B){console.error("三维图纸初始化失败",B),c==null||c.resetEditorStorage(y)}finally{I()}r("emit-three-editor",c),window.addEventListener("resize",_)}),C=y=>m(this,null,function*(){var J;const E=structuredClone(y||{});if((J=E.designCores)==null||J.forEach(R=>{R.preview=s.preview}),s.preview){E.handler.mode="none",E.handler.helpers.axes.showAxes=!1,E.handler.helpers.box3.useBox3=!1,E.handler.helpers.grid.showGrid=!1,E.handler.rightClickMenusEnable=!1;const{perspectiveCamera:R,orbitControls:H}=E,K=R==null?void 0:R.position,q=H==null?void 0:H.target;if(K&&q){const U=Math.hypot(K.x-q.x,K.y-q.y,K.z-q.z);Number.isFinite(U)&&U>0&&(H.maxDistance=U*(5/3))}}const b=yield p(),B=b.list||[],O=[];for(const R of E.modelCores||[]){const H=R.modelInfo.originPath;if(H){const K=B.find(U=>U.name===H);if(!K){const U=yield b.db.getRequest(H);U!=null&&U.url&&(R.modelInfo.url=U.url),O.push(R);continue}const q=W(K.blob);R.modelInfo.url=q}O.push(R)}return E.modelCores=O,E}),I=()=>{c!=null&&c.renderer&&(h=new F.THREE.PMREMGenerator(c.renderer),h.compileEquirectangularShader(),c.scene.environment=h.fromScene(new Yt.RoomEnvironment).texture)},L=()=>c;return x.watch([()=>a.value.path,()=>s.data],([y,E])=>{console.log("watch",y,E),g()},{deep:!0}),x.onMounted(()=>m(this,null,function*(){var y,E;A=!1,(y=M.value)!=null&&y.clientHeight&&((E=M.value)!=null&&E.clientWidth)&&g()})),x.onUnmounted(()=>{A=!0,window.removeEventListener("resize",_),c==null||c.destroySceneRender(),h==null||h.dispose(),ee()}),e({getEditorInstance:L}),(y,E)=>(x.openBlock(),x.createElementBlock("div",{ref_key:"editorRef",ref:M,class:"threed-editor",onDragover:E[0]||(E[0]=x.withModifiers(()=>{},["prevent"])),onDrop:E[1]||(E[1]=x.withModifiers(()=>{},["prevent"]))},null,544))}}),Hr=Rt(Or,[["__scopeId","data-v-939f3c22"]]),Ur={class:"threed-preview"},kr=Object.assign({name:"ThreedPreview"},{__name:"preview",props:{data:{type:Object,default:null},url:{type:String,default:""},id:{type:String,default:""},token:{type:String,default:""},socketUrl:{type:String,default:""}},emits:["loaded","graph-event"],setup(n,{expose:e,emit:t}){const r=n,s=t;let o=x.shallowRef({});const a=x.ref(),l=Ct();let c={},h=null,A=null;const M=_=>{var C,I,L;if(!_)return;if((C=_==null?void 0:_.includes)!=null&&C.call(_,"token 必传"))return oe({message:_,type:"warning"});const g=typeof _=="string"?JSON.parse(_):_;if((g==null?void 0:g.data)==="服务错误"||(L=(I=g==null?void 0:g.data)==null?void 0:I.includes)!=null&&L.call(I,"token is expired"))return oe({message:g.data,type:"warning"});switch(g.action){case Ne.ACPOINT.YCVALUE:case Ne.ACPOINT.YXVALUE:console.warn("遥测信息");break}},P=()=>{try{A=new yn({socketUrl:r.socketUrl,token:r.token,onMessage:M})}catch(_){console.warn("三维场景消息处理失败",_)}},N=()=>m(this,null,function*(){var _;if(c){const g=Object.keys(c);if(g.length){const C=yield $.postPDApi("querychannelstatus/",{data:g.map(I=>({ied_id:I,ln_list:c[I].map(L=>L.ln_id)}))});(_=C==null?void 0:C.data)!=null&&_.length&&g.forEach(I=>{const L=C.data.find(y=>y.ied_id===I),z=c[I];z!=null&&z.length&&z.forEach(y=>{const E=L.result.find(b=>b.ln_id===y.ln_id);if(E){const b=te();if(!(b!=null&&b.scene))return;const B=b.scene.getObjectsByProperty("dataId",y.guid);let O=B==null?void 0:B[0];if(O){const J=E.status==="告警"?2:E.status==="正常"?1:0;O.userData.params.state=J;const R=Rn(E.amp_peak)?Dn(Number(E.amp_peak))?Number(E.amp_peak):0:E.amp_peak;O.userData.params.value=R,O.changeState(J),O.changeValue(R)}}})})}}}),p=_=>{s("graph-event",_)},W=_=>{_&&(r.socketUrl&&P(),setTimeout(()=>{const g=_.scene.getObjectsByProperty("designType","局放测点");g.forEach(C=>{const{ied_id:I,ln_id:L}=C.userData.params;c[I]||(c[I]=[]),c[I].push({guid:C.dataId,id:C.uuid,ied_id:I,ln_id:L})}),g!=null&&g.length&&(h&&clearInterval(h),N(),h=setInterval(()=>{N()},2e3)),s("loaded",_)},100))},ee=()=>m(this,null,function*(){if(o.value&&Object.keys(o.value).length)return;const _=xn(),g=r.url||_.url;if(g){const L=yield $.getApi(g).catch(()=>({}));L.res&&(o.value=L.res);return}if(!(r.id||_.id)){console.warn("三维场景渲染失败,场景id为空!");return}const I=yield $.getCommonApi("threedfloorplan",{guid:r.id});I.data.length?l.setCurrScene(I.data[0]):console.warn("三维场景渲染失败,场景id为:"+r.id+"不存在!")}),te=()=>a.value?a.value.getEditorInstance():null;return x.watch(()=>r.data,_=>{_&&(o.value=_,ee())},{deep:!0,immediate:!0}),x.watch(()=>r.id,_=>{_&&ee()},{deep:!0,immediate:!0}),x.onMounted(()=>{fe.on("three-event",p)}),x.onUnmounted(()=>{A&&A.destroy(),h&&clearInterval(h),fe.off("three-event",p)}),e({getEditorInstance:te}),(_,g)=>(x.openBlock(),x.createElementBlock("div",Ur,[x.createVNode(Hr,{ref_key:"threedEditorRef",ref:a,data:x.unref(o),preview:"",onGraphEvent:p,onEmitThreeEditor:W},null,8,["data"])]))}}),ce=Rt(kr,[["__scopeId","data-v-fbc5634a"]]);ce.name||(ce.name="SyThree");const Fr=n=>{n.component(ce.name||"SyThree",ce)},Nr={install:Fr};exports.SyThree=ce;exports.default=Nr;
63
+ `,key:"col",commonFinish:!0,render:"iTime+speed"}];let ue=null,W=null,De=[];const Je=n=>(n==null?void 0:n.name)||(n==null?void 0:n.label)||"",xt=(n={})=>Object.values(n).filter(e=>e&&(e.label||e.name)),_r=xt(pr),wr=xt(fr),Ar=()=>({THREED_GUI_PARAMS:Me,THREED_LOG_BUFFER:Qn,THREED_CURRSCENE:Zn,THREED_ACTIVE_MENU:er,THREED_PIXEL_RATIO:tr,THREED_IMPORT_SIZE:ir,THREED_LIGHT_TYPES:hr,THREED_EXPORT_BATCH:It,THREED_RELOAD_DELAY:or,THREED_MODEL_DBNAME:ye,THREED_MODEL_DBSTORE:Pe,THREED_SCENE_PREVIEW:nr,THREED_USER_DATA_KEYS:St,THREED_MODEL_LOAD_KEY:Le,THREED_PREVIEW_URL_KEY:he,THREED_ADDON_EDITOR_JSON:rr,THREED_EXPORT_NODE_COUNT:sr,THREED_DEFAULT_SCENE_NAME:cr,THREED_DEFAULT_ACTIVE_MENU:dr,THREED_DEFAULT_PIXEL_RATIO:ur,THREED_EXPORT_VERTEX_COUNT:lr,THREED_SCENE_EXCLUDE_TYPES:mr,THREED_EXPORT_EXCLUDE_TYPES:Ct,THREED_EXPORT_RUNTIME_TYPES:vt,THREED_SCENE_STORAGE_SUFFIX:ar});function yr(){const{createInstance:n,dropInstance:e}=Jn(),t="/",r=i=>{const u=URL.createObjectURL(i);return De.push(u),u},a=()=>{De.forEach(i=>URL.revokeObjectURL(i)),De=[]},s=()=>f(this,null,function*(){return yield c(),{clearRequest:o,getAllRequest:g,getRequest:D,status:!0,message:"数据库打开成功",DATABASE:W}}),o=i=>f(this,null,function*(){if(!i)return{status:!1,message:"删除失败"};yield c(),yield W.removeItem(i);const u=yield j();return u.list=u.list.filter(m=>m.name!==i),{status:!0,message:"删除成功"}}),d=(...u)=>f(this,[...u],function*(i=ye){W=null,ue=null,yield e({name:i,storeName:Pe})}),c=()=>f(this,null,function*(){return W||(ue||(ue=n({name:ye,storeName:Pe}).then(i=>(W=i,i))),yield ue)}),p=i=>{if(!i)return!1;const u=String(i.message||"");return i.name==="DataError"||u.includes("in-line keys")},A=()=>f(this,null,function*(){W=null,ue=null,yield e({name:ye}),yield c()});let B=null;const j=()=>f(this,null,function*(){return window.threeEditorDB?window.threeEditorDB:(B||(B=f(this,null,function*(){const i=yield s(),{data:u}=yield i.getAllRequest();return window.threeEditorDB={db:i,list:u},window.threeEditorDB})),yield B)}),D=i=>f(this,null,function*(){if(!i)return{status:!1,message:"获取失败"};yield c();const u=yield W.getItem(i);if(u!=null&&u.blob&&!i)return{status:!0,message:"获取成功",url:r(u.blob)};if(!i)return{status:!1,message:"获取失败"};const m=yield fetch(i).then(O=>O.blob()),E={blob:m};try{yield W.setItem(i,E)}catch(O){if(!p(O))throw O;yield A(),yield W.setItem(i,E)}const C=yield j(),$=l({name:i},E),L=C.list.findIndex(O=>O.name===i);return L>-1?C.list.splice(L,1,$):C.list.push($),{status:!0,message:"文件缓存成功",url:r(m)}}),g=()=>f(this,null,function*(){yield c();const i=[];return W&&(yield W.iterate((u,m)=>{i.push(v(l({},u||{}),{name:m}))})),window.threeEditorDB&&(window.threeEditorDB.list=i),{status:!0,message:"获取成功",data:i}}),N=()=>f(this,null,function*(){var m;const{res:i}=yield Y.getApi("/filehandle/scan",{path:pt.threeModelPath,extension:"glb,gltf"}),u=[];if(((m=i==null?void 0:i.children)==null?void 0:m.length)>0)for(const E of i.children)u.push({name:E.name,path:"/"+E.path});return u}),oe=()=>window.GUI_PARAMS||Me,se=()=>window.threeEditor||null,_=()=>window.editorJsons||[],I=()=>({width:window.innerWidth||0,height:window.innerHeight||0}),b=()=>_r,x=()=>gr||{},U=()=>window[he]||"",q=()=>wr,T=()=>window.devicePixelRatio||1,w=()=>window[he]||"",F=()=>{const i=b(),u=q();return{modelDesigns:i,componentDesigns:u,modelList:i.map(m=>m.label),componentList:u.map(m=>m.label)}},K=(i,u)=>{var m;return(m=i==null?void 0:i.__DESIGNS__)==null?void 0:m.find(E=>E.label===u)},H=(i=0)=>!Number.isFinite(i)||i<=0?"0 B":i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:i<1024*1024*1024?`${(i/1024/1024).toFixed(1)} MB`:`${(i/1024/1024/1024).toFixed(2)} GB`,re=i=>{const u=window[Le];typeof u=="function"&&u(i)},P=i=>!!i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z),G=i=>{var u,m;return!i||!i.visible||(u=i.userData)!=null&&u.excludeFromExport||i.isTransformControls||i.isHelper||i.isLight||i.isPoints||(m=i.type)!=null&&m.includes("Helper")||Ct.has(i.type)||vt.has(i.type)||i.isCSS2DObject||i.isCSS3DObject?!1:i.isMesh||i.isGroup||i.isObject3D||i.isLine},X=(i,u)=>i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z)?i:u,J=i=>i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z)&&Number.isFinite(i.w)?i:{x:0,y:0,z:0,w:1},V=i=>{if(!(i!=null&&i.isObject3D))return;const u=X(i.position,{x:0,y:0,z:0});i.position.set(u.x,u.y,u.z);const m=X(i.scale,{x:1,y:1,z:1});i.scale.set(m.x===0?1:m.x,m.y===0?1:m.y,m.z===0?1:m.z);const E=X(i.up,{x:0,y:1,z:0});i.up.set(E.x,E.y,E.z);const C=J(i.quaternion);i.quaternion.set(C.x,C.y,C.z,C.w),i.pivot&&!P(i.pivot)&&delete i.pivot,i.updateMatrix(),i.updateMatrixWorld(!1)},Mt=(i,u="_blank")=>window.open(i,u),Nt=(i,u="")=>window.prompt(i,u),Ot=()=>window.location.reload(),kt=()=>document.documentElement.classList.remove("dark"),Ft=i=>{if(!Array.isArray(i==null?void 0:i.__DESIGNS__))return F();const u=[...b(),...q()],m=new Set(i.__DESIGNS__.map(E=>Je(E)));return u.forEach(E=>{const C=Je(E);!C||m.has(C)||(m.add(C),i.__DESIGNS__.unshift(E))}),F()},Ut=i=>{if(!Array.isArray(i==null?void 0:i.__GLSLLIB__))return;const u=new Set(i.__GLSLLIB__.map(m=>m==null?void 0:m.name));Er.forEach(m=>{u.has(m.name)||(u.add(m.name),i.__GLSLLIB__.push(m))})},Ce=(i={})=>{const u={};return Object.entries(i||{}).forEach(([m,E])=>{if(!(St.has(m)||typeof E=="function")){if(!E||["string","number","boolean"].includes(typeof E)){u[m]=E;return}if(Array.isArray(E)){try{u[m]=structuredClone(E)}catch(C){return}return}if(!(E.isObject3D||E.isMaterial||E.isTexture||E.nodeType))try{u[m]=structuredClone(E)}catch(C){return}}}),u},Ht=(i=Me)=>{window.GUI_PARAMS=i},Bt=i=>{window.threeEditor=i},Gt=i=>{window.threeEditorDB=i},Vt=i=>{window[Le]=i},zt=(i="")=>{window[he]=i},Kt=(i="")=>{window[he]=i},Ge=i=>{var m;const u=[];return(m=i==null?void 0:i.children)==null||m.forEach(E=>{G(E)&&u.push(E)}),u},Ve=(i=[])=>{const u={rootCount:i.length,nodeCount:0,meshCount:0,vertexCount:0,skippedCount:0};return i.forEach(m=>{m.traverse(E=>{var C,$,L;if(G(E)){u.nodeCount+=1,E.isMesh&&(u.meshCount+=1,u.vertexCount+=((L=($=(C=E.geometry)==null?void 0:C.attributes)==null?void 0:$.position)==null?void 0:L.count)||0);return}E!==m&&(u.skippedCount+=1)})}),u},ze=()=>new Promise(i=>requestAnimationFrame(()=>setTimeout(i,0))),Ke=()=>new Promise(i=>{if(typeof window.requestIdleCallback=="function"){window.requestIdleCallback(()=>i(),{timeout:80});return}setTimeout(i,0)}),__$t__=(i,u)=>f(this,null,function*(){var C;if(!G(i))return null;const m=i.clone(!1);m.userData=Ce(i.userData),P(i.pivot)?m.pivot=new z.THREE.Vector3(i.pivot.x,i.pivot.y,i.pivot.z):"pivot"in m&&delete m.pivot,V(m);const E=[{source:i,clone:m}];for(;E.length;){const $=E.shift();for(const L of $.source.children){if(!G(L)){u.skippedCount+=1;continue}const O=L.clone(!1);O.userData=Ce(L.userData),P(L.pivot)?O.pivot=new z.THREE.Vector3(L.pivot.x,L.pivot.y,L.pivot.z):"pivot"in O&&delete O.pivot,V(O),$.clone.add(O),E.push({source:L,clone:O}),u.processedCount+=1,u.processedCount%It===0&&(yield(C=u.onProgress)==null?void 0:C.call(u,{processedCount:u.processedCount,totalCount:u.totalCount,skippedCount:u.skippedCount,progress:18+Math.min(u.processedCount/Math.max(u.totalCount,1)*54,54)}),yield ze())}}return m});return{baseUrl:t,getModels:N,getRequest:D,reloadPage:Ot,promptInput:Nt,waitForIdle:Ke,waitForPaint:ze,clearRequest:o,getGuiParams:oe,setGuiParams:Ht,getAllRequest:g,getEditorJsons:_,getThreeEditor:se,formatFileSize:H,setThreeEditor:Bt,removeDarkClass:kt,openExternalUrl:Mt,getThreedModels:b,getViewportSize:I,buildExportScene:(m,...E)=>f(this,[m,...E],function*(i,u={}){const C=Ge(i),$=Ve(C),L=new z.THREE.Scene,O={totalCount:$.nodeCount,processedCount:0,skippedCount:0,onProgress:u.onProgress};for(const Wt of C){const $e=yield __$t__(Wt,O);$e&&L.add($e),yield Ke()}return L.updateMatrixWorld(!0),$.skippedCount+=O.skippedCount,{exportScene:L,exportObjects:C,stats:$}}),createModelDbApi:s,getEditorPreviewSceneUrl:w,sanitizeUserData:Ce,setThreeEditorDB:Gt,findThreedDesign:K,getThreedLightMap:x,collectExportStats:Ve,getPreviewSceneUrl:U,setEditorPreviewSceneUrl:Kt,setPreviewSceneUrl:zt,setModelLoadHander:Vt,isExportableObject:G,deleteThreeEditorDB:d,ensureThreeEditorDB:j,getDevicePixelRatio:T,getThreedComponents:q,collectExportObjects:Ge,resetModelDbInstance:A,ensureModelDbInstance:c,getLocalDesignMenuData:F,invokeModelLoadHandler:re,isLegacyInlineKeyError:p,ensureThreedShaderLibrary:Ut,ensureThreedDesignRegistry:Ft,createBlobUrl:r,revokeModelObjectUrls:a}}const{THREED_LOG_BUFFER:Tt,THREED_CURRSCENE:Ne,THREED_ACTIVE_MENU:Rt,THREED_PIXEL_RATIO:Dt,THREED_SCENE_PREVIEW:bt,THREED_ADDON_EDITOR_JSON:Oe,THREED_DEFAULT_SCENE_NAME:Ir,THREED_DEFAULT_ACTIVE_MENU:ke,THREED_DEFAULT_PIXEL_RATIO:Fe,THREED_SCENE_STORAGE_SUFFIX:Sr}=Ar(),te=(n,e)=>{const t=Be.getLocal(n);return t==null?e:t},Z=(n,e)=>{n&&Be.setLocal(n,e)},Cr=n=>{n&&Be.removeLocal(n)},vr=(n,e)=>{var r,a;const t=(r=n==null?void 0:n.trim)==null?void 0:r.call(n);return t&&e.some(s=>s.name===t)?t:((a=e[0])==null?void 0:a.name)||Ir},Ue=(n=[])=>Array.isArray(n)?n.filter(e=>typeof e=="string"&&e):[],xr=()=>{const n=[],e=te(Ne,{name:"",path:""}),t=Number.parseFloat(te(Dt,Fe));return{taskState:{busy:!1,type:"",title:"",message:"",description:"",progress:0},currScene:e,sceneList:n,previewScene:!!te(bt,!1),activeMenuTitle:te(Rt,ke)||ke,pixelRatio:Number.isFinite(t)&&t>0?t:Fe,logarithmicDepthBuffer:te(Tt,!0)!==!1,addonEditorJson:Ue(te(Oe,[]))}},Pt=He.defineStore("threed",{state:()=>xr(),actions:{getSceneList(n){return f(this,null,function*(){var t;const e=yield Y.getCommonApi("threedfloorplan",{limit:1e4,ordering:"-create_time"});if((t=e==null?void 0:e.data)!=null&&t.length){if(this.sceneList=e.data,n){const r=this.sceneList.find(a=>a.org_id===n);r?this.setCurrScene(r):this.setCurrScene({name:"",path:""});return}this.currScene.path?this.sceneList.find(a=>a.id===this.currScene.id)||this.setCurrScene({name:"",path:""}):this.setCurrScene(this.sceneList[0])}else this.sceneList=[],this.setCurrScene({name:"",path:""})})},setSceneList(n){this.sceneList=n},setSceneName(n){this.sceneName=vr(n,this.sceneList),Z(Ne,this.sceneName)},createScene(n,e=""){return f(this,null,function*(){var d,c,p;const t=(c=(d=n.name)==null?void 0:d.trim)==null?void 0:c.call(d);if(!t||this.sceneList.some(A=>A.name===t))return!1;const r=pt.threeSavePath+"/"+pe()+".json",a=pe();if(!(yield Y.postCommonApi("query/threedfloorplan/create",{data:[{name:t,path:r,guid:a,org_id:n.org_id,org_name:n.org_name}]})).success)return!1;if(yield jn(r,e)){const A=yield Y.postCommonApi("threedfloorplan",{guid:a});if((p=A==null?void 0:A.data)!=null&&p.length)return this.sceneList=[...this.sceneList,A.data[0]],A.data[0]}return!1})},updateScene(n){return f(this,null,function*(){var r,a;const e=(a=(r=n.name)==null?void 0:r.trim)==null?void 0:a.call(r);return!e||this.sceneList.some(s=>s.name===e)?!1:(yield Y.postCommonApi("query/threedfloorplan/update",{data:[{name:e,id:n.id,org_id:n.org_id,org_name:n.org_name}]})).success})},deleteScene(n){return f(this,null,function*(){var r;if(!n)return;if(!(yield Y.postCommonApi("query/threedfloorplan/delete",{data:[n]})).success)return!1;const t=this.sceneList.findIndex(a=>a.id===n);return t===-1?!1:(this.sceneList.splice(t,1),((r=this.currScene)==null?void 0:r.id)===n&&this.setCurrScene(this.sceneList[0]||{name:"",path:""}),!0)})},setCurrScene(n){return f(this,null,function*(){this.currScene=n,Z(Ne,this.currScene)})},setPreviewMode(n){this.previewScene=!!n,Z(bt,this.previewScene)},setActiveMenuTitle(n){this.activeMenuTitle=n||ke,Z(Rt,this.activeMenuTitle)},setPixelRatio(n){const e=Number.parseFloat(n);this.pixelRatio=Number.isFinite(e)&&e>0?e:Fe,Z(Dt,this.pixelRatio)},setLogarithmicDepthBuffer(n){this.logarithmicDepthBuffer=!!n,Z(Tt,this.logarithmicDepthBuffer)},getSceneStorageKey(n){return`${n||this.sceneName}${Sr}`},getSceneStorageParams(n,e=null){return te(this.getSceneStorageKey(n),e)},setSceneStorageParams(n,e){n&&Z(this.getSceneStorageKey(n),e)},removeSceneStorageParams(n){n&&Cr(this.getSceneStorageKey(n))},resetTaskState(){return f(this,null,function*(){yield new Promise(n=>setTimeout(n,120)),this.taskState={busy:!1,type:"",title:"",message:"",description:"",progress:0}})},getAddonEditorJson(){return this.addonEditorJson=Ue(te(Oe,this.addonEditorJson)),this.addonEditorJson},setAddonEditorJson(n){this.addonEditorJson=Ue(n),Z(Oe,this.addonEditorJson)}}}),Tr={backgroundBlurriness:0,backgroundIntensity:1,backgroundUrls:null,environmentEnabled:!1},Rr={fov:50,near:.1,far:1e5,zoom:1,layers:{mask:1},filmOffset:0,filmGauge:35,position:{x:247.72931803058157,y:715.3890430349733,z:789.6794984861216}},Dr={outputColorSpace:"srgb",toneMapping:0,toneMappingExposure:1,shadowMap:{enabled:!1,type:1},color:0,opacity:0,sortObjects:!0,localClippingEnabled:!1,autoClear:!0,autoClearColor:!0,renderListCompare:[{name:"stats",enabled:!0},{name:"controls",enabled:!0},{name:"scene",enabled:!0},{name:"css3DRender",enabled:!0},{name:"css2DRender",enabled:!0}]},br={autoRotate:!1,autoRotateSpeed:2,enableDamping:!0,dampingFactor:.05,minDistance:.01,maxDistance:1e6,maxAzimuthAngle:null,minAzimuthAngle:null,maxPolarAngle:3.141592653589793,minPolarAngle:0,maxTargetRadius:null,minTargetRadius:0,enablePan:!0,panSpeed:1,enableRotate:!0,rotateSpeed:1,enableZoom:!0,zoomSpeed:1,zoomToCursor:!1,target:{x:-38.59603927643809,y:-48.97202695679889,z:-49.19814250541991}},Pr={mode:"translate",space:"world",size:1,showX:!0,showY:!0,showZ:!0,translationSnap:null,rotationSnap:null,scaleSnap:null},Lr={renderWay:"effectComposer",fxaaPass:{enabled:!0,order:60,multPixel:1},outlinePass:{enabled:!0,order:40,edgeStrength:3,edgeGlow:0,edgeThickness:1,pulsePeriod:0,usePatternTexture:!1,visibleEdgeColor:16449071,hiddenEdgeColor:16449071,overlayMaterial:{blending:5,blendEquation:100,blendSrc:201,blendDst:205}},outputPass:{enabled:!0,order:50},saoPass:{enabled:!1,order:10,saoBias:.5,saoIntensity:.01,saoScale:100,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},screenMaskPass:{enabled:!1,order:70,intensity:1,maskColor:16777215,R:.2,sr:1.2},ssrPass:{enabled:!1,order:30,maxDistance:.01,distanceAttenuation:!0,opacity:.5,thickness:.018,fresnel:!0,infiniteThick:!1,bouncing:!1},unrealBloomPass:{enabled:!1,order:20,strength:1.5,radius:.4,threshold:.85}},Mr={mode:"transform",openKeyEnable:!0,rightClickMenusEnable:!0,selectChildEnabled:!1,selectChildLevel:1,stats:{showStats:!1,statsMode:0},helpers:{axes:{showAxes:!0,axesLength:1e3},grid:{showGrid:!0,size:1e3,divisions:15,colorCenterLine:4473924,colorGrid:8947848},box3:{useBox3:!0,color:16776960}}},Nr=[],Or=[],kr=[],Fr=[],Ur=[],Hr=[],Br={},Gr=[],Vr={viewAngleList:[],clipping:{size:20,clipList:[]}},zr={scene:Tr,perspectiveCamera:Rr,webglRenderer:Dr,orbitControls:br,transformControls:Pr,effectComposer:Lr,handler:Mr,lightCores:Nr,innerCores:Or,modelCores:kr,drawCores:Fr,textCores:Ur,particleCores:Hr,geoCores:Br,designCores:Gr,other:Vr},Kr=[{key:0,value:"离线"},{key:1,value:"在线"}],$r=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],Wr=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],jr="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",ee=window.meta.graph.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},qr=window.meta.graph.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200"},Xr=window.meta.graph.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff"},R={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:Kr.map(n=>({label:n.value,value:n.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:$r.map(n=>({label:n.value,value:n.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:Wr.map(n=>({label:n.value,value:n.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},h=v(l({penType:y.NORMAL},R),{form:[...ee[y.NORMAL],...R.form]});xe.YX,xe.YX,xe.YX,y.POINT_VALUE,R.anchors,window.visibleLevel,R.form,R.form,window.dataType,window.dataProp,window.visibleLevel,R.form,window.dataType,window.dataProp,window.visibleLevel,R.form,window.dataType,window.dataProp,window.visibleLevel,Xr[0],y.LIGHT_PLATE,qr[0],R.anchors,window.visibleLevel,[...ee[y.LIGHT_PLATE],...R.form],me+"",y.SENSOR,R.anchors,window.visibleLevel,[...ee[y.LIGHT_PLATE],...R.form],v(l({width:100,height:30,name:"text",penName:"文本",text:"文本",disableAnchor:!0,penType:y.TEXT},R),{form:[...ee[y.TEXT],...R.form]}),l({width:100,height:100,name:"square",penName:"正方形"},h),v(l({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},h),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),l({width:200,height:50,borderRadius:0,name:"rectangle",penName:"矩形"},h),l({width:100,height:100,name:"circle",penName:"圆"},h),l({width:100,height:100,name:"triangle",penName:"三角形"},h),l({width:100,height:100,name:"diamond",penName:"菱形"},h),l({width:100,height:100,name:"pentagon",penName:"五边形"},h),l({width:100,height:100,name:"hexagon",penName:"六边形"},h),l({width:100,height:100,name:"pentagram",penName:"五角星"},h),l({width:120,height:60,name:"leftArrow",penName:"左箭头"},h),l({width:120,height:60,penName:"右箭头",name:"rightArrow"},h),l({width:150,height:60,name:"twowayArrow",penName:"双向箭头"},h),l({width:100,height:100,name:"cloud",penName:"云"},h),l({textTop:-.1,width:100,height:100,name:"message",penName:"消息框"},h),l({width:80,height:100,name:"file",penName:"文件"},h),v(l({width:60,height:100,name:"cube",penName:"立方体",z:.25},h),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),l({width:70,height:100,name:"people",penName:"人"},h),v(l({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},h),{penType:y.BUTTON}),v(l({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},h),{penType:y.INPUT}),v(l({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},h),{penType:y.SELECT}),v(l({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,fontSize:20,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},h),{penType:y.SLIDER}),v(l({name:"time",penName:"时间",width:300,height:40,text:`${tn().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,fontSize:20,interval:67,fillZero:!0},h),{penType:y.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...h.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),v(l({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},h),{penType:y.SWITCH}),v(l({name:"radio",penName:"单选框",direction:"horizontal",width:150,height:30,checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},h),{penType:y.RADIO}),v(l({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},h),{penType:y.CHECKBOX}),v(l({name:"table2",penName:"表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,hasHeader:!0,color:"#333",textColor:"#444"},h),{penType:y.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),v(l({name:"table2",penName:"斑马纹表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!0,hasHeader:!0,color:"#333",textColor:"#444"},h),{penType:y.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),v(l({name:"table2",penName:"滚动表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,swiper:!0,maxNum:5,hasHeader:!0,color:"#333",textColor:"#444"},h),{penType:y.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}],["5","智能家居","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),v(l({name:"svg",width:100,height:100,image:me+"/icon/audio.svg",audioId:"",penName:"音频",datable:!0,penType:y.AUDIO},R),{form:[...ee[y.AUDIO],...R.form],events:[{name:"enter",action:Ee.Emit,value:Q.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:Q.OPEN_AUDIO,data:""})},{name:"leave",action:Ee.Emit,value:Q.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:Q.CLOSE_AUDIO,data:""})}]}),v(l({name:"svg",width:100,height:100,image:me+"/icon/camera.svg",cameraId:"",penName:"摄像机",datable:!0,events:[{name:"enter",action:Ee.Emit,value:Q.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:Q.OPEN_CAMERA,data:""})},{name:"leave",action:Ee.Emit,value:Q.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:Q.CLOSE_CAMERA,data:""})}],penType:y.CAMERA},R),{form:[...ee[y.CAMERA],...R.form]}),v(l({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penName:"MP4",penType:y.MP4},R),{form:[...ee[y.MP4],...R.form]}),v(l({name:"video",width:100,height:100,penName:"视频流",datable:!0,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:y.VIDEO_STREAM},R),{form:[...ee[y.VIDEO_STREAM],...R.form]}),l({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle",penName:"开始/结束"},h),l({text:"流程",width:120,height:40,name:"rectangle",penName:"流程"},h),l({text:"判定",width:120,height:60,name:"diamond",penName:"判定"},h),l({text:"数据",width:120,height:50,name:"flowData",penName:"数据",offsetX:.14},h),l({text:"准备",width:120,height:50,name:"hexagon",penName:"准备"},h),l({text:"子流程",width:120,height:50,name:"flowSubprocess",penName:"子流程"},h),l({text:"数据库",width:80,height:120,name:"flowDb",penName:"数据库"},h),l({text:"文档",width:120,height:100,name:"flowDocument",penName:"文档"},h),l({text:"内部存储",width:120,height:80,name:"flowInternalStorage",penName:"内部存储"},h),l({text:"外部存储",width:120,height:80,name:"flowExternStorage",penName:"外部存储"},h),l({text:"队列",width:100,height:100,name:"flowQueue",penName:"队列"},h),l({text:"手动输入",width:120,height:80,name:"flowManually",penName:"手动输入"},h),l({text:"展示",width:120,height:80,name:"flowDisplay",penName:"展示"},h),l({text:"并行模式",width:120,height:50,name:"flowParallel",penName:"并行模式"},h),l({text:"注释",width:100,height:100,name:"flowComment",penName:"注释"},h),l({text:"",width:30,height:30,name:"circle",penName:"开始",background:"#555",lineWidth:0},h),l({width:30,height:30,name:"activityFinal",penName:"结束"},h),l({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle",penName:"活动"},h),l({text:"决策/合并",width:120,height:50,name:"diamond",penName:"决策/合并"},h),l({text:"垂直泳道",width:200,height:500,name:"swimlaneV",penName:"垂直泳道",textBaseline:"top",textTop:20,lineTop:.08},h),l({text:"水平泳道",width:500,height:200,name:"swimlaneH",penName:"水平泳道",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},h),l({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",penName:"垂直分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},h),l({text:"水平分岔/汇合",width:150,height:10,name:"forkH",penName:"水平分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},h),l({name:"andGate",penName:"与门",width:100,height:150},h),l({name:"basicEvent",penName:"基本事件",width:100,height:150},h),l({name:"unexpandedEvent",penName:"未展开事件",width:100,height:150},h),l({name:"priorityAndGate",penName:"优先AND门",width:100,height:150},h),l({name:"forbiddenGate",penName:"禁止门",width:100,height:150},h),l({name:"event",penName:"事件",width:100,height:150},h),l({name:"switchEvent",penName:"开关事件",width:100,height:150},h),l({name:"conditionalEvent",penName:"条件事件",width:150,height:100},h),l({name:"transferSymbol",penName:"转移符号",width:100,height:150},h),l({name:"orGate",penName:"或门",width:100,height:150},h),l({name:"xorGate",penName:"异或门",width:100,height:150},h),l({name:"votingGate",penName:"表决门",width:100,height:150},h);const Yr=(n,e={isDev:!1,devServerUrl:"",devServerPort:8443})=>(n=n.replace(/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,`$1${e.isDev?e.devServerUrl:sn}:${e.isDev?e.devServerPort:ln}`),e.isDev?n:n.replace("/baseUrl","")),Lt=(n,e)=>{const t=n.__vccOpts||n;for(const[r,a]of e)t[r]=a;return t},Jr=Object.assign({name:"ThreedEditor"},{__name:"editor",props:{data:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1}},emits:["emit-three-editor","graph-event"],setup(n,{expose:e,emit:t}){var q;const r=t,a=n,s=Pt(),{currScene:o}=He.storeToRefs(s),d=((q=window.meta.threed)==null?void 0:q.draco_path)||me;z.ThreeEditor.dracoPath=d.endsWith("/")?d:`${d}/`;let c=null,p=null,A=!1;const B=M.ref(null),{setGuiParams:j,getDevicePixelRatio:D,ensureThreeEditorDB:g,createBlobUrl:N,revokeModelObjectUrls:oe,ensureThreedDesignRegistry:se}=yr();se(z.ThreeEditor),j({step:.1});const _=()=>{var T;return(T=c==null?void 0:c.renderSceneResize)==null?void 0:T.call(c)},I=()=>f(this,null,function*(){var w,F;if(A)return;let T=zr;try{if(a.data&&Object.keys(a.data).length)T=a.data;else if((w=o.value)!=null&&w.path){const H=yield Y.getApi((F=o.value)==null?void 0:F.path).catch(()=>({}));if(A)return;H.res&&(T=H.res)}const K=yield b(T);if(A)return;c?c.resetEditorStorage(K):c=new z.ThreeEditor(B.value,{fps:null,pixelRatio:D()*s.pixelRatio,webglRenderParams:{antialias:!0,alpha:!0},sceneParams:K})}catch(K){console.error("三维图纸初始化失败",K),c==null||c.resetEditorStorage(T)}finally{x()}r("emit-three-editor",c),window.addEventListener("resize",_)}),b=T=>f(this,null,function*(){var re;const w=structuredClone(T||{});if((re=w.designCores)==null||re.forEach(P=>{P.preview=a.preview}),a.preview){w.handler.mode="none",w.handler.helpers.axes.showAxes=!1,w.handler.helpers.box3.useBox3=!1,w.handler.helpers.grid.showGrid=!1,w.handler.rightClickMenusEnable=!1;const{perspectiveCamera:P,orbitControls:G}=w,X=P==null?void 0:P.position,J=G==null?void 0:G.target;if(X&&J){const V=Math.hypot(X.x-J.x,X.y-J.y,X.z-J.z);Number.isFinite(V)&&V>0&&(G.maxDistance=V*(5/3))}}const F=yield g(),K=F.list||[],H=[];for(const P of w.modelCores||[]){const G=P.modelInfo.originPath;if(G){const X=K.find(V=>V.name===G);if(!X){const V=yield F.db.getRequest(Yr(G));V!=null&&V.url&&(P.modelInfo.url=V.url),H.push(P);continue}const J=N(X.blob);P.modelInfo.url=J}H.push(P)}return w.modelCores=H,w}),x=()=>{c!=null&&c.renderer&&(p=new z.THREE.PMREMGenerator(c.renderer),p.compileEquirectangularShader(),c.scene.environment=p.fromScene(new an.RoomEnvironment).texture)},U=()=>c;return M.watch([()=>o.value.path,()=>a.data],([T,w])=>{console.log("watch",T,w),I()},{deep:!0}),M.onMounted(()=>f(this,null,function*(){var T,w;A=!1,(T=B.value)!=null&&T.clientHeight&&((w=B.value)!=null&&w.clientWidth)&&I()})),M.onUnmounted(()=>{A=!0,window.removeEventListener("resize",_),c==null||c.destroySceneRender(),p==null||p.dispose(),oe()}),e({getEditorInstance:U}),(T,w)=>(M.openBlock(),M.createElementBlock("div",{ref_key:"editorRef",ref:B,class:"threed-editor",onDragover:w[0]||(w[0]=M.withModifiers(()=>{},["prevent"])),onDrop:w[1]||(w[1]=M.withModifiers(()=>{},["prevent"]))},null,544))}}),Qr=Lt(Jr,[["__scopeId","data-v-f4011fe8"]]),Zr={class:"threed-preview"},ea=Object.assign({name:"ThreedPreview"},{__name:"preview",props:{data:{type:Object,default:null},url:{type:String,default:""},id:{type:String,default:""},token:{type:String,default:""},socketUrl:{type:String,default:""}},emits:["loaded","graph-event"],setup(n,{expose:e,emit:t}){const r=n,a=t;let s=M.shallowRef({});const o=M.ref(),d=Pt();let c={},p=null,A=null;const B=_=>{var b,x,U;if(!_)return;if((b=_==null?void 0:_.includes)!=null&&b.call(_,"token 必传"))return fe({message:_,type:"warning"});const I=typeof _=="string"?JSON.parse(_):_;if((I==null?void 0:I.data)==="服务错误"||(U=(x=I==null?void 0:I.data)==null?void 0:x.includes)!=null&&U.call(x,"token is expired"))return fe({message:I.data,type:"warning"});switch(I.action){case je.ACPOINT.YCVALUE:case je.ACPOINT.YXVALUE:console.warn("遥测信息");break}},j=()=>{try{A=new Mn({socketUrl:r.socketUrl,token:r.token,onMessage:B})}catch(_){console.warn("三维场景消息处理失败",_)}},D=()=>f(this,null,function*(){var _;if(c){const I=Object.keys(c);if(I.length){const b=yield Y.postPDApi("querychannelstatus/",{data:I.map(x=>({ied_id:x,ln_list:c[x].map(U=>U.ln_id)}))});(_=b==null?void 0:b.data)!=null&&_.length&&I.forEach(x=>{const U=b.data.find(T=>T.ied_id===x),q=c[x];q!=null&&q.length&&q.forEach(T=>{const w=U.result.find(F=>F.ln_id===T.ln_id);if(w){const F=se();if(!(F!=null&&F.scene))return;const K=F.scene.getObjectsByProperty("dataId",T.guid);let H=K==null?void 0:K[0];if(H){const re=w.status==="告警"?2:w.status==="正常"?1:0;H.userData.params.state=re;const P=On(w.amp_peak)?kn(Number(w.amp_peak))?Number(w.amp_peak):0:w.amp_peak;H.userData.params.value=P,H.changeState(re),H.changeValue(P),H.changeName(w.name)}}})})}}}),g=_=>{a("graph-event",_)},N=_=>{_&&(r.socketUrl&&j(),setTimeout(()=>{const I=_.scene.getObjectsByProperty("designType","局放测点");I.forEach(b=>{const{ied_id:x,ln_id:U}=b.userData.params;c[x]||(c[x]=[]),c[x].push({guid:b.dataId,id:b.uuid,ied_id:x,ln_id:U})}),I!=null&&I.length&&(p&&clearInterval(p),D(),p=setInterval(()=>{D()},2e3)),a("loaded",_)},100))},oe=()=>f(this,null,function*(){if(s.value&&Object.keys(s.value).length)return;const _=Fn(),I=r.url||_.url;if(I){const U=yield Y.getApi(I).catch(()=>({}));U.res&&(s.value=U.res);return}if(!(r.id||_.id)){console.warn("三维场景渲染失败,场景id为空!");return}const x=yield Y.getCommonApi("threedfloorplan",{guid:r.id});x.data.length?d.setCurrScene(x.data[0]):console.warn("三维场景渲染失败,场景id为:"+r.id+"不存在!")}),se=()=>o.value?o.value.getEditorInstance():null;return M.watch(()=>r.data,_=>{_&&(s.value=_,oe())},{deep:!0,immediate:!0}),M.watch(()=>r.id,_=>{_&&oe()},{deep:!0,immediate:!0}),M.onMounted(()=>{Ie.on("three-event",g)}),M.onUnmounted(()=>{A&&A.destroy(),p&&clearInterval(p),Ie.off("three-event",g)}),e({getEditorInstance:se}),(_,I)=>(M.openBlock(),M.createElementBlock("div",Zr,[M.createVNode(Qr,{ref_key:"threedEditorRef",ref:o,data:M.unref(s),preview:"",onGraphEvent:g,onEmitThreeEditor:N},null,8,["data"])]))}}),ge=Lt(ea,[["__scopeId","data-v-edbc5791"]]);ge.name||(ge.name="SyThree");const ta=n=>{n.component(ge.name||"SyThree",ge)},na={install:ta};exports.SyThree=ge;exports.default=na;
@@ -1 +1 @@
1
- @charset "UTF-8";.threed-editor[data-v-939f3c22]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sc-bg-color)}.threed-editor[data-v-939f3c22] .top-info{z-index:9999!important}.threed-preview[data-v-fbc5634a]{position:relative;width:100%;height:100%}
1
+ @charset "UTF-8";.threed-editor[data-v-f4011fe8]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sc-bg-color)}.threed-editor[data-v-f4011fe8] .top-info{z-index:9999!important}.threed-preview[data-v-edbc5791]{position:relative;width:100%;height:100%}