(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e702801"],{"3f2b":function(e,t,a){"use strict";a("5bfb")},"5bfb":function(e,t,a){},e130:function(e,t,a){e.exports=a.p+"static/img/crate.da499b85.gif"},f521:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"panelScan",attrs:{id:"panelScan"}},[a("div",{staticClass:"detailedSummary"},[a("ul",{staticClass:"infoList"},[e.showDiagramList?a("li",{staticClass:"allowPointer"},[a("div",{staticClass:"selectWrapper"},[a("span",{on:{click:function(t){e.showActionSheet=!0}}},[e._v(" "+e._s(e.currentOrderCode)+" "),a("i",{class:["iconfont iconxiala",e.showActionSheet?"up":"dowm"]})])])]):e._e(),e._l(e.newPanelParameters,(function(t,n){return a("li",{key:n},[a("span",[e._v(e._s(t.Name)+"：")]),a("span",[e._v(e._s(t.Value))])])}))],2),e.isMobile?a("div",{class:["showAllPanel",e.$i18n.locale]},[a("div",{staticClass:"iconWrapper",on:{click:e.showAllPanel}},[a("i",{staticClass:"iconfont iconxianshi"}),a("span",[e._v(e._s(e.$t("info.27")))])]),a("div",{staticClass:"iconWrapper",on:{click:e.clickGridIcon}},[a("i",{staticClass:"iconfont",class:[e.showGrid?"iconyincangwangge":"iconwangge"]}),a("span",[e._v(e._s(e.showGrid?e.$t("info.74"):e.$t("info.73")))])]),a("div",{staticClass:"iconWrapper",on:{click:e.changeModelState}},[a("i",{staticClass:"iconfont iconxiankuang"}),a("span",[e._v(e._s(e.modelText))])]),a("div",{staticClass:"iconWrapper",on:{click:e.hideSelectedPanels}},[a("i",{staticClass:"iconfont iconyincangbukejian"}),a("span",[e._v(e._s(e.$t("info.40")))])]),a("div",{staticClass:"iconWrapper",on:{click:e.clickPartList}},[a("i",{staticClass:"iconfont iconiconfront-"}),a("span",[e._v(e._s(e.$t("info.12")))])])]):e._e()]),a("div",{staticClass:"mainWrapper"},[a("div",{ref:"model",staticClass:"model",attrs:{id:"container"}}),e.isMobile?e._e():a("div",{ref:"panelData",staticClass:"panelData"},[a("panel-list",{attrs:{panelList:e.currentModelPanelData,panelCodeList:e.panelCodeList,panelShortid:e.currentPanelId}})],1)]),a("div",{ref:"toolbar",class:["toolbar",e.$i18n.locale]},[a("ul",[e._l(e.toolbarList,(function(t,n){return a("li",{key:n,on:{click:function(t){return t.stopPropagation(),e.clickToolbar(n)}}},[a("i",{class:["iconfont",t.icon,e.selectedIndex===n?"active":""]}),a("span",[e._v(e._s(t.activeName||t.name1))])])})),e.isMobile?e._e():a("li",{on:{click:e.hideSelectedPanels}},[a("i",{staticClass:"iconfont iconyincangbukejian"}),a("span",[e._v(e._s(e.$t("info.40")))])]),e.isMobile?e._e():a("li",{on:{click:e.showAllPanel}},[a("i",{staticClass:"iconfont iconxianshi"}),a("span",[e._v(e._s(e.$t("info.27")))])]),e.isMobile?e._e():a("li",{on:{click:e.clickGridIcon}},[a("i",{staticClass:"iconfont",class:[e.showGrid?"iconyincangwangge":"iconwangge"]}),a("span",[e._v(e._s(e.showGrid?e.$t("info.74"):e.$t("info.73")))])]),e.isMobile?e._e():a("li",{on:{click:e.changeModelState}},[a("i",{staticClass:"iconfont iconxiankuang"}),a("span",[e._v(e._s(e.modelText))])]),e.isMobile?e._e():a("li",{on:{click:e.clickPartList}},[a("i",{staticClass:"iconfont iconiconfront-"}),a("span",[e._v(e._s(e.$t("info.12")))])])],2)]),a("van-action-sheet",{attrs:{actions:e.weChatOrderList,"cancel-text":e.$t("info.29"),"close-on-click-action":""},on:{select:e.selectOrder},model:{value:e.showActionSheet,callback:function(t){e.showActionSheet=t},expression:"showActionSheet"}}),a("van-popup",{attrs:{position:"bottom"},model:{value:e.showModelList,callback:function(t){e.showModelList=t},expression:"showModelList"}},[a("div",{staticClass:"modelWrapper"},[a("div",{staticClass:"modelTitle"},[a("span",[e._v(e._s(e.$t("info.32")))]),a("i",{staticClass:"iconfont iconguanbi",on:{click:function(t){e.showModelList=!1}}})]),a("ul",{staticClass:"modelList"},e._l(e.modelList,(function(t,n){return a("li",{key:t.Id,on:{click:function(t){return t.stopPropagation(),e.selectedModel(n)}}},[a("img",{class:{active:t.Id===e.defaultCstId},attrs:{src:t.cstPath+"/"+t.Image,alt:""}}),a("span",[e._v(e._s(t.Name))])])})),0)])]),a("part-list",{attrs:{showPartListLayer:e.showPartListLayer,panelCodeList:e.panelCodeList,currentCstData:e.currentCstData},on:{"update:showPartListLayer":function(t){e.showPartListLayer=t},"update:show-part-list-layer":function(t){e.showPartListLayer=t}}}),a("input",{directives:[{name:"model",rawName:"v-model",value:e.scanText,expression:"scanText"},{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"scanInput",attrs:{name:"scanInput"},domProps:{value:e.scanText},on:{input:function(t){t.target.composing||(e.scanText=t.target.value)}}}),a("router-view")],1)},i=[],s=(a("99af"),a("4de4"),a("7db0"),a("4160"),a("a630"),a("caad"),a("d81d"),a("b0c0"),a("a9e3"),a("d3b7"),a("07ac"),a("ac1f"),a("2532"),a("3ca3"),a("5319"),a("1276"),a("cfc3"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("159b"),a("ddb0"),a("53ca")),o=a("2909"),r=(a("96cf"),a("1da1")),c=a("5530"),l=(a("e17f"),a("2241")),d=a("3835"),h=a("bc3a"),u=a.n(h),p=a("5a89"),f=a("cf1c"),m={setCookie:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3),document.cookie=e+"="+escape(t)+";expires="+n.toGMTString()},getCookie:function(e){for(var t=document.cookie,a=t.split("; "),n=0;n<a.length;n++)if(a[n].split("=")[0]==e)return a[n].split("=")[1]},removeCookie:function(e){this.setCookie(e,"",-1)}},w=a("6c01"),b=a("466f"),g=a("affd"),v=a("cf55"),x=a("e731"),y=a("78e9"),P=a("e642");class L extends p["E"]{constructor(e){super(e)}load(e,t,a,n){const i=this,s=""===this.path?p["F"].extractUrlBase(e):this.path,o=new p["r"](this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(a){try{t(i.parse(a,s))}catch(o){n?n(o):console.error(o),i.manager.itemError(e)}}),a,n)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const a=e.split("\n");let n={};const i=/\s+/,s={};for(let r=0;r<a.length;r++){let e=a[r];if(e=e.trim(),0===e.length||"#"===e.charAt(0))continue;const t=e.indexOf(" ");let o=t>=0?e.substring(0,t):e;o=o.toLowerCase();let c=t>=0?e.substring(t+1):"";if(c=c.trim(),"newmtl"===o)n={name:c},s[c]=n;else if("ka"===o||"kd"===o||"ks"===o||"ke"===o){const e=c.split(i,3);n[o]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else n[o]=c}const o=new k(this.resourcePath||t,this.materialOptions);return o.setCrossOrigin(this.crossOrigin),o.setManager(this.manager),o.setMaterials(s),o}}class k{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:p["u"],this.wrap=void 0!==this.options.wrap?this.options.wrap:p["Y"]}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const a in e){const n=e[a],i={};t[a]=i;for(const e in n){let t=!0,a=n[e];const s=e.toLowerCase();switch(s){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(a=[a[0]/255,a[1]/255,a[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===a[0]&&0===a[1]&&0===a[2]&&(t=!1);break;default:break}t&&(i[s]=a)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,a=this.materialsInfo[e],n={name:e,side:this.side};function i(e,t){return"string"!==typeof t||""===t?"":/^https?:\/\//i.test(t)?t:e+t}function s(e,a){if(n[e])return;const s=t.getTextureParams(a,n),o=t.loadTexture(i(t.baseUrl,s.url));o.repeat.copy(s.scale),o.offset.copy(s.offset),o.wrapS=t.wrap,o.wrapT=t.wrap,"map"!==e&&"emissiveMap"!==e||(o.colorSpace=p["Z"]),n[e]=o}for(const o in a){const e=a[o];let t;if(""!==e)switch(o.toLowerCase()){case"kd":n.color=p["i"].toWorkingColorSpace((new p["h"]).fromArray(e),p["Z"]);break;case"ks":n.specular=p["i"].toWorkingColorSpace((new p["h"]).fromArray(e),p["Z"]);break;case"ke":n.emissive=p["i"].toWorkingColorSpace((new p["h"]).fromArray(e),p["Z"]);break;case"map_kd":s("map",e);break;case"map_ks":s("specularMap",e);break;case"map_ke":s("emissiveMap",e);break;case"norm":s("normalMap",e);break;case"map_bump":case"bump":s("bumpMap",e);break;case"map_d":s("alphaMap",e),n.transparent=!0;break;case"ns":n.shininess=parseFloat(e);break;case"d":t=parseFloat(e),t<1&&(n.opacity=t,n.transparent=!0);break;case"tr":t=parseFloat(e),this.options&&this.options.invertTrProperty&&(t=1-t),t>0&&(n.opacity=1-t,n.transparent=!0);break;default:break}}return this.materials[e]=new p["M"](n),this.materials[e]}getTextureParams(e,t){const a={scale:new p["jb"](1,1),offset:new p["jb"](0,0)},n=e.split(/\s+/);let i;return i=n.indexOf("-bm"),i>=0&&(t.bumpScale=parseFloat(n[i+1]),n.splice(i,2)),i=n.indexOf("-s"),i>=0&&(a.scale.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),i=n.indexOf("-o"),i>=0&&(a.offset.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),a.url=n.join(" ").trim(),a}loadTexture(e,t,a,n,i){const s=void 0!==this.manager?this.manager:p["m"];let o=s.getHandler(e);null===o&&(o=new p["ib"](s)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin);const r=o.load(e,a,n,i);return void 0!==t&&(r.mapping=t),r}}var $,I,C,M,D,T,_,O,j=a("4a8d"),S=a("4721"),A={name:"model",data:function(){return{meshList:[],modelText:this.$t("info.31"),materialType:"panelBasicMaterial",IndexedDB:void 0,projectInfo:{},defaultCstId:"",defaultPanelId:"",currentPanelId:"",currentModelPanelList:[],currentModelPanelData:[],currentModelHardwareList:[],currentRouterName:"model",toolbarHeight:0,newPanelId:"",newHouseId:"",selectedIndex:void 0,toolbarList:[{icon:"iconmoxingzhongxin",activeName:"",name1:this.$t("info.32"),name2:this.$t("info.32")},{icon:"iconiconfontscan",activeName:"",name1:this.$t("info.33"),name2:this.$t("info.33")},{icon:"iconbankuai",activeName:this.$t("info.34"),name1:this.$t("info.34"),name2:this.$t("info.35")},{icon:"iconqiehuan1",activeName:this.$t("info.36"),name1:this.$t("info.36"),name2:this.$t("info.37")},{icon:"iconshuzi",activeName:this.$t("info.38"),name1:this.$t("info.38"),name2:this.$t("info.39")},{icon:"iconjinduchaxun",activeName:"",name1:this.$t("info.193"),name2:this.$t("info.193")}],toolbarListBackup:[],showModelList:!1,cabinetParameters:[],panelParameters:[],panelCodeList:[],selectedPanel:void 0,isAllPanelLoaded:!1,dataLoadingException:!1,modelList:[],textStyleFont:{},showPartListLayer:!1,currentCstData:{},scanText:"",dataProcessing:!1,isMobile:!0,showGrid:!0,cabinetGroupName:"",showDiagramList:!1,showActionSheet:!1,weChatOrderList:[],currentOrderCode:"",timeOutList:[],isStopExecution:!1,companyName:""}},components:{"part-list":x["a"],"panel-list":y["a"]},beforeRouteUpdate:function(e,t,a){var n=this;if("model"===e.name){var i="".concat(this.cabinetGroupName?this.cabinetGroupName+"-":"").concat(this.companyName).concat(this.$t("info.183"));b["a"].setWebPageTitle(i)}if(this.currentRouterName=e.name,"scanPage"===t.name||"appScan"===t.name){this.selectedIndex=void 0;var s=localStorage.getItem("ScanedUrl"),o=localStorage.getItem("panelId");if(localStorage.removeItem("ScanedUrl"),localStorage.removeItem("panelId"),s){var r=s.split("?")[1];if(!r){var c=s,h=this.panelCodeList.find((function(e){return e.code===c}));if(!h)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void a();var u=h.shortid;return this.panelCodeList=[],this.meshList=[],this.panelParameters=[],D.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(u),void a()}if(s.includes("v="))return void location.replace(s);var p=r.split("="),f=Object(d["a"])(p,2),m=f[0],w=f[1],g=["p","h"];if(!g.includes(m))return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void a();if(!w)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void a();var v=setTimeout((function(){l["a"].confirm({title:"".concat(n.$t("info.3"),"！"),message:"".concat(n.$t("info.41"),"！"),cancelButtonText:n.$t("info.29"),confirmButtonText:n.$t("info.70")}).then((function(){n["p"===m?"newPanelId":"newHouseId"]=w,n.panelCodeList=[],n.meshList=[],n.panelParameters=[],D.children=[],n.resetOrbitControls(!0),n.restoreDefaultMaterials(),n.getAllModelData(n.newPanelId,n.newHouseId),a()})).catch((function(){a()}))}));this.timeOutList.push(v)}o&&(this.panelCodeList=[],this.meshList=[],this.panelParameters=[],D.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(o),a())}a()},computed:{newPanelParameters:function(){var e=["房间","柜组ID","柜组名称"];return this.panelParameters.filter((function(t){return!e.includes(t.Name)}))}},watch:{cabinetGroupName:function(e){var t=this.$t("info.183");e&&(t="".concat(e,"-").concat(this.companyName).concat(t)),b["a"].setWebPageTitle(t)}},created:function(){"en"===this.$i18n.locale&&(this.toolbarList=this.toolbarList.filter((function(e){return"iconjinduchaxun"!==e.icon})));var e=this.$route.query.v;if(e){this.isStopExecution=!0;var t=Object(c["a"])({},this.$route.query);return delete t.v,void this.$router.replace({name:"model".concat(e),query:Object(c["a"])({},t)})}this.isMobile=b["a"].isMobile();var a=localStorage.getItem("gridType");if(a&&(this.showGrid="showGrid"===a),!this.$store.state.isInitializedWxConfig){var n={link:location.href};Object(v["b"])(n)}},mounted:function(){this.isStopExecution||(this.$route.query.debug&&new this.$Vconsole,this.initPage())},beforeDestroy:function(){this.timeOutList.forEach((function(e){e&&clearTimeout(e)}))},methods:{initPage:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t,a,n,i,s,r,c,l,d=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.companyName=b["a"].getHgCompanyName(),t=document.documentElement.clientHeight,document.getElementById("panelScan").style.height=t+"px",Object(w["a"])(this),this.toolbarHeight=this.$refs.toolbar.offsetHeight,this.toolbarListBackup=JSON.parse(JSON.stringify(this.toolbarList)),a=this.$route.query,0===Object.values(a).length?a=JSON.parse(sessionStorage.getItem("route-query-data"))||{}:sessionStorage.setItem("route-query-data",JSON.stringify(a)),n=a,i=n.p,s=n.h,r=n.weChatOrderList,r&&(c=JSON.parse(r),c.forEach((function(e){e.name=e.Code,e.subname=e.OrderName})),this.currentOrderCode=c[0].Code,this.showDiagramList=!0,this.weChatOrderList=Object(o["a"])(c)),this.newPanelId=i,this.newHouseId=s,e.next=14,f["a"].openDB("modelData");case 14:this.IndexedDB=e.sent,this.loadTextStyleJson(),this.checkCookie(),l=setTimeout((function(){d.$nextTick((function(){d.initScene(),d.getAllModelData(i,s)}))}),180),this.timeOutList.push(l);case 19:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),inputEnterEvent:function(){if(this.dataProcessing)return this.scanText="",void b["a"].playLocalAudio(g["a"][this.$t("info.42")]);this.dataProcessing=!0;var e=this.scanText;this.scanText="",e=e.replace(/\?+/g,"?");var t=e.split("?")[1];if(t){var a="/#/m?";if(!e.includes(a))return this.dataProcessing=!1,void b["a"].playLocalAudio(g["a"][this.$t("info.25")]);var n=t.split("="),i=Object(d["a"])(n,2),s=i[0],o=i[1],r=["p","h"];if(r.includes(s)){if(!o)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),b["a"].playLocalAudio(g["a"][this.$t("info.25")]),void(this.dataProcessing=!1);this.newPanelId="",this.newHouseId="",this["p"===s?"newPanelId":"newHouseId"]=o,this.panelCodeList=[],this.meshList=[],D.children=[],this.resetOrbitControls(),this.restoreDefaultMaterials();var c="Swtich";this.getAllModelData(this.newPanelId,this.newHouseId,c),this.toolbarList=JSON.parse(JSON.stringify(this.toolbarListBackup))}else this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),b["a"].playLocalAudio(g["a"][this.$t("info.25")]),this.dataProcessing=!1}else this.reloadModelByPanelCode(e)},reloadModelByPanelCode:function(e){var t=this.currentModelPanelData.find((function(t){return t.Code===e}));if(t)this.renderTargetPanel(t);else{var a=this.panelCodeList.find((function(t){return t.code===e}));if(!a)return this.$toast.fail({message:"".concat(this.$t("info.43"),"！")}),b["a"].playLocalAudio(g["a"][this.$t("info.43")]),void(this.dataProcessing=!1);var n=a.shortid;this.currentPanelId=n,this.panelCodeList=[],this.meshList=[],D.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials();var i="Highlight";this.getAllModelData(n,"",i)}},renderTargetPanel:function(e){var t=e.Code,a=e.Id,n=new p["L"]({color:15977863,side:p["o"]}),i=new p["L"]({color:16777215,side:p["o"]}),s=new p["L"]({color:16776960,side:p["o"],transparent:!0,opacity:.6,depthTest:!1}),o=new p["A"]({color:7829367,linewidth:1,transparent:!0,opacity:1,depthTest:!0}),r=new p["A"]({color:15610023,linewidth:1,transparent:!0,opacity:.4,depthTest:!1});this.meshList.forEach((function(e){var a=e.userData,c=a.panelBarcode,l=a.panel_type,d=a.isTargetPanel;d&&(e.material="panel"===l?n:i,e.userData.isTargetPanel=!1,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=o)}))),c===t&&(e.material=s,e.userData.isTargetPanel=!0,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=r)})))})),this.modelText===this.$t("info.46")&&(D.children.forEach((function(e){"panel"!==e.userData.meshType||e.userData.isTargetPanel||(e.material.opacity=1,e.material.transparent=!1,e.material.wireframe=!1)})),this.modelText=this.$t("info.31")),this.currentPanelId=a,this.dataProcessing=!1,this.updateCameraParameter(),this.renderModel(),b["a"].playLocalAudio(g["a"][this.$t("info.24")])},selectOrder:function(e){var t=e.Web3dviewUrl;if(t){var a=b["a"].getUrlParameter(t),n=a.h;n?(this.newHouseId=n,this.meshList=[],D.children=[],this.restoreDefaultMaterials(),this.resetOrbitControls(),this.getAllModelData("",n)):this.$toast("".concat(this.$t("info.45"),"！"))}this.showActionSheet=!1},loadNewHardwareMesh:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t,a,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=new L,a=new P["a"],t.load("https://h.techtimesun.com/globalData/model/sxy1000.mtl",(function(e){e.preload(),console.log(a),console.log(e),a.setMaterials(e),a.load("https://h.techtimesun.com/globalData/model/sxy1000.obj",(function(e){var t=new p["c"];t.setFromObject(e),console.log("x=".concat(t.max.x-t.min.x),"y=".concat(t.max.y-t.min.y),"z=".concat(t.max.z-t.min.z)),e.position.y=0,e.position.z=0,e.traverse((function(e){p["K"]})),I.add(e),n.renderModel()}))}));case 3:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),loadTextStyleJson:function(){var e=this,t=new j["a"];t.load("/font/typeface.json",(function(t){e.textStyleFont=t}))},initScene:function(){var e=this.$refs.model.offsetWidth,t=this.$refs.model.offsetHeight,a=this.$refs.model;I=new p["ab"],D=new p["w"],$=new p["Q"](45,e/t,1,8e4),$.up.set(0,0,1),$.position.set(0,-5500,6100),I.add($),I.background=new p["h"](15658734);var n=new p["a"](16777215);I.add(n);var i=new p["S"](16777215,50);$.add(i);var s=new p["v"](6e3,20,12434620,12434620);s.rotateOnAxis(new p["kb"](1,0,0),Math.PI/180*90),s.position.z=0,s.visible=this.showGrid,I.add(s),C=new p["lb"]({antialias:!0,alpha:!0}),C.setPixelRatio(window.devicePixelRatio),C.setSize(e,t),a.appendChild(C.domElement),M=new S["a"]($,C.domElement),M.addEventListener("change",this.renderModel),M.target.set(0,0,500),M.update(),window.addEventListener("resize",b["a"].debounce(this.onWindowResize,300),!1),a.addEventListener("click",this.onMouseDblclick,!0),a.addEventListener("touchstart",this.onMouseDblclick,!0)},updateCameraParameter:function(){var e=new p["c"];e.expandByObject(D);var t=new p["kb"];e.getCenter(t);var a=0,n=0,i=e.max.z-e.min.z,s=e.max.x-e.min.x;if(this.isMobile)a=s>i?2*i:1.4*i,n=-(s<1e3?3e3:s<=1500?3*s:2.2*s);else{a=1.3*i;var o=i>2e3?2*i:i>1e3?2.4*i:i>500?3.5*i:4.3*i;n=-o}$.position.set(0,n,a),M.update()},resetOrbitControls:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateCameraParameter(),e&&M.reset(),M.target.set(0,0,500),M.update()},getAllModelData:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,a,n){var i,c=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.delegateYield(regeneratorRuntime.mark((function e(){var i,s,l,d,h,p,m,w,v,x,y,P,L,k,$,C,M,T,_,O,j,S,A,E,N,B,R,z,H,G,F,W,J;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c.$toast.loading({message:c.$t("info.47"),duration:0}),i="",s="",!t){e.next=12;break}return e.next=6,u.a.get("".concat(c.$JsonProxy).concat(c.$AZT_API,"/data/P/panel_").concat(t,".json"));case 6:l=e.sent,d=l.data.PanelIndex,h=d.HouseId,p=d.RoomId,m=d.CstId,w=d.Panel,v=d.Id,a=h,i=p,s=m,c.defaultPanelId=w||v;case 12:return e.next=14,u.a.get("".concat(c.$JsonProxy).concat(c.$AZT_API,"/data/House_").concat(a,"/house.json"));case 14:return x=e.sent,y=x.data,P=y.LockNum,L=y.ProjectNum,c.projectInfo={houseId:a,locknum:P,projectcode:L,h:"".concat(location.origin,"/#/m?h=").concat(a)},k=Object(o["a"])(y.Rooms),!i&&(i=y.Rooms[0].Id),$=[],k.forEach(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n="".concat(c.$AZT_API,"/data/House_").concat(a,"/Room_").concat(t.Id),i=new Promise((function(e){u.a.get("".concat(c.$JsonProxy).concat(n,"/room.json")).then(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.data.Csts&&a.data.Csts.forEach((function(e){e.cstPath=n+"/Cst_".concat(e.Id)})),e(a.data);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())})),$.push(i);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=24,Promise.all($);case 24:if(C=e.sent,M=[],C.forEach((function(e){e.Csts&&e.Csts.forEach((function(e){M.push(e.cstPath)}))})),0!==M.length){e.next=32;break}return c.$toast("".concat(c.$t("info.48"),"！")),c.dataProcessing=!1,n&&b["a"].playLocalAudio(g["a"][c.$t("info.48")]),e.abrupt("return",{v:void 0});case 32:return T=[],M.forEach((function(e){var t=new Promise((function(t){u.a.get("".concat(c.$JsonProxy).concat(e,"/cst.json")).then((function(a){a.data.cstPath=e,t(a.data)}))}));T.push(t)})),e.next=36,Promise.all(T);case 36:_=e.sent,O=_.find((function(e){return e.Id===s})),O||(O=_[0],s=_[0].Id),c.defaultCstId=s,j=O,S=j.Name,A=j.Panel,E=j.Model,N=j.Parameters,B=j.cstPath,c.cabinetGroupName=S,c.cabinetParameters=Object(o["a"])(N),R=[],z=[],H=regeneratorRuntime.mark((function e(t){var a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].read(c.IndexedDB,"model",A[t].Id);case 2:a=e.sent,a?z.push(a.modelData):(n=new Promise((function(e){u.a.get("".concat(c.$JsonProxy).concat(B,"/panel_").concat(A[t].Id,".json")).then((function(t){e(t.data)}))})),R.push(n));case 4:case"end":return e.stop()}}),e)})),G=0;case 47:if(!(G<A.length)){e.next=52;break}return e.delegateYield(H(G),"t0",49);case 49:G++,e.next=47;break;case 52:return F=[],E&&E.forEach((function(e){var t=new Promise((function(t){u.a.get("".concat(c.$JsonProxy).concat(B,"/model_").concat(e.Id,".json")).then((function(e){t(e.data)}))}));F.push(t)})),e.next=56,Promise.all(R);case 56:return W=e.sent,e.next=59,Promise.all(F);case 59:return J=e.sent,W=[].concat(Object(o["a"])(W),z),c.currentModelPanelList=Object(o["a"])(W),c.currentModelHardwareList=Object(o["a"])(J),W.forEach((function(e){c.addPanelDataToIndexedDB(e),c.panelCodeList.push({code:e.Code,shortid:e.unique_code}),c.loadPanelMesh(e)})),e.next=66,c.loadHardwareMesh(J);case 66:c.meshList.forEach((function(e){D.add(e)})),c.initCabinetModelLocation(),I.add(D),c.updateCameraParameter(),c.renderModel(),c.$toast.clear(),c.dataProcessing=!1,n&&("Swtich"===n?b["a"].playLocalAudio(g["a"][c.$t("info.49")]):b["a"].playLocalAudio(g["a"][c.$t("info.24")])),_.forEach((function(e){e.Id===s&&(e.hardwareList=Object(o["a"])(J))})),c.currentModelPanelData=Object(o["a"])(O.Panel),c.currentPanelId=t,c.loadRemainingPanels(s,_);case 78:case"end":return e.stop()}}),e)}))(),"t0",2);case 2:if(i=e.t0,"object"!==Object(s["a"])(i)){e.next=5;break}return e.abrupt("return",i.v);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e["catch"](0),e.t1&&(this.$toast.fail({message:"".concat(t?this.$t("info.50"):this.$t("info.51"))}),this.dataLoadingException=!0,this.isAllPanelLoaded=!0,this.dataProcessing=!1);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(t,a,n){return e.apply(this,arguments)}return t}(),loadRemainingPanels:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,a){var n,i,s,r,c,l,d=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=[],i=[],s=[],r=regeneratorRuntime.mark((function e(r){var c,l,h,p,m,w,b,g,v,x;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c=a[r],l=c.Id,h=c.cstPath,p=c.Panel,m=c.Model,l===t){e.next=15;break}w=regeneratorRuntime.mark((function e(t){var a,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].read(d.IndexedDB,"model",p[t].Id);case 2:a=e.sent,a?s.push(a.modelData):(i=new Promise((function(e){u.a.get("".concat(d.$JsonProxy).concat(h,"/panel_").concat(p[t].Id,".json")).then((function(t){e(t.data)}))})),n.push(i));case 4:case"end":return e.stop()}}),e)})),b=0;case 4:if(!(b<p.length)){e.next=9;break}return e.delegateYield(w(b),"t0",6);case 6:b++,e.next=4;break;case 9:if(m)for(g=function(e){var t=new Promise((function(t){u.a.get("".concat(d.$JsonProxy).concat(h,"/model_").concat(m[e].Id,".json")).then((function(e){t(e.data)}))}));i.push(t)},v=0;v<m.length;v++)g(v);return e.next=12,Promise.all(i);case 12:x=e.sent,a[r].hardwareList=Object(o["a"])(x),i=[];case 15:case"end":return e.stop()}}),e)})),c=0;case 5:if(!(c<a.length)){e.next=10;break}return e.delegateYield(r(c),"t0",7);case 7:c++,e.next=5;break;case 10:return this.modelList=Object(o["a"])(a),e.next=13,Promise.all(n);case 13:l=e.sent,l=[].concat(Object(o["a"])(l),s),this.isAllPanelLoaded=!0,l.forEach((function(e,t){t<l.length&&d.addPanelDataToIndexedDB(e),d.panelCodeList.push({code:e.Code,shortid:e.unique_code})}));case 17:case"end":return e.stop()}}),e,this)})));function t(t,a){return e.apply(this,arguments)}return t}(),addPanelDataToIndexedDB:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.unique_code,e.next=3,f["a"].read(this.IndexedDB,"model",a);case 3:n=e.sent,n||f["a"].addData(this.IndexedDB,"model","panelId",{panelId:a,addedTime:new Date,modelData:t});case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),loadPanelMesh:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n,i,s,o,r,c,l,d,h,u,f,m,w,b,g,v,x,y,P,L,k,$,I,C,M,D=this,T=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=T.length>1&&void 0!==T[1]&&T[1],e.prev=1,t.meshList){e.next=6;break}return this.$toast("".concat(this.$t("info.52"),"！")),this.dataProcessing=!1,e.abrupt("return");case 6:for(n=[],i=[],t.meshList.forEach((function(e){n=n.concat(e.verts),i=i.concat(e.normals)})),s=n.length/3,o=new p["f"],r=new Float32Array(3*s*3),c=new Float32Array(3*s*3),l=0;l<r.length;l+=9)d=l/3,n[d]&&(r[l]=n[d].x,r[l+1]=n[d].y,r[l+2]=n[d].z,r[l+3]=n[d+1].x,r[l+4]=n[d+1].y,r[l+5]=n[d+1].z,r[l+6]=n[d+2].x,r[l+7]=n[d+2].y,r[l+8]=n[d+2].z,c[l]=i[d].x,c[l+1]=i[d].y,c[l+2]=i[d].z,c[l+3]=i[d+1].x,c[l+4]=i[d+1].y,c[l+5]=i[d+1].z,c[l+6]=i[d+2].x,c[l+7]=i[d+2].y,c[l+8]=i[d+2].z);o.setAttribute("position",new p["e"](r,3)),o.setAttribute("normal",new p["e"](c,3)),o.computeBoundingSphere(),h=new p["L"]({color:15977863,side:p["o"]}),u=new p["L"]({color:16777215,side:p["o"]}),f=new p["L"]({color:16776960,side:p["o"],transparent:!0,opacity:.6,depthTest:!1}),m=void 0,w=t.Id||t.unique_code,m=this.defaultPanelId===w?f:"panel"===t.panel_type?h:u,b=new p["K"](o,m),g=t.Code.substring(t.Code.length-3,t.Code.length),g=String(Number(g)),this.addPanelNumber(g,t,a,b),v=this.defaultPanelId===w,x=new p["A"]({color:v?15610023:7829367,linewidth:1,transparent:!0,opacity:v?.4:1,depthTest:!v}),y=new p["p"](o,1),P=new p["B"](y,x),b.add(P),L=t.meshInstanceList[0],k=L.mesh_to_world,$=L.mesh_expose_to_world,I=a?$:k,C=this.MakeMatrix4FromSoftware(I),b.userData={parameters:t.Parameters,panel_center:t.panel_center,panel_expose_center:t.panel_expose_center,mesh_expose_to_world:t.meshInstanceList[0].mesh_expose_to_world,mesh_to_world:t.meshInstanceList[0].mesh_to_world,panel_type:t.panel_type,meshType:"panel",isTargetPanel:this.defaultPanelId===w,panelNumber:g,panelId:t.unique_code,panelBarcode:t.Code},b.applyMatrix4(C),b.receiveShadow=!0,this.meshList.push(b),e.next=46;break;case 41:e.prev=41,e.t0=e["catch"](1),console.log(e.t0),M=setTimeout((function(){D.$toast({message:D.$t("info.339"),icon:"none",duration:2500})}),50),this.timeOutList.push(M);case 46:case"end":return e.stop()}}),e,this,[[1,41]])})));function t(t){return e.apply(this,arguments)}return t}(),addPanelNumber:function(e,t,a,n){if(Number(e)){var i=new p["L"]({color:255,transparent:!0,opacity:1,side:p["o"]}),s=this.computedFontSize(n),o=this.textStyleFont.generateShapes(e,s),r=new p["cb"](o),c=new p["cb"](o);r.computeBoundingBox(),c.computeBoundingBox();var l=t.panel_center,h=t.panel_expose_center,u=a?h:l,f=Object(d["a"])(u,2),m=f[0],w=f[1],b=m.x,g=m.y,v=m.z,x=w.x,y=w.y,P=w.z,L=new p["kb"](b-x,-Math.abs(g-y),v-P),k=new p["kb"](x-b,y-g,P-v);L.normalize();var $=10;b+=L.x*$,g+=g-y>0?L.y*$*2:L.y*$,v+=L.z*$,k.normalize(),x-=7*L.x,y-=7*L.y,P-=7*L.z,r.lookAt(new p["kb"](b-x,g-y,v-P)),r.translate(b-(r.boundingBox.max.x-r.boundingBox.min.x)/2,g-(r.boundingBox.max.y-r.boundingBox.min.y)/2,v-(r.boundingBox.max.z-r.boundingBox.min.z)/2),c.lookAt(new p["kb"](x-b,y-g,P-v)),c.translate(x-1*(c.boundingBox.max.x-c.boundingBox.min.x)/2,y-1*(c.boundingBox.max.y-c.boundingBox.min.y)/2,P-1*(c.boundingBox.max.z-c.boundingBox.min.z)/2);var I=new p["K"](r,i);I.userData.meshType="numberText",I.userData.panelNumber=e,I.visible=!1;var C=new p["K"](c,i);C.userData.meshType="numberText",C.userData.panelNumber=e,C.visible=!1,D.add(I)}},computedFontSize:function(e){var t=new p["c"];t.setFromObject(e);var a=t.max,n=a.x,i=a.y,s=a.z,o=t.min,r=o.x,c=o.y,l=o.z,d=Array.from([n-r,i-c,s-l]).sort((function(e,t){return e-t})),h=120;return d[1]<h&&(h=d[1]-10),h},loadHardwareMesh:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n,i,s=this,o=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=o.length>1&&void 0!==o[1]&&o[1],n=[],t.forEach((function(e){var t=new p["L"]({color:13421772}),i=new p["L"]({color:9364974,transparent:!0,opacity:.5,depthWrite:!1}),o=e.model,r=e.meshInstanceList,c=e.Parameters,l=e.CorrelateID,d=r[0],h=d.mesh_to_world,u=d.mesh_expose_to_world,f=a?u:h,m=s.MakeMatrix4FromSoftware(f),w=new Promise((function(e){(new P["a"]).load("".concat(s.$AZT_API,"/globalData/model/").concat(o),(function(a){a.traverse((function(e){if(e instanceof p["K"]){var a=new p["A"]({color:6710886,linewidth:1}),n=new p["p"](e.geometry),s=new p["B"](n,a);e.add(s),"Glass.obj"===o?(e.material=i,e.userData.isGlass=!0):e.material=t}})),a.userData.meshType="hardware","Glass.obj"===o&&(a.userData.isGlass=!0),a.userData.panelId=l,a.userData.parameters=c,a.children.forEach((function(e){e.userData.meshType="hardware",e.userData.panelId=l})),a.applyMatrix4(m),a.receiveShadow=!0,e(a)}))}));n.push(w)})),e.next=5,Promise.all(n);case 5:i=e.sent,i.forEach((function(e){D.add(e)}));case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),restoreDefaultMaterials:function(){this.materialType="panelBasicMaterial",this.modelText=this.$t("info.31")},explodeOrRestore:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t||(this.selectedIndex=void 0),this.$toast.loading({message:this.$t("info.47"),duration:0}),this.toolbarList.forEach((function(e){"iconqiehuan1"===e.icon&&(e.activeName=n.$t("info.36")),"iconshuzi"===e.icon&&(e.activeName=n.$t("info.38"))})),this.meshList=[],D.children=[],this.currentModelPanelList.forEach((function(e){n.loadPanelMesh(e,t)})),this.meshList.forEach((function(e){D.add(e)})),e.next=9,this.loadHardwareMesh(this.currentModelHardwareList,t);case 9:this.resetOrbitControls(),this.initCabinetModelLocation(),I.add(D),this.showModelList=!1,this.renderModel(),a=setTimeout((function(){n.$toast.clear()})),this.timeOutList.push(a);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),showOrHideAllDoorPanel:function(e){var t=this,a=[],n=[];D.children.forEach((function(t){"door"===t.userData.panel_type&&(t.visible=e,a.push(t.userData.panelNumber),n.push(t.userData.panelId))}));var i=this.toolbarList[4].activeName;D.children.forEach((function(s){"numberText"===s.userData.meshType&&a.includes(s.userData.panelNumber)&&(s.visible=!!e&&i!==t.$t("info.38")),"hardware"===s.userData.meshType&&n.includes(s.userData.panelId)&&s.children.forEach((function(t){return t.visible=e}))})),e&&(this.selectedIndex=void 0),this.renderModel()},showOrHideNumbers:function(e){var t=[];D.children.forEach((function(e){"panel"!==e.userData.meshType||e.visible||t.push(e.userData.panelNumber)})),D.children.forEach((function(a){"numberText"===a.userData.meshType&&(e?t.includes(a.userData.panelNumber)||(a.visible=!0):a.visible=!1)})),e||(this.selectedIndex=void 0),this.renderModel()},handleToolbarText:function(e){var t=Object(o["a"])(this.toolbarList),a=t[e],n=a.activeName,i=a.name1,s=a.name2;return n=n===i?s:i,this.toolbarList[e].activeName=n,n},selectedModel:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n,i,s,r,c,l,d,h=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$toast.loading({message:this.$t("info.47"),duration:0}),this.restoreDefaultMaterials(),this.toolbarList=JSON.parse(JSON.stringify(this.toolbarListBackup)),a=this.modelList[t],n=a.Id,i=a.Name,s=a.Panel,r=a.Parameters,c=a.hardwareList,this.currentModelPanelData=Object(o["a"])(s),this.defaultCstId=n,this.cabinetGroupName=i,this.cabinetParameters=Object(o["a"])(r),l=[],s.forEach((function(e){var t=new Promise((function(t){t(f["a"].read(h.IndexedDB,"model",e.Id))}));l.push(t)})),e.next=12,Promise.all(l);case 12:return d=e.sent,this.currentModelPanelList=d.map((function(e){return e.modelData})),this.meshList=[],D.children=[],d.forEach((function(e){h.loadPanelMesh(e.modelData)})),this.meshList.forEach((function(e){D.add(e)})),this.currentModelHardwareList=Object(o["a"])(c),e.next=21,this.loadHardwareMesh(c);case 21:I.add(D),this.resetOrbitControls(),this.initCabinetModelLocation(),this.renderModel(),this.showModelList=!1,this.selectedIndex=void 0,this.$toast.clear();case 28:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),onMouseDblclick:function(e){if("model"===this.currentRouterName){this.selectedIndex=void 0;var t=this.getIntersects(e);if(this.selectedPanel){var a=this.selectedPanel.userData.meshType;if("hardware"===a){var n=this.selectedPanel.userData.isGlass;this.selectedPanel.children.forEach((function(e){n?e.material.color.set(9364974):e.material.color.set(13421772)}))}else this.selectedPanel.children.forEach((function(e){"LineSegments"===e.type&&(e.renderOrder=0,e.material.depthTest=!0,e.material.color.set(6710886))}));this.selectedPanel=void 0}if(t.length>0){var i,s,o=t.find((function(e){return("panel"===e.object.userData.meshType||"hardware"===e.object.userData.meshType)&&e.object.visible}));if(o)if("hardware"===o.object.userData.meshType)o.object.parent.children.forEach((function(e){e.material.color.set(255)})),this.panelParameters=(null===(i=o.object.parent.userData)||void 0===i?void 0:i.parameters)||[],this.selectedPanel=o.object.parent;else o.object.children.forEach((function(e){"LineSegments"===e.type&&(e.renderOrder=1,e.material.depthTest=!1,e.material.color.set(255))})),this.panelParameters=(null===(s=o.object.userData)||void 0===s?void 0:s.parameters)||[],this.selectedPanel=o.object}else this.panelParameters=[];this.renderModel()}},getIntersects:function(e){var t,a;e.preventDefault();var n=new p["X"],i=new p["jb"],s=(null===(t=this.$refs.model)||void 0===t?void 0:t.offsetWidth)||document.body.offsetWidth,o=(null===(a=this.$refs.model)||void 0===a?void 0:a.offsetHeight)||document.body.offsetHeight;e.touches?(i.x=(e.touches[0].pageX-document.body.getBoundingClientRect().left)/s*2-1,i.y=-(e.touches[0].pageY-document.body.getBoundingClientRect().top)/o*2+1):(i.x=(e.clientX-document.body.getBoundingClientRect().left)/s*2-1,i.y=-(e.clientY-document.body.getBoundingClientRect().top)/o*2+1),n.setFromCamera(i,$);var r=n.intersectObjects(D.children,!0);return r},loadTexture:function(){var e=this,t=a("e130");return new Promise((function(a){(new p["ib"]).load(t,(function(t){t.wrapS=t.wrapT=p["Y"],t.anisotropy=C.capabilities.getMaxAnisotropy();var n=new p["d"](500,500,500),i=new p["L"]({map:t}),s=new p["K"](n,i);s.position.y=-1e3,I.add(s),e.renderModel(),a(t)}))}))},initCabinetModelLocation:function(){var e=new p["c"],t=new p["kb"];D.children.forEach((function(t){"panel"===t.userData.meshType&&e.expandByObject(t)})),e.getCenter(t),D.position.x-=t.x,D.position.y-=t.y,D.position.z=0},setupGui:function(){O={shininess:40,ka:.17,kd:.51,ks:.2,metallic:!0,hue:.121,saturation:.73,lightness:.66,lhue:.04,lsaturation:.01,llightness:1,lx:.32,ly:.39,lz:.7,newTess:15,bottom:!0,lid:!0,body:!0,fitLid:!1,nonblinn:!1,newShading:"wireframe"}},renderModel:function(){O&&(T.color.setHSL(O.hue,O.saturation,O.lightness*O.ka),_.position.set(O.lx,O.ly,O.lz),_.color.setHSL(O.lhue,O.lsaturation,O.llightness)),C.render(I,$)},MakeMatrix4FromSoftware:function(e){var t=new p["J"];return t.set(e[0].x,e[1].x,e[2].x,e[3].x,e[0].y,e[1].y,e[2].y,e[3].y,e[0].z,e[1].z,e[2].z,e[3].z,e[0].w,e[1].w,e[2].w,e[3].w),t},onWindowResize:function(){var e=this;this.$nextTick((function(){var t=e.$refs.toolbar,a=e.$refs.panelData;if(t){var n=document.documentElement.clientHeight;document.getElementById("panelScan").style.height=n+"px";var i=t.offsetHeight,s=window.innerWidth-(a?a.offsetWidth:0),o=window.innerHeight-i;$.aspect=s/o,$.updateProjectionMatrix(),C.setSize(s,o)}}))},clearAllPanelCache:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].clearStoreData(this.IndexedDB,"model","panelId");case 2:t=e.sent,t&&(console.log("清空缓存成功"),m.setCookie("loadedTime",new Date));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),checkCookie:function(){var e=m.getCookie("loadedTime");e||this.clearAllPanelCache()},clickToolbar:function(e){switch(this.selectedIndex=e,e){case 0:this.isAllPanelLoaded?this.showModelList=!0:this.dataLoadingException?this.$toast("".concat(this.$t("info.53"),"！")):this.$toast("".concat(this.$t("info.54"),"！"));break;case 1:this.isAllPanelLoaded?this.$router.push({name:"scanPage",params:{panelCodeList:this.panelCodeList}}):this.$toast("".concat(this.$t("info.54"),"！"));break;case 2:var t=this.handleToolbarText(e);this.restoreDefaultMaterials(),this.explodeOrRestore(t===this.$t("info.35"));break;case 3:var a=this.handleToolbarText(e);this.showOrHideAllDoorPanel(a===this.$t("info.36"));break;case 4:var n=this.handleToolbarText(e);this.showOrHideNumbers(n===this.$t("info.39"));break;case 5:0,this.$router.push({name:"orderDetail",params:{projectInfo:this.projectInfo}});break}},showAllPanel:function(){var e=this,t=this.toolbarList[4].activeName;D.children.forEach((function(a){"panel"===a.userData.meshType?a.visible=!0:"numberText"===a.userData.meshType?a.visible=t!==e.$t("info.38"):"hardware"===a.userData.meshType&&a.children.forEach((function(e){e.visible=!0}))})),this.toolbarList.forEach((function(t){"iconqiehuan1"===t.icon&&(t.activeName=e.$t("info.36"))})),this.renderModel()},clickGridIcon:function(){var e=this;this.showGrid=!this.showGrid,I.children.forEach((function(t){"GridHelper"===t.type&&(t.visible=!!e.showGrid),"AxesHelper"===t.type&&(t.visible=!1)})),localStorage.setItem("gridType",this.showGrid?"showGrid":"hideGrid"),this.renderModel()},changeModelState:function(){var e=this;D.children.forEach((function(t){"panel"!==t.userData.meshType||t.userData.isTargetPanel||(e.modelText===e.$t("info.31")?(t.material.wireframe=!0,t.material.opacity=0,t.material.transparent=!0):e.modelText===e.$t("info.46")&&(t.material.opacity=1,t.material.transparent=!1,t.material.wireframe=!1))})),this.modelText===this.$t("info.31")?(this.materialType="panelWireMaterial",this.modelText=this.$t("info.46")):(this.materialType="panelBasicMaterial",this.modelText=this.$t("info.31")),this.renderModel()},hideSelectedPanels:function(){if(this.selectedPanel){var e=this.selectedPanel.userData,t=e.meshType,a=e.panelNumber,n=e.panelId;"panel"===t?(D.children.forEach((function(e){e.userData.panelNumber===a&&(e.visible=!1),"hardware"===e.userData.meshType&&n===e.userData.panelId&&e.children.forEach((function(e){return e.visible=!1}))})),this.selectedPanel.visible=!1):"hardware"===t&&this.selectedPanel.children.forEach((function(e){return e.visible=!1})),this.renderModel()}else this.$toast("".concat(this.$t("info.55"),"！")),this.selectedIndex=void 0},clickPartList:function(){var e=this,t=this.modelList.find((function(t){return t.Id===e.defaultCstId}));t?this.currentCstData=Object(c["a"])({},t):this.$toast(this.$t("info.44")),this.showPartListLayer=!0}}},E=A,N=(a("3f2b"),a("2877")),B=Object(N["a"])(E,n,i,!1,null,"17c74b79",null);t["default"]=B.exports}}]);