mixapply 1.1.42 → 1.1.43

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.
package/mixapply.umd.cjs CHANGED
@@ -292,7 +292,7 @@ For more detail, please visit: ${a}
292
292
  <div>名称:${h.data[2]}</div>
293
293
  <div>编号:${h.data[3]}</div>
294
294
  </div>
295
- `),v}},visualMap:[{show:!1,min:0,max:10,range:[0,10],x:"left",y:"bottom",text:["高","低"],calculable:!0}],series:[{name:"中国",coordinateSystem:"geo",type:"effectScatter",data:o.value,symbolSize:24,rippleEffect:{number:0,scale:1},label:{show:!0,formatter:"{b}",position:["50%","50%"],color:"#fff",fontSize:12,fontWeight:400},itemStyle:{show:!0,areaColor:"#ff0000",color:"#FFFFFF",borderWidth:1},symbol:"image://data:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1QkNERUMzQkIyQTExRTg4QURFOTM3MjI1MTkxNEFCIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1QkNERUM0QkIyQTExRTg4QURFOTM3MjI1MTkxNEFCIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTVCQ0RFQzFCQjJBMTFFODhBREU5MzcyMjUxOTE0QUIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTVCQ0RFQzJCQjJBMTFFODhBREU5MzcyMjUxOTE0QUIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5/ObexAAADlUlEQVR42syYS0iUURTH534+ZiZHU3roVGrWwiiKHgQmUW2CXpSlBIVthKJF9oCkRSAWERaBKBgtXIQuWkRhi7BaVFAO9iDDQMoKe6nhZGo648zozNf/DGcih/meM4UXfszM/b577v/77jn3njNClmXLTGrJ0R3CNfzfJpeLs7QF6WwLQAkoBoVgLvf/AO9AO7gD+o0aFtFLpvGGloNzYC9I0rAdBK2gGnTrfUOSXuGgCnSCMh1iLHxPKY+pYhuaTdJpuAlcBqkmljeVxzbpmU+PoCugIgE+XMG24hK0HZxMYGCdYpumBNFS1WlM8AwcA5vBVnAG9GiMqVPzQTVB2zikYwYIvTlESRForMm1d4Pn+E6+sgI0qtgtZNuGBZWoXDuPyevr+n0Hu7zBX9W5NvfZRbZR19jU94t59nW4Xgluq4zfY2Yf6gIrY4xxg9xL+fY1R3OsrowkMS2ce32hQLM7kF3zdWIOfr5XCPc3YJXRfahAob8dhvwFNqk2Wkx4kE1KdaaKatzzkQUZsa0qyKrQT8eDJT1JOJUGpkliKX/9adC2qiC3Qn94soGA3KE0cGhKbsPSk+0lag9lVNBrhf6NmCzviz9U2ekJjkZfvD8y2XPcab3G28B8g7ZVT/s2sCNGfwq4Dqel0M3p8gSb8q3SpoAsBz75Q61Hsq2nIXieRui3mYkySil6gUNh7GNwGM77IWr8enw0g2UK48bBYlpZo/kQrXMtuKBwfQt4CwEuDmM6RGkPWq1xspPNIbP5EPnYXbWd1WB7yg8SNJsPhUA5+JwAMd/AgYiYeNKPIU7KvHGIGQP7WFTc+RC1l5z9BUyIoQfZCV4kKmOMtHu8fJMGxewCT/QOkAw+7U2wX+eb8nMx8MjIBJKJJWhlf1DzKQ/YDR7EXSgqKh/IFFyP5dHhKKf5G+T0iRPYcezTUzcxIcZsDcJjpQ11A/hC9VnIOaKrRNasyyCEJiwCa+mQnza3bTJbzvSWw4qDxYyLkVktwpcyGCPKXlHKC2FetbpMVRDELOS9w6Fc5ExlhbI8h8L3D6e1WALJapUmHRs3IKrPbCldpiqGGgRIgxmN/IaCGvYcbLPerA+F9P1roCnEfG3/pwa6Fe7XXjJjLbxkoC9YKky9IVrrq385tSMOIeTUHVpHkJ6wJwMPeYOLhD3l0+SRszlhs/G9Pt7JKZMk5x6IhD3Xconbh9hgH/PPmphpf+n9FmAATyEp4C2loPgAAAAASUVORK5CYII="},{name:"省会坐标",type:"scatter",coordinateSystem:"geo",symbol:"circle",symbolSize:8,data:Oce(),label:{show:!0,formatter:"{b}",position:"right",color:"#fff",fontSize:12,fontWeight:400},itemStyle:{color:"#fff"}}]};return p},u=async()=>{const{result:p}=await _t.post("get_object_list");var h=/^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/,v=/^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;p.data.length&&(o.value=[],p.data.forEach(m=>{let g="";if(m.gis||m.gis.split(",").length>1){let b=m.gis.split(",");g=h.test(b[1])&&v.test(b[0])?m.gis:m.custom_gis}else g=m.custom_gis;let y=g.split(","),_=m.province+" "+m.city;if(y[0]&&y[1]){let b=[y[1],y[0],m.name,m.uid,_];o.value.push(b)}}),r.setOption(c(),!0))},d=p=>{if(p){let h=location.href;h.indexOf("?object_id=")>-1&&(h=h.split("?object_id=")[0]);let v=h+"?object_id="+p;location.href=v,location.reload()}else{v1.error("未配置跳转参数");return}},f=pt(s,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&f()},{deep:!0}),l.onMounted(()=>{l.nextTick(()=>{mw("china",{geoJSON:Ice}),window.toDetail=d}),s(),a.mode==="preview"&&u()}),l.onBeforeUnmount(()=>{n&&n.uninstall(document.querySelector("#"+e)),r&&r.clear(),r&&h1(r),r=null}),(p,h)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:e})]),l.renderSlot(p.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6909b443"]])},Symbol.toStringTag,{value:"Module"})),Nce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组态图%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-102.000000,%20-636.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M105.586207,636.65%20C105.941701,636.65%20106.229885,636.938185%20106.229885,637.293678%20L106.229885,637.293678%20L106.229,638.121%20L113.77,638.121%20L113.770115,637.293678%20C113.770115,636.970502%20114.008284,636.702953%20114.318675,636.656979%20L114.413793,636.65%20L117.356322,636.65%20C117.711815,636.65%20118,636.938185%20118,637.293678%20L118,637.293678%20L118,640.236207%20C118,640.591701%20117.711815,640.879885%20117.356322,640.879885%20L117.356322,640.879885%20L116.528,640.879%20L116.528,648.42%20L117.356322,648.420115%20C117.679498,648.420115%20117.947047,648.658284%20117.993021,648.968675%20L118,649.063793%20L118,652.006322%20C118,652.361815%20117.711815,652.65%20117.356322,652.65%20L117.356322,652.65%20L114.413793,652.65%20C114.058299,652.65%20113.770115,652.361815%20113.770115,652.006322%20L113.770115,652.006322%20L113.77,651.178%20L106.229,651.178%20L106.229885,652.006322%20C106.229885,652.329498%20105.991716,652.597047%20105.681325,652.643021%20L105.586207,652.65%20L102.643678,652.65%20C102.288185,652.65%20102,652.361815%20102,652.006322%20L102,652.006322%20L102,649.063793%20C102,648.708299%20102.288185,648.420115%20102.643678,648.420115%20L102.643678,648.420115%20L103.471,648.42%20L103.471,640.879%20L102.643678,640.879885%20C102.320502,640.879885%20102.052953,640.641716%20102.006979,640.331325%20L102,640.236207%20L102,637.293678%20C102,636.938185%20102.288185,636.65%20102.643678,636.65%20L102.643678,636.65%20Z%20M116.712644,649.707471%20L115.057471,649.707471%20L115.057471,651.362644%20L116.712644,651.362644%20L116.712644,649.707471%20Z%20M104.942529,649.707471%20L103.287356,649.707471%20L103.287356,651.362644%20L104.942529,651.362644%20L104.942529,649.707471%20Z%20M113.77,639.408%20L106.229,639.408%20L106.229885,640.236207%20C106.229885,640.559383%20105.991716,640.826932%20105.681325,640.872906%20L105.586207,640.879885%20L104.758,640.879%20L104.758,648.42%20L105.586207,648.420115%20C105.909383,648.420115%20106.176932,648.658284%20106.222906,648.968675%20L106.229885,649.063793%20L106.229,649.891%20L113.77,649.891%20L113.770115,649.063793%20C113.770115,648.740617%20114.008284,648.473068%20114.318675,648.427094%20L114.413793,648.420115%20L115.241,648.42%20L115.241,640.879%20L114.413793,640.879885%20C114.090617,640.879885%20113.823068,640.641716%20113.777094,640.331325%20L113.770115,640.236207%20L113.77,639.408%20Z%20M110.588506,641.063793%20C110.943999,641.063793%20111.232184,641.351978%20111.232184,641.707471%20L111.232184,641.707471%20L111.232184,643.416897%20L112.942529,643.417816%20C113.268398,643.417816%20113.537709,643.659971%20113.580331,643.974151%20L113.580331,643.974151%20L113.586207,644.061494%20L113.586207,647.592529%20C113.586207,647.948022%20113.298022,648.236207%20112.942529,648.236207%20L112.942529,648.236207%20L109.411494,648.236207%20C109.056001,648.236207%20108.767816,647.948022%20108.767816,647.592529%20L108.767816,647.592529%20L108.767816,645.882184%20L107.057471,645.882184%20C106.731602,645.882184%20106.462291,645.640029%20106.419669,645.325849%20L106.419669,645.325849%20L106.413793,645.238506%20L106.413793,641.707471%20C106.413793,641.351978%20106.701978,641.063793%20107.057471,641.063793%20L107.057471,641.063793%20Z%20M109.944828,642.351149%20L107.701149,642.351149%20L107.701149,644.593908%20L109.411494,644.594828%20C109.737363,644.594828%20110.006674,644.836983%20110.049296,645.151162%20L110.049296,645.151162%20L110.055172,645.238506%20L110.055172,646.947931%20L112.298851,646.947931%20L112.298851,644.705172%20L110.588506,644.705172%20C110.262637,644.705172%20109.993326,644.463017%20109.950704,644.148838%20L109.950704,644.148838%20L109.944828,644.061494%20L109.944828,642.351149%20Z%20M104.942529,637.937356%20L103.287356,637.937356%20L103.287356,639.592529%20L104.942529,639.592529%20L104.942529,637.937356%20Z%20M116.712644,637.937356%20L115.057471,637.937356%20L115.057471,639.592529%20L116.712644,639.592529%20L116.712644,637.937356%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Rce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组态图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-102.000000,%20-636.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M105.586207,636.65%20C105.941701,636.65%20106.229885,636.938185%20106.229885,637.293678%20L106.229885,637.293678%20L106.229,638.121%20L113.77,638.121%20L113.770115,637.293678%20C113.770115,636.970502%20114.008284,636.702953%20114.318675,636.656979%20L114.413793,636.65%20L117.356322,636.65%20C117.711815,636.65%20118,636.938185%20118,637.293678%20L118,637.293678%20L118,640.236207%20C118,640.591701%20117.711815,640.879885%20117.356322,640.879885%20L117.356322,640.879885%20L116.528,640.879%20L116.528,648.42%20L117.356322,648.420115%20C117.679498,648.420115%20117.947047,648.658284%20117.993021,648.968675%20L118,649.063793%20L118,652.006322%20C118,652.361815%20117.711815,652.65%20117.356322,652.65%20L117.356322,652.65%20L114.413793,652.65%20C114.058299,652.65%20113.770115,652.361815%20113.770115,652.006322%20L113.770115,652.006322%20L113.77,651.178%20L106.229,651.178%20L106.229885,652.006322%20C106.229885,652.329498%20105.991716,652.597047%20105.681325,652.643021%20L105.586207,652.65%20L102.643678,652.65%20C102.288185,652.65%20102,652.361815%20102,652.006322%20L102,652.006322%20L102,649.063793%20C102,648.708299%20102.288185,648.420115%20102.643678,648.420115%20L102.643678,648.420115%20L103.471,648.42%20L103.471,640.879%20L102.643678,640.879885%20C102.320502,640.879885%20102.052953,640.641716%20102.006979,640.331325%20L102,640.236207%20L102,637.293678%20C102,636.938185%20102.288185,636.65%20102.643678,636.65%20L102.643678,636.65%20Z%20M116.712644,649.707471%20L115.057471,649.707471%20L115.057471,651.362644%20L116.712644,651.362644%20L116.712644,649.707471%20Z%20M104.942529,649.707471%20L103.287356,649.707471%20L103.287356,651.362644%20L104.942529,651.362644%20L104.942529,649.707471%20Z%20M113.77,639.408%20L106.229,639.408%20L106.229885,640.236207%20C106.229885,640.559383%20105.991716,640.826932%20105.681325,640.872906%20L105.586207,640.879885%20L104.758,640.879%20L104.758,648.42%20L105.586207,648.420115%20C105.909383,648.420115%20106.176932,648.658284%20106.222906,648.968675%20L106.229885,649.063793%20L106.229,649.891%20L113.77,649.891%20L113.770115,649.063793%20C113.770115,648.740617%20114.008284,648.473068%20114.318675,648.427094%20L114.413793,648.420115%20L115.241,648.42%20L115.241,640.879%20L114.413793,640.879885%20C114.090617,640.879885%20113.823068,640.641716%20113.777094,640.331325%20L113.770115,640.236207%20L113.77,639.408%20Z%20M110.588506,641.063793%20C110.943999,641.063793%20111.232184,641.351978%20111.232184,641.707471%20L111.232184,641.707471%20L111.232184,643.416897%20L112.942529,643.417816%20C113.268398,643.417816%20113.537709,643.659971%20113.580331,643.974151%20L113.580331,643.974151%20L113.586207,644.061494%20L113.586207,647.592529%20C113.586207,647.948022%20113.298022,648.236207%20112.942529,648.236207%20L112.942529,648.236207%20L109.411494,648.236207%20C109.056001,648.236207%20108.767816,647.948022%20108.767816,647.592529%20L108.767816,647.592529%20L108.767816,645.882184%20L107.057471,645.882184%20C106.731602,645.882184%20106.462291,645.640029%20106.419669,645.325849%20L106.419669,645.325849%20L106.413793,645.238506%20L106.413793,641.707471%20C106.413793,641.351978%20106.701978,641.063793%20107.057471,641.063793%20L107.057471,641.063793%20Z%20M109.944828,642.351149%20L107.701149,642.351149%20L107.701149,644.593908%20L109.411494,644.594828%20C109.737363,644.594828%20110.006674,644.836983%20110.049296,645.151162%20L110.049296,645.151162%20L110.055172,645.238506%20L110.055172,646.947931%20L112.298851,646.947931%20L112.298851,644.705172%20L110.588506,644.705172%20C110.262637,644.705172%20109.993326,644.463017%20109.950704,644.148838%20L109.950704,644.148838%20L109.944828,644.061494%20L109.944828,642.351149%20Z%20M104.942529,637.937356%20L103.287356,637.937356%20L103.287356,639.592529%20L104.942529,639.592529%20L104.942529,637.937356%20Z%20M116.712644,637.937356%20L115.057471,637.937356%20L115.057471,639.592529%20L116.712644,639.592529%20L116.712644,637.937356%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Pce=["id"],Bce=["id","title"],Fce={class:"num"},zce=["id"],Vce=["id"],$ce=["id"],Uce=["id"],jce=["id"],Hce=["id"],Gce="--",nv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:Nce,ACTIVE_ICON:Rce,NAME_CN:"组态图",NAME_EN:"Scd",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},bgImg:{value:"",type:"image",label:"背景图片"},outer:{value:{width:"100%",height:"100%",top:"0%",left:"0%"},type:"object",label:"容器大小"},inner:{value:{width:"100%",height:"100%"},type:"object",label:"图片大小"},multipleImg:{value:!1,type:"checkbox",label:"是否设置多图"},statusFv:{value:"",type:"string",label:"状态FV",required:!0,dependent:"multipleImg"},object:{value:"",type:"string",label:"对象",dependent:"multipleImg"},images:{value:[{code:"0",value:""}],type:"status",label:"",dependent:"multipleImg"},isHideTitle:{value:!0,type:"checkbox",label:"是否隐藏标题"}},DATA:[{name:"参数一",fv:"",width:100,object_id:"",source:"mosaic",type:"Plate",titleBg:"#006eaf",titleColor:"#fff",valueBg:"#fff",valueColor:"#006eaf",fontSize:12,isBold:!1,x:0,y:0}],PARAMS:["name","fv","object_id","source","type","width","fontSize","titleColor","titleBg","valueColor","valueBg","isBold"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"scd",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="monitor_"+Math.random().toString(16).substring(4,12),a=t,i=l.ref({}),o=()=>{var C,w,S,x,E,L,T,k,A,D,M;const{options:b}=a.conf;i.value={bgColor:((C=b==null?void 0:b.bgColor)==null?void 0:C.value)||"#fff",bgImg:((w=b==null?void 0:b.bgImg)==null?void 0:w.value)||"",radiusSize:((S=b==null?void 0:b.radiusSize)==null?void 0:S.value)??4,isHideTitle:((x=b==null?void 0:b.isHideTitle)==null?void 0:x.value)??!1,outer:((E=b==null?void 0:b.outer)==null?void 0:E.value)??{width:"95%",height:"95%",top:"5%",left:"5%"},inner:((L=b==null?void 0:b.inner)==null?void 0:L.value)??{width:"100%",height:"100%"}},(T=b==null?void 0:b.multipleImg)!=null&&T.value&&(i.value.multipleImg=(k=b==null?void 0:b.multipleImg)==null?void 0:k.value,i.value.statusFv=(A=b==null?void 0:b.statusFv)==null?void 0:A.value,i.value.images=(D=b==null?void 0:b.images)==null?void 0:D.value,i.value.object=(M=b==null?void 0:b.object)==null?void 0:M.value),v.value=i.value.bgImg},s=b=>{let C=5;return/^\d+$/.test(b)&&(C=Number(b)),C+1},c=(b,C)=>{let w=C.pieces?Number(C.pieces):5,S=C.max?Number(C.max):100,x=C.min?Number(C.min):0,E=S-x,L=parseInt(E/w);return S-L*b},u=()=>{Ns("."+n).draggable({modifiers:[Ns.modifiers.restrictRect({restriction:"parent",endOnly:!0})],onmove(b){d(b)}})},d=b=>{const{data:C}=a.conf;let w=b.target;C.forEach((S,x)=>{`${S.type}_${n}_${S.fv}_${x}`===w.id&&(S.x=S.x+b.dx,S.y=S.y+b.dy)})},f=b=>{let C=b.max-b.min,w,S;return b.value<b.startValue?(w=Math.abs((b.value-b.startValue)/C*b.height),S=b.value/C*b.height):(w=Math.abs((b.value-b.startValue)/C*b.height),S=b.startValue/C*b.height),{height:`${w}px`,bottom:`${S}px`}},p=b=>{let C="standby";return String(b.value)===b.online&&(C="online"),String(b.value)===b.offline&&(C="offline"),C},h=b=>{let C={text:"",color:b.color};return b.status.forEach(w=>{String(b.value)===String(w.code)&&(C.text=w.text,C.color=w.color)}),C},v=l.ref(""),m=b=>{const{data:C}=a.conf;if(C.forEach((w,S)=>{var x,E;try{w.value=((E=(x=b.history[S])==null?void 0:x[0])==null?void 0:E[w.fv])??w.default}catch(L){console.error("设置历史数据时出错:",L),w.value=Gce}}),i.value.multipleImg){let w=b.history.length-1,S=i.value.images.find(x=>{var E,L;return String(x.code)===String((L=(E=b.history[w])==null?void 0:E[0])==null?void 0:L[i.value.statusFv])});v.value=S.value||i.value.bgImg}},g=b=>{const{common:C,data:w}=a.conf,S=C.source||"mosaic";let x="";if(C.multiObject||(x=je(C,C.useAlias,a.uid)),w.forEach((E,L)=>{var T,k,A;C.multiObject&&(x=je(E,C.useAlias,a.uid));try{E.value=((A=(k=(T=b[x])==null?void 0:T[S])==null?void 0:k.data)==null?void 0:A[E.fv])??E.default}catch(D){console.error("设置实时数据时出错:",D),E.value=E.default}}),i.value.multipleImg){let E=i.value.object;C.useAlias&&(E=aliasMapping[i.value.object]||a.uid);let L=i.value.images.find(T=>{var k,A,D;return String(T.code)===String((D=(A=(k=b[E])==null?void 0:k.mosaic)==null?void 0:A.data)==null?void 0:D[i.value.statusFv])});v.value=(L==null?void 0:L.value)||i.value.bgImg}},y=async()=>{try{const{data:b,common:C}=a.conf,w=C.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(w)){const x=await new $t().getHistoryData(a,"scd");m(x)}}catch(b){console.error("获取历史数据时出错:",b)}finally{const b=c1(a.conf,a.uid,"scd");e.value&&e.value.port.postMessage({request:b,type:"send"}),r.value&&r.value.send(JSON.stringify(b))}},_=pt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&_()},{deep:!0}),l.watchEffect(()=>{a.conf.socketData&&g(a.conf.socketData)}),l.onMounted(async()=>{o(),a.mode==="preview"?y():u()}),l.onUnmounted(()=>{Ns(".echart-body").unset()}),(b,C)=>{var w,S,x,E,L,T,k,A,D,M,O,R,P;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor,fontSize:`${i.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body",id:n},[l.createElementVNode("div",{style:l.normalizeStyle({height:(S=(w=i.value)==null?void 0:w.outer)==null?void 0:S.height,width:(E=(x=i.value)==null?void 0:x.outer)==null?void 0:E.width,top:(T=(L=i.value)==null?void 0:L.outer)==null?void 0:T.top,left:(A=(k=i.value)==null?void 0:k.outer)==null?void 0:A.left}),class:"absolute"},[l.createElementVNode("div",{class:"w-[100%] h-[100%] relative",style:l.normalizeStyle({backgroundImage:`url(${v.value})`,backgroundSize:`${(M=(D=i.value)==null?void 0:D.inner)==null?void 0:M.width} ${(R=(O=i.value)==null?void 0:O.inner)==null?void 0:R.height}`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((P=t.conf)==null?void 0:P.data,(B,z)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:B.fv+"_"+z},[B.type=="ULG"?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`${n} liquid absolute`),id:`ULG_${n}_${B.fv}_${z}`,style:l.normalizeStyle({height:`${B.height}px`,left:`${B.x}px`,top:`${B.y}px`,zIndex:z})},[l.createElementVNode("div",{class:"liquid-bar",style:l.normalizeStyle({width:`${B.width}px`})},[l.createElementVNode("div",{class:"liquid-value",id:n+"_Liquid_"+B.fv,title:B.value,style:l.normalizeStyle({height:f(B).height,bottom:f(B).bottom})},null,12,Bce)],4),l.createElementVNode("div",{class:"liquid-scale",style:l.normalizeStyle({display:B.showScale===!1?"none":"flex"})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s(B.pieces),($,j)=>(l.openBlock(),l.createElementBlock("div",{class:"split",key:j,style:l.normalizeStyle({fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal"})},[l.createElementVNode("span",Fce,l.toDisplayString(c(j,B)),1)],4))),128))],4)],14,Pce)):B.type=="Signal"?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(`${n} signal absolute ${p(B)}`),style:l.normalizeStyle({width:`${B.fontSize}px`,height:`${B.fontSize}px`,left:`${B.x}px`,top:`${B.y}px`,zIndex:z}),id:`Signal_${n}_${B.fv}_${z}`},null,14,zce)):B.type=="Digit"?(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass(`${n} absolute`),style:l.normalizeStyle({left:`${B.x}px`,top:`${B.y}px`,color:B.color,fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal",zIndex:z}),id:`Digit_${n}_${B.fv}_${z}`},l.toDisplayString(B.value??B.default)+l.toDisplayString(B.unit?" "+B.unit:""),15,Vce)):B.type=="Status"?(l.openBlock(),l.createElementBlock("div",{key:3,class:l.normalizeClass(`${n} absolute status`),id:`Status_${n}_${B.fv}_${z}`,style:l.normalizeStyle({color:h(B).color,left:`${B.x}px`,top:`${B.y}px`,zIndex:z})},[l.createTextVNode(l.toDisplayString(B.name)+": ",1),l.createElementVNode("span",null,[l.createElementVNode("div",{style:l.normalizeStyle({"background-color":h(B).color}),id:"monitorStatus-"+B.fv},null,12,Uce),l.createElementVNode("span",{id:"monitorStatusSpan-"+B.fv,style:l.normalizeStyle({color:h(B).color})},l.toDisplayString(h(B).text),13,jce)])],14,$ce)):(l.openBlock(),l.createElementBlock("div",{key:4,class:l.normalizeClass(`${n} absolute plate`),id:`Plate_${n}_${B.fv}_${z}`,style:l.normalizeStyle({width:`${B.width}px`,fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal",left:`${B.x}px`,top:`${B.y}px`,zIndex:z})},[l.createElementVNode("div",{class:"name",style:l.normalizeStyle({color:B.titleColor,backgroundColor:B.titleBg})},l.toDisplayString(B.name||"--")+l.toDisplayString(B.unit?"/"+B.unit:""),5),l.createElementVNode("div",{class:"value",style:l.normalizeStyle({color:B.valueColor,backgroundColor:B.valueBg,borderColor:B.titleBg})},l.toDisplayString(B.value||"--"),5)],14,Hce))],64))),128))],4)],4)]),l.renderSlot(b.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-77c6de9a"]])},Symbol.toStringTag,{value:"Module"})),Wce={class:"dialog-footer"},H3={__name:"mix-control-modal",props:{password:{type:String,default:""}},emits:["submit"],setup(t,{expose:e,emit:r}){const n=r,a=t,i=l.ref(""),o=l.reactive({visible:!1,title:"密码验证"}),s=()=>{o.visible=!1},c=()=>{if(o.visible=!1,i.value!==a.password){v1.error("密码错误");return}n("submit")};return l.watchEffect(()=>{o.visible&&(i.value="")}),e({modal:o}),(u,d)=>{const f=no,p=ds,h=PO;return l.openBlock(),l.createBlock(h,{modelValue:o.visible,"onUpdate:modelValue":d[1]||(d[1]=v=>o.visible=v),title:o.title,width:"300px","append-to-body":""},{footer:l.withCtx(()=>[l.createElementVNode("div",Wce,[l.createVNode(p,{onClick:s},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("取消")])),_:1}),l.createVNode(p,{type:"primary",onClick:c},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("确定")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(f,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=v=>i.value=v)},null,8,["modelValue"])]),_:1},8,["modelValue","title"])}}},G3="control_authorized",Yce=(t,e)=>{let r=sessionStorage.getItem(G3)?JSON.parse(sessionStorage.getItem(G3)):{};r[t]=e,sessionStorage.setItem(G3,JSON.stringify(r))},rR=t=>(sessionStorage.getItem(G3)?JSON.parse(sessionStorage.getItem(G3)):{})[t],Zce=async t=>{let e={block_mapping:"object",action:"get_object_item",uid:t};return new Promise((r,n)=>{_t.platform(a=>{r(a)},e)})},W3=async t=>{const{conf:e,password:r,authorized:n}=t,{common:a}=e;if((localStorage.getItem("sys_mode")||null)==="box")return{password:r,authorized:n};let o={password:"",authorized:[]},s=a.object_id||t.uid;if(a.useAlias&&(s=JSON.parse(sessionStorage.getItem(rr))[a.object_alias]||""),!s)return o.authorized=n,o.password=r,o;if(rR(s))return rR(s);const{result:c}=await Zce(s);if(o.password=c==null?void 0:c.control,!(c!=null&&c.control_id))return o.authorized=[],o;let u={permission_user_id:J0.getUser().id,control_uid:c.control_id,block_mapping:"mixauth",action:"get_my_control_parameter"};return new Promise((d,f)=>{_t.platform(p=>{o.authorized=p.result,Yce(s,o),d(o)},u)})},Kce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-428.000000,%20-1211.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(428.226222,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",qce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-433.000000,%20-1211.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(433.664368,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Xce={class:"font-[600]"},Jce={class:"font-[600] opacity-[0.7]"},Qce={class:"echart-body"},eue={class:"ml-[12px] min-w-[70px]"},Y3="--",av=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:Kce,ACTIVE_ICON:qce,NAME_CN:"单参数",NAME_EN:"Single Parameter",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"文本颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:14,type:"number",label:"文本字体"},labelWidth:{value:100,type:"number",label:"标签宽度"},method:{value:"alway",type:"select",label:"验证方案",options:V3}},DATA:[{command:"Control_01",name:"参数一",unit:"",fv:""}],PARAMS:["name","fv","command","unit"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,hideMultiObject:!0}},{__name:"ctrSet",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},password:{type:String,default:""},socketData:{type:Object,default:()=>({})},authorized:{type:Array,default:()=>[]}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.reactive({authorized:[],password:""}),o=l.computed(()=>{const{data:b}=n.conf;return!b[0]||i.authorized.indexOf(b[0].command)===-1}),s=l.ref(""),c=l.computed(()=>s.value===""),u=()=>{var C,w,S,x,E,L,T;const{options:b}=n.conf;a.value={bgColor:((C=b==null?void 0:b.bgColor)==null?void 0:C.value)||"#fff",titleColor:((w=b==null?void 0:b.titleColor)==null?void 0:w.value)||"#111",textColor:((S=b==null?void 0:b.textColor)==null?void 0:S.value)||"#111",titleSize:((x=b==null?void 0:b.titleSize)==null?void 0:x.value)||14,textSize:((E=b==null?void 0:b.textSize)==null?void 0:E.value)||12,labelWidth:((L=b==null?void 0:b.labelWidth)==null?void 0:L.value)||100,radiusSize:((T=b==null?void 0:b.radiusSize)==null?void 0:T.value)??4}},d=l.computed(()=>{var C,w;const{data:b}=n.conf;return(((C=b==null?void 0:b[0])==null?void 0:C.value)||Y3)+" "+(((w=b==null?void 0:b[0])==null?void 0:w.unit)||"")}),f=b=>{n.conf.data.forEach((C,w)=>{var S;try{C.value=((S=b.history[w])==null?void 0:S[0][C.fv])??Y3}catch(x){console.error("设置历史数据时出错:",x),C.value=Y3}})},p=b=>{const{common:C,data:w}=n.conf,S=C.source||"mosaic",x=JSON.parse(sessionStorage.getItem(rr))||{};let E=C.useAlias?x[C.object_alias]:C.object_id||n.uid;w.forEach(L=>{var T,k,A;try{L.value=((A=(k=(T=b[E])==null?void 0:T[S])==null?void 0:k.data)==null?void 0:A[L.fv])??Y3}catch(D){console.error("设置实时数据时出错:",D),L.value=Y3}})},h=l.ref(null),v=l.ref(!0),m=()=>{var w;const{options:b}=n.conf;let C=((w=b==null?void 0:b.method)==null?void 0:w.value)||"alway";C==="alway"||C==="once"&&v.value?h.value.modal.visible=!0:g()},g=()=>{var L;const{common:b,data:C,options:w}=n.conf,S=JSON.parse(sessionStorage.getItem(rr))||{};let E={block_mapping:"pusher",action:"publish_command",object_id:b.useAlias?S[b.object_alias]:b.object_id||n.uid,command:C[0].command,value:s.value,control:i.password,rule:((L=w==null?void 0:w.method)==null?void 0:L.value)||"alway"};_t.platform(T=>{T.code===200&&(v1.success(T.msg),h.value.modal.visible=!1,v.value=!1)},E)},y=async()=>{const b=await W3(n);i.authorized=b.authorized,i.password=b.password;try{const w=await new $t().getHistoryData(n,"ctrSetGroup");f(w)}catch(C){console.error("获取历史数据时出错:",C)}finally{const C=c1(n.conf,n.uid,"ctrSetGroup");e.value&&e.value.port.postMessage({request:C,type:"send"}),r.value&&r.value.send(JSON.stringify(C))}},_=pt(u,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&_()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&p(n.conf.socketData)}),l.onMounted(()=>{u(),n.mode==="preview"&&y()}),(b,C)=>{var x,E;const w=no,S=ds;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[l.createElementVNode("div",{class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},[l.createElementVNode("div",Xce,l.toDisplayString(t.conf.name),1),l.createElementVNode("div",{class:"w-[2px] h-[18px] mx-[12px] opacity-[0.7]",style:l.normalizeStyle({backgroundColor:a.value.titleColor})},null,4),l.createElementVNode("div",Jce,l.toDisplayString(d.value),1)],4),l.createElementVNode("div",Qce,[l.createElementVNode("div",{class:"set-item",style:l.normalizeStyle({fontSize:`${a.value.textSize}px`,color:a.value.textColor})},[l.createElementVNode("div",{class:"item-name",style:l.normalizeStyle({width:`${a.value.labelWidth}px`})},l.toDisplayString(((E=(x=t.conf)==null?void 0:x.data[0])==null?void 0:E.name)||""),5),l.createVNode(w,{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=L=>s.value=L),disabled:o.value},null,8,["modelValue","disabled"]),l.createElementVNode("div",eue,[l.createVNode(S,{type:c.value?"default":"primary",style:{width:"100%"},onClick:m,disabled:c.value},{default:l.withCtx(()=>C[1]||(C[1]=[l.createTextVNode(" 确定 ")])),_:1},8,["type","disabled"])])],4)]),l.renderSlot(b.$slots,"default",{},void 0,!0)],4),l.createVNode(H3,{ref_key:"controlRef",ref:h,onSubmit:g,password:i.password},null,8,["password"])],64)}}}),[["__scopeId","data-v-4ae8f603"]])},Symbol.toStringTag,{value:"Module"})),tue="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-531.000000,%20-1209.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35备份'%20transform='translate(531.930087,%201210.335632)'%3e%3cpath%20d='M13.9770115,0%20C15.0434924,0%2015.9172245,0.825255696%2015.9944512,1.8720105%20L16,2.02298851%20L16,12.5057471%20C16,13.572228%2015.1747443,14.4459601%2014.1279895,14.5231868%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.95650761,14.5287356%200.0827755089,13.7034799%200.00554879087,12.6567251%20L0,12.5057471%20L0,2.02298851%20C0,0.95650761%200.825255696,0.0827755089%201.8720105,0.00554879087%20L2.02298851,0%20L13.9770115,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.65056661,1.28735632%201.34278281,1.56410496%201.29407178,1.92316758%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.878169%201.56410496,13.1859528%201.92316758,13.2346639%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3494334,13.2413793%2014.6572172,12.9646307%2014.7059282,12.6055681%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20Z%20M12.3022421,9.56321839%20C12.6577357,9.56321839%2012.9459203,9.85140292%2012.9459203,10.2068966%20C12.9459203,10.5327657%2012.7037652,10.8020765%2012.3895854,10.8446987%20L12.3022421,10.8505747%20L3.5862069,10.8505747%20C3.23071326,10.8505747%202.94252874,10.5623902%202.94252874,10.2068966%20C2.94252874,9.88102739%203.18468379,9.61171657%203.49886358,9.56909441%20L3.5862069,9.56321839%20L12.3022421,9.56321839%20Z%20M4.32183908,6.37422957%20C4.6661066,6.37422957%204.94724899,6.64450035%204.96466204,6.98443771%20C5.00109227,7.07027592%205.02183908,7.16489903%205.02183908,7.26436782%20C5.02183908,7.61875053%204.75849546,7.91162605%204.41682493,7.95797764%20L4.32183908,7.96436782%20L3.5862069,7.96436782%20C3.19960757,7.96436782%202.8862069,7.65096714%202.8862069,7.26436782%20C2.8862069,7.16567414%202.90663163,7.07175091%202.94348477,6.98659446%20L2.94252874,7.01790773%20C2.94252874,6.69203856%203.18468379,6.42272774%203.49886358,6.38010559%20L3.5862069,6.37422957%20L4.32183908,6.37422957%20Z%20M12.4137931,6.62068966%20C12.7692867,6.62068966%2013.0574713,6.90887418%2013.0574713,7.26436782%20C13.0574713,7.59023698%2012.8153162,7.8595478%2012.5011364,7.90216995%20L12.4137931,7.90804598%20L6.52873563,7.90804598%20C6.173242,7.90804598%205.88505747,7.61986145%205.88505747,7.26436782%20C5.88505747,6.93849865%206.12721253,6.66918783%206.44139232,6.62656568%20L6.52873563,6.62068966%20L12.4137931,6.62068966%20Z%20M12.4137931,3.86206897%20C12.7692867,3.86206897%2013.0574713,4.15025349%2013.0574713,4.50574713%20C13.0574713,4.83161629%2012.8153162,5.10092711%2012.5011364,5.14354926%20L12.4137931,5.14942529%20L6.52873563,5.14942529%20C6.173242,5.14942529%205.88505747,4.86124076%205.88505747,4.50574713%20C5.88505747,4.17987796%206.12721253,3.91056714%206.44139232,3.86794499%20L6.52873563,3.86206897%20L12.4137931,3.86206897%20Z%20M4.32183908,3.61560888%20C4.67733271,3.61560888%204.96551724,3.9037934%204.96551724,4.25928704%20C4.96551724,4.5851562%204.72336219,4.85446702%204.40918239,4.89708917%20L4.32183908,4.9029652%20L3.5862069,4.9029652%20C3.23071326,4.9029652%202.94252874,4.61478067%202.94252874,4.25928704%20C2.94252874,3.93341787%203.18468379,3.66410705%203.49886358,3.6214849%20L3.5862069,3.61560888%20L4.32183908,3.61560888%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",rue="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-537.000000,%20-1209.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35备份'%20transform='translate(537.368233,%201210.335632)'%3e%3cpath%20d='M13.9770115,0%20C15.0434924,0%2015.9172245,0.825255696%2015.9944512,1.8720105%20L16,2.02298851%20L16,12.5057471%20C16,13.572228%2015.1747443,14.4459601%2014.1279895,14.5231868%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.95650761,14.5287356%200.0827755089,13.7034799%200.00554879087,12.6567251%20L0,12.5057471%20L0,2.02298851%20C0,0.95650761%200.825255696,0.0827755089%201.8720105,0.00554879087%20L2.02298851,0%20L13.9770115,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.65056661,1.28735632%201.34278281,1.56410496%201.29407178,1.92316758%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.878169%201.56410496,13.1859528%201.92316758,13.2346639%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3494334,13.2413793%2014.6572172,12.9646307%2014.7059282,12.6055681%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20Z%20M12.3022421,9.56321839%20C12.6577357,9.56321839%2012.9459203,9.85140292%2012.9459203,10.2068966%20C12.9459203,10.5327657%2012.7037652,10.8020765%2012.3895854,10.8446987%20L12.3022421,10.8505747%20L3.5862069,10.8505747%20C3.23071326,10.8505747%202.94252874,10.5623902%202.94252874,10.2068966%20C2.94252874,9.88102739%203.18468379,9.61171657%203.49886358,9.56909441%20L3.5862069,9.56321839%20L12.3022421,9.56321839%20Z%20M4.32183908,6.37422957%20C4.6661066,6.37422957%204.94724899,6.64450035%204.96466204,6.98443771%20C5.00109227,7.07027592%205.02183908,7.16489903%205.02183908,7.26436782%20C5.02183908,7.61875053%204.75849546,7.91162605%204.41682493,7.95797764%20L4.32183908,7.96436782%20L3.5862069,7.96436782%20C3.19960757,7.96436782%202.8862069,7.65096714%202.8862069,7.26436782%20C2.8862069,7.16567414%202.90663163,7.07175091%202.94348477,6.98659446%20L2.94252874,7.01790773%20C2.94252874,6.69203856%203.18468379,6.42272774%203.49886358,6.38010559%20L3.5862069,6.37422957%20L4.32183908,6.37422957%20Z%20M12.4137931,6.62068966%20C12.7692867,6.62068966%2013.0574713,6.90887418%2013.0574713,7.26436782%20C13.0574713,7.59023698%2012.8153162,7.8595478%2012.5011364,7.90216995%20L12.4137931,7.90804598%20L6.52873563,7.90804598%20C6.173242,7.90804598%205.88505747,7.61986145%205.88505747,7.26436782%20C5.88505747,6.93849865%206.12721253,6.66918783%206.44139232,6.62656568%20L6.52873563,6.62068966%20L12.4137931,6.62068966%20Z%20M12.4137931,3.86206897%20C12.7692867,3.86206897%2013.0574713,4.15025349%2013.0574713,4.50574713%20C13.0574713,4.83161629%2012.8153162,5.10092711%2012.5011364,5.14354926%20L12.4137931,5.14942529%20L6.52873563,5.14942529%20C6.173242,5.14942529%205.88505747,4.86124076%205.88505747,4.50574713%20C5.88505747,4.17987796%206.12721253,3.91056714%206.44139232,3.86794499%20L6.52873563,3.86206897%20L12.4137931,3.86206897%20Z%20M4.32183908,3.61560888%20C4.67733271,3.61560888%204.96551724,3.9037934%204.96551724,4.25928704%20C4.96551724,4.5851562%204.72336219,4.85446702%204.40918239,4.89708917%20L4.32183908,4.9029652%20L3.5862069,4.9029652%20C3.23071326,4.9029652%202.94252874,4.61478067%202.94252874,4.25928704%20C2.94252874,3.93341787%203.18468379,3.66410705%203.49886358,3.6214849%20L3.5862069,3.61560888%20L4.32183908,3.61560888%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nue={class:"submint"},I6="--",iv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:tue,ACTIVE_ICON:rue,NAME_CN:"多参数",NAME_EN:"Multiparameter",ORDER:2},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"文本颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:14,type:"number",label:"文本字体"},labelWidth:{value:100,type:"number",label:"标签宽度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},method:{value:"alway",type:"select",label:"验证方案",options:V3}},DATA:[{command:"Control_01",name:"参数一",unit:"",fv:""}],PARAMS:["name","fv","command","unit"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,hideMultiObject:!0}},{__name:"ctrSetGroup",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},password:{type:String,default:""},socketData:{type:Object,default:()=>({})},authorized:{type:Array,default:()=>[]}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.reactive({authorized:[],password:""}),o=_=>i.authorized.indexOf(_.command)===-1,s=l.ref([]),c=l.computed(()=>{let _=0;return s.value.forEach((b,C)=>{b&&_++}),_===0}),u=()=>{var b,C,w,S,x,E,L,T;const{options:_}=n.conf;a.value={bgColor:((b=_==null?void 0:_.bgColor)==null?void 0:b.value)||"#fff",titleColor:((C=_==null?void 0:_.titleColor)==null?void 0:C.value)||"#111",textColor:((w=_==null?void 0:_.textColor)==null?void 0:w.value)||"#111",titleSize:((S=_==null?void 0:_.titleSize)==null?void 0:S.value)||14,textSize:((x=_==null?void 0:_.textSize)==null?void 0:x.value)||12,labelWidth:((E=_==null?void 0:_.labelWidth)==null?void 0:E.value)||100,radiusSize:((L=_==null?void 0:_.radiusSize)==null?void 0:L.value)??4,isHideTitle:((T=_==null?void 0:_.isHideTitle)==null?void 0:T.value)??!1}},d=_=>{n.conf.data.forEach((b,C)=>{var w;try{b.value=((w=_.history[C])==null?void 0:w[0][b.fv])??I6}catch(S){console.error("设置历史数据时出错:",S),b.value=I6}})},f=_=>{const{common:b,data:C}=n.conf,w=b.source||"mosaic",S=JSON.parse(sessionStorage.getItem(rr))||{};let x=b.useAlias?S[b.object_alias]:b.object_id||n.uid;C.forEach(E=>{var L,T,k;try{E.value=((k=(T=(L=_[x])==null?void 0:L[w])==null?void 0:T.data)==null?void 0:k[E.fv])??I6}catch(A){console.error("设置实时数据时出错:",A),E.value=I6}})},p=l.ref(null),h=l.ref(!0),v=(_,b)=>{var S;const{options:C}=n.conf;let w=((S=C==null?void 0:C.method)==null?void 0:S.value)||"alway";w==="alway"||w==="once"&&h.value?p.value.modal.visible=!0:m()},m=()=>{var L;const{common:_,data:b,options:C}=n.conf,w=JSON.parse(sessionStorage.getItem(rr))||{};let S=_.useAlias?w[_.object_alias]:_.object_id||n.uid,x=[];s.value.forEach((T,k)=>{T&&x.push({object_id:S,command:b[k].command,value:T})});let E={block_mapping:"pusher",action:"publish_command_plus",publishes:x,control:i.password,rule:((L=C==null?void 0:C.method)==null?void 0:L.value)||"alway"};_t.platform(T=>{T.code===200&&(v1.success(T.msg),p.value.modal.visible=!1,h.value=!1)},E)},g=async()=>{const _=await W3(n);i.authorized=_.authorized,i.password=_.password;try{const C=await new $t().getHistoryData(n,"ctrSetGroup");d(C)}catch(b){console.error("获取历史数据时出错:",b)}finally{const b=c1(n.conf,n.uid,"ctrSetGroup");e.value&&e.value.port.postMessage({request:b,type:"send"}),r.value&&r.value.send(JSON.stringify(b))}},y=pt(u,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&y()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&f(n.conf.socketData)}),l.onMounted(()=>{u(),n.mode==="preview"&&g()}),(_,b)=>{const C=no,w=ds;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",a.value.isHideTitle?"h-[100%]":"h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:"set-item",key:x,style:l.normalizeStyle({fontSize:`${a.value.textSize}px`,color:a.value.textColor})},[l.createElementVNode("div",{class:"item-name",style:l.normalizeStyle({width:`${a.value.labelWidth}px`})},l.toDisplayString(S.name),5),l.createVNode(C,{modelValue:s.value[x],"onUpdate:modelValue":E=>s.value[x]=E,disabled:o(S)},null,8,["modelValue","onUpdate:modelValue","disabled"]),l.createElementVNode("div",{class:"item-value",style:l.normalizeStyle([{"margin-left":"12px"},{background:a.value.bgColor}])},l.toDisplayString(S.value),5)],4))),128)),l.createElementVNode("div",nue,[l.createVNode(w,{type:c.value?"default":"primary",onClick:v,disabled:c.value},{default:l.withCtx(()=>b[0]||(b[0]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])],2),l.renderSlot(_.$slots,"default",{},void 0,!0)],4),l.createVNode(H3,{ref_key:"controlRef",ref:p,onSubmit:m,password:i.password},null,8,["password"])],64)}}}),[["__scopeId","data-v-8aacc734"]])},Symbol.toStringTag,{value:"Module"})),ov="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e饼图-B%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-658.000000,%20-609.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-41备份'%20transform='translate(658.250000,%20612.574747)'%3e%3cpath%20d='M4.42525253,0%20C6.86925202,0%208.85050506,1.98125304%208.85050506,4.42525253%20C8.85050506,6.86925202%206.86925202,8.85050506%204.42525253,8.85050506%20C1.98125304,8.85050506%200,6.86925202%200,4.42525253%20C0,1.98125304%201.98125304,0%204.42525253,0%20Z%20M11.4469893,7.49145708%20C11.7950103,7.49145708%2012.077137,7.77358381%2012.077137,8.12160476%20C12.077137,8.44062397%2011.8400722,8.70427373%2011.5324966,8.74599994%20L11.4469893,8.75175245%20L10.7931788,8.75175245%20C10.4451579,8.75175245%2010.1630311,8.46962572%2010.1630311,8.12160476%20C10.1630311,7.80258555%2010.400096,7.5389358%2010.7076715,7.49720958%20L10.7931788,7.49145708%20L11.4469893,7.49145708%20Z%20M4.42525253,1.26029537%20C2.67729496,1.26029537%201.26029537,2.67729496%201.26029537,4.42525253%20C1.26029537,6.1732101%202.67729496,7.59020969%204.42525253,7.59020969%20C6.1732101,7.59020969%207.59020969,6.1732101%207.59020969,4.42525253%20C7.59020969,2.67729496%206.1732101,1.26029537%204.42525253,1.26029537%20Z%20M12.7546103,5.02722225%20C13.1026313,5.02722225%2013.384758,5.30934898%2013.384758,5.65736994%20C13.384758,5.97638915%2013.1476932,6.24003891%2012.8401176,6.28176512%20L12.7546103,6.28751763%20L10.7931788,6.28751763%20C10.4451579,6.28751763%2010.1630311,6.0053909%2010.1630311,5.65736994%20C10.1630311,5.33835073%2010.400096,5.07470098%2010.7076715,5.03297476%20L10.7931788,5.02722225%20L12.7546103,5.02722225%20Z%20M4.42525253,2.76007625%20C5.34490684,2.76007625%206.09042881,3.50559822%206.09042881,4.42525253%20C6.09042881,5.34490684%205.34490684,6.09042881%204.42525253,6.09042881%20C3.50559822,6.09042881%202.76007625,5.34490684%202.76007625,4.42525253%20C2.76007625,3.50559822%203.50559822,2.76007625%204.42525253,2.76007625%20Z%20M4.42525253,4.02037162%20C4.20164013,4.02037162%204.02037162,4.20164013%204.02037162,4.42525253%20C4.02037162,4.64886493%204.20164013,4.83013344%204.42525253,4.83013344%20C4.64886493,4.83013344%204.83013344,4.64886493%204.83013344,4.42525253%20C4.83013344,4.20164013%204.64886493,4.02037162%204.42525253,4.02037162%20Z%20M14.0622313,2.56298743%20C14.4102523,2.56298743%2014.692379,2.84511416%2014.692379,3.19313512%20C14.692379,3.51215433%2014.4553142,3.77580409%2014.1477386,3.8175303%20L14.0622313,3.82328281%20L10.7931788,3.82328281%20C10.4451579,3.82328281%2010.1630311,3.54115608%2010.1630311,3.19313512%20C10.1630311,2.87411591%2010.400096,2.61046615%2010.7076715,2.56873994%20L10.7931788,2.56298743%20L14.0622313,2.56298743%20Z%20M15.3698523,0.0987526126%20C15.7178733,0.0987526126%2016,0.380879342%2016,0.728900299%20C16,1.04791951%2015.7629352,1.31156927%2015.4553596,1.35329548%20L15.3698523,1.35904799%20L10.7931788,1.35904799%20C10.4451579,1.35904799%2010.1630311,1.07692126%2010.1630311,0.728900299%20C10.1630311,0.409881088%2010.400096,0.146231333%2010.7076715,0.104505118%20L10.7931788,0.0987526126%20L15.3698523,0.0987526126%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",sv="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e饼图-%20W%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-658.000000,%20-633.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-41备份-2'%20transform='translate(658.073832,%20636.954757)'%3e%3cpath%20d='M4.42525253,0%20C6.86925202,0%208.85050506,1.98125304%208.85050506,4.42525253%20C8.85050506,6.86925202%206.86925202,8.85050506%204.42525253,8.85050506%20C1.98125304,8.85050506%200,6.86925202%200,4.42525253%20C0,1.98125304%201.98125304,0%204.42525253,0%20Z%20M11.4469893,7.49145708%20C11.7950103,7.49145708%2012.077137,7.77358381%2012.077137,8.12160476%20C12.077137,8.44062397%2011.8400722,8.70427373%2011.5324966,8.74599994%20L11.4469893,8.75175245%20L10.7931788,8.75175245%20C10.4451579,8.75175245%2010.1630311,8.46962572%2010.1630311,8.12160476%20C10.1630311,7.80258555%2010.400096,7.5389358%2010.7076715,7.49720958%20L10.7931788,7.49145708%20L11.4469893,7.49145708%20Z%20M4.42525253,1.26029537%20C2.67729496,1.26029537%201.26029537,2.67729496%201.26029537,4.42525253%20C1.26029537,6.1732101%202.67729496,7.59020969%204.42525253,7.59020969%20C6.1732101,7.59020969%207.59020969,6.1732101%207.59020969,4.42525253%20C7.59020969,2.67729496%206.1732101,1.26029537%204.42525253,1.26029537%20Z%20M12.7546103,5.02722225%20C13.1026313,5.02722225%2013.384758,5.30934898%2013.384758,5.65736994%20C13.384758,5.97638915%2013.1476932,6.24003891%2012.8401176,6.28176512%20L12.7546103,6.28751763%20L10.7931788,6.28751763%20C10.4451579,6.28751763%2010.1630311,6.0053909%2010.1630311,5.65736994%20C10.1630311,5.33835073%2010.400096,5.07470098%2010.7076715,5.03297476%20L10.7931788,5.02722225%20L12.7546103,5.02722225%20Z%20M4.42525253,2.76007625%20C5.34490684,2.76007625%206.09042881,3.50559822%206.09042881,4.42525253%20C6.09042881,5.34490684%205.34490684,6.09042881%204.42525253,6.09042881%20C3.50559822,6.09042881%202.76007625,5.34490684%202.76007625,4.42525253%20C2.76007625,3.50559822%203.50559822,2.76007625%204.42525253,2.76007625%20Z%20M4.42525253,4.02037162%20C4.20164013,4.02037162%204.02037162,4.20164013%204.02037162,4.42525253%20C4.02037162,4.64886493%204.20164013,4.83013344%204.42525253,4.83013344%20C4.64886493,4.83013344%204.83013344,4.64886493%204.83013344,4.42525253%20C4.83013344,4.20164013%204.64886493,4.02037162%204.42525253,4.02037162%20Z%20M14.0622313,2.56298743%20C14.4102523,2.56298743%2014.692379,2.84511416%2014.692379,3.19313512%20C14.692379,3.51215433%2014.4553142,3.77580409%2014.1477386,3.8175303%20L14.0622313,3.82328281%20L10.7931788,3.82328281%20C10.4451579,3.82328281%2010.1630311,3.54115608%2010.1630311,3.19313512%20C10.1630311,2.87411591%2010.400096,2.61046615%2010.7076715,2.56873994%20L10.7931788,2.56298743%20L14.0622313,2.56298743%20Z%20M15.3698523,0.0987526126%20C15.7178733,0.0987526126%2016,0.380879342%2016,0.728900299%20C16,1.04791951%2015.7629352,1.31156927%2015.4553596,1.35329548%20L15.3698523,1.35904799%20L10.7931788,1.35904799%20C10.4451579,1.35904799%2010.1630311,1.07692126%2010.1630311,0.728900299%20C10.1630311,0.409881088%2010.400096,0.146231333%2010.7076715,0.104505118%20L10.7931788,0.0987526126%20L15.3698523,0.0987526126%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",aue={class:"echart-body"},iue={class:"bar-wrap"},oue={DEFAULT_ICON:ov,ACTIVE_ICON:sv,NAME_CN:"环形图",NAME_EN:"CircleBar",ORDER:2},sue={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#e5e5e5",type:"color",label:"进度条底色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"环形字体"},barHeight:{value:10,type:"number",label:"环形高度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showTotal:{value:!0,type:"checkbox",label:"是否显示总数"},fixed:{value:2,type:"number",label:"保留小数",dependent:"showTotal"},totalText:{value:"总数",type:"string",label:"总数文本",dependent:"showTotal"}},nR=[{name:"参数一",fv:"",color:"#4162ff",object_id:"",default:""},{name:"参数二",fv:"",color:"#3bbc6a",object_id:"",default:""},{name:"参数三",fv:"",color:"#e24359",object_id:"",default:""}],lv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:oue,OPTIONS:sue,DATA:nR,PARAMS:["name","fv","object_id","color","default"],SOURCE:["mosaic","statistics","calculate"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"circleBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,p1,g1,N0]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="bar_"+Math.random().toString(16).substring(4,12);let a=null,i=null,o=0;const s=t,c=l.ref({}),u=()=>{var _,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P;const{conf:y}=s;c.value={bgColor:((b=(_=y==null?void 0:y.options)==null?void 0:_.bgColor)==null?void 0:b.value)||"#73bff9",titleColor:((w=(C=y==null?void 0:y.options)==null?void 0:C.titleColor)==null?void 0:w.value)||"#111",textColor:((x=(S=y==null?void 0:y.options)==null?void 0:S.textColor)==null?void 0:x.value)||"#111",barColor:((L=(E=y==null?void 0:y.options)==null?void 0:E.barColor)==null?void 0:L.value)||"#202755",radiusSize:((k=(T=y==null?void 0:y.options)==null?void 0:T.radiusSize)==null?void 0:k.value)??4,textSize:((D=(A=y==null?void 0:y.options)==null?void 0:A.textSize)==null?void 0:D.value)??12,barHeight:((O=(M=y==null?void 0:y.options)==null?void 0:M.barHeight)==null?void 0:O.value)??10,isHideTitle:((P=(R=y==null?void 0:y.options)==null?void 0:R.isHideTitle)==null?void 0:P.value)||!1},y.data=y.data.length?y.data:nR,l.nextTick(()=>{let B=document.querySelector("#"+n);B&&(a||(a=o1(B),i=Qt({strategy:"scroll"}),i.listenTo(B,function(){a.resize()})),a.setOption(d(),!0))})},d=()=>{var w;const{data:y,options:_}=s.conf;let b=y.map((S,x)=>S.color||wn[x]);var C={title:{zlevel:0,show:_.showTotal.value,text:[`{value|${o}}`,`{name|${(w=_==null?void 0:_.totalText)==null?void 0:w.value}}`].join(`
295
+ `),v}},visualMap:[{show:!1,min:0,max:10,range:[0,10],x:"left",y:"bottom",text:["高","低"],calculable:!0}],series:[{name:"中国",coordinateSystem:"geo",type:"effectScatter",data:o.value,symbolSize:24,rippleEffect:{number:0,scale:1},label:{show:!0,formatter:"{b}",position:["50%","50%"],color:"#fff",fontSize:12,fontWeight:400},itemStyle:{show:!0,areaColor:"#ff0000",color:"#FFFFFF",borderWidth:1},symbol:"image://data:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1QkNERUMzQkIyQTExRTg4QURFOTM3MjI1MTkxNEFCIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1QkNERUM0QkIyQTExRTg4QURFOTM3MjI1MTkxNEFCIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTVCQ0RFQzFCQjJBMTFFODhBREU5MzcyMjUxOTE0QUIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTVCQ0RFQzJCQjJBMTFFODhBREU5MzcyMjUxOTE0QUIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5/ObexAAADlUlEQVR42syYS0iUURTH534+ZiZHU3roVGrWwiiKHgQmUW2CXpSlBIVthKJF9oCkRSAWERaBKBgtXIQuWkRhi7BaVFAO9iDDQMoKe6nhZGo648zozNf/DGcih/meM4UXfszM/b577v/77jn3njNClmXLTGrJ0R3CNfzfJpeLs7QF6WwLQAkoBoVgLvf/AO9AO7gD+o0aFtFLpvGGloNzYC9I0rAdBK2gGnTrfUOSXuGgCnSCMh1iLHxPKY+pYhuaTdJpuAlcBqkmljeVxzbpmU+PoCugIgE+XMG24hK0HZxMYGCdYpumBNFS1WlM8AwcA5vBVnAG9GiMqVPzQTVB2zikYwYIvTlESRForMm1d4Pn+E6+sgI0qtgtZNuGBZWoXDuPyevr+n0Hu7zBX9W5NvfZRbZR19jU94t59nW4Xgluq4zfY2Yf6gIrY4xxg9xL+fY1R3OsrowkMS2ce32hQLM7kF3zdWIOfr5XCPc3YJXRfahAob8dhvwFNqk2Wkx4kE1KdaaKatzzkQUZsa0qyKrQT8eDJT1JOJUGpkliKX/9adC2qiC3Qn94soGA3KE0cGhKbsPSk+0lag9lVNBrhf6NmCzviz9U2ekJjkZfvD8y2XPcab3G28B8g7ZVT/s2sCNGfwq4Dqel0M3p8gSb8q3SpoAsBz75Q61Hsq2nIXieRui3mYkySil6gUNh7GNwGM77IWr8enw0g2UK48bBYlpZo/kQrXMtuKBwfQt4CwEuDmM6RGkPWq1xspPNIbP5EPnYXbWd1WB7yg8SNJsPhUA5+JwAMd/AgYiYeNKPIU7KvHGIGQP7WFTc+RC1l5z9BUyIoQfZCV4kKmOMtHu8fJMGxewCT/QOkAw+7U2wX+eb8nMx8MjIBJKJJWhlf1DzKQ/YDR7EXSgqKh/IFFyP5dHhKKf5G+T0iRPYcezTUzcxIcZsDcJjpQ11A/hC9VnIOaKrRNasyyCEJiwCa+mQnza3bTJbzvSWw4qDxYyLkVktwpcyGCPKXlHKC2FetbpMVRDELOS9w6Fc5ExlhbI8h8L3D6e1WALJapUmHRs3IKrPbCldpiqGGgRIgxmN/IaCGvYcbLPerA+F9P1roCnEfG3/pwa6Fe7XXjJjLbxkoC9YKky9IVrrq385tSMOIeTUHVpHkJ6wJwMPeYOLhD3l0+SRszlhs/G9Pt7JKZMk5x6IhD3Xconbh9hgH/PPmphpf+n9FmAATyEp4C2loPgAAAAASUVORK5CYII="},{name:"省会坐标",type:"scatter",coordinateSystem:"geo",symbol:"circle",symbolSize:8,data:Oce(),label:{show:!0,formatter:"{b}",position:"right",color:"#fff",fontSize:12,fontWeight:400},itemStyle:{color:"#fff"}}]};return p},u=async()=>{const{result:p}=await _t.post("get_object_list");var h=/^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/,v=/^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;p.data.length&&(o.value=[],p.data.forEach(m=>{let g="";if(m.gis||m.gis.split(",").length>1){let b=m.gis.split(",");g=h.test(b[1])&&v.test(b[0])?m.gis:m.custom_gis}else g=m.custom_gis;let y=g.split(","),_=m.province+" "+m.city;if(y[0]&&y[1]){let b=[y[1],y[0],m.name,m.uid,_];o.value.push(b)}}),r.setOption(c(),!0))},d=p=>{if(p){let h=location.href;h.indexOf("?object_id=")>-1&&(h=h.split("?object_id=")[0]);let v=h+"?object_id="+p;location.href=v,location.reload()}else{v1.error("未配置跳转参数");return}},f=pt(s,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&f()},{deep:!0}),l.onMounted(()=>{l.nextTick(()=>{mw("china",{geoJSON:Ice}),window.toDetail=d}),s(),a.mode==="preview"&&u()}),l.onBeforeUnmount(()=>{n&&n.uninstall(document.querySelector("#"+e)),r&&r.clear(),r&&h1(r),r=null}),(p,h)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:e})]),l.renderSlot(p.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6909b443"]])},Symbol.toStringTag,{value:"Module"})),Nce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组态图%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-102.000000,%20-636.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M105.586207,636.65%20C105.941701,636.65%20106.229885,636.938185%20106.229885,637.293678%20L106.229885,637.293678%20L106.229,638.121%20L113.77,638.121%20L113.770115,637.293678%20C113.770115,636.970502%20114.008284,636.702953%20114.318675,636.656979%20L114.413793,636.65%20L117.356322,636.65%20C117.711815,636.65%20118,636.938185%20118,637.293678%20L118,637.293678%20L118,640.236207%20C118,640.591701%20117.711815,640.879885%20117.356322,640.879885%20L117.356322,640.879885%20L116.528,640.879%20L116.528,648.42%20L117.356322,648.420115%20C117.679498,648.420115%20117.947047,648.658284%20117.993021,648.968675%20L118,649.063793%20L118,652.006322%20C118,652.361815%20117.711815,652.65%20117.356322,652.65%20L117.356322,652.65%20L114.413793,652.65%20C114.058299,652.65%20113.770115,652.361815%20113.770115,652.006322%20L113.770115,652.006322%20L113.77,651.178%20L106.229,651.178%20L106.229885,652.006322%20C106.229885,652.329498%20105.991716,652.597047%20105.681325,652.643021%20L105.586207,652.65%20L102.643678,652.65%20C102.288185,652.65%20102,652.361815%20102,652.006322%20L102,652.006322%20L102,649.063793%20C102,648.708299%20102.288185,648.420115%20102.643678,648.420115%20L102.643678,648.420115%20L103.471,648.42%20L103.471,640.879%20L102.643678,640.879885%20C102.320502,640.879885%20102.052953,640.641716%20102.006979,640.331325%20L102,640.236207%20L102,637.293678%20C102,636.938185%20102.288185,636.65%20102.643678,636.65%20L102.643678,636.65%20Z%20M116.712644,649.707471%20L115.057471,649.707471%20L115.057471,651.362644%20L116.712644,651.362644%20L116.712644,649.707471%20Z%20M104.942529,649.707471%20L103.287356,649.707471%20L103.287356,651.362644%20L104.942529,651.362644%20L104.942529,649.707471%20Z%20M113.77,639.408%20L106.229,639.408%20L106.229885,640.236207%20C106.229885,640.559383%20105.991716,640.826932%20105.681325,640.872906%20L105.586207,640.879885%20L104.758,640.879%20L104.758,648.42%20L105.586207,648.420115%20C105.909383,648.420115%20106.176932,648.658284%20106.222906,648.968675%20L106.229885,649.063793%20L106.229,649.891%20L113.77,649.891%20L113.770115,649.063793%20C113.770115,648.740617%20114.008284,648.473068%20114.318675,648.427094%20L114.413793,648.420115%20L115.241,648.42%20L115.241,640.879%20L114.413793,640.879885%20C114.090617,640.879885%20113.823068,640.641716%20113.777094,640.331325%20L113.770115,640.236207%20L113.77,639.408%20Z%20M110.588506,641.063793%20C110.943999,641.063793%20111.232184,641.351978%20111.232184,641.707471%20L111.232184,641.707471%20L111.232184,643.416897%20L112.942529,643.417816%20C113.268398,643.417816%20113.537709,643.659971%20113.580331,643.974151%20L113.580331,643.974151%20L113.586207,644.061494%20L113.586207,647.592529%20C113.586207,647.948022%20113.298022,648.236207%20112.942529,648.236207%20L112.942529,648.236207%20L109.411494,648.236207%20C109.056001,648.236207%20108.767816,647.948022%20108.767816,647.592529%20L108.767816,647.592529%20L108.767816,645.882184%20L107.057471,645.882184%20C106.731602,645.882184%20106.462291,645.640029%20106.419669,645.325849%20L106.419669,645.325849%20L106.413793,645.238506%20L106.413793,641.707471%20C106.413793,641.351978%20106.701978,641.063793%20107.057471,641.063793%20L107.057471,641.063793%20Z%20M109.944828,642.351149%20L107.701149,642.351149%20L107.701149,644.593908%20L109.411494,644.594828%20C109.737363,644.594828%20110.006674,644.836983%20110.049296,645.151162%20L110.049296,645.151162%20L110.055172,645.238506%20L110.055172,646.947931%20L112.298851,646.947931%20L112.298851,644.705172%20L110.588506,644.705172%20C110.262637,644.705172%20109.993326,644.463017%20109.950704,644.148838%20L109.950704,644.148838%20L109.944828,644.061494%20L109.944828,642.351149%20Z%20M104.942529,637.937356%20L103.287356,637.937356%20L103.287356,639.592529%20L104.942529,639.592529%20L104.942529,637.937356%20Z%20M116.712644,637.937356%20L115.057471,637.937356%20L115.057471,639.592529%20L116.712644,639.592529%20L116.712644,637.937356%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Rce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组态图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-102.000000,%20-636.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M105.586207,636.65%20C105.941701,636.65%20106.229885,636.938185%20106.229885,637.293678%20L106.229885,637.293678%20L106.229,638.121%20L113.77,638.121%20L113.770115,637.293678%20C113.770115,636.970502%20114.008284,636.702953%20114.318675,636.656979%20L114.413793,636.65%20L117.356322,636.65%20C117.711815,636.65%20118,636.938185%20118,637.293678%20L118,637.293678%20L118,640.236207%20C118,640.591701%20117.711815,640.879885%20117.356322,640.879885%20L117.356322,640.879885%20L116.528,640.879%20L116.528,648.42%20L117.356322,648.420115%20C117.679498,648.420115%20117.947047,648.658284%20117.993021,648.968675%20L118,649.063793%20L118,652.006322%20C118,652.361815%20117.711815,652.65%20117.356322,652.65%20L117.356322,652.65%20L114.413793,652.65%20C114.058299,652.65%20113.770115,652.361815%20113.770115,652.006322%20L113.770115,652.006322%20L113.77,651.178%20L106.229,651.178%20L106.229885,652.006322%20C106.229885,652.329498%20105.991716,652.597047%20105.681325,652.643021%20L105.586207,652.65%20L102.643678,652.65%20C102.288185,652.65%20102,652.361815%20102,652.006322%20L102,652.006322%20L102,649.063793%20C102,648.708299%20102.288185,648.420115%20102.643678,648.420115%20L102.643678,648.420115%20L103.471,648.42%20L103.471,640.879%20L102.643678,640.879885%20C102.320502,640.879885%20102.052953,640.641716%20102.006979,640.331325%20L102,640.236207%20L102,637.293678%20C102,636.938185%20102.288185,636.65%20102.643678,636.65%20L102.643678,636.65%20Z%20M116.712644,649.707471%20L115.057471,649.707471%20L115.057471,651.362644%20L116.712644,651.362644%20L116.712644,649.707471%20Z%20M104.942529,649.707471%20L103.287356,649.707471%20L103.287356,651.362644%20L104.942529,651.362644%20L104.942529,649.707471%20Z%20M113.77,639.408%20L106.229,639.408%20L106.229885,640.236207%20C106.229885,640.559383%20105.991716,640.826932%20105.681325,640.872906%20L105.586207,640.879885%20L104.758,640.879%20L104.758,648.42%20L105.586207,648.420115%20C105.909383,648.420115%20106.176932,648.658284%20106.222906,648.968675%20L106.229885,649.063793%20L106.229,649.891%20L113.77,649.891%20L113.770115,649.063793%20C113.770115,648.740617%20114.008284,648.473068%20114.318675,648.427094%20L114.413793,648.420115%20L115.241,648.42%20L115.241,640.879%20L114.413793,640.879885%20C114.090617,640.879885%20113.823068,640.641716%20113.777094,640.331325%20L113.770115,640.236207%20L113.77,639.408%20Z%20M110.588506,641.063793%20C110.943999,641.063793%20111.232184,641.351978%20111.232184,641.707471%20L111.232184,641.707471%20L111.232184,643.416897%20L112.942529,643.417816%20C113.268398,643.417816%20113.537709,643.659971%20113.580331,643.974151%20L113.580331,643.974151%20L113.586207,644.061494%20L113.586207,647.592529%20C113.586207,647.948022%20113.298022,648.236207%20112.942529,648.236207%20L112.942529,648.236207%20L109.411494,648.236207%20C109.056001,648.236207%20108.767816,647.948022%20108.767816,647.592529%20L108.767816,647.592529%20L108.767816,645.882184%20L107.057471,645.882184%20C106.731602,645.882184%20106.462291,645.640029%20106.419669,645.325849%20L106.419669,645.325849%20L106.413793,645.238506%20L106.413793,641.707471%20C106.413793,641.351978%20106.701978,641.063793%20107.057471,641.063793%20L107.057471,641.063793%20Z%20M109.944828,642.351149%20L107.701149,642.351149%20L107.701149,644.593908%20L109.411494,644.594828%20C109.737363,644.594828%20110.006674,644.836983%20110.049296,645.151162%20L110.049296,645.151162%20L110.055172,645.238506%20L110.055172,646.947931%20L112.298851,646.947931%20L112.298851,644.705172%20L110.588506,644.705172%20C110.262637,644.705172%20109.993326,644.463017%20109.950704,644.148838%20L109.950704,644.148838%20L109.944828,644.061494%20L109.944828,642.351149%20Z%20M104.942529,637.937356%20L103.287356,637.937356%20L103.287356,639.592529%20L104.942529,639.592529%20L104.942529,637.937356%20Z%20M116.712644,637.937356%20L115.057471,637.937356%20L115.057471,639.592529%20L116.712644,639.592529%20L116.712644,637.937356%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Pce=["id"],Bce=["id","title"],Fce={class:"num"},zce=["id"],Vce=["id"],$ce=["id"],Uce=["id"],jce=["id"],Hce=["id"],Gce="--",nv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:Nce,ACTIVE_ICON:Rce,NAME_CN:"组态图",NAME_EN:"Scd",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},bgImg:{value:"",type:"image",label:"背景图片"},outer:{value:{width:"100%",height:"100%",top:"0%",left:"0%"},type:"object",label:"容器大小"},inner:{value:{width:"100%",height:"100%"},type:"object",label:"图片大小"},multipleImg:{value:!1,type:"checkbox",label:"是否设置多图"},statusFv:{value:"",type:"string",label:"状态FV",required:!0,dependent:"multipleImg"},object:{value:"",type:"string",label:"对象",dependent:"multipleImg"},images:{value:[{code:"0",value:""}],type:"status",label:"",dependent:"multipleImg"},isHideTitle:{value:!0,type:"checkbox",label:"是否隐藏标题"}},DATA:[{name:"参数一",fv:"",width:100,object_id:"",source:"mosaic",type:"Plate",titleBg:"#006eaf",titleColor:"#fff",valueBg:"#fff",valueColor:"#006eaf",fontSize:12,isBold:!1}],PARAMS:["name","fv","object_id","source","type","width","fontSize","titleColor","titleBg","valueColor","valueBg","isBold"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"scd",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="monitor_"+Math.random().toString(16).substring(4,12),a=t,i=l.ref({}),o=()=>{var w,S,x,E,L,T,k,A,D,M,O;const{options:b,data:C}=a.conf;i.value={bgColor:((w=b==null?void 0:b.bgColor)==null?void 0:w.value)||"#fff",bgImg:((S=b==null?void 0:b.bgImg)==null?void 0:S.value)||"",radiusSize:((x=b==null?void 0:b.radiusSize)==null?void 0:x.value)??4,isHideTitle:((E=b==null?void 0:b.isHideTitle)==null?void 0:E.value)??!1,outer:((L=b==null?void 0:b.outer)==null?void 0:L.value)??{width:"95%",height:"95%",top:"5%",left:"5%"},inner:((T=b==null?void 0:b.inner)==null?void 0:T.value)??{width:"100%",height:"100%"}},(k=b==null?void 0:b.multipleImg)!=null&&k.value&&(i.value.multipleImg=(A=b==null?void 0:b.multipleImg)==null?void 0:A.value,i.value.statusFv=(D=b==null?void 0:b.statusFv)==null?void 0:D.value,i.value.images=(M=b==null?void 0:b.images)==null?void 0:M.value,i.value.object=(O=b==null?void 0:b.object)==null?void 0:O.value),v.value=i.value.bgImg,l.nextTick(()=>{let R=document.getElementById(n);R.offsetWidth,R.offsetHeight,l.nextTick(()=>{let P=document.getElementById(n).clientWidth,B=document.getElementById(n).clientHeight;C.forEach(z=>{let $=a.conf.height||B;if(typeof z.x=="number"){let j=z.x/P,Z=z.y/B;z.x=`${j*100}%`,z.y=`${Z*100}%`}z.height=Math.floor(B/$*z.height)}),a.conf.height=B})})},s=b=>{let C=5;return/^\d+$/.test(b)&&(C=Number(b)),C+1},c=(b,C)=>{let w=C.pieces?Number(C.pieces):5,S=C.max?Number(C.max):100,x=C.min?Number(C.min):0,E=S-x,L=parseInt(E/w);return S-L*b},u=()=>{Ns("."+n).draggable({modifiers:[Ns.modifiers.restrictRect({restriction:"parent",endOnly:!0})],onmove(b){d(b)}})},d=b=>{const{data:C}=a.conf;let w=b.target;C.forEach((S,x)=>{`${S.type}_${n}_${S.fv}_${x}`===w.id&&(S.x=S.x+b.dx,S.y=S.y+b.dy)})},f=b=>{let C=b.max-b.min,w,S;return b.value<b.startValue?(w=Math.abs((b.value-b.startValue)/C*b.height),S=b.value/C*b.height):(w=Math.abs((b.value-b.startValue)/C*b.height),S=b.startValue/C*b.height),{height:`${w}px`,bottom:`${S}px`}},p=b=>{let C="standby";return String(b.value)===b.online&&(C="online"),String(b.value)===b.offline&&(C="offline"),C},h=b=>{let C={text:"",color:b.color};return b.status.forEach(w=>{String(b.value)===String(w.code)&&(C.text=w.text,C.color=w.color)}),C},v=l.ref(""),m=b=>{const{data:C}=a.conf;if(C.forEach((w,S)=>{var x,E;try{w.value=((E=(x=b.history[S])==null?void 0:x[0])==null?void 0:E[w.fv])??w.default}catch(L){console.error("设置历史数据时出错:",L),w.value=Gce}}),i.value.multipleImg){let w=b.history.length-1,S=i.value.images.find(x=>{var E,L;return String(x.code)===String((L=(E=b.history[w])==null?void 0:E[0])==null?void 0:L[i.value.statusFv])});v.value=S.value||i.value.bgImg}},g=b=>{const{common:C,data:w}=a.conf,S=C.source||"mosaic";let x="";if(C.multiObject||(x=je(C,C.useAlias,a.uid)),w.forEach((E,L)=>{var T,k,A;C.multiObject&&(x=je(E,C.useAlias,a.uid));try{E.value=((A=(k=(T=b[x])==null?void 0:T[S])==null?void 0:k.data)==null?void 0:A[E.fv])??E.default}catch(D){console.error("设置实时数据时出错:",D),E.value=E.default}}),i.value.multipleImg){let E=i.value.object;C.useAlias&&(E=aliasMapping[i.value.object]||a.uid);let L=i.value.images.find(T=>{var k,A,D;return String(T.code)===String((D=(A=(k=b[E])==null?void 0:k.mosaic)==null?void 0:A.data)==null?void 0:D[i.value.statusFv])});v.value=(L==null?void 0:L.value)||i.value.bgImg}},y=async()=>{try{const{data:b,common:C}=a.conf,w=C.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(w)){const x=await new $t().getHistoryData(a,"scd");m(x)}}catch(b){console.error("获取历史数据时出错:",b)}finally{const b=c1(a.conf,a.uid,"scd");e.value&&e.value.port.postMessage({request:b,type:"send"}),r.value&&r.value.send(JSON.stringify(b))}},_=pt(o,100);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&_()},{deep:!0}),l.watchEffect(()=>{a.conf.socketData&&g(a.conf.socketData)}),l.onMounted(async()=>{_(),a.mode==="preview"?y():u()}),l.onUnmounted(()=>{Ns(".echart-body").unset()}),(b,C)=>{var w,S,x,E,L,T,k,A,D,M,O,R,P;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor,fontSize:`${i.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body",id:n},[l.createElementVNode("div",{style:l.normalizeStyle({height:(S=(w=i.value)==null?void 0:w.outer)==null?void 0:S.height,width:(E=(x=i.value)==null?void 0:x.outer)==null?void 0:E.width,top:(T=(L=i.value)==null?void 0:L.outer)==null?void 0:T.top,left:(A=(k=i.value)==null?void 0:k.outer)==null?void 0:A.left}),class:"absolute"},[l.createElementVNode("div",{class:"w-[100%] h-[100%] relative",style:l.normalizeStyle({backgroundImage:`url(${v.value})`,backgroundSize:`${(M=(D=i.value)==null?void 0:D.inner)==null?void 0:M.width} ${(R=(O=i.value)==null?void 0:O.inner)==null?void 0:R.height}`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((P=t.conf)==null?void 0:P.data,(B,z)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:B.fv+"_"+z},[B.type=="ULG"?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`${n} liquid absolute`),id:`ULG_${n}_${B.fv}_${z}`,style:l.normalizeStyle({height:`${B.height}px`,left:B.x,top:B.y,zIndex:z})},[l.createElementVNode("div",{class:"liquid-bar",style:l.normalizeStyle({width:`${B.width}px`})},[l.createElementVNode("div",{class:"liquid-value",id:n+"_Liquid_"+B.fv,title:B.value,style:l.normalizeStyle({height:f(B).height,bottom:f(B).bottom})},null,12,Bce)],4),l.createElementVNode("div",{class:"liquid-scale",style:l.normalizeStyle({display:B.showScale===!1?"none":"flex"})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s(B.pieces),($,j)=>(l.openBlock(),l.createElementBlock("div",{class:"split",key:j,style:l.normalizeStyle({fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal"})},[l.createElementVNode("span",Fce,l.toDisplayString(c(j,B)),1)],4))),128))],4)],14,Pce)):B.type=="Signal"?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(`${n} signal absolute ${p(B)}`),style:l.normalizeStyle({width:`${B.fontSize}px`,height:`${B.fontSize}px`,left:B.x,top:B.y,zIndex:z}),id:`Signal_${n}_${B.fv}_${z}`},null,14,zce)):B.type=="Digit"?(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass(`${n} absolute`),style:l.normalizeStyle({left:B.x,top:B.y,color:B.color,fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal",zIndex:z}),id:`Digit_${n}_${B.fv}_${z}`},l.toDisplayString(B.value??B.default)+l.toDisplayString(B.unit?" "+B.unit:""),15,Vce)):B.type=="Status"?(l.openBlock(),l.createElementBlock("div",{key:3,class:l.normalizeClass(`${n} absolute status`),id:`Status_${n}_${B.fv}_${z}`,style:l.normalizeStyle({color:h(B).color,left:B.x,top:B.y,zIndex:z})},[l.createTextVNode(l.toDisplayString(B.name)+": ",1),l.createElementVNode("span",null,[l.createElementVNode("div",{style:l.normalizeStyle({"background-color":h(B).color}),id:"monitorStatus-"+B.fv},null,12,Uce),l.createElementVNode("span",{id:"monitorStatusSpan-"+B.fv,style:l.normalizeStyle({color:h(B).color})},l.toDisplayString(h(B).text),13,jce)])],14,$ce)):(l.openBlock(),l.createElementBlock("div",{key:4,class:l.normalizeClass(`${n} absolute plate`),id:`Plate_${n}_${B.fv}_${z}`,style:l.normalizeStyle({width:`${B.width}px`,fontSize:`${B.fontSize}px`,fontWeight:B.isBold?"bold":"normal",left:B.x,top:B.y,zIndex:z})},[l.createElementVNode("div",{class:"name",style:l.normalizeStyle({color:B.titleColor,backgroundColor:B.titleBg})},l.toDisplayString(B.name||"--")+l.toDisplayString(B.unit?"/"+B.unit:""),5),l.createElementVNode("div",{class:"value",style:l.normalizeStyle({color:B.valueColor,backgroundColor:B.valueBg,borderColor:B.titleBg})},l.toDisplayString(B.value||"--"),5)],14,Hce))],64))),128))],4)],4)]),l.renderSlot(b.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-4a47ad1c"]])},Symbol.toStringTag,{value:"Module"})),Wce={class:"dialog-footer"},H3={__name:"mix-control-modal",props:{password:{type:String,default:""}},emits:["submit"],setup(t,{expose:e,emit:r}){const n=r,a=t,i=l.ref(""),o=l.reactive({visible:!1,title:"密码验证"}),s=()=>{o.visible=!1},c=()=>{if(o.visible=!1,i.value!==a.password){v1.error("密码错误");return}n("submit")};return l.watchEffect(()=>{o.visible&&(i.value="")}),e({modal:o}),(u,d)=>{const f=no,p=ds,h=PO;return l.openBlock(),l.createBlock(h,{modelValue:o.visible,"onUpdate:modelValue":d[1]||(d[1]=v=>o.visible=v),title:o.title,width:"300px","append-to-body":""},{footer:l.withCtx(()=>[l.createElementVNode("div",Wce,[l.createVNode(p,{onClick:s},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("取消")])),_:1}),l.createVNode(p,{type:"primary",onClick:c},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("确定")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(f,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=v=>i.value=v)},null,8,["modelValue"])]),_:1},8,["modelValue","title"])}}},G3="control_authorized",Yce=(t,e)=>{let r=sessionStorage.getItem(G3)?JSON.parse(sessionStorage.getItem(G3)):{};r[t]=e,sessionStorage.setItem(G3,JSON.stringify(r))},rR=t=>(sessionStorage.getItem(G3)?JSON.parse(sessionStorage.getItem(G3)):{})[t],Zce=async t=>{let e={block_mapping:"object",action:"get_object_item",uid:t};return new Promise((r,n)=>{_t.platform(a=>{r(a)},e)})},W3=async t=>{const{conf:e,password:r,authorized:n}=t,{common:a}=e;if((localStorage.getItem("sys_mode")||null)==="box")return{password:r,authorized:n};let o={password:"",authorized:[]},s=a.object_id||t.uid;if(a.useAlias&&(s=JSON.parse(sessionStorage.getItem(rr))[a.object_alias]||""),!s)return o.authorized=n,o.password=r,o;if(rR(s))return rR(s);const{result:c}=await Zce(s);if(o.password=c==null?void 0:c.control,!(c!=null&&c.control_id))return o.authorized=[],o;let u={permission_user_id:J0.getUser().id,control_uid:c.control_id,block_mapping:"mixauth",action:"get_my_control_parameter"};return new Promise((d,f)=>{_t.platform(p=>{o.authorized=p.result,Yce(s,o),d(o)},u)})},Kce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-428.000000,%20-1211.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(428.226222,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",qce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-433.000000,%20-1211.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(433.664368,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Xce={class:"font-[600]"},Jce={class:"font-[600] opacity-[0.7]"},Qce={class:"echart-body"},eue={class:"ml-[12px] min-w-[70px]"},Y3="--",av=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:Kce,ACTIVE_ICON:qce,NAME_CN:"单参数",NAME_EN:"Single Parameter",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"文本颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:14,type:"number",label:"文本字体"},labelWidth:{value:100,type:"number",label:"标签宽度"},method:{value:"alway",type:"select",label:"验证方案",options:V3}},DATA:[{command:"Control_01",name:"参数一",unit:"",fv:""}],PARAMS:["name","fv","command","unit"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,hideMultiObject:!0}},{__name:"ctrSet",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},password:{type:String,default:""},socketData:{type:Object,default:()=>({})},authorized:{type:Array,default:()=>[]}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.reactive({authorized:[],password:""}),o=l.computed(()=>{const{data:b}=n.conf;return!b[0]||i.authorized.indexOf(b[0].command)===-1}),s=l.ref(""),c=l.computed(()=>s.value===""),u=()=>{var C,w,S,x,E,L,T;const{options:b}=n.conf;a.value={bgColor:((C=b==null?void 0:b.bgColor)==null?void 0:C.value)||"#fff",titleColor:((w=b==null?void 0:b.titleColor)==null?void 0:w.value)||"#111",textColor:((S=b==null?void 0:b.textColor)==null?void 0:S.value)||"#111",titleSize:((x=b==null?void 0:b.titleSize)==null?void 0:x.value)||14,textSize:((E=b==null?void 0:b.textSize)==null?void 0:E.value)||12,labelWidth:((L=b==null?void 0:b.labelWidth)==null?void 0:L.value)||100,radiusSize:((T=b==null?void 0:b.radiusSize)==null?void 0:T.value)??4}},d=l.computed(()=>{var C,w;const{data:b}=n.conf;return(((C=b==null?void 0:b[0])==null?void 0:C.value)||Y3)+" "+(((w=b==null?void 0:b[0])==null?void 0:w.unit)||"")}),f=b=>{n.conf.data.forEach((C,w)=>{var S;try{C.value=((S=b.history[w])==null?void 0:S[0][C.fv])??Y3}catch(x){console.error("设置历史数据时出错:",x),C.value=Y3}})},p=b=>{const{common:C,data:w}=n.conf,S=C.source||"mosaic",x=JSON.parse(sessionStorage.getItem(rr))||{};let E=C.useAlias?x[C.object_alias]:C.object_id||n.uid;w.forEach(L=>{var T,k,A;try{L.value=((A=(k=(T=b[E])==null?void 0:T[S])==null?void 0:k.data)==null?void 0:A[L.fv])??Y3}catch(D){console.error("设置实时数据时出错:",D),L.value=Y3}})},h=l.ref(null),v=l.ref(!0),m=()=>{var w;const{options:b}=n.conf;let C=((w=b==null?void 0:b.method)==null?void 0:w.value)||"alway";C==="alway"||C==="once"&&v.value?h.value.modal.visible=!0:g()},g=()=>{var L;const{common:b,data:C,options:w}=n.conf,S=JSON.parse(sessionStorage.getItem(rr))||{};let E={block_mapping:"pusher",action:"publish_command",object_id:b.useAlias?S[b.object_alias]:b.object_id||n.uid,command:C[0].command,value:s.value,control:i.password,rule:((L=w==null?void 0:w.method)==null?void 0:L.value)||"alway"};_t.platform(T=>{T.code===200&&(v1.success(T.msg),h.value.modal.visible=!1,v.value=!1)},E)},y=async()=>{const b=await W3(n);i.authorized=b.authorized,i.password=b.password;try{const w=await new $t().getHistoryData(n,"ctrSetGroup");f(w)}catch(C){console.error("获取历史数据时出错:",C)}finally{const C=c1(n.conf,n.uid,"ctrSetGroup");e.value&&e.value.port.postMessage({request:C,type:"send"}),r.value&&r.value.send(JSON.stringify(C))}},_=pt(u,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&_()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&p(n.conf.socketData)}),l.onMounted(()=>{u(),n.mode==="preview"&&y()}),(b,C)=>{var x,E;const w=no,S=ds;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[l.createElementVNode("div",{class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},[l.createElementVNode("div",Xce,l.toDisplayString(t.conf.name),1),l.createElementVNode("div",{class:"w-[2px] h-[18px] mx-[12px] opacity-[0.7]",style:l.normalizeStyle({backgroundColor:a.value.titleColor})},null,4),l.createElementVNode("div",Jce,l.toDisplayString(d.value),1)],4),l.createElementVNode("div",Qce,[l.createElementVNode("div",{class:"set-item",style:l.normalizeStyle({fontSize:`${a.value.textSize}px`,color:a.value.textColor})},[l.createElementVNode("div",{class:"item-name",style:l.normalizeStyle({width:`${a.value.labelWidth}px`})},l.toDisplayString(((E=(x=t.conf)==null?void 0:x.data[0])==null?void 0:E.name)||""),5),l.createVNode(w,{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=L=>s.value=L),disabled:o.value},null,8,["modelValue","disabled"]),l.createElementVNode("div",eue,[l.createVNode(S,{type:c.value?"default":"primary",style:{width:"100%"},onClick:m,disabled:c.value},{default:l.withCtx(()=>C[1]||(C[1]=[l.createTextVNode(" 确定 ")])),_:1},8,["type","disabled"])])],4)]),l.renderSlot(b.$slots,"default",{},void 0,!0)],4),l.createVNode(H3,{ref_key:"controlRef",ref:h,onSubmit:g,password:i.password},null,8,["password"])],64)}}}),[["__scopeId","data-v-4ae8f603"]])},Symbol.toStringTag,{value:"Module"})),tue="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-531.000000,%20-1209.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35备份'%20transform='translate(531.930087,%201210.335632)'%3e%3cpath%20d='M13.9770115,0%20C15.0434924,0%2015.9172245,0.825255696%2015.9944512,1.8720105%20L16,2.02298851%20L16,12.5057471%20C16,13.572228%2015.1747443,14.4459601%2014.1279895,14.5231868%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.95650761,14.5287356%200.0827755089,13.7034799%200.00554879087,12.6567251%20L0,12.5057471%20L0,2.02298851%20C0,0.95650761%200.825255696,0.0827755089%201.8720105,0.00554879087%20L2.02298851,0%20L13.9770115,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.65056661,1.28735632%201.34278281,1.56410496%201.29407178,1.92316758%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.878169%201.56410496,13.1859528%201.92316758,13.2346639%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3494334,13.2413793%2014.6572172,12.9646307%2014.7059282,12.6055681%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20Z%20M12.3022421,9.56321839%20C12.6577357,9.56321839%2012.9459203,9.85140292%2012.9459203,10.2068966%20C12.9459203,10.5327657%2012.7037652,10.8020765%2012.3895854,10.8446987%20L12.3022421,10.8505747%20L3.5862069,10.8505747%20C3.23071326,10.8505747%202.94252874,10.5623902%202.94252874,10.2068966%20C2.94252874,9.88102739%203.18468379,9.61171657%203.49886358,9.56909441%20L3.5862069,9.56321839%20L12.3022421,9.56321839%20Z%20M4.32183908,6.37422957%20C4.6661066,6.37422957%204.94724899,6.64450035%204.96466204,6.98443771%20C5.00109227,7.07027592%205.02183908,7.16489903%205.02183908,7.26436782%20C5.02183908,7.61875053%204.75849546,7.91162605%204.41682493,7.95797764%20L4.32183908,7.96436782%20L3.5862069,7.96436782%20C3.19960757,7.96436782%202.8862069,7.65096714%202.8862069,7.26436782%20C2.8862069,7.16567414%202.90663163,7.07175091%202.94348477,6.98659446%20L2.94252874,7.01790773%20C2.94252874,6.69203856%203.18468379,6.42272774%203.49886358,6.38010559%20L3.5862069,6.37422957%20L4.32183908,6.37422957%20Z%20M12.4137931,6.62068966%20C12.7692867,6.62068966%2013.0574713,6.90887418%2013.0574713,7.26436782%20C13.0574713,7.59023698%2012.8153162,7.8595478%2012.5011364,7.90216995%20L12.4137931,7.90804598%20L6.52873563,7.90804598%20C6.173242,7.90804598%205.88505747,7.61986145%205.88505747,7.26436782%20C5.88505747,6.93849865%206.12721253,6.66918783%206.44139232,6.62656568%20L6.52873563,6.62068966%20L12.4137931,6.62068966%20Z%20M12.4137931,3.86206897%20C12.7692867,3.86206897%2013.0574713,4.15025349%2013.0574713,4.50574713%20C13.0574713,4.83161629%2012.8153162,5.10092711%2012.5011364,5.14354926%20L12.4137931,5.14942529%20L6.52873563,5.14942529%20C6.173242,5.14942529%205.88505747,4.86124076%205.88505747,4.50574713%20C5.88505747,4.17987796%206.12721253,3.91056714%206.44139232,3.86794499%20L6.52873563,3.86206897%20L12.4137931,3.86206897%20Z%20M4.32183908,3.61560888%20C4.67733271,3.61560888%204.96551724,3.9037934%204.96551724,4.25928704%20C4.96551724,4.5851562%204.72336219,4.85446702%204.40918239,4.89708917%20L4.32183908,4.9029652%20L3.5862069,4.9029652%20C3.23071326,4.9029652%202.94252874,4.61478067%202.94252874,4.25928704%20C2.94252874,3.93341787%203.18468379,3.66410705%203.49886358,3.6214849%20L3.5862069,3.61560888%20L4.32183908,3.61560888%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",rue="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-537.000000,%20-1209.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35备份'%20transform='translate(537.368233,%201210.335632)'%3e%3cpath%20d='M13.9770115,0%20C15.0434924,0%2015.9172245,0.825255696%2015.9944512,1.8720105%20L16,2.02298851%20L16,12.5057471%20C16,13.572228%2015.1747443,14.4459601%2014.1279895,14.5231868%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.95650761,14.5287356%200.0827755089,13.7034799%200.00554879087,12.6567251%20L0,12.5057471%20L0,2.02298851%20C0,0.95650761%200.825255696,0.0827755089%201.8720105,0.00554879087%20L2.02298851,0%20L13.9770115,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.65056661,1.28735632%201.34278281,1.56410496%201.29407178,1.92316758%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.878169%201.56410496,13.1859528%201.92316758,13.2346639%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3494334,13.2413793%2014.6572172,12.9646307%2014.7059282,12.6055681%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20Z%20M12.3022421,9.56321839%20C12.6577357,9.56321839%2012.9459203,9.85140292%2012.9459203,10.2068966%20C12.9459203,10.5327657%2012.7037652,10.8020765%2012.3895854,10.8446987%20L12.3022421,10.8505747%20L3.5862069,10.8505747%20C3.23071326,10.8505747%202.94252874,10.5623902%202.94252874,10.2068966%20C2.94252874,9.88102739%203.18468379,9.61171657%203.49886358,9.56909441%20L3.5862069,9.56321839%20L12.3022421,9.56321839%20Z%20M4.32183908,6.37422957%20C4.6661066,6.37422957%204.94724899,6.64450035%204.96466204,6.98443771%20C5.00109227,7.07027592%205.02183908,7.16489903%205.02183908,7.26436782%20C5.02183908,7.61875053%204.75849546,7.91162605%204.41682493,7.95797764%20L4.32183908,7.96436782%20L3.5862069,7.96436782%20C3.19960757,7.96436782%202.8862069,7.65096714%202.8862069,7.26436782%20C2.8862069,7.16567414%202.90663163,7.07175091%202.94348477,6.98659446%20L2.94252874,7.01790773%20C2.94252874,6.69203856%203.18468379,6.42272774%203.49886358,6.38010559%20L3.5862069,6.37422957%20L4.32183908,6.37422957%20Z%20M12.4137931,6.62068966%20C12.7692867,6.62068966%2013.0574713,6.90887418%2013.0574713,7.26436782%20C13.0574713,7.59023698%2012.8153162,7.8595478%2012.5011364,7.90216995%20L12.4137931,7.90804598%20L6.52873563,7.90804598%20C6.173242,7.90804598%205.88505747,7.61986145%205.88505747,7.26436782%20C5.88505747,6.93849865%206.12721253,6.66918783%206.44139232,6.62656568%20L6.52873563,6.62068966%20L12.4137931,6.62068966%20Z%20M12.4137931,3.86206897%20C12.7692867,3.86206897%2013.0574713,4.15025349%2013.0574713,4.50574713%20C13.0574713,4.83161629%2012.8153162,5.10092711%2012.5011364,5.14354926%20L12.4137931,5.14942529%20L6.52873563,5.14942529%20C6.173242,5.14942529%205.88505747,4.86124076%205.88505747,4.50574713%20C5.88505747,4.17987796%206.12721253,3.91056714%206.44139232,3.86794499%20L6.52873563,3.86206897%20L12.4137931,3.86206897%20Z%20M4.32183908,3.61560888%20C4.67733271,3.61560888%204.96551724,3.9037934%204.96551724,4.25928704%20C4.96551724,4.5851562%204.72336219,4.85446702%204.40918239,4.89708917%20L4.32183908,4.9029652%20L3.5862069,4.9029652%20C3.23071326,4.9029652%202.94252874,4.61478067%202.94252874,4.25928704%20C2.94252874,3.93341787%203.18468379,3.66410705%203.49886358,3.6214849%20L3.5862069,3.61560888%20L4.32183908,3.61560888%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nue={class:"submint"},I6="--",iv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:{DEFAULT_ICON:tue,ACTIVE_ICON:rue,NAME_CN:"多参数",NAME_EN:"Multiparameter",ORDER:2},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"文本颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:14,type:"number",label:"文本字体"},labelWidth:{value:100,type:"number",label:"标签宽度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},method:{value:"alway",type:"select",label:"验证方案",options:V3}},DATA:[{command:"Control_01",name:"参数一",unit:"",fv:""}],PARAMS:["name","fv","command","unit"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,hideMultiObject:!0}},{__name:"ctrSetGroup",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},password:{type:String,default:""},socketData:{type:Object,default:()=>({})},authorized:{type:Array,default:()=>[]}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.reactive({authorized:[],password:""}),o=_=>i.authorized.indexOf(_.command)===-1,s=l.ref([]),c=l.computed(()=>{let _=0;return s.value.forEach((b,C)=>{b&&_++}),_===0}),u=()=>{var b,C,w,S,x,E,L,T;const{options:_}=n.conf;a.value={bgColor:((b=_==null?void 0:_.bgColor)==null?void 0:b.value)||"#fff",titleColor:((C=_==null?void 0:_.titleColor)==null?void 0:C.value)||"#111",textColor:((w=_==null?void 0:_.textColor)==null?void 0:w.value)||"#111",titleSize:((S=_==null?void 0:_.titleSize)==null?void 0:S.value)||14,textSize:((x=_==null?void 0:_.textSize)==null?void 0:x.value)||12,labelWidth:((E=_==null?void 0:_.labelWidth)==null?void 0:E.value)||100,radiusSize:((L=_==null?void 0:_.radiusSize)==null?void 0:L.value)??4,isHideTitle:((T=_==null?void 0:_.isHideTitle)==null?void 0:T.value)??!1}},d=_=>{n.conf.data.forEach((b,C)=>{var w;try{b.value=((w=_.history[C])==null?void 0:w[0][b.fv])??I6}catch(S){console.error("设置历史数据时出错:",S),b.value=I6}})},f=_=>{const{common:b,data:C}=n.conf,w=b.source||"mosaic",S=JSON.parse(sessionStorage.getItem(rr))||{};let x=b.useAlias?S[b.object_alias]:b.object_id||n.uid;C.forEach(E=>{var L,T,k;try{E.value=((k=(T=(L=_[x])==null?void 0:L[w])==null?void 0:T.data)==null?void 0:k[E.fv])??I6}catch(A){console.error("设置实时数据时出错:",A),E.value=I6}})},p=l.ref(null),h=l.ref(!0),v=(_,b)=>{var S;const{options:C}=n.conf;let w=((S=C==null?void 0:C.method)==null?void 0:S.value)||"alway";w==="alway"||w==="once"&&h.value?p.value.modal.visible=!0:m()},m=()=>{var L;const{common:_,data:b,options:C}=n.conf,w=JSON.parse(sessionStorage.getItem(rr))||{};let S=_.useAlias?w[_.object_alias]:_.object_id||n.uid,x=[];s.value.forEach((T,k)=>{T&&x.push({object_id:S,command:b[k].command,value:T})});let E={block_mapping:"pusher",action:"publish_command_plus",publishes:x,control:i.password,rule:((L=C==null?void 0:C.method)==null?void 0:L.value)||"alway"};_t.platform(T=>{T.code===200&&(v1.success(T.msg),p.value.modal.visible=!1,h.value=!1)},E)},g=async()=>{const _=await W3(n);i.authorized=_.authorized,i.password=_.password;try{const C=await new $t().getHistoryData(n,"ctrSetGroup");d(C)}catch(b){console.error("获取历史数据时出错:",b)}finally{const b=c1(n.conf,n.uid,"ctrSetGroup");e.value&&e.value.port.postMessage({request:b,type:"send"}),r.value&&r.value.send(JSON.stringify(b))}},y=pt(u,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&y()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&f(n.conf.socketData)}),l.onMounted(()=>{u(),n.mode==="preview"&&g()}),(_,b)=>{const C=no,w=ds;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",a.value.isHideTitle?"h-[100%]":"h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:"set-item",key:x,style:l.normalizeStyle({fontSize:`${a.value.textSize}px`,color:a.value.textColor})},[l.createElementVNode("div",{class:"item-name",style:l.normalizeStyle({width:`${a.value.labelWidth}px`})},l.toDisplayString(S.name),5),l.createVNode(C,{modelValue:s.value[x],"onUpdate:modelValue":E=>s.value[x]=E,disabled:o(S)},null,8,["modelValue","onUpdate:modelValue","disabled"]),l.createElementVNode("div",{class:"item-value",style:l.normalizeStyle([{"margin-left":"12px"},{background:a.value.bgColor}])},l.toDisplayString(S.value),5)],4))),128)),l.createElementVNode("div",nue,[l.createVNode(w,{type:c.value?"default":"primary",onClick:v,disabled:c.value},{default:l.withCtx(()=>b[0]||(b[0]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])],2),l.renderSlot(_.$slots,"default",{},void 0,!0)],4),l.createVNode(H3,{ref_key:"controlRef",ref:p,onSubmit:m,password:i.password},null,8,["password"])],64)}}}),[["__scopeId","data-v-8aacc734"]])},Symbol.toStringTag,{value:"Module"})),ov="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e饼图-B%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-658.000000,%20-609.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-41备份'%20transform='translate(658.250000,%20612.574747)'%3e%3cpath%20d='M4.42525253,0%20C6.86925202,0%208.85050506,1.98125304%208.85050506,4.42525253%20C8.85050506,6.86925202%206.86925202,8.85050506%204.42525253,8.85050506%20C1.98125304,8.85050506%200,6.86925202%200,4.42525253%20C0,1.98125304%201.98125304,0%204.42525253,0%20Z%20M11.4469893,7.49145708%20C11.7950103,7.49145708%2012.077137,7.77358381%2012.077137,8.12160476%20C12.077137,8.44062397%2011.8400722,8.70427373%2011.5324966,8.74599994%20L11.4469893,8.75175245%20L10.7931788,8.75175245%20C10.4451579,8.75175245%2010.1630311,8.46962572%2010.1630311,8.12160476%20C10.1630311,7.80258555%2010.400096,7.5389358%2010.7076715,7.49720958%20L10.7931788,7.49145708%20L11.4469893,7.49145708%20Z%20M4.42525253,1.26029537%20C2.67729496,1.26029537%201.26029537,2.67729496%201.26029537,4.42525253%20C1.26029537,6.1732101%202.67729496,7.59020969%204.42525253,7.59020969%20C6.1732101,7.59020969%207.59020969,6.1732101%207.59020969,4.42525253%20C7.59020969,2.67729496%206.1732101,1.26029537%204.42525253,1.26029537%20Z%20M12.7546103,5.02722225%20C13.1026313,5.02722225%2013.384758,5.30934898%2013.384758,5.65736994%20C13.384758,5.97638915%2013.1476932,6.24003891%2012.8401176,6.28176512%20L12.7546103,6.28751763%20L10.7931788,6.28751763%20C10.4451579,6.28751763%2010.1630311,6.0053909%2010.1630311,5.65736994%20C10.1630311,5.33835073%2010.400096,5.07470098%2010.7076715,5.03297476%20L10.7931788,5.02722225%20L12.7546103,5.02722225%20Z%20M4.42525253,2.76007625%20C5.34490684,2.76007625%206.09042881,3.50559822%206.09042881,4.42525253%20C6.09042881,5.34490684%205.34490684,6.09042881%204.42525253,6.09042881%20C3.50559822,6.09042881%202.76007625,5.34490684%202.76007625,4.42525253%20C2.76007625,3.50559822%203.50559822,2.76007625%204.42525253,2.76007625%20Z%20M4.42525253,4.02037162%20C4.20164013,4.02037162%204.02037162,4.20164013%204.02037162,4.42525253%20C4.02037162,4.64886493%204.20164013,4.83013344%204.42525253,4.83013344%20C4.64886493,4.83013344%204.83013344,4.64886493%204.83013344,4.42525253%20C4.83013344,4.20164013%204.64886493,4.02037162%204.42525253,4.02037162%20Z%20M14.0622313,2.56298743%20C14.4102523,2.56298743%2014.692379,2.84511416%2014.692379,3.19313512%20C14.692379,3.51215433%2014.4553142,3.77580409%2014.1477386,3.8175303%20L14.0622313,3.82328281%20L10.7931788,3.82328281%20C10.4451579,3.82328281%2010.1630311,3.54115608%2010.1630311,3.19313512%20C10.1630311,2.87411591%2010.400096,2.61046615%2010.7076715,2.56873994%20L10.7931788,2.56298743%20L14.0622313,2.56298743%20Z%20M15.3698523,0.0987526126%20C15.7178733,0.0987526126%2016,0.380879342%2016,0.728900299%20C16,1.04791951%2015.7629352,1.31156927%2015.4553596,1.35329548%20L15.3698523,1.35904799%20L10.7931788,1.35904799%20C10.4451579,1.35904799%2010.1630311,1.07692126%2010.1630311,0.728900299%20C10.1630311,0.409881088%2010.400096,0.146231333%2010.7076715,0.104505118%20L10.7931788,0.0987526126%20L15.3698523,0.0987526126%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",sv="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e饼图-%20W%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-658.000000,%20-633.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-41备份-2'%20transform='translate(658.073832,%20636.954757)'%3e%3cpath%20d='M4.42525253,0%20C6.86925202,0%208.85050506,1.98125304%208.85050506,4.42525253%20C8.85050506,6.86925202%206.86925202,8.85050506%204.42525253,8.85050506%20C1.98125304,8.85050506%200,6.86925202%200,4.42525253%20C0,1.98125304%201.98125304,0%204.42525253,0%20Z%20M11.4469893,7.49145708%20C11.7950103,7.49145708%2012.077137,7.77358381%2012.077137,8.12160476%20C12.077137,8.44062397%2011.8400722,8.70427373%2011.5324966,8.74599994%20L11.4469893,8.75175245%20L10.7931788,8.75175245%20C10.4451579,8.75175245%2010.1630311,8.46962572%2010.1630311,8.12160476%20C10.1630311,7.80258555%2010.400096,7.5389358%2010.7076715,7.49720958%20L10.7931788,7.49145708%20L11.4469893,7.49145708%20Z%20M4.42525253,1.26029537%20C2.67729496,1.26029537%201.26029537,2.67729496%201.26029537,4.42525253%20C1.26029537,6.1732101%202.67729496,7.59020969%204.42525253,7.59020969%20C6.1732101,7.59020969%207.59020969,6.1732101%207.59020969,4.42525253%20C7.59020969,2.67729496%206.1732101,1.26029537%204.42525253,1.26029537%20Z%20M12.7546103,5.02722225%20C13.1026313,5.02722225%2013.384758,5.30934898%2013.384758,5.65736994%20C13.384758,5.97638915%2013.1476932,6.24003891%2012.8401176,6.28176512%20L12.7546103,6.28751763%20L10.7931788,6.28751763%20C10.4451579,6.28751763%2010.1630311,6.0053909%2010.1630311,5.65736994%20C10.1630311,5.33835073%2010.400096,5.07470098%2010.7076715,5.03297476%20L10.7931788,5.02722225%20L12.7546103,5.02722225%20Z%20M4.42525253,2.76007625%20C5.34490684,2.76007625%206.09042881,3.50559822%206.09042881,4.42525253%20C6.09042881,5.34490684%205.34490684,6.09042881%204.42525253,6.09042881%20C3.50559822,6.09042881%202.76007625,5.34490684%202.76007625,4.42525253%20C2.76007625,3.50559822%203.50559822,2.76007625%204.42525253,2.76007625%20Z%20M4.42525253,4.02037162%20C4.20164013,4.02037162%204.02037162,4.20164013%204.02037162,4.42525253%20C4.02037162,4.64886493%204.20164013,4.83013344%204.42525253,4.83013344%20C4.64886493,4.83013344%204.83013344,4.64886493%204.83013344,4.42525253%20C4.83013344,4.20164013%204.64886493,4.02037162%204.42525253,4.02037162%20Z%20M14.0622313,2.56298743%20C14.4102523,2.56298743%2014.692379,2.84511416%2014.692379,3.19313512%20C14.692379,3.51215433%2014.4553142,3.77580409%2014.1477386,3.8175303%20L14.0622313,3.82328281%20L10.7931788,3.82328281%20C10.4451579,3.82328281%2010.1630311,3.54115608%2010.1630311,3.19313512%20C10.1630311,2.87411591%2010.400096,2.61046615%2010.7076715,2.56873994%20L10.7931788,2.56298743%20L14.0622313,2.56298743%20Z%20M15.3698523,0.0987526126%20C15.7178733,0.0987526126%2016,0.380879342%2016,0.728900299%20C16,1.04791951%2015.7629352,1.31156927%2015.4553596,1.35329548%20L15.3698523,1.35904799%20L10.7931788,1.35904799%20C10.4451579,1.35904799%2010.1630311,1.07692126%2010.1630311,0.728900299%20C10.1630311,0.409881088%2010.400096,0.146231333%2010.7076715,0.104505118%20L10.7931788,0.0987526126%20L15.3698523,0.0987526126%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",aue={class:"echart-body"},iue={class:"bar-wrap"},oue={DEFAULT_ICON:ov,ACTIVE_ICON:sv,NAME_CN:"环形图",NAME_EN:"CircleBar",ORDER:2},sue={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#e5e5e5",type:"color",label:"进度条底色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"环形字体"},barHeight:{value:10,type:"number",label:"环形高度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showTotal:{value:!0,type:"checkbox",label:"是否显示总数"},fixed:{value:2,type:"number",label:"保留小数",dependent:"showTotal"},totalText:{value:"总数",type:"string",label:"总数文本",dependent:"showTotal"}},nR=[{name:"参数一",fv:"",color:"#4162ff",object_id:"",default:""},{name:"参数二",fv:"",color:"#3bbc6a",object_id:"",default:""},{name:"参数三",fv:"",color:"#e24359",object_id:"",default:""}],lv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({DEFAULT:oue,OPTIONS:sue,DATA:nR,PARAMS:["name","fv","object_id","color","default"],SOURCE:["mosaic","statistics","calculate"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"circleBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,p1,g1,N0]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="bar_"+Math.random().toString(16).substring(4,12);let a=null,i=null,o=0;const s=t,c=l.ref({}),u=()=>{var _,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P;const{conf:y}=s;c.value={bgColor:((b=(_=y==null?void 0:y.options)==null?void 0:_.bgColor)==null?void 0:b.value)||"#73bff9",titleColor:((w=(C=y==null?void 0:y.options)==null?void 0:C.titleColor)==null?void 0:w.value)||"#111",textColor:((x=(S=y==null?void 0:y.options)==null?void 0:S.textColor)==null?void 0:x.value)||"#111",barColor:((L=(E=y==null?void 0:y.options)==null?void 0:E.barColor)==null?void 0:L.value)||"#202755",radiusSize:((k=(T=y==null?void 0:y.options)==null?void 0:T.radiusSize)==null?void 0:k.value)??4,textSize:((D=(A=y==null?void 0:y.options)==null?void 0:A.textSize)==null?void 0:D.value)??12,barHeight:((O=(M=y==null?void 0:y.options)==null?void 0:M.barHeight)==null?void 0:O.value)??10,isHideTitle:((P=(R=y==null?void 0:y.options)==null?void 0:R.isHideTitle)==null?void 0:P.value)||!1},y.data=y.data.length?y.data:nR,l.nextTick(()=>{let B=document.querySelector("#"+n);B&&(a||(a=o1(B),i=Qt({strategy:"scroll"}),i.listenTo(B,function(){a.resize()})),a.setOption(d(),!0))})},d=()=>{var w;const{data:y,options:_}=s.conf;let b=y.map((S,x)=>S.color||wn[x]);var C={title:{zlevel:0,show:_.showTotal.value,text:[`{value|${o}}`,`{name|${(w=_==null?void 0:_.totalText)==null?void 0:w.value}}`].join(`
296
296
  `),textStyle:{rich:{value:{color:c.value.textColor,fontSize:c.value.textSize,fontWeight:"bold",lineHeight:c.value.textSize+8},name:{color:c.value.textColor,lineHeight:c.value.textSize+8,fontSize:c.value.textSize}}},top:"center",left:"center"},color:b,series:f()};return C},f=()=>{const{data:y,options:_,name:b}=s.conf;let C=y.map(w=>({value:0,name:w.name}));return[{name:b,type:"pie",radius:["50%","85%"],center:["50%","50%"],data:C,label:{position:"center",show:!1,color:"inherit"},emphasis:{scale:0,label:{show:_.showTotal.value,fontSize:_.textSize.value,fontWeight:"bold",formatter:`{d}%
297
297
  {b}`,lineHeight:_.textSize.value+8}}}]},p=y=>Number(y)&&Number(o)?(Number(y)/Number(o)*100).toFixed(2)+"%":Number(o)===0?"100%":0,h=y=>{var x;const{data:_,options:b,common:C}=s.conf,w=C.source||"mosaic";if(["statistics","calculate"].includes(w)&&(y=Pr(y,_)),!y.history.length)return;let S=a.getOption();y.history.forEach((E,L)=>{S.series[0].data[L].value=E[0][_[L].fv],_[L].value=E[0][_[L].fv]}),o=_.reduce((E,L)=>E+Number(L.value),0).toFixed(b.fixed.value),S.title[0].text=[`{value|${o}}`,`{name|${(x=b==null?void 0:b.totalText)==null?void 0:x.value}}`].join(`
298
298
  `),a.setOption(S)},v=y=>{var E;const{data:_,common:b,options:C}=s.conf,w=b.source||"mosaic";if(!y||!a)return;let S=a.getOption(),x="";b.multiObject||(x=je(b,b.useAlias,s.uid)),_.forEach((L,T)=>{var A,D,M,O,R,P,B;b.multiObject&&(x=je(L,b.useAlias,s.uid));let k=null;["statistics","calculate"].includes(w)?k=((O=(M=(D=(A=y[x])==null?void 0:A[w])==null?void 0:D.data)==null?void 0:M[L.fv])==null?void 0:O.data)??L.value??0:k=((B=(P=(R=y[x])==null?void 0:R[w])==null?void 0:P.data)==null?void 0:B[L.fv])??L.value??0,L.value=k,S.series[0].data[T].value=k}),o=_.reduce((L,T)=>L+Number(T.value),0).toFixed(C.fixed.value),S.title[0].text=[`{value|${o}}`,`{name|${(E=C==null?void 0:C.totalText)==null?void 0:E.value}}`].join(`
@@ -323,4 +323,4 @@ For more detail, please visit: ${a}
323
323
  `,m.parse()),m.state==="INITIAL"||m.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(g){m.onparsingerror&&m.onparsingerror(g)}return m.onflush&&m.onflush(),this},h}()},"./src/utils/webvtt-parser.ts":function(t,e,r){r.r(e),r.d(e,"generateCueId",function(){return f}),r.d(e,"parseWebVTT",function(){return p});var n=r("./src/polyfills/number.ts"),a=r("./src/utils/vttparser.ts"),i=r("./src/demux/id3.ts"),o=r("./src/utils/timescale-conversion.ts"),s=r("./src/remux/mp4-remuxer.ts"),c=/\r\n|\n\r|\n|\r/g,u=function(h,v,m){return m===void 0&&(m=0),h.substr(m,v.length)===v},d=function(h){for(var v=5381,m=h.length;m;)v=33*v^h.charCodeAt(--m);return(v>>>0).toString()};function f(h,v,m){return d(h.toString())+d(v.toString())+d(m)}function p(h,v,m,g,y,_,b,C){var w,S=new a.VTTParser,x=Object(i.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(c,`
324
324
  `).split(`
325
325
  `),E=[],L=Object(o.toMpegTsClockFromTimescale)(v,m),T="00:00.000",k=0,A=0,D=!0,M=!1;S.oncue=function(O){var R=g[y],P=g.ccOffset,B=(k-L)/9e4;if(R!=null&&R.new&&(A!==void 0?P=g.ccOffset=R.start:function(Z,W,K){var ee=Z[W],Q=Z[ee.prevCC];if(!Q||!Q.new&&ee.new)return Z.ccOffset=Z.presentationOffset=ee.start,void(ee.new=!1);for(;(ae=Q)!==null&&ae!==void 0&&ae.new;){var ae;Z.ccOffset+=ee.start-Q.start,ee.new=!1,Q=Z[(ee=Q).prevCC]}Z.presentationOffset=K}(g,y,B)),B&&(P=B-g.presentationOffset),M){var z=O.endTime-O.startTime,$=Object(s.normalizePts)(9e4*(O.startTime+P-A),9e4*_)/9e4;O.startTime=$,O.endTime=$+z}var j=O.text.trim();O.text=decodeURIComponent(encodeURIComponent(j)),O.id||(O.id=f(O.startTime,O.endTime,j)),O.endTime>0&&E.push(O)},S.onparsingerror=function(O){w=O},S.onflush=function(){w?C(w):b(E)},x.forEach(function(O){if(D){if(u(O,"X-TIMESTAMP-MAP=")){D=!1,M=!0,O.substr(16).split(",").forEach(function(R){u(R,"LOCAL:")?T=R.substr(6):u(R,"MPEGTS:")&&(k=parseInt(R.substr(7)))});try{A=function(R){var P=parseInt(R.substr(-3)),B=parseInt(R.substr(-6,2)),z=parseInt(R.substr(-9,2)),$=R.length>9?parseInt(R.substr(0,R.indexOf(":"))):0;if(!(Object(n.isFiniteNumber)(P)&&Object(n.isFiniteNumber)(B)&&Object(n.isFiniteNumber)(z)&&Object(n.isFiniteNumber)($)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+R);return P+=1e3*B,(P+=6e4*z)+36e5*$}(T)/1e3}catch(R){M=!1,w=R}return}O===""&&(D=!1)}S.parse(O+`
326
- `)}),S.flush()}},"./src/utils/xhr-loader.ts":function(t,e,r){r.r(e);var n=r("./src/utils/logger.ts"),a=r("./src/loader/load-stats.ts"),i=/^age:\s*[\d.]+\s*$/m,o=function(){function s(u){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=u?u.xhrSetup:null,this.stats=new a.LoadStats,this.retryDelay=0}var c=s.prototype;return c.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},c.abortInternal=function(){var u=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),u&&(u.onreadystatechange=null,u.onprogress=null,u.readyState!==4&&(this.stats.aborted=!0,u.abort()))},c.abort=function(){var u;this.abortInternal(),(u=this.callbacks)!==null&&u!==void 0&&u.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},c.load=function(u,d,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=u,this.config=d,this.callbacks=f,this.retryDelay=d.retryDelay,this.loadInternal()},c.loadInternal=function(){var u=this.config,d=this.context;if(u){var f=this.loader=new self.XMLHttpRequest,p=this.stats;p.loading.first=0,p.loaded=0;var h=this.xhrSetup;try{if(h)try{h(f,d.url)}catch{f.open("GET",d.url,!0),h(f,d.url)}f.readyState||f.open("GET",d.url,!0)}catch(v){return void this.callbacks.onError({code:f.status,text:v.message},d,f)}d.rangeEnd&&f.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout),f.send()}},c.readystatechange=function(){var u=this.context,d=this.loader,f=this.stats;if(u&&d){var p=d.readyState,h=this.config;if(!f.aborted&&p>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),p===4){d.onreadystatechange=null,d.onprogress=null;var v=d.status;if(v>=200&&v<300){var m,g;if(f.loading.end=Math.max(self.performance.now(),f.loading.first),g=u.responseType==="arraybuffer"?(m=d.response).byteLength:(m=d.responseText).length,f.loaded=f.total=g,!this.callbacks)return;var y=this.callbacks.onProgress;if(y&&y(f,u,m,d),!this.callbacks)return;var _={url:d.responseURL,data:m};this.callbacks.onSuccess(_,f,u,d)}else f.retry>=h.maxRetry||v>=400&&v<499?(n.logger.error(v+" while loading "+u.url),this.callbacks.onError({code:v,text:d.statusText},u,d)):(n.logger.warn(v+" while loading "+u.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,h.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout)}},c.loadtimeout=function(){n.logger.warn("timeout while loading "+this.context.url);var u=this.callbacks;u&&(this.abortInternal(),u.onTimeout(this.stats,this.context,this.loader))},c.loadprogress=function(u){var d=this.stats;d.loaded=u.loaded,u.lengthComputable&&(d.total=u.total)},c.getCacheAge=function(){var u=null;if(this.loader&&i.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");u=d?parseFloat(d):null}return u},s}();e.default=o}}).default);var Ev=$de(pR.exports);const Kn=Object.assign({name:"d-icon"},{props:{icon:String,size:[Number,String]},setup:function(t){const e=t,r=l.computed(()=>({fontSize:/^\d+$/.test(e.size)?e.size+"px":e.size}));return(n,a)=>(l.openBlock(),l.createElementBlock("i",{class:l.normalizeClass(["d-icon iconfont",t.icon]),style:l.normalizeStyle(l.unref(r))},null,6))}});Kn.__scopeId="data-v-0c690e66",l.pushScopeId("data-v-4cb76d59");const Ude={class:"d-player-top"},jde={class:"top-title"},Hde={class:"top-title"};l.popScopeId();const Gde={props:{title:{default:""}},setup(t){Date.prototype.format=function(n){let a={"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds()};for(var i in a)new RegExp("("+i+")").test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length==1?a[i]:("00"+a[i]).substr((""+a[i]).length)));return n};let e=l.ref("00:00:00");e.value=new Date().format("hh:mm:ss");let r=null;return r=setInterval(()=>{e.value=new Date().format("hh:mm:ss")},1e3),l.onUnmounted(()=>{clearInterval(r)}),(n,a)=>(l.openBlock(),l.createElementBlock("div",Ude,[l.createElementVNode("p",jde,l.toDisplayString(t.title||""),1),l.createElementVNode("p",Hde,l.toDisplayString(l.unref(e)),1)]))},__scopeId:"data-v-4cb76d59"};l.pushScopeId("data-v-ac2469ec");const Wde={class:"d-status"},Yde={class:"d-flex-center"},Zde={class:"d-flex-center"},Kde=l.createTextVNode("5X速播放中 ");l.popScopeId();var gR=l.defineComponent({props:["state"],setup:t=>(e,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",Wde,[l.withDirectives(l.createElementVNode("li",Yde,[l.createVNode(Kn,{size:"18",class:"d-status-icon",icon:"icon-volume-"+(t.state.volume==0?"mute":t.state.volume>.5?"up":"down")},null,8,["icon"]),l.createTextVNode(" "+l.toDisplayString(~~(100*t.state.volume))+"% ",1)],512),[[l.vShow,t.state.handleType=="volume"]]),l.withDirectives(l.createElementVNode("li",Zde,[l.createVNode(Kn,{size:"12",icon:"icon-play"}),l.createVNode(Kn,{size:"12",icon:"icon-play",style:{"margin-right":"5px"}}),Kde],512),[[l.vShow,t.state.handleType=="playbackRate"||t.state.isMultiplesPlay]])],512)),[[l.vShow,t.state.handleType||t.state.isMultiplesPlay]])});gR.__scopeId="data-v-ac2469ec",l.pushScopeId("data-v-385f7870");const qde=["checked","true-value","false-value"],Xde=l.createElementVNode("span",{class:"d-switch_action"},null,-1);l.popScopeId();var P6=l.defineComponent({props:{modelValue:{type:[Number,String,Boolean]},width:{type:String,default:"40px"},trueValue:{type:[Number,String,Boolean],default:!0},falseValue:{type:[Number,String,Boolean],default:!0},activeColor:{type:[String],default:"#409EFF"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const r=t;l.useCssVars(o=>({"014e5dc0":t.width,e4e32852:t.activeColor}));const n=l.ref(null),a=l.computed(()=>r.modelValue===r.trueValue),i=()=>{l.nextTick(()=>{const o=n.value.checked;e("update:modelValue",o),e("change",o)})};return(o,s)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["d-switch",{"is-checked":l.unref(a)}])},[l.createElementVNode("input",{class:"d-switch__input",ref:n,type:"checkbox",checked:l.unref(a),onChange:i,"true-value":t.trueValue,"false-value":t.falseValue},null,40,qde),Xde],2))}});P6.__scopeId="data-v-385f7870",l.pushScopeId("data-v-b2384226");const Jde={key:0},Qde=l.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1),efe=[l.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1),l.createElementVNode("p",null,"正在缓冲...",-1)],tfe=[l.createElementVNode("i",{class:"iconfont icon-replay f24 mr5"},null,-1),l.createTextVNode("重新播放 ")],rfe=[l.createElementVNode("i",{class:"iconfont icon-replay f24 mr5"},null,-1),l.createTextVNode("请求错误 ")];l.popScopeId();var vR=l.defineComponent({props:{loadType:String,text:{type:String,default:""}},setup(t){const e=t,{proxy:r}=l.getCurrentInstance(),n=["loadstart","waiting","ended","error","stalled"],a=()=>{r.$parent.play()},i=l.computed(()=>{let o="background: rgba(0, 0, 0, .1);z-index:1";return e.loadType=="loadstart"&&(o="background: rgba(0, 0, 0, 1);;z-index:3"),o});return(o,s)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"d-loading",style:l.normalizeStyle(l.unref(i))},[l.createElementVNode("div",null,[t.loadType=="loadstart"?(l.openBlock(),l.createElementBlock("span",Jde,[Qde,l.createElementVNode("p",null,l.toDisplayString(t.text),1)])):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("span",null,efe,512),[[l.vShow,t.loadType=="waiting"]]),l.withDirectives(l.createElementVNode("span",null,[l.createElementVNode("p",{onClick:a,class:"d-flex-x d-pointer"},tfe)],512),[[l.vShow,t.loadType=="ended"]]),l.withDirectives(l.createElementVNode("span",null,[l.createElementVNode("p",{onClick:a,class:"d-flex-x d-pointer"},rfe)],512),[[l.vShow,t.loadType=="error"||t.loadType=="stalled"]])])],4)),[[l.vShow,n.includes(t.loadType)]])}});vR.__scopeId="data-v-b2384226";const $2=function(t,e,r,n=!1){t&&e&&r&&t.addEventListener(e,r,n)},Kr=function(t,e,r,n=!1){t&&e&&r&&t.removeEventListener(e,r,n)};l.pushScopeId("data-v-5a794390");const nfe=["onMousedown"];l.popScopeId();var Ts=l.defineComponent(xv(wv({},{name:"DSlider"}),{props:{modelValue:{required:!0,type:Number,default:0},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},hoverText:{type:String,default:""},preload:{type:Number,default:0},size:{type:String,default:"10px"}},emits:["update:modelValue","change","onMousemove"],setup:function(t,{emit:e}){const r=t;l.useCssVars(g=>({"5242b67b":t.size}));const n=l.ref(null),a=l.ref(null),i=l.reactive({dragging:!1,hoverPosition:0,hoverTipsLeft:"50%"}),o=l.computed(()=>{let g=r.modelValue<0?0:r.modelValue>1?1:r.modelValue;return r.vertical?`height:${100*g}%`:`width:${100*g}%`}),s=l.computed(()=>{let g=r.preload<0?0:r.preload>1?1:r.preload;return r.vertical?`height:${100*g}%`:`width:${100*g}%`}),c=l.computed(()=>{let g=i.hoverPosition<0?0:i.hoverPosition>1?1:i.hoverPosition;return r.vertical?`bottom:${100*g}%`:`left:${100*g}%`}),u=g=>{g.preventDefault()},d=g=>{r.disabled||(g.preventDefault(),i.dragging=!0,p(g),$2(window,"mousemove",v),$2(window,"touchmove",v),$2(window,"mouseup",m),$2(window,"touchend",m))},f=g=>{if(!r.hover)return;let y=h(g);if(e("onMousemove",g,y),i.hoverPosition=y,r.vertical)return;let _=n.value,b=a.value.clientWidth/2,C=g.clientX-_.getBoundingClientRect().left;C<b?i.hoverTipsLeft=b-C+"px":_.clientWidth-C<b?i.hoverTipsLeft=_.clientWidth-C-b+"px":i.hoverTipsLeft="50%"},p=g=>{let y=h(g);e("update:modelValue",y),e("change",g,y)},h=g=>{let y=n.value,_=0;if(r.vertical){let b=y.clientHeight;_=(y.getBoundingClientRect().bottom-g.clientY)/b}else _=(g.clientX-y.getBoundingClientRect().left)/y.clientWidth;return _<0?0:_>1?1:_},v=g=>{p(g)},m=g=>{i.dragging&&(Kr(window,"mousemove",v),Kr(window,"touchmove",v),Kr(window,"mouseup",m),Kr(window,"touchend",m),Kr(window,"contextmenu",m),setTimeout(()=>{i.dragging=!1},0))};return(g,y)=>(l.openBlock(),l.createElementBlock("div",{ref:n,class:l.normalizeClass(["d-slider",{"is-vertical":r.vertical}]),onMousedown:l.withModifiers(d,["stop"]),onContextmenu:u},[l.createElementVNode("div",{class:"d-slider__runway",onMousemove:f},[l.withDirectives(l.createElementVNode("div",{class:"d-slider__cursor",style:l.normalizeStyle(l.unref(c))},[l.withDirectives(l.createElementVNode("div",{class:"d-slider__tips",ref:a,style:l.normalizeStyle({left:l.unref(i).hoverTipsLeft})},l.toDisplayString(r.hoverText),5),[[l.vShow,r.hoverText]])],4),[[l.vShow,r.hover]]),l.createElementVNode("div",{class:"d-slider__preload",style:l.normalizeStyle(l.unref(s))},null,4),l.createElementVNode("div",{class:"d-slider__bar",style:l.normalizeStyle(l.unref(o))},null,4)],32)],42,nfe))}}));Ts.__scopeId="data-v-5a794390",l.pushScopeId("data-v-570fa0d1");const afe={key:0,class:"d-player-dialog"},ife={class:"d-player-dialog-body"},ofe={class:"d-player-dialog-title"},sfe={class:"d-player-hotkey-panel"},lfe={class:"d-player-filter-panel"},cfe={class:"d-player-filter-panel-item"},ufe=l.createElementVNode("span",null,"饱和度",-1),dfe={class:"d-player-filter-panel-item"},ffe=l.createElementVNode("span",null,"亮度",-1),hfe={class:"d-player-filter-panel-item"},pfe=l.createElementVNode("span",null,"对比度",-1),gfe={key:0,class:"d-player-contextmenu"},vfe=["dplayerKeyCode"],mfe=l.createElementVNode("input",{class:"d-player-copyText"},null,-1);l.popScopeId();var mR=l.defineComponent({setup(t){const e=l.reactive({show:!1,dialogType:"",dialogTitle:"",version:"1.3.1-beta.6",mouseX:0,mouseY:0}),r=[{label:"视频色彩调整",key:"filter"},{label:"快捷键说明",key:"hotkey"},{label:"复制视频网址",key:"copy"},{label:"版本:1.3.1-beta.6",key:"version"}],n=[{key:"Space",label:"播放/暂停"},{key:"→",label:"单次快进10s,长按5倍速播放"},{key:"←",label:"快退5s"},{key:"↑",label:"音量增加10%"},{key:"↓",label:"音量增加降低10%"},{key:"Esc",label:"退出全屏/退出网页全屏"},{key:"F",label:"全屏/退出全屏"}],a=l.reactive({saturate:.392,brightness:.392,contrast:.392}),i=l.computed(()=>({left:e.mouseX+"px",top:e.mouseY+"px"}));l.watch(a,d=>{let f=document.querySelector("#dPlayerVideo"),p=(2.55*d.saturate).toFixed(2),h=(2.55*d.brightness).toFixed(2),v=(2.55*d.contrast).toFixed(2);f.style.filter=`saturate(${p}) brightness(${h}) contrast(${v})`});const o=()=>{a.saturate=.392,a.brightness=.392,a.contrast=.392},s=d=>{d.key=="Escape"&&u(0)},c=d=>{d.preventDefault(),$2(window,"keydown",s),$2(window,"click",u);let f=document.querySelector("#refPlayerWrap"),p=f.clientWidth;f.clientHeight,e.mouseX=d.clientX-f.getBoundingClientRect().left,p-e.mouseX<130&&(e.mouseX=e.mouseX+(p-e.mouseX-130)),e.mouseY=d.clientY-f.getBoundingClientRect().top,e.show=!0},u=d=>{let f=d.path[0].tagName=="LI",p=d.path[0].attributes.dplayerKeyCode&&d.path[0].attributes.dplayerKeyCode.value,h=r.map(v=>v.key);if(f&&h.includes(p))if(e.dialogTitle=d.path[0].innerText,e.dialogType=p,p=="copy"){let v=document.querySelector(".d-player-copyText");v.value=window.location.href,v.select(),document.execCommand("copy"),e.dialogType=""}else p=="version"&&(e.dialogType="");e.show=!1,Kr(window,"keydown",s),Kr(window,"click",u)};return l.onMounted(()=>{let d=document.querySelector("#refPlayerWrap");Kr(window,"keydown",s),Kr(window,"click",u),Kr(d,"contextmenu",c),$2(d,"contextmenu",c)}),l.onUnmounted(()=>{let d=document.querySelector("#refPlayerWrap");Kr(window,"keydown",s),Kr(window,"click",u),Kr(d,"contextmenu",c)}),(d,f)=>(l.openBlock(),l.createElementBlock("div",null,[l.createVNode(l.Transition,{name:"d-fade-in"},{default:l.withCtx(()=>[l.unref(e).dialogType?(l.openBlock(),l.createElementBlock("div",afe,[l.createElementVNode("div",ife,[l.createElementVNode("h5",ofe,[l.createTextVNode(l.toDisplayString(l.unref(e).dialogTitle)+" ",1),l.createElementVNode("i",{onClick:f[0]||(f[0]=p=>l.unref(e).dialogType=!1),class:"icon icon-close"},"X")]),l.withDirectives(l.createElementVNode("ul",sfe,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(n,p=>l.createElementVNode("li",{class:"d-player-hotkey-panel-item",key:p.key},[l.createElementVNode("span",null,l.toDisplayString(p.key),1),l.createElementVNode("span",null,l.toDisplayString(p.label),1)])),64))],512),[[l.vShow,l.unref(e).dialogType=="hotkey"]]),l.withDirectives(l.createElementVNode("ul",lfe,[l.createElementVNode("li",cfe,[ufe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).saturate,"onUpdate:modelValue":f[1]||(f[1]=p=>l.unref(a).saturate=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).saturate)),1)]),l.createElementVNode("li",dfe,[ffe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).brightness,"onUpdate:modelValue":f[2]||(f[2]=p=>l.unref(a).brightness=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).brightness)),1)]),l.createElementVNode("li",hfe,[pfe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).contrast,"onUpdate:modelValue":f[3]||(f[3]=p=>l.unref(a).contrast=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).contrast)),1)]),l.createElementVNode("span",{onClick:o,title:"重置","aria-label":"重置",class:"d-player-filter-reset"},"重置")],512),[[l.vShow,l.unref(e).dialogType=="filter"]])])])):l.createCommentVNode("",!0)]),_:1}),l.unref(e).show?(l.openBlock(),l.createElementBlock("div",gfe,[l.createElementVNode("ul",{class:"d-player-contextmenu-body",style:l.normalizeStyle(l.unref(i))},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(r,p=>l.createElementVNode("li",{dplayerKeyCode:p.key,key:p.key},l.toDisplayString(p.label),9,vfe)),64))],4),mfe])):l.createCommentVNode("",!0)]))}});mR.__scopeId="data-v-570fa0d1";const Tv=t=>{let e=~~(t/3600),r=~~(t%3600/60),n=~~(t%60);return e=e<10?"0"+e:e,r=r<10?"0"+r:r,n=n<10?"0"+n:n,`${e}:${r}:${n}`},K3="ontouchstart"in window,yR=["loadstart","play","pause","playing","seeking","seeked","waiting","durationchange","progress","canplay","timeupdate","ended","error","stalled"],yfe={width:{type:String,default:"800px"},height:{type:String,default:"450px"},color:{type:String,default:"#409eff"},src:{required:!0,type:String,default:""},title:{type:String,default:""},type:{type:String,default:"video/mp4"},poster:{type:String,default:""},webFullScreen:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},currentTime:{type:Number,default:0},playsinline:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},speedRate:{type:Array,default:()=>["2.0","1.5","1.25","1.0","0.75","0.5"]},autoPlay:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},mirror:{type:Boolean,default:!1},ligthOff:{type:Boolean,default:!1},volume:{type:[String,Number],default:.3},control:{type:Boolean,default:!0},controlBtns:{type:Array,default:["audioTrack","quality","speedRate","volume","setting","pip","pageFullScreen","fullScreen"]},preload:{type:String,default:"auto"}};l.pushScopeId("data-v-01791e9e");const bfe={class:"d-player-video",id:"dPlayerVideo"},_fe=["controls","webkit-playsinline","playsinline","volume","muted","loop","preload","src","poster"],Sfe={class:"d-player-lightoff"},Cfe={key:1,class:"d-player-state"},wfe={class:"d-play-btn"},xfe=["onKeyup","onKeydown"],Efe={class:"d-control-progress"},Tfe={class:"d-tool-bar"},Lfe={key:0,class:"d-tool-item d-tool-time audioTrack-btn"},kfe=l.createElementVNode("span",{style:{margin:"0 3px"}},"/",-1),Afe={class:"total-time"},Dfe={class:"d-tool-bar"},Mfe={key:0,class:"d-tool-item quality-btn"},Ofe={class:"d-tool-item-main"},Ife={class:"speed-main",style:{"text-align":"center"}},Nfe=["onClick"],Rfe={key:1,class:"d-tool-item speedRate-btn"},Pfe={class:"d-tool-item-main"},Bfe={class:"speed-main"},Ffe=["onClick"],zfe={key:2,class:"d-tool-item volume-btn"},Vfe={class:"d-tool-item-main volume-box",style:{width:"52px"}},$fe={class:"volume-text-size"},Ufe={key:3,class:"d-tool-item setting-btn"},jfe={class:"d-tool-item-main"},Hfe={class:"speed-main"},Gfe=l.createTextVNode(" 镜像画面 "),Wfe=l.createTextVNode(" 循环播放 "),Yfe=l.createTextVNode(" 关灯模式 "),Zfe=l.createElementVNode("div",{class:"d-tool-item-main"},"画中画",-1),Kfe=l.createElementVNode("div",{class:"d-tool-item-main"},"网页全屏",-1),qfe=l.createElementVNode("div",{class:"d-tool-item-main"},"全屏",-1);l.popScopeId();var Ls=l.defineComponent(xv(wv({},{name:"vue3VideoPlay",inheritAttrs:!1}),{props:yfe,emits:[...yR,"mirrorChange","loopChange","lightOffChange"],setup:function(t,{expose:e,emit:r}){const n=t;l.useCssVars(P=>({"51d4439c":l.unref(h),"77e758a6":P.width,b8a1afc0:P.height}));const a=new Ev({fragLoadingTimeOut:2e3}),i=l.ref(null),o=l.ref(null),s=l.ref(null),c=l.ref(null),u=l.reactive(xv(wv({dVideo:null},n),{muted:n.muted,playBtnState:n.autoPlay?"pause":"play",loadStateType:"loadstart",fullScreen:!1,handleType:"",currentTime:"00:00:00",preloadBar:0,totalTime:"00:00:00",isVideoHovering:!0,speedActive:"1.0",playProgress:0,isMultiplesPlay:!1,longPressTimeout:null,progressCursorTime:"00:00:00",qualityLevels:[],currentLevel:0})),d=(...P)=>B=>P.reverse().reduce((z,$)=>$(z),B),f=yR.reduce((P,B)=>{var z;return P[`on${z=B,z.charAt(0).toUpperCase()+z.slice(1)}`]=$=>{u.loadStateType=B,r(B,$)},P},{});f.onCanplay=d(f.onCanplay,()=>{u.playBtnState!="play"&&u.dVideo.play(),u.autoPlay&&(u.dVideo.play(),u.playBtnState="pause")}),f.onEnded=d(f.onEnded,()=>{u.playBtnState="replay"}),f.onDurationchange=P=>{r("durationchange",P),n.currentTime!=0&&(u.dVideo.currentTime=n.currentTime),f.onTimeupdate(P)},f.onProgress=P=>{console.log("缓冲中..."),r("progress",P);let B=P.target.duration,z=P.target.buffered,$=P.target.buffered.length&&P.target.buffered.end(z-1);u.preloadBar=$/B},f.onTimeupdate=P=>{r("timeupdate",P);let B=P.duration||P.target.duration||0,z=P.currentTime||P.target.currentTime;u.playProgress=z/B,u.currentTime=Tv(z),u.totalTime=Tv(B)},f.onError=d(f.onError,()=>{u.playBtnState="replay"});let p=l.useAttrs();for(let P in p)f[P]=p[P];const h=(v=u.color,`${parseInt("0x"+v.slice(1,3))},${parseInt("0x"+v.slice(3,5))},${parseInt("0x"+v.slice(5,7))}`);var v;const m=hR(500,()=>{u.handleType=""}),g=P=>{P.preventDefault(),P.code=="ArrowUp"?u.volume=u.volume+.1>1?1:u.volume+.1:u.volume=u.volume-.1<0?0:u.volume-.1,u.muted=!1,u.handleType="volume",m()},y=P=>{n.speed&&(u.dVideo.currentTime=u.dVideo.currentTime<10?.1:u.dVideo.currentTime-10,f.onTimeupdate(u.dVideo),C())},_=P=>{P.preventDefault();let B=P.type;if(P.key=="ArrowRight"){if(C(),B=="keyup"){if(clearTimeout(u.longPressTimeout),!n.speed&&!u.longPressTimeout)return;u.isMultiplesPlay?(u.dVideo.playbackRate=u.speedActive,u.isMultiplesPlay=!1):(u.dVideo.currentTime=u.dVideo.currentTime+10,f.onTimeupdate(u.dVideo))}else if(B=="keydown"){if(!n.speed)return;u.isMultiplesPlay&&clearTimeout(u.longPressTimeout),u.longPressTimeout=setTimeout(()=>{u.isMultiplesPlay=!0,u.dVideo.playbackRate=5,u.handleType="playbackRate",m()},500)}}},b=()=>{K3||c.value.focus()},C=()=>{u.loadStateType="play",u.dVideo.play().catch(()=>{setTimeout(()=>{u.playBtnState="replay",u.loadStateType="error"},500)}),u.playBtnState="pause"},w=()=>{u.dVideo.pause(),u.playBtnState="play"},S=P=>{P&&P.preventDefault(),u.playBtnState=="play"||u.playBtnState=="replay"?C():u.playBtnState=="pause"&&w()},x=()=>{u.muted=!u.muted,u.volume==0&&(u.volume=.05)},E=(P,B)=>{let z=u.dVideo.duration||u.dVideo.target.duration;u.dVideo.currentTime=z*B,u.playBtnState=="play"&&(u.dVideo.play(),u.playBtnState="pause")},L=(P,B)=>{u.progressCursorTime=Tv(u.dVideo.duration*B)},T=hR(2500,()=>{u.isVideoHovering=!1}),k=P=>{u.isVideoHovering=!0,T()},A=P=>{r("mirrorChange",P,u.dVideo)},D=P=>{r("loopChange",P,u.dVideo)},M=P=>{r("lightOffChange",P,u.dVideo)},O=()=>{var P;P=u.dVideo,document.pictureInPictureElement?document.exitPictureInPicture().catch(B=>{console.log(B,"Video failed to leave Picture-in-Picture mode.")}):P.requestPictureInPicture().catch(B=>{console.log(B,"Video failed to enter Picture-in-Picture mode.")})},R=()=>{u.fullScreen=(P=>{let B=document,z=B.webkitIsFullScreen||B.fullscreen;return z?(document.exitFullscreen||B.webkitExitFullScreen).call(B):(P.requestFullscreen||P.webkitRequestFullScreen).call(P),!z})(i.value)};return l.watch(()=>n.src,()=>{l.nextTick(()=>{u.dVideo.canPlayType(n.type)||u.dVideo.canPlayType("application/vnd.apple.mpegurl")?u.muted=n.autoPlay:Ev.isSupported()&&(a.detachMedia(),a.attachMedia(u.dVideo),a.on(Ev.Events.MEDIA_ATTACHED,()=>{a.loadSource(n.src),a.on("hlsManifestParsed",(P,B)=>{console.log(B),u.currentLevel=B.level,u.qualityLevels=B.levels||[]})}),a.on("hlsLevelSwitching",(P,B)=>{console.log(B),console.log("LEVEL_SWITCHING")}),a.on("hlsLevelSwitched",(P,B)=>{u.currentLevel=B.level,console.log("LEVEL_SWITCHED")}))})},{immediate:!0}),l.onMounted(()=>{u.dVideo=o,b()}),e({play:C,pause:w,togglePlay:S}),(P,B)=>(l.openBlock(),l.createElementBlock("div",{ref:i,id:"refPlayerWrap",class:l.normalizeClass(["d-player-wrap",{"web-full-screen":l.unref(u).webFullScreen,"is-lightoff":l.unref(u).lightOff,"d-player-wrap-hover":l.unref(u).playBtnState=="play"||l.unref(u).isVideoHovering}]),onMousemove:k},[l.createElementVNode("div",bfe,[l.createElementVNode("video",l.mergeProps({ref:o,class:["d-player-video-main",{"video-mirror":l.unref(u).mirror}],id:"dPlayerVideoMain",controls:!(!l.unref(K3)||!l.unref(u).speed),"webkit-playsinline":n.playsinline,playsinline:n.playsinline},l.unref(f),{volume:l.unref(u).volume,muted:l.unref(u).muted,loop:l.unref(u).loop,preload:P.preload,width:"100%",height:"100%",src:n.src,poster:n.poster}),"您的浏览器不支持Video标签。",16,_fe)]),l.createVNode(l.Transition,{name:"d-fade-in"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",Sfe,null,512),[[l.vShow,l.unref(u).lightOff]])]),_:1}),l.unref(u).fullScreen?(l.openBlock(),l.createBlock(Gde,{key:0,title:n.title},null,8,["title"])):l.createCommentVNode("",!0),l.unref(K3)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Cfe,[l.createVNode(l.Transition,{name:"d-scale-out"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",wfe,[l.createVNode(Kn,{icon:"icon-play",size:40})],512),[[l.vShow,l.unref(u).playBtnState=="play"]])]),_:1}),l.createVNode(gR,{state:l.unref(u)},null,8,["state"])])),l.unref(K3)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("input",{key:2,type:"input",readonly:"readonly",ref:c,onDblclick:R,onKeyup:[l.withKeys(R,["f"]),B[0]||(B[0]=l.withKeys(z=>l.unref(u).webFullScreen=!1,["esc"])),_],onClick:S,onKeydown:[l.withKeys(S,["space"]),l.withKeys(y,["arrow-left"]),l.withKeys(g,["arrow-up","arrow-down"]),_],class:"d-player-input",maxlength:"0"},null,40,xfe)),l.createVNode(vR,{loadType:l.unref(u).loadStateType},null,8,["loadType"]),l.createVNode(mR),!l.unref(K3)&&l.unref(u).control?(l.openBlock(),l.createElementBlock("div",{key:3,class:"d-player-control",ref:s},[l.createElementVNode("div",Efe,[l.createVNode(Ts,{class:"d-progress-bar",onOnMousemove:L,onChange:E,disabled:!l.unref(u).speed,hoverText:l.unref(u).progressCursorTime,modelValue:l.unref(u).playProgress,"onUpdate:modelValue":B[1]||(B[1]=z=>l.unref(u).playProgress=z),preload:l.unref(u).preloadBar},null,8,["disabled","hoverText","modelValue","preload"])]),l.createElementVNode("div",{class:"d-control-tool",onClick:b},[l.createElementVNode("div",Tfe,[l.createElementVNode("div",{class:"d-tool-item",onClick:S},[l.createVNode(Kn,{size:"24",icon:`icon-${l.unref(u).playBtnState}`},null,8,["icon"])]),n.controlBtns.includes("audioTrack")?(l.openBlock(),l.createElementBlock("div",Lfe,[l.createElementVNode("span",null,l.toDisplayString(l.unref(u).currentTime),1),kfe,l.createElementVNode("span",Afe,l.toDisplayString(l.unref(u).totalTime),1)])):l.createCommentVNode("",!0)]),l.createElementVNode("div",Dfe,[l.unref(u).qualityLevels.length&&n.controlBtns.includes("quality")?(l.openBlock(),l.createElementBlock("div",Mfe,[l.createTextVNode(l.toDisplayString(l.unref(u).qualityLevels.length&&(l.unref(u).qualityLevels[l.unref(u).currentLevel]||{}).height)+"P ",1),l.createElementVNode("div",Ofe,[l.createElementVNode("ul",Ife,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u).qualityLevels,(z,$)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass({"speed-active":l.unref(u).currentLevel==$}),onClick:j=>((Z,W)=>{a.currentLevel=W,u.currentLevel=W})(0,$),key:z},l.toDisplayString(z.height)+"P",11,Nfe))),128))])])])):l.createCommentVNode("",!0),n.controlBtns.includes("speedRate")?(l.openBlock(),l.createElementBlock("div",Rfe,[l.createTextVNode(l.toDisplayString(l.unref(u).speedActive=="1.0"?"倍速":l.unref(u).speedActive+"x")+" ",1),l.createElementVNode("div",Pfe,[l.createElementVNode("ul",Bfe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u).speedRate,z=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass({"speed-active":l.unref(u).speedActive==z}),onClick:$=>(j=>{u.speedActive=j,u.dVideo.playbackRate=j})(z),key:z},l.toDisplayString(z)+"x",11,Ffe))),128))])])])):l.createCommentVNode("",!0),n.controlBtns.includes("volume")?(l.openBlock(),l.createElementBlock("div",zfe,[l.createElementVNode("div",Vfe,[l.createElementVNode("div",{class:l.normalizeClass(["volume-main",{"is-muted":l.unref(u).muted}])},[l.createElementVNode("span",$fe,l.toDisplayString(l.unref(u).muted?0:~~(100*l.unref(u).volume))+"%",1),l.createVNode(Ts,{onChange:B[2]||(B[2]=z=>l.unref(u).muted=!1),hover:!1,size:"5px",vertical:!0,modelValue:l.unref(u).volume,"onUpdate:modelValue":B[3]||(B[3]=z=>l.unref(u).volume=z)},null,8,["modelValue"])],2)]),l.createElementVNode("span",{onClick:x,style:{display:"flex"}},[l.createVNode(Kn,{size:"20",icon:"icon-volume-"+(l.unref(u).volume==0||l.unref(u).muted?"mute":l.unref(u).volume>.5?"up":"down")},null,8,["icon"])])])):l.createCommentVNode("",!0),n.controlBtns.includes("setting")?(l.openBlock(),l.createElementBlock("div",Ufe,[l.createVNode(Kn,{size:"20",class:"rotateHover",icon:"icon-settings"}),l.createElementVNode("div",jfe,[l.createElementVNode("ul",Hfe,[l.createElementVNode("li",null,[Gfe,l.createVNode(P6,{onChange:A,modelValue:l.unref(u).mirror,"onUpdate:modelValue":B[4]||(B[4]=z=>l.unref(u).mirror=z)},null,8,["modelValue"])]),l.createElementVNode("li",null,[Wfe,l.createVNode(P6,{onChange:D,modelValue:l.unref(u).loop,"onUpdate:modelValue":B[5]||(B[5]=z=>l.unref(u).loop=z)},null,8,["modelValue"])]),l.createElementVNode("li",null,[Yfe,l.createVNode(P6,{onChange:M,modelValue:l.unref(u).lightOff,"onUpdate:modelValue":B[6]||(B[6]=z=>l.unref(u).lightOff=z)},null,8,["modelValue"])])])])])):l.createCommentVNode("",!0),n.controlBtns.includes("pip")?(l.openBlock(),l.createElementBlock("div",{key:4,class:"d-tool-item pip-btn",onClick:O},[l.createVNode(Kn,{size:"20",icon:"icon-pip"}),Zfe])):l.createCommentVNode("",!0),n.controlBtns.includes("pageFullScreen")?(l.openBlock(),l.createElementBlock("div",{key:5,class:"d-tool-item pip-btn",onClick:B[7]||(B[7]=z=>l.unref(u).webFullScreen=!l.unref(u).webFullScreen)},[l.createVNode(Kn,{size:"20",icon:"icon-web-screen"}),Kfe])):l.createCommentVNode("",!0),n.controlBtns.includes("fullScreen")?(l.openBlock(),l.createElementBlock("div",{key:6,class:"d-tool-item fullScreen-btn",onClick:R},[qfe,l.createVNode(Kn,{size:"20",icon:"icon-screen"})])):l.createCommentVNode("",!0)])])],512)):l.createCommentVNode("",!0)],34))}}));function Xfe(t){t.component(Ls.name,Ls)}Ls.__scopeId="data-v-01791e9e",Ls.install=Xfe;const Jfe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e视频%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-102.000000,%20-803.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M113.828161,805.303448%20C114.589942,805.303448%20115.207471,805.920984%20115.207471,806.682759%20L115.207471,806.682759%20L115.207471,808.705747%20L117.120115,807.271264%20C117.51949,806.971733%20118.079386,807.222315%20118.143874,807.695047%20L118.143874,807.695047%20L118.15,807.786207%20L118.15,816.245977%20C118.15,816.776397%20117.544451,817.079172%20117.120115,816.76092%20L117.120115,816.76092%20L115.207471,815.326437%20L115.207471,816.981609%20C115.207471,817.698582%20114.660458,818.28777%20113.960999,818.354606%20L113.960999,818.354606%20L113.828161,818.36092%20L103.52931,818.36092%20C102.767536,818.36092%20102.15,817.74339%20102.15,816.981609%20L102.15,816.981609%20L102.15,806.682759%20C102.15,805.920986%20102.767538,805.303448%20103.52931,805.303448%20L103.52931,805.303448%20Z%20M113.828161,806.590805%20L103.52931,806.590805%20C103.478525,806.590805%20103.437356,806.631974%20103.437356,806.682759%20L103.437356,806.682759%20L103.437356,816.981609%20C103.437356,817.0324%20103.47852,817.073563%20103.52931,817.073563%20L103.52931,817.073563%20L113.828161,817.073563%20C113.878957,817.073563%20113.920115,817.032405%20113.920115,816.981609%20L113.920115,816.981609%20L113.920115,814.03908%20C113.920115,813.50866%20114.525664,813.205886%20114.95,813.524138%20L114.95,813.524138%20L116.862644,814.958621%20L116.862644,809.073563%20L114.95,810.508046%20C114.550625,810.807577%20113.990729,810.556995%20113.926241,810.084264%20L113.926241,810.084264%20L113.920115,809.993103%20L113.920115,806.682759%20C113.920115,806.631968%20113.878952,806.590805%20113.828161,806.590805%20L113.828161,806.590805%20Z%20M107.575287,808.245977%20C108.946477,808.245977%20110.058046,809.357546%20110.058046,810.728736%20C110.058046,812.099925%20108.946477,813.211494%20107.575287,813.211494%20C106.204098,813.211494%20105.092529,812.099925%20105.092529,810.728736%20C105.092529,809.357546%20106.204098,808.245977%20107.575287,808.245977%20Z%20M107.575287,809.533333%20C106.915085,809.533333%20106.379885,810.068533%20106.379885,810.728736%20C106.379885,811.388938%20106.915085,811.924138%20107.575287,811.924138%20C108.23549,811.924138%20108.77069,811.388938%20108.77069,810.728736%20C108.77069,810.068533%20108.23549,809.533333%20107.575287,809.533333%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Qfe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e视频%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-102.000000,%20-803.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M113.828161,805.303448%20C114.589942,805.303448%20115.207471,805.920984%20115.207471,806.682759%20L115.207471,806.682759%20L115.207471,808.705747%20L117.120115,807.271264%20C117.51949,806.971733%20118.079386,807.222315%20118.143874,807.695047%20L118.143874,807.695047%20L118.15,807.786207%20L118.15,816.245977%20C118.15,816.776397%20117.544451,817.079172%20117.120115,816.76092%20L117.120115,816.76092%20L115.207471,815.326437%20L115.207471,816.981609%20C115.207471,817.698582%20114.660458,818.28777%20113.960999,818.354606%20L113.960999,818.354606%20L113.828161,818.36092%20L103.52931,818.36092%20C102.767536,818.36092%20102.15,817.74339%20102.15,816.981609%20L102.15,816.981609%20L102.15,806.682759%20C102.15,805.920986%20102.767538,805.303448%20103.52931,805.303448%20L103.52931,805.303448%20Z%20M113.828161,806.590805%20L103.52931,806.590805%20C103.478525,806.590805%20103.437356,806.631974%20103.437356,806.682759%20L103.437356,806.682759%20L103.437356,816.981609%20C103.437356,817.0324%20103.47852,817.073563%20103.52931,817.073563%20L103.52931,817.073563%20L113.828161,817.073563%20C113.878957,817.073563%20113.920115,817.032405%20113.920115,816.981609%20L113.920115,816.981609%20L113.920115,814.03908%20C113.920115,813.50866%20114.525664,813.205886%20114.95,813.524138%20L114.95,813.524138%20L116.862644,814.958621%20L116.862644,809.073563%20L114.95,810.508046%20C114.550625,810.807577%20113.990729,810.556995%20113.926241,810.084264%20L113.926241,810.084264%20L113.920115,809.993103%20L113.920115,806.682759%20C113.920115,806.631968%20113.878952,806.590805%20113.828161,806.590805%20L113.828161,806.590805%20Z%20M107.575287,808.245977%20C108.946477,808.245977%20110.058046,809.357546%20110.058046,810.728736%20C110.058046,812.099925%20108.946477,813.211494%20107.575287,813.211494%20C106.204098,813.211494%20105.092529,812.099925%20105.092529,810.728736%20C105.092529,809.357546%20106.204098,808.245977%20107.575287,808.245977%20Z%20M107.575287,809.533333%20C106.915085,809.533333%20106.379885,810.068533%20106.379885,810.728736%20C106.379885,811.388938%20106.915085,811.924138%20107.575287,811.924138%20C108.23549,811.924138%20108.77069,811.388938%20108.77069,810.728736%20C108.77069,810.068533%20108.23549,809.533333%20107.575287,809.533333%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ehe={key:0,class:"echart-title"},Lv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({components:{videoPlay:Ls},DEFAULT:{DEFAULT_ICON:Jfe,ACTIVE_ICON:Qfe,NAME_CN:"视频",NAME_EN:"vdo",ORDER:5},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},type:{value:"ysy",type:"select",options:[{value:"ysy",label:"萤石云"},{value:"mp4",label:"MP4"}],label:"视频类型"},url:{value:"",type:"string",label:"视频地址"}}},{__name:"vdo",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"}},setup(t){const e=l.ref("vdo_"+Math.random().toString(16).substring(4,12)),r={mp4:"video/mp4",ysy:"application/x-mpegURL"},n=l.reactive({width:"100%",height:"100%",type:"video/mp4",autoPlay:!0,control:!0,controlBtns:["pip","fullScreen"],src:""}),a=t,i=l.ref({}),o=()=>{var u,d,f,p,h,v;const{options:c}=a.conf;i.value={bgColor:((u=c==null?void 0:c.bgColor)==null?void 0:u.value)||"#fff",radiusSize:((d=c==null?void 0:c.radiusSize)==null?void 0:d.value)??4,type:((f=c==null?void 0:c.type)==null?void 0:f.value)??"img",isHideTitle:((p=c==null?void 0:c.isHideTitle)==null?void 0:p.value)??!1},n.type=r[(h=c==null?void 0:c.type)==null?void 0:h.value],n.src=(v=c==null?void 0:c.url)==null?void 0:v.value},s=pt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{o()}),(c,u)=>(l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex flex-col relative",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",ehe,l.toDisplayString(t.conf.name),1)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",i.value.isHideTitle?"h-[100%]":"h-[calc(100%-40px)]"])},[l.createVNode(l.unref(Ls),l.mergeProps({id:e.value},n),null,16,["id"])],2),l.renderSlot(c.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4ff20009"]])},Symbol.toStringTag,{value:"Module"})),the=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Bar",NAME_CN:"柱状图",ORDER:3}},Symbol.toStringTag,{value:"Module"})),rhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Card",NAME_CN:"卡片",ORDER:1}},Symbol.toStringTag,{value:"Module"})),nhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Collect",NAME_CN:"离线",ORDER:7}},Symbol.toStringTag,{value:"Module"})),ahe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"customized",NAME_CN:"自定义",ORDER:0}},Symbol.toStringTag,{value:"Module"})),ihe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Gague",NAME_CN:"仪表盘",ORDER:4}},Symbol.toStringTag,{value:"Module"})),ohe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Indass",NAME_CN:"数据分析",ORDER:11}},Symbol.toStringTag,{value:"Module"})),she=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Line",NAME_CN:"曲线",ORDER:2}},Symbol.toStringTag,{value:"Module"})),lhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"List",NAME_CN:"列表",ORDER:6}},Symbol.toStringTag,{value:"Module"})),che=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Map",NAME_CN:"地图",ORDER:11}},Symbol.toStringTag,{value:"Module"})),uhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Monitor",NAME_CN:"组态",ORDER:8}},Symbol.toStringTag,{value:"Module"})),dhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Params",NAME_CN:"参数控件",ORDER:10}},Symbol.toStringTag,{value:"Module"})),fhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Pie",NAME_CN:"饼状图",ORDER:5}},Symbol.toStringTag,{value:"Module"})),hhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Pro",NAME_CN:"首页组件",ORDER:12}},Symbol.toStringTag,{value:"Module"})),phe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Radar",NAME_CN:"雷达图",ORDER:6}},Symbol.toStringTag,{value:"Module"})),ghe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Sankey",NAME_CN:"桑基图",ORDER:8}},Symbol.toStringTag,{value:"Module"})),vhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Switch",NAME_CN:"开关控件",ORDER:9}},Symbol.toStringTag,{value:"Module"})),mhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Video",NAME_CN:"视频",ORDER:7}},Symbol.toStringTag,{value:"Module"})),bR=localStorage.getItem("locale")??"cn";let kv=null,Av=null;const yhe=async()=>{var n,a,i,o;if(kv)return kv;const t={},e=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv}),r=Object.assign({"/packages/elements/bar/config.js":the,"/packages/elements/card/config.js":rhe,"/packages/elements/collect/config.js":nhe,"/packages/elements/customized/config.js":ahe,"/packages/elements/gauge/config.js":ihe,"/packages/elements/indass/config.js":ohe,"/packages/elements/line/config.js":she,"/packages/elements/list/config.js":lhe,"/packages/elements/map/config.js":che,"/packages/elements/monitor/config.js":uhe,"/packages/elements/params/config.js":dhe,"/packages/elements/pie/config.js":fhe,"/packages/elements/pro/config.js":hhe,"/packages/elements/radar/config.js":phe,"/packages/elements/sankey/config.js":ghe,"/packages/elements/switch/config.js":vhe,"/packages/elements/video/config.js":mhe});for(const s in e){const c=s.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(!c)continue;const[,u,d]=c,f=l.markRaw(e[s].default),p=Dv(f);t[u]||(t[u]=_R(u,r)),t[u].data.push({name:((n=p.DEFAULT)==null?void 0:n[`NAME_${bR.toUpperCase()}`])||d,type:d,default_icon:(a=p.DEFAULT)==null?void 0:a.DEFAULT_ICON,active_icon:(i=p.DEFAULT)==null?void 0:i.ACTIVE_ICON,order:((o=p.DEFAULT)==null?void 0:o.ORDER)??999})}return Object.values(t).forEach(s=>{s.data.sort((c,u)=>c.order-u.order)}),kv=t,t},bhe=()=>{if(Av)return Av;const t={},e=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv});return Object.keys(e).forEach(r=>{const n=r.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(!n)return;const[,,a]=n,i=l.markRaw(e[r].default);t[a]=Dv(i)}),Av=t,t},Dv=t=>({DEFAULT:t.DEFAULT||{},DATA:t.DATA||{},OPTIONS:t.OPTIONS||{},PARAMS:t.PARAMS||{},SOURCE:t.SOURCE||{},COMMON:t.COMMON||{},ITEMS:t.ITEMS||{},COLOR_AREA:t.COLOR_AREA||{},GRADE:t.GRADE||{},CUSTOMIZED:t.CUSTOMIZED||{}}),_R=(t,e)=>{const r=`/src/elements/${t}/config.js`,n={name:t,order:999,data:[]};if(!e[r])return n;const a=e[r].default;return{...n,name:a[`NAME_${bR.toUpperCase()}`]||t,order:a.ORDER??999}},ks={getElementsMap:yhe,getComponentExposedProps:Dv,getDirectoryConfig:_R,getAllExposedProps:bhe,loadComponents:()=>{const t=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv}),e={};return Object.keys(t).forEach(r=>{const n=r.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(n){const[,,a]=n;e[a]=l.markRaw(t[r].default)}}),e}};/*! Element Plus v2.9.6 */var SR={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const _he={key:0,class:"w-full h-full"},She={class:"canvas"},Che={key:0,class:"component-edit"},whe={key:0,class:"sheet-wrap"},xhe=["onClick"],q3=et(Object.assign({name:"DesignPro"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""},unlocked:{type:Boolean,default:!1}},emits:["delete","update"],setup(t,{emit:e}){const r=e,n=t,a=l.reactive({margin:[10,10],height:40}),i=l.ref({sheets:[]}),o=l.ref(0),s=l.computed(()=>i.value.sheets[o.value]),c=l.ref({});let u={};const d=l.ref(""),f=new Blob([Nm],{type:"application/javascript"}),p=URL.createObjectURL(f),h=new SharedWorker(p),v=Zp(),m=J0.getUser().token;h.port.postMessage({type:"open",url:v,token:m,sysMode:localStorage.getItem("sys_mode")||""}),h.port.onmessage=x=>{let E=x.data;if(E.component_name==="object_alias_map"){let L={};for(let T in E.result)L[E.result[T]]=T;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(L));return}i.value.sheets[o.value].components.forEach(L=>{E.actionid===L.id&&(L.socketData=E.result)})};const g=x=>({x:x.x,y:x.y,w:x.w,h:x.h,i:x.i}),y=()=>{let x=1920,E=s.value.col||20;x=document.body.offsetWidth-356-16-(E+1)*a.margin[0],a.height=Math.round(x/E)},_=x=>(x.sheets.forEach(E=>{E.components.forEach(L=>{var k;const T=((k=u[L.type])==null?void 0:k.OPTIONS)||{};Object.keys(L.options).forEach(A=>{L.options[A]={...T[A]||{},value:L.options[A]}})})}),x),b=async()=>{const{result:x}=await _t.post("get_object_list",{select:["name","uid","alias"]});let E={};return x.data.forEach(L=>{E[L.alias]=L.uid}),E},C=x=>{l.nextTick(()=>{o.value=x})},w=x=>{let E=s.value.components.filter(L=>L.id!==x.id);r("delete",E)},S=x=>{r("update",s.value.components)};return l.onMounted(async()=>{const x=await b();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(x)),c.value=await ks.loadComponents(),u=await ks.getAllExposedProps(),i.value=_(n.script),y()}),l.provide("sharedWorker",h),(x,E)=>(l.openBlock(),l.createBlock(l.unref(MO),{locale:l.unref(SR)},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock("div",_he,[l.createElementVNode("div",{class:l.normalizeClass(["layout",{"h-[calc(100%-40px)]":i.value.sheets.length>1,"h-[100%]":i.value.sheets.length<=1}])},[l.createElementVNode("div",She,[l.createVNode(r7,{layout:s.value.components,"onUpdate:layout":E[1]||(E[1]=L=>s.value.components=L),"col-num":s.value.col,"row-height":a.height,margin:a.margin,"is-draggable":t.unlocked,"is-resizable":t.unlocked,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!1},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.components,L=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:L.i,ref_for:!0},g(L),{onMouseover:T=>d.value=L.i,onMouseleave:E[0]||(E[0]=T=>d.value=""),onResized:S,onMoved:S}),{default:l.withCtx(()=>[c.value[L.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(c.value[L.type]),{key:0,conf:L,uid:t.uid,mode:"preview"},{default:l.withCtx(()=>[d.value===L.i&&t.unlocked?(l.openBlock(),l.createElementBlock("div",Che,[l.createVNode(l.unref(Nie),{onClick:T=>w(L)},null,8,["onClick"])])):l.createCommentVNode("",!0)]),_:2},1032,["conf","uid"])):l.createCommentVNode("",!0)]),_:2},1040,["onMouseover"]))),128))]),_:1},8,["layout","col-num","row-height","margin","is-draggable","is-resizable"])])],2),i.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",whe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.sheets,(L,T)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:o.value===T}]),onClick:k=>C(T)},l.toDisplayString(L.name),11,xhe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-61d6de77"]]),Ehe={key:0,id:"ShowContainer"},The={class:"canvas"},Lhe={key:0,class:"sheet-wrap"},khe=["onClick"],X3=et(Object.assign({name:"DesignShow"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""},node:{type:String,default:""},unlocked:{type:Boolean,default:!1}},setup(t){const e=t,r=l.reactive({margin:[10,10],height:40}),n=l.ref({sheets:[]}),a=l.ref(0),i=l.computed(()=>n.value.sheets[a.value]),o=l.ref({});let s={};const c=new Blob([Nm],{type:"application/javascript"}),u=URL.createObjectURL(c),d=new SharedWorker(u),f=Zp(),p=J0.getUser().token;d.port.postMessage({type:"open",url:f,token:p,sysMode:localStorage.getItem("sys_mode")||""}),d.port.onmessage=C=>{let w=C.data;if(w.component_name==="object_alias_map"){let S={};for(let x in w.result)S[w.result[x]]=x;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(S));return}n.value.sheets[a.value].components.forEach(S=>{w.actionid===S.id&&(S.socketData=w.result)})};const h=C=>({x:C.x,y:C.y,w:C.w,h:C.h,i:C.i}),v=()=>{let C=i.value.col||100,w=i.value.screenHeight;document.querySelector("#ShowContainer")&&(w=w-(C+1)*r.margin[0]),r.height=w/C},m=C=>C.includes("defaultBg1")?location.origin+"/images/bg/bg1.png":C.includes("defaultBg1")?location.origin+"/images/bg/bg2.png":C,g=C=>(C.sheets.forEach(w=>{w.components.forEach(S=>{var E;const x=((E=s[S.type])==null?void 0:E.OPTIONS)||{};Object.keys(S.options).forEach(L=>{S.options[L]={...x[L]||{},value:S.options[L]}})})}),C),y=async()=>{const{result:C}=await _t.post("get_object_list",{select:["name","uid","alias"]});let w={};return C.data.forEach(S=>{w[S.alias]=S.uid}),w},_=C=>{l.nextTick(()=>{a.value=C})},b=()=>{const{screenHeight:C,screenWidth:w}=i.value;let S=document.documentElement;e.node&&(S=document.getElementById(e.node));let x=document.getElementById("ShowContainer"),E=S.clientWidth,L=S.clientHeight,T=L/C,k=E/w,A=k>T?T:k,D=E/2-w*A/2,M=L/2-C*A/2;x.style.width=w+"px",x.style.height=C+"px",x.style.transform=`scale(${A}, ${A})`,x.style.left=`${D}px`,x.style.top=`${M}px`};return l.onMounted(async()=>{const C=await y();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(C)),o.value=await ks.loadComponents(),s=await ks.getAllExposedProps(),n.value=g(e.script),l.nextTick(()=>{b(),v()}),window.onresize=pt(()=>{b()},100)}),l.provide("sharedWorker",d),(C,w)=>(l.openBlock(),l.createBlock(l.unref(MO),{locale:l.unref(SR)},{default:l.withCtx(()=>[i.value?(l.openBlock(),l.createElementBlock("div",Ehe,[l.createElementVNode("div",{class:"layout",style:l.normalizeStyle({background:`url(${m(i.value.background)})`})},[l.createElementVNode("div",The,[l.createVNode(r7,{layout:i.value.components,"onUpdate:layout":w[0]||(w[0]=S=>i.value.components=S),"col-num":i.value.col,"row-height":r.height,margin:r.margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.components,S=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:S.i,ref_for:!0},h(S)),{default:l.withCtx(()=>[o.value[S.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value[S.type]),{key:0,conf:S,uid:t.uid,mode:"preview"},null,8,["conf","uid"])):l.createCommentVNode("",!0)]),_:2},1040))),128))]),_:1},8,["layout","col-num","row-height","margin"])])],4),n.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",Lhe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value.sheets,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:a.value===x}]),onClick:E=>_(x)},l.toDisplayString(S.name),11,khe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f06bfb8f"]]),Ahe={key:0,class:"w-full h-full bg-[#e5e7eb]"},Dhe={class:"layout"},Mhe={class:"canvas"},Ohe={key:0,class:"sheet-wrap"},Ihe=["onClick"],J3=et(Object.assign({name:"DesignApp"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""}},setup(t){const e=t,r=l.reactive({margin:[10,10],height:40}),n=l.ref({sheets:[]}),a=l.ref(0),i=l.computed(()=>n.value.sheets[a.value]),o=l.ref({});let s={};const c=l.ref(Zp()),u=J0.getUser().token;let d=new WebSocket(c.value),f=null,p=0;const h=()=>{d.onopen=()=>{let b={action:"auth_dashbos",token:u};d.send(JSON.stringify(b)),f&&clearInterval(f),f=setInterval(()=>{d.send("ping")},5e3)},d.onmessage=b=>{try{let C=JSON.parse(b.data);if(C.component_name==="object_alias_map"){let w={};for(let S in data.result)w[data.result[S]]=S;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(w));return}n.value.sheets[a.value].components.forEach(w=>{C.actionid===w.id&&(w.socketData=C.result)})}catch{}},d.onerror=()=>{p++,p>5&&(clearInterval(f),d.close())},d.onclose=()=>{clearInterval(f),console.log("websocket已关闭!")}},v=b=>({x:b.x,y:b.y,w:b.w,h:b.h,i:b.i}),m=()=>{let b=1920,C=i.value.col||4;b=document.querySelector("div.layout").offsetWidth-16-(C+1)*r.margin[0],r.height=Math.round(b/C)},g=b=>(b.sheets.forEach(C=>{C.components.forEach(w=>{var x;const S=((x=s[w.type])==null?void 0:x.OPTIONS)||{};Object.keys(w.options).forEach(E=>{w.options[E]={...S[E]||{},value:w.options[E]}}),w.data&&w.data.length>0})}),b),y=async()=>{const{result:b}=await _t.post("get_object_list",{select:["name","uid","alias"]});let C={};return b.data.forEach(w=>{C[w.alias]=w.uid}),C},_=b=>{l.nextTick(()=>{a.value=b})};return l.onMounted(async()=>{h();const b=await y();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(b)),o.value=await ks.loadComponents(),s=await ks.getAllExposedProps(),console.log(JSON.parse(JSON.stringify(e.script)),"script"),n.value=g(e.script),l.nextTick(()=>{m()})}),l.provide("ws",d),(b,C)=>{var w;return(w=i.value)!=null&&w.components?(l.openBlock(),l.createElementBlock("div",Ahe,[l.createElementVNode("div",Dhe,[l.createElementVNode("div",Mhe,[l.createVNode(r7,{layout:i.value.components,"onUpdate:layout":C[0]||(C[0]=S=>i.value.components=S),"col-num":i.value.col,"row-height":r.height,margin:r.margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.components,S=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:S.i,ref_for:!0},v(S)),{default:l.withCtx(()=>[o.value[S.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value[S.type]),{key:0,uid:t.uid,conf:S,mode:"preview"},null,8,["uid","conf"])):l.createCommentVNode("",!0)]),_:2},1040))),128))]),_:1},8,["layout","col-num","row-height","margin"])])]),n.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",Ohe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value.sheets,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:a.value===x}]),onClick:E=>_(x)},l.toDisplayString(S.name),11,Ihe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}}),[["__scopeId","data-v-9c5357a5"]]);q3.install=function(t){t.component(q3.name,q3)},X3.install=function(t){t.component(X3.name,X3)},J3.install=function(t){t.component(J3.name,J3)};const Nhe=[q3,X3,J3],Mv=function(t){Mv.installed||Nhe.forEach(e=>{t.component(e.name,e)})};return typeof window<"u"&&window.Vue&&Mv(window.Vue),{install:Mv,DesignPro:q3,DesignShow:X3,DesignApp:J3}});
326
+ `)}),S.flush()}},"./src/utils/xhr-loader.ts":function(t,e,r){r.r(e);var n=r("./src/utils/logger.ts"),a=r("./src/loader/load-stats.ts"),i=/^age:\s*[\d.]+\s*$/m,o=function(){function s(u){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=u?u.xhrSetup:null,this.stats=new a.LoadStats,this.retryDelay=0}var c=s.prototype;return c.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},c.abortInternal=function(){var u=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),u&&(u.onreadystatechange=null,u.onprogress=null,u.readyState!==4&&(this.stats.aborted=!0,u.abort()))},c.abort=function(){var u;this.abortInternal(),(u=this.callbacks)!==null&&u!==void 0&&u.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},c.load=function(u,d,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=u,this.config=d,this.callbacks=f,this.retryDelay=d.retryDelay,this.loadInternal()},c.loadInternal=function(){var u=this.config,d=this.context;if(u){var f=this.loader=new self.XMLHttpRequest,p=this.stats;p.loading.first=0,p.loaded=0;var h=this.xhrSetup;try{if(h)try{h(f,d.url)}catch{f.open("GET",d.url,!0),h(f,d.url)}f.readyState||f.open("GET",d.url,!0)}catch(v){return void this.callbacks.onError({code:f.status,text:v.message},d,f)}d.rangeEnd&&f.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout),f.send()}},c.readystatechange=function(){var u=this.context,d=this.loader,f=this.stats;if(u&&d){var p=d.readyState,h=this.config;if(!f.aborted&&p>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),p===4){d.onreadystatechange=null,d.onprogress=null;var v=d.status;if(v>=200&&v<300){var m,g;if(f.loading.end=Math.max(self.performance.now(),f.loading.first),g=u.responseType==="arraybuffer"?(m=d.response).byteLength:(m=d.responseText).length,f.loaded=f.total=g,!this.callbacks)return;var y=this.callbacks.onProgress;if(y&&y(f,u,m,d),!this.callbacks)return;var _={url:d.responseURL,data:m};this.callbacks.onSuccess(_,f,u,d)}else f.retry>=h.maxRetry||v>=400&&v<499?(n.logger.error(v+" while loading "+u.url),this.callbacks.onError({code:v,text:d.statusText},u,d)):(n.logger.warn(v+" while loading "+u.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,h.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout)}},c.loadtimeout=function(){n.logger.warn("timeout while loading "+this.context.url);var u=this.callbacks;u&&(this.abortInternal(),u.onTimeout(this.stats,this.context,this.loader))},c.loadprogress=function(u){var d=this.stats;d.loaded=u.loaded,u.lengthComputable&&(d.total=u.total)},c.getCacheAge=function(){var u=null;if(this.loader&&i.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");u=d?parseFloat(d):null}return u},s}();e.default=o}}).default);var Ev=$de(pR.exports);const Kn=Object.assign({name:"d-icon"},{props:{icon:String,size:[Number,String]},setup:function(t){const e=t,r=l.computed(()=>({fontSize:/^\d+$/.test(e.size)?e.size+"px":e.size}));return(n,a)=>(l.openBlock(),l.createElementBlock("i",{class:l.normalizeClass(["d-icon iconfont",t.icon]),style:l.normalizeStyle(l.unref(r))},null,6))}});Kn.__scopeId="data-v-0c690e66",l.pushScopeId("data-v-4cb76d59");const Ude={class:"d-player-top"},jde={class:"top-title"},Hde={class:"top-title"};l.popScopeId();const Gde={props:{title:{default:""}},setup(t){Date.prototype.format=function(n){let a={"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds()};for(var i in a)new RegExp("("+i+")").test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length==1?a[i]:("00"+a[i]).substr((""+a[i]).length)));return n};let e=l.ref("00:00:00");e.value=new Date().format("hh:mm:ss");let r=null;return r=setInterval(()=>{e.value=new Date().format("hh:mm:ss")},1e3),l.onUnmounted(()=>{clearInterval(r)}),(n,a)=>(l.openBlock(),l.createElementBlock("div",Ude,[l.createElementVNode("p",jde,l.toDisplayString(t.title||""),1),l.createElementVNode("p",Hde,l.toDisplayString(l.unref(e)),1)]))},__scopeId:"data-v-4cb76d59"};l.pushScopeId("data-v-ac2469ec");const Wde={class:"d-status"},Yde={class:"d-flex-center"},Zde={class:"d-flex-center"},Kde=l.createTextVNode("5X速播放中 ");l.popScopeId();var gR=l.defineComponent({props:["state"],setup:t=>(e,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",Wde,[l.withDirectives(l.createElementVNode("li",Yde,[l.createVNode(Kn,{size:"18",class:"d-status-icon",icon:"icon-volume-"+(t.state.volume==0?"mute":t.state.volume>.5?"up":"down")},null,8,["icon"]),l.createTextVNode(" "+l.toDisplayString(~~(100*t.state.volume))+"% ",1)],512),[[l.vShow,t.state.handleType=="volume"]]),l.withDirectives(l.createElementVNode("li",Zde,[l.createVNode(Kn,{size:"12",icon:"icon-play"}),l.createVNode(Kn,{size:"12",icon:"icon-play",style:{"margin-right":"5px"}}),Kde],512),[[l.vShow,t.state.handleType=="playbackRate"||t.state.isMultiplesPlay]])],512)),[[l.vShow,t.state.handleType||t.state.isMultiplesPlay]])});gR.__scopeId="data-v-ac2469ec",l.pushScopeId("data-v-385f7870");const qde=["checked","true-value","false-value"],Xde=l.createElementVNode("span",{class:"d-switch_action"},null,-1);l.popScopeId();var P6=l.defineComponent({props:{modelValue:{type:[Number,String,Boolean]},width:{type:String,default:"40px"},trueValue:{type:[Number,String,Boolean],default:!0},falseValue:{type:[Number,String,Boolean],default:!0},activeColor:{type:[String],default:"#409EFF"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const r=t;l.useCssVars(o=>({"014e5dc0":t.width,e4e32852:t.activeColor}));const n=l.ref(null),a=l.computed(()=>r.modelValue===r.trueValue),i=()=>{l.nextTick(()=>{const o=n.value.checked;e("update:modelValue",o),e("change",o)})};return(o,s)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["d-switch",{"is-checked":l.unref(a)}])},[l.createElementVNode("input",{class:"d-switch__input",ref:n,type:"checkbox",checked:l.unref(a),onChange:i,"true-value":t.trueValue,"false-value":t.falseValue},null,40,qde),Xde],2))}});P6.__scopeId="data-v-385f7870",l.pushScopeId("data-v-b2384226");const Jde={key:0},Qde=l.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1),efe=[l.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1),l.createElementVNode("p",null,"正在缓冲...",-1)],tfe=[l.createElementVNode("i",{class:"iconfont icon-replay f24 mr5"},null,-1),l.createTextVNode("重新播放 ")],rfe=[l.createElementVNode("i",{class:"iconfont icon-replay f24 mr5"},null,-1),l.createTextVNode("请求错误 ")];l.popScopeId();var vR=l.defineComponent({props:{loadType:String,text:{type:String,default:""}},setup(t){const e=t,{proxy:r}=l.getCurrentInstance(),n=["loadstart","waiting","ended","error","stalled"],a=()=>{r.$parent.play()},i=l.computed(()=>{let o="background: rgba(0, 0, 0, .1);z-index:1";return e.loadType=="loadstart"&&(o="background: rgba(0, 0, 0, 1);;z-index:3"),o});return(o,s)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"d-loading",style:l.normalizeStyle(l.unref(i))},[l.createElementVNode("div",null,[t.loadType=="loadstart"?(l.openBlock(),l.createElementBlock("span",Jde,[Qde,l.createElementVNode("p",null,l.toDisplayString(t.text),1)])):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("span",null,efe,512),[[l.vShow,t.loadType=="waiting"]]),l.withDirectives(l.createElementVNode("span",null,[l.createElementVNode("p",{onClick:a,class:"d-flex-x d-pointer"},tfe)],512),[[l.vShow,t.loadType=="ended"]]),l.withDirectives(l.createElementVNode("span",null,[l.createElementVNode("p",{onClick:a,class:"d-flex-x d-pointer"},rfe)],512),[[l.vShow,t.loadType=="error"||t.loadType=="stalled"]])])],4)),[[l.vShow,n.includes(t.loadType)]])}});vR.__scopeId="data-v-b2384226";const $2=function(t,e,r,n=!1){t&&e&&r&&t.addEventListener(e,r,n)},Kr=function(t,e,r,n=!1){t&&e&&r&&t.removeEventListener(e,r,n)};l.pushScopeId("data-v-5a794390");const nfe=["onMousedown"];l.popScopeId();var Ts=l.defineComponent(xv(wv({},{name:"DSlider"}),{props:{modelValue:{required:!0,type:Number,default:0},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},hoverText:{type:String,default:""},preload:{type:Number,default:0},size:{type:String,default:"10px"}},emits:["update:modelValue","change","onMousemove"],setup:function(t,{emit:e}){const r=t;l.useCssVars(g=>({"5242b67b":t.size}));const n=l.ref(null),a=l.ref(null),i=l.reactive({dragging:!1,hoverPosition:0,hoverTipsLeft:"50%"}),o=l.computed(()=>{let g=r.modelValue<0?0:r.modelValue>1?1:r.modelValue;return r.vertical?`height:${100*g}%`:`width:${100*g}%`}),s=l.computed(()=>{let g=r.preload<0?0:r.preload>1?1:r.preload;return r.vertical?`height:${100*g}%`:`width:${100*g}%`}),c=l.computed(()=>{let g=i.hoverPosition<0?0:i.hoverPosition>1?1:i.hoverPosition;return r.vertical?`bottom:${100*g}%`:`left:${100*g}%`}),u=g=>{g.preventDefault()},d=g=>{r.disabled||(g.preventDefault(),i.dragging=!0,p(g),$2(window,"mousemove",v),$2(window,"touchmove",v),$2(window,"mouseup",m),$2(window,"touchend",m))},f=g=>{if(!r.hover)return;let y=h(g);if(e("onMousemove",g,y),i.hoverPosition=y,r.vertical)return;let _=n.value,b=a.value.clientWidth/2,C=g.clientX-_.getBoundingClientRect().left;C<b?i.hoverTipsLeft=b-C+"px":_.clientWidth-C<b?i.hoverTipsLeft=_.clientWidth-C-b+"px":i.hoverTipsLeft="50%"},p=g=>{let y=h(g);e("update:modelValue",y),e("change",g,y)},h=g=>{let y=n.value,_=0;if(r.vertical){let b=y.clientHeight;_=(y.getBoundingClientRect().bottom-g.clientY)/b}else _=(g.clientX-y.getBoundingClientRect().left)/y.clientWidth;return _<0?0:_>1?1:_},v=g=>{p(g)},m=g=>{i.dragging&&(Kr(window,"mousemove",v),Kr(window,"touchmove",v),Kr(window,"mouseup",m),Kr(window,"touchend",m),Kr(window,"contextmenu",m),setTimeout(()=>{i.dragging=!1},0))};return(g,y)=>(l.openBlock(),l.createElementBlock("div",{ref:n,class:l.normalizeClass(["d-slider",{"is-vertical":r.vertical}]),onMousedown:l.withModifiers(d,["stop"]),onContextmenu:u},[l.createElementVNode("div",{class:"d-slider__runway",onMousemove:f},[l.withDirectives(l.createElementVNode("div",{class:"d-slider__cursor",style:l.normalizeStyle(l.unref(c))},[l.withDirectives(l.createElementVNode("div",{class:"d-slider__tips",ref:a,style:l.normalizeStyle({left:l.unref(i).hoverTipsLeft})},l.toDisplayString(r.hoverText),5),[[l.vShow,r.hoverText]])],4),[[l.vShow,r.hover]]),l.createElementVNode("div",{class:"d-slider__preload",style:l.normalizeStyle(l.unref(s))},null,4),l.createElementVNode("div",{class:"d-slider__bar",style:l.normalizeStyle(l.unref(o))},null,4)],32)],42,nfe))}}));Ts.__scopeId="data-v-5a794390",l.pushScopeId("data-v-570fa0d1");const afe={key:0,class:"d-player-dialog"},ife={class:"d-player-dialog-body"},ofe={class:"d-player-dialog-title"},sfe={class:"d-player-hotkey-panel"},lfe={class:"d-player-filter-panel"},cfe={class:"d-player-filter-panel-item"},ufe=l.createElementVNode("span",null,"饱和度",-1),dfe={class:"d-player-filter-panel-item"},ffe=l.createElementVNode("span",null,"亮度",-1),hfe={class:"d-player-filter-panel-item"},pfe=l.createElementVNode("span",null,"对比度",-1),gfe={key:0,class:"d-player-contextmenu"},vfe=["dplayerKeyCode"],mfe=l.createElementVNode("input",{class:"d-player-copyText"},null,-1);l.popScopeId();var mR=l.defineComponent({setup(t){const e=l.reactive({show:!1,dialogType:"",dialogTitle:"",version:"1.3.1-beta.6",mouseX:0,mouseY:0}),r=[{label:"视频色彩调整",key:"filter"},{label:"快捷键说明",key:"hotkey"},{label:"复制视频网址",key:"copy"},{label:"版本:1.3.1-beta.6",key:"version"}],n=[{key:"Space",label:"播放/暂停"},{key:"→",label:"单次快进10s,长按5倍速播放"},{key:"←",label:"快退5s"},{key:"↑",label:"音量增加10%"},{key:"↓",label:"音量增加降低10%"},{key:"Esc",label:"退出全屏/退出网页全屏"},{key:"F",label:"全屏/退出全屏"}],a=l.reactive({saturate:.392,brightness:.392,contrast:.392}),i=l.computed(()=>({left:e.mouseX+"px",top:e.mouseY+"px"}));l.watch(a,d=>{let f=document.querySelector("#dPlayerVideo"),p=(2.55*d.saturate).toFixed(2),h=(2.55*d.brightness).toFixed(2),v=(2.55*d.contrast).toFixed(2);f.style.filter=`saturate(${p}) brightness(${h}) contrast(${v})`});const o=()=>{a.saturate=.392,a.brightness=.392,a.contrast=.392},s=d=>{d.key=="Escape"&&u(0)},c=d=>{d.preventDefault(),$2(window,"keydown",s),$2(window,"click",u);let f=document.querySelector("#refPlayerWrap"),p=f.clientWidth;f.clientHeight,e.mouseX=d.clientX-f.getBoundingClientRect().left,p-e.mouseX<130&&(e.mouseX=e.mouseX+(p-e.mouseX-130)),e.mouseY=d.clientY-f.getBoundingClientRect().top,e.show=!0},u=d=>{let f=d.path[0].tagName=="LI",p=d.path[0].attributes.dplayerKeyCode&&d.path[0].attributes.dplayerKeyCode.value,h=r.map(v=>v.key);if(f&&h.includes(p))if(e.dialogTitle=d.path[0].innerText,e.dialogType=p,p=="copy"){let v=document.querySelector(".d-player-copyText");v.value=window.location.href,v.select(),document.execCommand("copy"),e.dialogType=""}else p=="version"&&(e.dialogType="");e.show=!1,Kr(window,"keydown",s),Kr(window,"click",u)};return l.onMounted(()=>{let d=document.querySelector("#refPlayerWrap");Kr(window,"keydown",s),Kr(window,"click",u),Kr(d,"contextmenu",c),$2(d,"contextmenu",c)}),l.onUnmounted(()=>{let d=document.querySelector("#refPlayerWrap");Kr(window,"keydown",s),Kr(window,"click",u),Kr(d,"contextmenu",c)}),(d,f)=>(l.openBlock(),l.createElementBlock("div",null,[l.createVNode(l.Transition,{name:"d-fade-in"},{default:l.withCtx(()=>[l.unref(e).dialogType?(l.openBlock(),l.createElementBlock("div",afe,[l.createElementVNode("div",ife,[l.createElementVNode("h5",ofe,[l.createTextVNode(l.toDisplayString(l.unref(e).dialogTitle)+" ",1),l.createElementVNode("i",{onClick:f[0]||(f[0]=p=>l.unref(e).dialogType=!1),class:"icon icon-close"},"X")]),l.withDirectives(l.createElementVNode("ul",sfe,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(n,p=>l.createElementVNode("li",{class:"d-player-hotkey-panel-item",key:p.key},[l.createElementVNode("span",null,l.toDisplayString(p.key),1),l.createElementVNode("span",null,l.toDisplayString(p.label),1)])),64))],512),[[l.vShow,l.unref(e).dialogType=="hotkey"]]),l.withDirectives(l.createElementVNode("ul",lfe,[l.createElementVNode("li",cfe,[ufe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).saturate,"onUpdate:modelValue":f[1]||(f[1]=p=>l.unref(a).saturate=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).saturate)),1)]),l.createElementVNode("li",dfe,[ffe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).brightness,"onUpdate:modelValue":f[2]||(f[2]=p=>l.unref(a).brightness=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).brightness)),1)]),l.createElementVNode("li",hfe,[pfe,l.createVNode(Ts,{class:"filter-panel-slider",size:"5px",modelValue:l.unref(a).contrast,"onUpdate:modelValue":f[3]||(f[3]=p=>l.unref(a).contrast=p)},null,8,["modelValue"]),l.createElementVNode("span",null,l.toDisplayString(Math.round(255*l.unref(a).contrast)),1)]),l.createElementVNode("span",{onClick:o,title:"重置","aria-label":"重置",class:"d-player-filter-reset"},"重置")],512),[[l.vShow,l.unref(e).dialogType=="filter"]])])])):l.createCommentVNode("",!0)]),_:1}),l.unref(e).show?(l.openBlock(),l.createElementBlock("div",gfe,[l.createElementVNode("ul",{class:"d-player-contextmenu-body",style:l.normalizeStyle(l.unref(i))},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(r,p=>l.createElementVNode("li",{dplayerKeyCode:p.key,key:p.key},l.toDisplayString(p.label),9,vfe)),64))],4),mfe])):l.createCommentVNode("",!0)]))}});mR.__scopeId="data-v-570fa0d1";const Tv=t=>{let e=~~(t/3600),r=~~(t%3600/60),n=~~(t%60);return e=e<10?"0"+e:e,r=r<10?"0"+r:r,n=n<10?"0"+n:n,`${e}:${r}:${n}`},K3="ontouchstart"in window,yR=["loadstart","play","pause","playing","seeking","seeked","waiting","durationchange","progress","canplay","timeupdate","ended","error","stalled"],yfe={width:{type:String,default:"800px"},height:{type:String,default:"450px"},color:{type:String,default:"#409eff"},src:{required:!0,type:String,default:""},title:{type:String,default:""},type:{type:String,default:"video/mp4"},poster:{type:String,default:""},webFullScreen:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},currentTime:{type:Number,default:0},playsinline:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},speedRate:{type:Array,default:()=>["2.0","1.5","1.25","1.0","0.75","0.5"]},autoPlay:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},mirror:{type:Boolean,default:!1},ligthOff:{type:Boolean,default:!1},volume:{type:[String,Number],default:.3},control:{type:Boolean,default:!0},controlBtns:{type:Array,default:["audioTrack","quality","speedRate","volume","setting","pip","pageFullScreen","fullScreen"]},preload:{type:String,default:"auto"}};l.pushScopeId("data-v-01791e9e");const bfe={class:"d-player-video",id:"dPlayerVideo"},_fe=["controls","webkit-playsinline","playsinline","volume","muted","loop","preload","src","poster"],Sfe={class:"d-player-lightoff"},Cfe={key:1,class:"d-player-state"},wfe={class:"d-play-btn"},xfe=["onKeyup","onKeydown"],Efe={class:"d-control-progress"},Tfe={class:"d-tool-bar"},Lfe={key:0,class:"d-tool-item d-tool-time audioTrack-btn"},kfe=l.createElementVNode("span",{style:{margin:"0 3px"}},"/",-1),Afe={class:"total-time"},Dfe={class:"d-tool-bar"},Mfe={key:0,class:"d-tool-item quality-btn"},Ofe={class:"d-tool-item-main"},Ife={class:"speed-main",style:{"text-align":"center"}},Nfe=["onClick"],Rfe={key:1,class:"d-tool-item speedRate-btn"},Pfe={class:"d-tool-item-main"},Bfe={class:"speed-main"},Ffe=["onClick"],zfe={key:2,class:"d-tool-item volume-btn"},Vfe={class:"d-tool-item-main volume-box",style:{width:"52px"}},$fe={class:"volume-text-size"},Ufe={key:3,class:"d-tool-item setting-btn"},jfe={class:"d-tool-item-main"},Hfe={class:"speed-main"},Gfe=l.createTextVNode(" 镜像画面 "),Wfe=l.createTextVNode(" 循环播放 "),Yfe=l.createTextVNode(" 关灯模式 "),Zfe=l.createElementVNode("div",{class:"d-tool-item-main"},"画中画",-1),Kfe=l.createElementVNode("div",{class:"d-tool-item-main"},"网页全屏",-1),qfe=l.createElementVNode("div",{class:"d-tool-item-main"},"全屏",-1);l.popScopeId();var Ls=l.defineComponent(xv(wv({},{name:"vue3VideoPlay",inheritAttrs:!1}),{props:yfe,emits:[...yR,"mirrorChange","loopChange","lightOffChange"],setup:function(t,{expose:e,emit:r}){const n=t;l.useCssVars(P=>({"51d4439c":l.unref(h),"77e758a6":P.width,b8a1afc0:P.height}));const a=new Ev({fragLoadingTimeOut:2e3}),i=l.ref(null),o=l.ref(null),s=l.ref(null),c=l.ref(null),u=l.reactive(xv(wv({dVideo:null},n),{muted:n.muted,playBtnState:n.autoPlay?"pause":"play",loadStateType:"loadstart",fullScreen:!1,handleType:"",currentTime:"00:00:00",preloadBar:0,totalTime:"00:00:00",isVideoHovering:!0,speedActive:"1.0",playProgress:0,isMultiplesPlay:!1,longPressTimeout:null,progressCursorTime:"00:00:00",qualityLevels:[],currentLevel:0})),d=(...P)=>B=>P.reverse().reduce((z,$)=>$(z),B),f=yR.reduce((P,B)=>{var z;return P[`on${z=B,z.charAt(0).toUpperCase()+z.slice(1)}`]=$=>{u.loadStateType=B,r(B,$)},P},{});f.onCanplay=d(f.onCanplay,()=>{u.playBtnState!="play"&&u.dVideo.play(),u.autoPlay&&(u.dVideo.play(),u.playBtnState="pause")}),f.onEnded=d(f.onEnded,()=>{u.playBtnState="replay"}),f.onDurationchange=P=>{r("durationchange",P),n.currentTime!=0&&(u.dVideo.currentTime=n.currentTime),f.onTimeupdate(P)},f.onProgress=P=>{console.log("缓冲中..."),r("progress",P);let B=P.target.duration,z=P.target.buffered,$=P.target.buffered.length&&P.target.buffered.end(z-1);u.preloadBar=$/B},f.onTimeupdate=P=>{r("timeupdate",P);let B=P.duration||P.target.duration||0,z=P.currentTime||P.target.currentTime;u.playProgress=z/B,u.currentTime=Tv(z),u.totalTime=Tv(B)},f.onError=d(f.onError,()=>{u.playBtnState="replay"});let p=l.useAttrs();for(let P in p)f[P]=p[P];const h=(v=u.color,`${parseInt("0x"+v.slice(1,3))},${parseInt("0x"+v.slice(3,5))},${parseInt("0x"+v.slice(5,7))}`);var v;const m=hR(500,()=>{u.handleType=""}),g=P=>{P.preventDefault(),P.code=="ArrowUp"?u.volume=u.volume+.1>1?1:u.volume+.1:u.volume=u.volume-.1<0?0:u.volume-.1,u.muted=!1,u.handleType="volume",m()},y=P=>{n.speed&&(u.dVideo.currentTime=u.dVideo.currentTime<10?.1:u.dVideo.currentTime-10,f.onTimeupdate(u.dVideo),C())},_=P=>{P.preventDefault();let B=P.type;if(P.key=="ArrowRight"){if(C(),B=="keyup"){if(clearTimeout(u.longPressTimeout),!n.speed&&!u.longPressTimeout)return;u.isMultiplesPlay?(u.dVideo.playbackRate=u.speedActive,u.isMultiplesPlay=!1):(u.dVideo.currentTime=u.dVideo.currentTime+10,f.onTimeupdate(u.dVideo))}else if(B=="keydown"){if(!n.speed)return;u.isMultiplesPlay&&clearTimeout(u.longPressTimeout),u.longPressTimeout=setTimeout(()=>{u.isMultiplesPlay=!0,u.dVideo.playbackRate=5,u.handleType="playbackRate",m()},500)}}},b=()=>{K3||c.value.focus()},C=()=>{u.loadStateType="play",u.dVideo.play().catch(()=>{setTimeout(()=>{u.playBtnState="replay",u.loadStateType="error"},500)}),u.playBtnState="pause"},w=()=>{u.dVideo.pause(),u.playBtnState="play"},S=P=>{P&&P.preventDefault(),u.playBtnState=="play"||u.playBtnState=="replay"?C():u.playBtnState=="pause"&&w()},x=()=>{u.muted=!u.muted,u.volume==0&&(u.volume=.05)},E=(P,B)=>{let z=u.dVideo.duration||u.dVideo.target.duration;u.dVideo.currentTime=z*B,u.playBtnState=="play"&&(u.dVideo.play(),u.playBtnState="pause")},L=(P,B)=>{u.progressCursorTime=Tv(u.dVideo.duration*B)},T=hR(2500,()=>{u.isVideoHovering=!1}),k=P=>{u.isVideoHovering=!0,T()},A=P=>{r("mirrorChange",P,u.dVideo)},D=P=>{r("loopChange",P,u.dVideo)},M=P=>{r("lightOffChange",P,u.dVideo)},O=()=>{var P;P=u.dVideo,document.pictureInPictureElement?document.exitPictureInPicture().catch(B=>{console.log(B,"Video failed to leave Picture-in-Picture mode.")}):P.requestPictureInPicture().catch(B=>{console.log(B,"Video failed to enter Picture-in-Picture mode.")})},R=()=>{u.fullScreen=(P=>{let B=document,z=B.webkitIsFullScreen||B.fullscreen;return z?(document.exitFullscreen||B.webkitExitFullScreen).call(B):(P.requestFullscreen||P.webkitRequestFullScreen).call(P),!z})(i.value)};return l.watch(()=>n.src,()=>{l.nextTick(()=>{u.dVideo.canPlayType(n.type)||u.dVideo.canPlayType("application/vnd.apple.mpegurl")?u.muted=n.autoPlay:Ev.isSupported()&&(a.detachMedia(),a.attachMedia(u.dVideo),a.on(Ev.Events.MEDIA_ATTACHED,()=>{a.loadSource(n.src),a.on("hlsManifestParsed",(P,B)=>{console.log(B),u.currentLevel=B.level,u.qualityLevels=B.levels||[]})}),a.on("hlsLevelSwitching",(P,B)=>{console.log(B),console.log("LEVEL_SWITCHING")}),a.on("hlsLevelSwitched",(P,B)=>{u.currentLevel=B.level,console.log("LEVEL_SWITCHED")}))})},{immediate:!0}),l.onMounted(()=>{u.dVideo=o,b()}),e({play:C,pause:w,togglePlay:S}),(P,B)=>(l.openBlock(),l.createElementBlock("div",{ref:i,id:"refPlayerWrap",class:l.normalizeClass(["d-player-wrap",{"web-full-screen":l.unref(u).webFullScreen,"is-lightoff":l.unref(u).lightOff,"d-player-wrap-hover":l.unref(u).playBtnState=="play"||l.unref(u).isVideoHovering}]),onMousemove:k},[l.createElementVNode("div",bfe,[l.createElementVNode("video",l.mergeProps({ref:o,class:["d-player-video-main",{"video-mirror":l.unref(u).mirror}],id:"dPlayerVideoMain",controls:!(!l.unref(K3)||!l.unref(u).speed),"webkit-playsinline":n.playsinline,playsinline:n.playsinline},l.unref(f),{volume:l.unref(u).volume,muted:l.unref(u).muted,loop:l.unref(u).loop,preload:P.preload,width:"100%",height:"100%",src:n.src,poster:n.poster}),"您的浏览器不支持Video标签。",16,_fe)]),l.createVNode(l.Transition,{name:"d-fade-in"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",Sfe,null,512),[[l.vShow,l.unref(u).lightOff]])]),_:1}),l.unref(u).fullScreen?(l.openBlock(),l.createBlock(Gde,{key:0,title:n.title},null,8,["title"])):l.createCommentVNode("",!0),l.unref(K3)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Cfe,[l.createVNode(l.Transition,{name:"d-scale-out"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",wfe,[l.createVNode(Kn,{icon:"icon-play",size:40})],512),[[l.vShow,l.unref(u).playBtnState=="play"]])]),_:1}),l.createVNode(gR,{state:l.unref(u)},null,8,["state"])])),l.unref(K3)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("input",{key:2,type:"input",readonly:"readonly",ref:c,onDblclick:R,onKeyup:[l.withKeys(R,["f"]),B[0]||(B[0]=l.withKeys(z=>l.unref(u).webFullScreen=!1,["esc"])),_],onClick:S,onKeydown:[l.withKeys(S,["space"]),l.withKeys(y,["arrow-left"]),l.withKeys(g,["arrow-up","arrow-down"]),_],class:"d-player-input",maxlength:"0"},null,40,xfe)),l.createVNode(vR,{loadType:l.unref(u).loadStateType},null,8,["loadType"]),l.createVNode(mR),!l.unref(K3)&&l.unref(u).control?(l.openBlock(),l.createElementBlock("div",{key:3,class:"d-player-control",ref:s},[l.createElementVNode("div",Efe,[l.createVNode(Ts,{class:"d-progress-bar",onOnMousemove:L,onChange:E,disabled:!l.unref(u).speed,hoverText:l.unref(u).progressCursorTime,modelValue:l.unref(u).playProgress,"onUpdate:modelValue":B[1]||(B[1]=z=>l.unref(u).playProgress=z),preload:l.unref(u).preloadBar},null,8,["disabled","hoverText","modelValue","preload"])]),l.createElementVNode("div",{class:"d-control-tool",onClick:b},[l.createElementVNode("div",Tfe,[l.createElementVNode("div",{class:"d-tool-item",onClick:S},[l.createVNode(Kn,{size:"24",icon:`icon-${l.unref(u).playBtnState}`},null,8,["icon"])]),n.controlBtns.includes("audioTrack")?(l.openBlock(),l.createElementBlock("div",Lfe,[l.createElementVNode("span",null,l.toDisplayString(l.unref(u).currentTime),1),kfe,l.createElementVNode("span",Afe,l.toDisplayString(l.unref(u).totalTime),1)])):l.createCommentVNode("",!0)]),l.createElementVNode("div",Dfe,[l.unref(u).qualityLevels.length&&n.controlBtns.includes("quality")?(l.openBlock(),l.createElementBlock("div",Mfe,[l.createTextVNode(l.toDisplayString(l.unref(u).qualityLevels.length&&(l.unref(u).qualityLevels[l.unref(u).currentLevel]||{}).height)+"P ",1),l.createElementVNode("div",Ofe,[l.createElementVNode("ul",Ife,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u).qualityLevels,(z,$)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass({"speed-active":l.unref(u).currentLevel==$}),onClick:j=>((Z,W)=>{a.currentLevel=W,u.currentLevel=W})(0,$),key:z},l.toDisplayString(z.height)+"P",11,Nfe))),128))])])])):l.createCommentVNode("",!0),n.controlBtns.includes("speedRate")?(l.openBlock(),l.createElementBlock("div",Rfe,[l.createTextVNode(l.toDisplayString(l.unref(u).speedActive=="1.0"?"倍速":l.unref(u).speedActive+"x")+" ",1),l.createElementVNode("div",Pfe,[l.createElementVNode("ul",Bfe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u).speedRate,z=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass({"speed-active":l.unref(u).speedActive==z}),onClick:$=>(j=>{u.speedActive=j,u.dVideo.playbackRate=j})(z),key:z},l.toDisplayString(z)+"x",11,Ffe))),128))])])])):l.createCommentVNode("",!0),n.controlBtns.includes("volume")?(l.openBlock(),l.createElementBlock("div",zfe,[l.createElementVNode("div",Vfe,[l.createElementVNode("div",{class:l.normalizeClass(["volume-main",{"is-muted":l.unref(u).muted}])},[l.createElementVNode("span",$fe,l.toDisplayString(l.unref(u).muted?0:~~(100*l.unref(u).volume))+"%",1),l.createVNode(Ts,{onChange:B[2]||(B[2]=z=>l.unref(u).muted=!1),hover:!1,size:"5px",vertical:!0,modelValue:l.unref(u).volume,"onUpdate:modelValue":B[3]||(B[3]=z=>l.unref(u).volume=z)},null,8,["modelValue"])],2)]),l.createElementVNode("span",{onClick:x,style:{display:"flex"}},[l.createVNode(Kn,{size:"20",icon:"icon-volume-"+(l.unref(u).volume==0||l.unref(u).muted?"mute":l.unref(u).volume>.5?"up":"down")},null,8,["icon"])])])):l.createCommentVNode("",!0),n.controlBtns.includes("setting")?(l.openBlock(),l.createElementBlock("div",Ufe,[l.createVNode(Kn,{size:"20",class:"rotateHover",icon:"icon-settings"}),l.createElementVNode("div",jfe,[l.createElementVNode("ul",Hfe,[l.createElementVNode("li",null,[Gfe,l.createVNode(P6,{onChange:A,modelValue:l.unref(u).mirror,"onUpdate:modelValue":B[4]||(B[4]=z=>l.unref(u).mirror=z)},null,8,["modelValue"])]),l.createElementVNode("li",null,[Wfe,l.createVNode(P6,{onChange:D,modelValue:l.unref(u).loop,"onUpdate:modelValue":B[5]||(B[5]=z=>l.unref(u).loop=z)},null,8,["modelValue"])]),l.createElementVNode("li",null,[Yfe,l.createVNode(P6,{onChange:M,modelValue:l.unref(u).lightOff,"onUpdate:modelValue":B[6]||(B[6]=z=>l.unref(u).lightOff=z)},null,8,["modelValue"])])])])])):l.createCommentVNode("",!0),n.controlBtns.includes("pip")?(l.openBlock(),l.createElementBlock("div",{key:4,class:"d-tool-item pip-btn",onClick:O},[l.createVNode(Kn,{size:"20",icon:"icon-pip"}),Zfe])):l.createCommentVNode("",!0),n.controlBtns.includes("pageFullScreen")?(l.openBlock(),l.createElementBlock("div",{key:5,class:"d-tool-item pip-btn",onClick:B[7]||(B[7]=z=>l.unref(u).webFullScreen=!l.unref(u).webFullScreen)},[l.createVNode(Kn,{size:"20",icon:"icon-web-screen"}),Kfe])):l.createCommentVNode("",!0),n.controlBtns.includes("fullScreen")?(l.openBlock(),l.createElementBlock("div",{key:6,class:"d-tool-item fullScreen-btn",onClick:R},[qfe,l.createVNode(Kn,{size:"20",icon:"icon-screen"})])):l.createCommentVNode("",!0)])])],512)):l.createCommentVNode("",!0)],34))}}));function Xfe(t){t.component(Ls.name,Ls)}Ls.__scopeId="data-v-01791e9e",Ls.install=Xfe;const Jfe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e视频%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-102.000000,%20-803.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M113.828161,805.303448%20C114.589942,805.303448%20115.207471,805.920984%20115.207471,806.682759%20L115.207471,806.682759%20L115.207471,808.705747%20L117.120115,807.271264%20C117.51949,806.971733%20118.079386,807.222315%20118.143874,807.695047%20L118.143874,807.695047%20L118.15,807.786207%20L118.15,816.245977%20C118.15,816.776397%20117.544451,817.079172%20117.120115,816.76092%20L117.120115,816.76092%20L115.207471,815.326437%20L115.207471,816.981609%20C115.207471,817.698582%20114.660458,818.28777%20113.960999,818.354606%20L113.960999,818.354606%20L113.828161,818.36092%20L103.52931,818.36092%20C102.767536,818.36092%20102.15,817.74339%20102.15,816.981609%20L102.15,816.981609%20L102.15,806.682759%20C102.15,805.920986%20102.767538,805.303448%20103.52931,805.303448%20L103.52931,805.303448%20Z%20M113.828161,806.590805%20L103.52931,806.590805%20C103.478525,806.590805%20103.437356,806.631974%20103.437356,806.682759%20L103.437356,806.682759%20L103.437356,816.981609%20C103.437356,817.0324%20103.47852,817.073563%20103.52931,817.073563%20L103.52931,817.073563%20L113.828161,817.073563%20C113.878957,817.073563%20113.920115,817.032405%20113.920115,816.981609%20L113.920115,816.981609%20L113.920115,814.03908%20C113.920115,813.50866%20114.525664,813.205886%20114.95,813.524138%20L114.95,813.524138%20L116.862644,814.958621%20L116.862644,809.073563%20L114.95,810.508046%20C114.550625,810.807577%20113.990729,810.556995%20113.926241,810.084264%20L113.926241,810.084264%20L113.920115,809.993103%20L113.920115,806.682759%20C113.920115,806.631968%20113.878952,806.590805%20113.828161,806.590805%20L113.828161,806.590805%20Z%20M107.575287,808.245977%20C108.946477,808.245977%20110.058046,809.357546%20110.058046,810.728736%20C110.058046,812.099925%20108.946477,813.211494%20107.575287,813.211494%20C106.204098,813.211494%20105.092529,812.099925%20105.092529,810.728736%20C105.092529,809.357546%20106.204098,808.245977%20107.575287,808.245977%20Z%20M107.575287,809.533333%20C106.915085,809.533333%20106.379885,810.068533%20106.379885,810.728736%20C106.379885,811.388938%20106.915085,811.924138%20107.575287,811.924138%20C108.23549,811.924138%20108.77069,811.388938%20108.77069,810.728736%20C108.77069,810.068533%20108.23549,809.533333%20107.575287,809.533333%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Qfe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e视频%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-102.000000,%20-803.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M113.828161,805.303448%20C114.589942,805.303448%20115.207471,805.920984%20115.207471,806.682759%20L115.207471,806.682759%20L115.207471,808.705747%20L117.120115,807.271264%20C117.51949,806.971733%20118.079386,807.222315%20118.143874,807.695047%20L118.143874,807.695047%20L118.15,807.786207%20L118.15,816.245977%20C118.15,816.776397%20117.544451,817.079172%20117.120115,816.76092%20L117.120115,816.76092%20L115.207471,815.326437%20L115.207471,816.981609%20C115.207471,817.698582%20114.660458,818.28777%20113.960999,818.354606%20L113.960999,818.354606%20L113.828161,818.36092%20L103.52931,818.36092%20C102.767536,818.36092%20102.15,817.74339%20102.15,816.981609%20L102.15,816.981609%20L102.15,806.682759%20C102.15,805.920986%20102.767538,805.303448%20103.52931,805.303448%20L103.52931,805.303448%20Z%20M113.828161,806.590805%20L103.52931,806.590805%20C103.478525,806.590805%20103.437356,806.631974%20103.437356,806.682759%20L103.437356,806.682759%20L103.437356,816.981609%20C103.437356,817.0324%20103.47852,817.073563%20103.52931,817.073563%20L103.52931,817.073563%20L113.828161,817.073563%20C113.878957,817.073563%20113.920115,817.032405%20113.920115,816.981609%20L113.920115,816.981609%20L113.920115,814.03908%20C113.920115,813.50866%20114.525664,813.205886%20114.95,813.524138%20L114.95,813.524138%20L116.862644,814.958621%20L116.862644,809.073563%20L114.95,810.508046%20C114.550625,810.807577%20113.990729,810.556995%20113.926241,810.084264%20L113.926241,810.084264%20L113.920115,809.993103%20L113.920115,806.682759%20C113.920115,806.631968%20113.878952,806.590805%20113.828161,806.590805%20L113.828161,806.590805%20Z%20M107.575287,808.245977%20C108.946477,808.245977%20110.058046,809.357546%20110.058046,810.728736%20C110.058046,812.099925%20108.946477,813.211494%20107.575287,813.211494%20C106.204098,813.211494%20105.092529,812.099925%20105.092529,810.728736%20C105.092529,809.357546%20106.204098,808.245977%20107.575287,808.245977%20Z%20M107.575287,809.533333%20C106.915085,809.533333%20106.379885,810.068533%20106.379885,810.728736%20C106.379885,811.388938%20106.915085,811.924138%20107.575287,811.924138%20C108.23549,811.924138%20108.77069,811.388938%20108.77069,810.728736%20C108.77069,810.068533%20108.23549,809.533333%20107.575287,809.533333%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ehe={key:0,class:"echart-title"},Lv=Object.freeze(Object.defineProperty({__proto__:null,default:et(Object.assign({components:{videoPlay:Ls},DEFAULT:{DEFAULT_ICON:Jfe,ACTIVE_ICON:Qfe,NAME_CN:"视频",NAME_EN:"vdo",ORDER:5},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},type:{value:"ysy",type:"select",options:[{value:"ysy",label:"萤石云"},{value:"mp4",label:"MP4"}],label:"视频类型"},url:{value:"",type:"string",label:"视频地址"}}},{__name:"vdo",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"}},setup(t){const e=l.ref("vdo_"+Math.random().toString(16).substring(4,12)),r={mp4:"video/mp4",ysy:"application/x-mpegURL"},n=l.reactive({width:"100%",height:"100%",type:"video/mp4",autoPlay:!0,control:!0,controlBtns:["pip","fullScreen"],src:""}),a=t,i=l.ref({}),o=()=>{var u,d,f,p,h,v;const{options:c}=a.conf;i.value={bgColor:((u=c==null?void 0:c.bgColor)==null?void 0:u.value)||"#fff",radiusSize:((d=c==null?void 0:c.radiusSize)==null?void 0:d.value)??4,type:((f=c==null?void 0:c.type)==null?void 0:f.value)??"img",isHideTitle:((p=c==null?void 0:c.isHideTitle)==null?void 0:p.value)??!1},n.type=r[(h=c==null?void 0:c.type)==null?void 0:h.value],n.src=(v=c==null?void 0:c.url)==null?void 0:v.value},s=pt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{o()}),(c,u)=>(l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex flex-col relative",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",ehe,l.toDisplayString(t.conf.name),1)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",i.value.isHideTitle?"h-[100%]":"h-[calc(100%-40px)]"])},[l.createVNode(l.unref(Ls),l.mergeProps({id:e.value},n),null,16,["id"])],2),l.renderSlot(c.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4ff20009"]])},Symbol.toStringTag,{value:"Module"})),the=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Bar",NAME_CN:"柱状图",ORDER:3}},Symbol.toStringTag,{value:"Module"})),rhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Card",NAME_CN:"卡片",ORDER:1}},Symbol.toStringTag,{value:"Module"})),nhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Collect",NAME_CN:"离线",ORDER:7}},Symbol.toStringTag,{value:"Module"})),ahe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"customized",NAME_CN:"自定义",ORDER:0}},Symbol.toStringTag,{value:"Module"})),ihe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Gague",NAME_CN:"仪表盘",ORDER:4}},Symbol.toStringTag,{value:"Module"})),ohe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Indass",NAME_CN:"数据分析",ORDER:11}},Symbol.toStringTag,{value:"Module"})),she=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Line",NAME_CN:"曲线",ORDER:2}},Symbol.toStringTag,{value:"Module"})),lhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"List",NAME_CN:"列表",ORDER:6}},Symbol.toStringTag,{value:"Module"})),che=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Map",NAME_CN:"地图",ORDER:11}},Symbol.toStringTag,{value:"Module"})),uhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Monitor",NAME_CN:"组态",ORDER:8}},Symbol.toStringTag,{value:"Module"})),dhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Params",NAME_CN:"参数控件",ORDER:10}},Symbol.toStringTag,{value:"Module"})),fhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Pie",NAME_CN:"饼状图",ORDER:5}},Symbol.toStringTag,{value:"Module"})),hhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Pro",NAME_CN:"首页组件",ORDER:12}},Symbol.toStringTag,{value:"Module"})),phe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Radar",NAME_CN:"雷达图",ORDER:6}},Symbol.toStringTag,{value:"Module"})),ghe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Sankey",NAME_CN:"桑基图",ORDER:8}},Symbol.toStringTag,{value:"Module"})),vhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Switch",NAME_CN:"开关控件",ORDER:9}},Symbol.toStringTag,{value:"Module"})),mhe=Object.freeze(Object.defineProperty({__proto__:null,default:{NAME_EN:"Video",NAME_CN:"视频",ORDER:7}},Symbol.toStringTag,{value:"Module"})),bR=localStorage.getItem("locale")??"cn";let kv=null,Av=null;const yhe=async()=>{var n,a,i,o;if(kv)return kv;const t={},e=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv}),r=Object.assign({"/packages/elements/bar/config.js":the,"/packages/elements/card/config.js":rhe,"/packages/elements/collect/config.js":nhe,"/packages/elements/customized/config.js":ahe,"/packages/elements/gauge/config.js":ihe,"/packages/elements/indass/config.js":ohe,"/packages/elements/line/config.js":she,"/packages/elements/list/config.js":lhe,"/packages/elements/map/config.js":che,"/packages/elements/monitor/config.js":uhe,"/packages/elements/params/config.js":dhe,"/packages/elements/pie/config.js":fhe,"/packages/elements/pro/config.js":hhe,"/packages/elements/radar/config.js":phe,"/packages/elements/sankey/config.js":ghe,"/packages/elements/switch/config.js":vhe,"/packages/elements/video/config.js":mhe});for(const s in e){const c=s.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(!c)continue;const[,u,d]=c,f=l.markRaw(e[s].default),p=Dv(f);t[u]||(t[u]=_R(u,r)),t[u].data.push({name:((n=p.DEFAULT)==null?void 0:n[`NAME_${bR.toUpperCase()}`])||d,type:d,default_icon:(a=p.DEFAULT)==null?void 0:a.DEFAULT_ICON,active_icon:(i=p.DEFAULT)==null?void 0:i.ACTIVE_ICON,order:((o=p.DEFAULT)==null?void 0:o.ORDER)??999})}return Object.values(t).forEach(s=>{s.data.sort((c,u)=>c.order-u.order)}),kv=t,t},bhe=()=>{if(Av)return Av;const t={},e=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv});return Object.keys(e).forEach(r=>{const n=r.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(!n)return;const[,,a]=n,i=l.markRaw(e[r].default);t[a]=Dv(i)}),Av=t,t},Dv=t=>({DEFAULT:t.DEFAULT||{},DATA:t.DATA||{},OPTIONS:t.OPTIONS||{},PARAMS:t.PARAMS||{},SOURCE:t.SOURCE||{},COMMON:t.COMMON||{},ITEMS:t.ITEMS||{},COLOR_AREA:t.COLOR_AREA||{},GRADE:t.GRADE||{},CUSTOMIZED:t.CUSTOMIZED||{}}),_R=(t,e)=>{const r=`/src/elements/${t}/config.js`,n={name:t,order:999,data:[]};if(!e[r])return n;const a=e[r].default;return{...n,name:a[`NAME_${bR.toUpperCase()}`]||t,order:a.ORDER??999}},ks={getElementsMap:yhe,getComponentExposedProps:Dv,getDirectoryConfig:_R,getAllExposedProps:bhe,loadComponents:()=>{const t=Object.assign({"/packages/elements/bar/bar.vue":Kp,"/packages/elements/bar/raceBar.vue":qp,"/packages/elements/card/arrayCard.vue":Xp,"/packages/elements/card/crd.vue":Jp,"/packages/elements/card/evn.vue":eg,"/packages/elements/card/groupCard.vue":tg,"/packages/elements/card/rtn.vue":rg,"/packages/elements/card/vlu.vue":ng,"/packages/elements/collect/clt.vue":ag,"/packages/elements/collect/cmc.vue":ig,"/packages/elements/customized/btn.vue":og,"/packages/elements/customized/datetime.vue":sg,"/packages/elements/customized/swiper.vue":lg,"/packages/elements/customized/textbox.vue":cg,"/packages/elements/customized/weather.vue":ug,"/packages/elements/gauge/gag.vue":dg,"/packages/elements/gauge/progressBar.vue":fg,"/packages/elements/gauge/progressCircle.vue":hg,"/packages/elements/indass/aqiIndass.vue":vg,"/packages/elements/indass/grdIndass.vue":_g,"/packages/elements/indass/grg.vue":Sg,"/packages/elements/indass/kds.vue":Pg,"/packages/elements/indass/linIndass.vue":Bg,"/packages/elements/indass/rangeLin.vue":Fg,"/packages/elements/indass/windLin.vue":Vg,"/packages/elements/line/aqi.vue":$g,"/packages/elements/line/dzc.vue":Ug,"/packages/elements/line/lin.vue":jg,"/packages/elements/line/mxa.vue":Hg,"/packages/elements/list/device.vue":Wg,"/packages/elements/list/grd.vue":Yg,"/packages/elements/list/gridview.vue":Zg,"/packages/elements/list/lst.vue":Kg,"/packages/elements/map/bmp.vue":tv,"/packages/elements/map/cmp.vue":rv,"/packages/elements/monitor/scd.vue":nv,"/packages/elements/params/ctrSet.vue":av,"/packages/elements/params/ctrSetGroup.vue":iv,"/packages/elements/pie/circleBar.vue":lv,"/packages/elements/pie/pie.vue":cv,"/packages/elements/pro/composite.vue":dv,"/packages/elements/pro/mixGrid.vue":fv,"/packages/elements/pro/mixMap.vue":hv,"/packages/elements/pro/mixModel.vue":pv,"/packages/elements/pro/mixPie.vue":gv,"/packages/elements/pro/staticLine.vue":vv,"/packages/elements/radar/rad.vue":mv,"/packages/elements/radar/toggleBtn.vue":yv,"/packages/elements/sankey/sankey.vue":bv,"/packages/elements/switch/ctrBtn.vue":_v,"/packages/elements/switch/ctrSwitch.vue":Sv,"/packages/elements/switch/pressBtn.vue":Cv,"/packages/elements/video/vdo.vue":Lv}),e={};return Object.keys(t).forEach(r=>{const n=r.match(/\/elements\/([^/]+)\/([^/]+)\.vue$/);if(n){const[,,a]=n;e[a]=l.markRaw(t[r].default)}}),e}};/*! Element Plus v2.9.6 */var SR={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const _he={key:0,class:"w-full h-full"},She={class:"canvas"},Che={key:0,class:"component-edit"},whe={key:0,class:"sheet-wrap"},xhe=["onClick"],q3=et(Object.assign({name:"DesignPro"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""},unlocked:{type:Boolean,default:!1}},emits:["delete","update"],setup(t,{emit:e}){const r=e,n=t,a=l.reactive({margin:[10,10],height:40}),i=l.ref({sheets:[]}),o=l.ref(0),s=l.computed(()=>i.value.sheets[o.value]),c=l.ref({});let u={};const d=l.ref(""),f=new Blob([Nm],{type:"application/javascript"}),p=URL.createObjectURL(f),h=new SharedWorker(p),v=Zp(),m=J0.getUser().token;h.port.postMessage({type:"open",url:v,token:m,sysMode:localStorage.getItem("sys_mode")||""}),h.port.onmessage=x=>{let E=x.data;if(E.component_name==="object_alias_map"){let L={};for(let T in E.result)L[E.result[T]]=T;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(L));return}i.value.sheets[o.value].components.forEach(L=>{E.actionid===L.id&&(L.socketData=E.result)})};const g=x=>({x:x.x,y:x.y,w:x.w,h:x.h,i:x.i}),y=()=>{let x=1920,E=s.value.col||20;x=document.body.offsetWidth-356-16-(E+1)*a.margin[0],a.height=Math.round(x/E)},_=x=>(x.sheets.forEach(E=>{E.components.forEach(L=>{var k;const T=((k=u[L.type])==null?void 0:k.OPTIONS)||{};Object.keys(L.options).forEach(A=>{L.options[A]={...T[A]||{},value:L.options[A]}})})}),x),b=async()=>{const{result:x}=await _t.post("get_object_list",{select:["name","uid","alias"]});let E={};return x.data.forEach(L=>{E[L.alias]=L.uid}),E},C=x=>{l.nextTick(()=>{o.value=x})},w=x=>{let E=s.value.components.filter(L=>L.id!==x.id);r("delete",E)},S=x=>{r("update",s.value.components)};return l.onMounted(async()=>{const x=await b();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(x)),c.value=await ks.loadComponents(),u=await ks.getAllExposedProps(),i.value=_(n.script),y()}),l.provide("sharedWorker",h),(x,E)=>(l.openBlock(),l.createBlock(l.unref(MO),{locale:l.unref(SR)},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock("div",_he,[l.createElementVNode("div",{class:l.normalizeClass(["layout",{"h-[calc(100%-40px)]":i.value.sheets.length>1,"h-[100%]":i.value.sheets.length<=1}])},[l.createElementVNode("div",She,[l.createVNode(r7,{layout:s.value.components,"onUpdate:layout":E[1]||(E[1]=L=>s.value.components=L),"col-num":s.value.col,"row-height":a.height,margin:a.margin,"is-draggable":t.unlocked,"is-resizable":t.unlocked,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!1},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.components,L=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:L.i,ref_for:!0},g(L),{onMouseover:T=>d.value=L.i,onMouseleave:E[0]||(E[0]=T=>d.value=""),onResized:S,onMoved:S}),{default:l.withCtx(()=>[c.value[L.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(c.value[L.type]),{key:0,conf:L,uid:t.uid,mode:"preview"},{default:l.withCtx(()=>[d.value===L.i&&t.unlocked?(l.openBlock(),l.createElementBlock("div",Che,[l.createVNode(l.unref(Nie),{onClick:T=>w(L)},null,8,["onClick"])])):l.createCommentVNode("",!0)]),_:2},1032,["conf","uid"])):l.createCommentVNode("",!0)]),_:2},1040,["onMouseover"]))),128))]),_:1},8,["layout","col-num","row-height","margin","is-draggable","is-resizable"])])],2),i.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",whe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.sheets,(L,T)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:o.value===T}]),onClick:k=>C(T)},l.toDisplayString(L.name),11,xhe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-c1234785"]]),Ehe={key:0,id:"ShowContainer"},The={class:"canvas"},Lhe={key:0,class:"sheet-wrap"},khe=["onClick"],X3=et(Object.assign({name:"DesignShow"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""},node:{type:String,default:""},unlocked:{type:Boolean,default:!1}},setup(t){const e=t,r=l.reactive({margin:[10,10],height:40}),n=l.ref({sheets:[]}),a=l.ref(0),i=l.computed(()=>n.value.sheets[a.value]),o=l.ref({});let s={};const c=new Blob([Nm],{type:"application/javascript"}),u=URL.createObjectURL(c),d=new SharedWorker(u),f=Zp(),p=J0.getUser().token;d.port.postMessage({type:"open",url:f,token:p,sysMode:localStorage.getItem("sys_mode")||""}),d.port.onmessage=C=>{let w=C.data;if(w.component_name==="object_alias_map"){let S={};for(let x in w.result)S[w.result[x]]=x;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(S));return}n.value.sheets[a.value].components.forEach(S=>{w.actionid===S.id&&(S.socketData=w.result)})};const h=C=>({x:C.x,y:C.y,w:C.w,h:C.h,i:C.i}),v=()=>{let C=i.value.col||100,w=i.value.screenHeight;document.querySelector("#ShowContainer")&&(w=w-(C+1)*r.margin[0]),r.height=w/C},m=C=>C.includes("defaultBg1")?location.origin+"/images/bg/bg1.png":C.includes("defaultBg1")?location.origin+"/images/bg/bg2.png":C,g=C=>(C.sheets.forEach(w=>{w.components.forEach(S=>{var E;const x=((E=s[S.type])==null?void 0:E.OPTIONS)||{};Object.keys(S.options).forEach(L=>{S.options[L]={...x[L]||{},value:S.options[L]}})})}),C),y=async()=>{const{result:C}=await _t.post("get_object_list",{select:["name","uid","alias"]});let w={};return C.data.forEach(S=>{w[S.alias]=S.uid}),w},_=C=>{l.nextTick(()=>{a.value=C})},b=()=>{const{screenHeight:C,screenWidth:w}=i.value;let S=document.documentElement;e.node&&(S=document.getElementById(e.node));let x=document.getElementById("ShowContainer"),E=S.clientWidth,L=S.clientHeight,T=L/C,k=E/w,A=k>T?T:k,D=E/2-w*A/2,M=L/2-C*A/2;x.style.width=w+"px",x.style.height=C+"px",x.style.transform=`scale(${A}, ${A})`,x.style.left=`${D}px`,x.style.top=`${M}px`};return l.onMounted(async()=>{const C=await y();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(C)),o.value=await ks.loadComponents(),s=await ks.getAllExposedProps(),n.value=g(e.script),l.nextTick(()=>{b(),v()}),window.onresize=pt(()=>{b()},100)}),l.provide("sharedWorker",d),(C,w)=>(l.openBlock(),l.createBlock(l.unref(MO),{locale:l.unref(SR)},{default:l.withCtx(()=>[i.value?(l.openBlock(),l.createElementBlock("div",Ehe,[l.createElementVNode("div",{class:"layout",style:l.normalizeStyle({background:`url(${m(i.value.background)})`})},[l.createElementVNode("div",The,[l.createVNode(r7,{layout:i.value.components,"onUpdate:layout":w[0]||(w[0]=S=>i.value.components=S),"col-num":i.value.col,"row-height":r.height,margin:r.margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.components,S=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:S.i,ref_for:!0},h(S)),{default:l.withCtx(()=>[o.value[S.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value[S.type]),{key:0,conf:S,uid:t.uid,mode:"preview"},null,8,["conf","uid"])):l.createCommentVNode("",!0)]),_:2},1040))),128))]),_:1},8,["layout","col-num","row-height","margin"])])],4),n.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",Lhe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value.sheets,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:a.value===x}]),onClick:E=>_(x)},l.toDisplayString(S.name),11,khe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f06bfb8f"]]),Ahe={key:0,class:"w-full h-full bg-[#e5e7eb]"},Dhe={class:"layout"},Mhe={class:"canvas"},Ohe={key:0,class:"sheet-wrap"},Ihe=["onClick"],J3=et(Object.assign({name:"DesignApp"},{props:{script:{type:Object,default:()=>{}},uid:{type:String,default:""}},setup(t){const e=t,r=l.reactive({margin:[10,10],height:40}),n=l.ref({sheets:[]}),a=l.ref(0),i=l.computed(()=>n.value.sheets[a.value]),o=l.ref({});let s={};const c=l.ref(Zp()),u=J0.getUser().token;let d=new WebSocket(c.value),f=null,p=0;const h=()=>{d.onopen=()=>{let b={action:"auth_dashbos",token:u};d.send(JSON.stringify(b)),f&&clearInterval(f),f=setInterval(()=>{d.send("ping")},5e3)},d.onmessage=b=>{try{let C=JSON.parse(b.data);if(C.component_name==="object_alias_map"){let w={};for(let S in data.result)w[data.result[S]]=S;sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(w));return}n.value.sheets[a.value].components.forEach(w=>{C.actionid===w.id&&(w.socketData=C.result)})}catch{}},d.onerror=()=>{p++,p>5&&(clearInterval(f),d.close())},d.onclose=()=>{clearInterval(f),console.log("websocket已关闭!")}},v=b=>({x:b.x,y:b.y,w:b.w,h:b.h,i:b.i}),m=()=>{let b=1920,C=i.value.col||4;b=document.querySelector("div.layout").offsetWidth-16-(C+1)*r.margin[0],r.height=Math.round(b/C)},g=b=>(b.sheets.forEach(C=>{C.components.forEach(w=>{var x;const S=((x=s[w.type])==null?void 0:x.OPTIONS)||{};Object.keys(w.options).forEach(E=>{w.options[E]={...S[E]||{},value:w.options[E]}}),w.data&&w.data.length>0})}),b),y=async()=>{const{result:b}=await _t.post("get_object_list",{select:["name","uid","alias"]});let C={};return b.data.forEach(w=>{C[w.alias]=w.uid}),C},_=b=>{l.nextTick(()=>{a.value=b})};return l.onMounted(async()=>{h();const b=await y();sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(b)),o.value=await ks.loadComponents(),s=await ks.getAllExposedProps(),console.log(JSON.parse(JSON.stringify(e.script)),"script"),n.value=g(e.script),l.nextTick(()=>{m()})}),l.provide("ws",d),(b,C)=>{var w;return(w=i.value)!=null&&w.components?(l.openBlock(),l.createElementBlock("div",Ahe,[l.createElementVNode("div",Dhe,[l.createElementVNode("div",Mhe,[l.createVNode(r7,{layout:i.value.components,"onUpdate:layout":C[0]||(C[0]=S=>i.value.components=S),"col-num":i.value.col,"row-height":r.height,margin:r.margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"use-css-transforms":!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value.components,S=>(l.openBlock(),l.createBlock(Rs,l.mergeProps({key:S.i,ref_for:!0},v(S)),{default:l.withCtx(()=>[o.value[S.type]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value[S.type]),{key:0,uid:t.uid,conf:S,mode:"preview"},null,8,["uid","conf"])):l.createCommentVNode("",!0)]),_:2},1040))),128))]),_:1},8,["layout","col-num","row-height","margin"])])]),n.value.sheets.length>1?(l.openBlock(),l.createElementBlock("div",Ohe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value.sheets,(S,x)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["sheet-item",{active:a.value===x}]),onClick:E=>_(x)},l.toDisplayString(S.name),11,Ihe))),256))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}}),[["__scopeId","data-v-9c5357a5"]]);q3.install=function(t){t.component(q3.name,q3)},X3.install=function(t){t.component(X3.name,X3)},J3.install=function(t){t.component(J3.name,J3)};const Nhe=[q3,X3,J3],Mv=function(t){Mv.installed||Nhe.forEach(e=>{t.component(e.name,e)})};return typeof window<"u"&&window.Vue&&Mv(window.Vue),{install:Mv,DesignPro:q3,DesignShow:X3,DesignApp:J3}});