chbim-plugins 0.2.3 → 0.2.4

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/chbim-plugins.js CHANGED
@@ -30405,7 +30405,7 @@ const C1 = () => {
30405
30405
  let f = c.options.modelId || c.options.vectorId;
30406
30406
  a[f] ? (window.bimModel.editColor(f), window.schemeEvnModify.clearAllModelModify({ isClone: !1 })) : c.remove();
30407
30407
  }
30408
- }), (o = window.bimEntity.entityLayer.getGraphicsByAttr()) == null || o.forEach((c) => {
30408
+ }), (o = window.bimEntity.entityLayer.getGraphics()) == null || o.forEach((c) => {
30409
30409
  c.remove();
30410
30410
  }), window.bimMapSetUp.undergroundVal(1), window.bimTerrainProvider.show(), window.bimTrafficSimulation.destruction(), window.bimRotatePoint.stop(), window.bimMapPTV.destruction(), window.romStop(), window.complete(), window.planClip.clearPlanClip();
30411
30411
  };
@@ -2699,4 +2699,4 @@ function print() { __p += __j.call(arguments, '') }
2699
2699
  * Subject to the terms at https://gsap.com/standard-license or for
2700
2700
  * Club GSAP members, the agreement issued with that membership.
2701
2701
  * @author: Jack Doyle, jack@greensock.com
2702
- */var Ed,ea,Nl,Dc,Wa,bd,zc,fg=function(){return typeof window<"u"},ms={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,Cd=1e8,kc=/([A-Z])/g,dg=/(left|right|width|margin|padding|x)/i,pg=/[\s,\(]\S/,qo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Bc=function(a,o){return o.set(o.t,o.p,Math.round((o.s+o.c*a)*1e4)/1e4+o.u,o)},mg=function(a,o){return o.set(o.t,o.p,a===1?o.e:Math.round((o.s+o.c*a)*1e4)/1e4+o.u,o)},gg=function(a,o){return o.set(o.t,o.p,a?Math.round((o.s+o.c*a)*1e4)/1e4+o.u:o.b,o)},vg=function(a,o){var c=o.s+o.c*a;o.set(o.t,o.p,~~(c+(c<0?-.5:.5))+o.u,o)},Ad=function(a,o){return o.set(o.t,o.p,a?o.e:o.b,o)},Pd=function(a,o){return o.set(o.t,o.p,a!==1?o.b:o.e,o)},yg=function(a,o,c){return a.style[o]=c},_g=function(a,o,c){return a.style.setProperty(o,c)},xg=function(a,o,c){return a._gsap[o]=c},wg=function(a,o,c){return a._gsap.scaleX=a._gsap.scaleY=c},Mg=function(a,o,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},Tg=function(a,o,c,f,u){var m=a._gsap;m[o]=c,m.renderTransform(u,m)},mn="transform",Rr=mn+"Origin",Sg=function x(a,o){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ms&&u){if(this.tfm=this.tfm||{},a!=="transform")a=qo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=gs(f,g)}):this.tfm[a]=m.x?m[a]:gs(f,a),a===Rr&&(this.tfm.zOrigin=m.zOrigin);else return qo.transform.split(",").forEach(function(g){return x.call(c,g,o)});if(this.props.indexOf(mn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Rr,o,"")),a=mn}(u||o)&&this.props.push(a,o,u[a])},Ld=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Eg=function(){var a=this.props,o=this.target,c=o.style,f=o._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?o[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(kc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),o.setAttribute("data-svg-origin",this.svgo||"")),u=zc(),(!u||!u.isStart)&&!c[mn]&&(Ld(c),f.zOrigin&&c[Rr]&&(c[Rr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Rd=function(a,o){var c={target:a,props:[],revert:Eg,save:Sg};return a._gsap||Lr.core.getCache(a),o&&o.split(",").forEach(function(f){return c.save(f)}),c},Od,Nc=function(a,o){var c=ea.createElementNS?ea.createElementNS((o||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):ea.createElement(a);return c&&c.style?c:ea.createElement(a)},Yo=function x(a,o,c){var f=getComputedStyle(a);return f[o]||f.getPropertyValue(o.replace(kc,"-$1").toLowerCase())||f.getPropertyValue(o)||!c&&x(a,Gl(o)||o,1)||""},Id="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,o,c){var f=o||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Id[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Id[m]:"")+a},Fc=function(){fg()&&window.document&&(Ed=window,ea=Ed.document,Nl=ea.documentElement,Wa=Nc("div")||{style:{}},Nc("div"),mn=Gl(mn),Rr=mn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Od=!!Gl("perspective"),zc=Lr.core.reverting,Dc=1)},Uc=function x(a){var o=Nc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,f=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(o),o.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(f?c.insertBefore(this,f):c.appendChild(this)),Nl.removeChild(o),this.style.cssText=u,m},Dd=function(a,o){for(var c=o.length;c--;)if(a.hasAttribute(o[c]))return a.getAttribute(o[c])},zd=function(a){var o;try{o=a.getBBox()}catch{o=Uc.call(a,!0)}return o&&(o.width||o.height)||a.getBBox===Uc||(o=Uc.call(a,!0)),o&&!o.width&&!o.x&&!o.y?{x:+Dd(a,["x","cx","x1"])||0,y:+Dd(a,["y","cy","y1"])||0,width:0,height:0}:o},kd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&zd(a))},Xa=function(a,o){if(o){var c=a.style,f;o in ms&&o!==Rr&&(o=mn),c.removeProperty?(f=o.substr(0,2),(f==="ms"||o.substr(0,6)==="webkit")&&(o="-"+o),c.removeProperty(f==="--"?o:o.replace(kc,"-$1").toLowerCase())):c.removeAttribute(o)}},ia=function(a,o,c,f,u,m){var g=new Pr(a._pt,o,c,0,1,m?Pd:Ad);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},Bd={deg:1,rad:1,turn:1},bg={grid:1,flex:1},na=function x(a,o,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,v=dg.test(o),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(v?"Width":"Height"),O=100,k=f==="px",R=f==="%",F,E,P,w;if(f===m||!u||Bd[f]||Bd[m])return u;if(m!=="px"&&!k&&(u=x(a,o,c,"px")),w=a.getCTM&&kd(a),(R||m==="%")&&(ms[o]||~o.indexOf("adius")))return F=w?a.getBBox()[v?"width":"height"]:a[b],On(R?u/F*O:u/100*F);if(g[v?"width":"height"]=O+(k?m:f),E=~o.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,w&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===ea||!E.appendChild)&&(E=ea.body),P=E._gsap,P&&R&&P.width&&v&&P.time===qr.time&&!P.uncache)return On(u/P.width*O);if(R&&(o==="height"||o==="width")){var T=a.style[o];a.style[o]=O+f,F=a[b],T?a.style[o]=T:Xa(a,o)}else(R||m==="%")&&!bg[Yo(E,"display")]&&(g.position=Yo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return v&&R&&(P=Na(E),P.time=qr.time,P.width=E[b]),On(k?F*u/O:F&&u?O/F*u:0)},gs=function(a,o,c,f){var u;return Dc||Fc(),o in qo&&o!=="transform"&&(o=qo[o],~o.indexOf(",")&&(o=o.split(",")[0])),ms[o]&&o!=="transform"?(u=Lh(a,f),u=o!=="transformOrigin"?u[o]:u.svg?u.origin:Su(Yo(a,Rr))+" "+u.zOrigin+"px"):(u=a.style[o],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[o]&&Tu[o](a,o,c)||Yo(a,o)||Gf(a,o)||(o==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?na(a,o,u,c)+c:u},Cg=function(a,o,c,f){if(!c||c==="none"){var u=Gl(o,a,1),m=u&&Yo(a,u,1);m&&m!==c?(o=u,c=m):o==="borderColor"&&(c=Yo(a,"borderTopColor"))}var g=new Pr(this._pt,a.style,o,0,1,wd),v=0,S=0,b,O,k,R,F,E,P,w,T,I,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[o],a.style[o]=f,f=Yo(a,o)||f,E?a.style[o]=E:Xa(a,o)),b=[c,f],cd(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;O=Ol.exec(f);)P=O[0],T=f.substring(v,O.index),F?F=(F+1)%5:(T.substr(-5)==="rgba("||T.substr(-5)==="hsla(")&&(F=1),P!==(E=k[S++]||"")&&(R=parseFloat(E)||0,C=E.substr((R+"").length),P.charAt(1)==="="&&(P=Il(R,P)+C),w=parseFloat(P),I=P.substr((w+"").length),v=Ol.lastIndex-I.length,I||(I=I||Vr.units[o]||C,v===f.length&&(f+=I,g.e+=I)),C!==I&&(R=na(a,o,E,I)||0),g._pt={_next:g._pt,p:T||S===1?T:",",s:R,c:w-R,m:F&&F<4||o==="zIndex"?Math.round:0});g.c=v<f.length?f.substring(v,f.length):""}else g.r=o==="display"&&f==="none"?Pd:Ad;return Df.test(f)&&(g.e=0),this._pt=g,g},Nd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Ag=function(a){var o=a.split(" "),c=o[0],f=o[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),o[0]=Nd[c]||c,o[1]=Nd[f]||f,o.join(" ")},Pg=function(a,o){if(o.tween&&o.tween._time===o.tween._dur){var c=o.t,f=c.style,u=o.u,m=c._gsap,g,v,S;if(u==="all"||u===!0)f.cssText="",v=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ms[g]&&(v=1,g=g==="transformOrigin"?Rr:mn),Xa(c,g);v&&(Xa(c,mn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Ld(f)))}},Tu={clearProps:function(a,o,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Pr(a._pt,o,c,0,0,Pg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Fd={},Ud=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Gd=function(a){var o=Yo(a,mn);return Ud(o)?Ph:o.substr(7).match(If).map(On)},Gc=function(a,o){var c=a._gsap||Na(a),f=a.style,u=Gd(a),m,g,v,S;return c.svg&&a.getAttribute("transform")?(v=a.transform.baseVal.consolidate().matrix,u=[v.a,v.b,v.c,v.d,v.e,v.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(v=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Gd(a),v?f.display=v:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),o&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Hc=function(a,o,c,f,u,m){var g=a._gsap,v=u||Gc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,O=g.xOffset||0,k=g.yOffset||0,R=v[0],F=v[1],E=v[2],P=v[3],w=v[4],T=v[5],I=o.split(" "),C=parseFloat(I[0])||0,U=parseFloat(I[1])||0,N,X,J,Z;c?v!==Ph&&(X=R*P-F*E)&&(J=C*(P/X)+U*(-E/X)+(E*T-P*w)/X,Z=C*(-F/X)+U*(R/X)-(R*T-F*w)/X,C=J,U=Z):(N=zd(a),C=N.x+(~I[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(I[1]||I[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(w=C-S,T=U-b,g.xOffset=O+(w*R+T*E)-w,g.yOffset=k+(w*F+T*P)-T):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=o,g.originIsAbsolute=!!c,a.style[Rr]="0px 0px",m&&(ia(m,g,"xOrigin",S,C),ia(m,g,"yOrigin",b,U),ia(m,g,"xOffset",O,g.xOffset),ia(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,o){var c=a._gsap||new md(a);if("x"in c&&!o&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",v=getComputedStyle(a),S=Yo(a,Rr)||"0",b,O,k,R,F,E,P,w,T,I,C,U,N,X,J,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=O=k=E=P=w=T=I=C=0,R=F=1,c.svg=!!(a.getCTM&&kd(a)),v.translate&&((v.translate!=="none"||v.scale!=="none"||v.rotate!=="none")&&(f[mn]=(v.translate!=="none"?"translate3d("+(v.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(v.rotate!=="none"?"rotate("+v.rotate+") ":"")+(v.scale!=="none"?"scale("+v.scale.split(" ").join(",")+") ":"")+(v[mn]!=="none"?v[mn]:"")),f.scale=f.rotate=f.translate="none"),X=Gc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!o&&a.getAttribute("data-svg-origin"),Hc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],tt=X[1],_t=X[2],G=X[3],b=Pt=X[4],O=Et=X[5],X.length===6?(R=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,T=_t||G?Ul(_t,G)*ja+E:0,T&&(F*=Math.abs(Math.cos(T*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),O-=N-(U*tt+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],O=X[13],k=X[14],J=Ul(Wt,Nt),P=J*ja,J&&(Z=Math.cos(-J),ct=Math.sin(-J),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),J=Ul(-_t,Nt),w=J*ja,J&&(Z=Math.cos(-J),ct=Math.sin(-J),At=Rt*Z-Ft*ct,ce=tt*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,tt=ce,_t=re),J=Ul(tt,Rt),E=J*ja,J&&(Z=Math.cos(J),ct=Math.sin(J),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),P&&Math.abs(P)+Math.abs(E)>359.9&&(P=E=0,w=180-w),R=On(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=On(Math.sqrt(Et*Et+Wt*Wt)),J=Ul(Pt,Et),T=Math.abs(J)>2e-4?J*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Ud(Yo(a,mn)),At&&a.setAttribute("transform",At))),Math.abs(T)>90&&Math.abs(T)<270&&(u?(R*=-1,T+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,T+=T<=0?180:-180)),o=o||c.uncache,c.x=b-((c.xPercent=b&&(!o&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=O-((c.yPercent=O&&(!o&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-O)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=On(R),c.scaleY=On(F),c.rotation=On(E)+g,c.rotationX=On(P)+g,c.rotationY=On(w)+g,c.skewX=T+g,c.skewY=I+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!o&&c.zOrigin||0)&&(f[Rr]=Su(S)),c.xOffset=c.yOffset=0,c.force3D=Vr.force3D,c.renderTransform=c.svg?Rg:Od?Hd:Lg,c.uncache=0,c},Su=function(a){return(a=a.split(" "))[0]+" "+a[1]},Vc=function(a,o,c){var f=sr(o);return On(parseFloat(o)+parseFloat(na(a,"x",c+"px",f)))+f},Lg=function(a,o){o.z="0px",o.rotationY=o.rotationX="0deg",o.force3D=0,Hd(a,o)},qa="0deg",Rh="0px",Ya=") ",Hd=function(a,o){var c=o||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,v=c.z,S=c.rotation,b=c.rotationY,O=c.rotationX,k=c.skewX,R=c.skewY,F=c.scaleX,E=c.scaleY,P=c.transformPerspective,w=c.force3D,T=c.target,I=c.zOrigin,C="",U=w==="auto"&&a&&a!==1||w===!0;if(I&&(O!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),J=Math.cos(N),Z;N=parseFloat(O)*Fl,Z=Math.cos(N),m=Vc(T,m,X*Z*-I),g=Vc(T,g,-Math.sin(N)*-I),v=Vc(T,v,J*Z*-I+I)}P!==Rh&&(C+="perspective("+P+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||v!==Rh)&&(C+=v!==Rh||U?"translate3d("+m+", "+g+", "+v+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),O!==qa&&(C+="rotateX("+O+Ya),(k!==qa||R!==qa)&&(C+="skew("+k+", "+R+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),T.style[mn]=C||"translate(0, 0)"},Rg=function(a,o){var c=o||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,v=c.rotation,S=c.skewX,b=c.skewY,O=c.scaleX,k=c.scaleY,R=c.target,F=c.xOrigin,E=c.yOrigin,P=c.xOffset,w=c.yOffset,T=c.forceCSS,I=parseFloat(m),C=parseFloat(g),U,N,X,J,Z;v=parseFloat(v),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,v+=b),v||S?(v*=Fl,S*=Fl,U=Math.cos(v)*O,N=Math.sin(v)*O,X=Math.sin(v-S)*-k,J=Math.cos(v-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,J*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=On(U),N=On(N),X=On(X),J=On(J)):(U=O,J=k,N=X=0),(I&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(I=na(R,"x",m,"px"),C=na(R,"y",g,"px")),(F||E||P||w)&&(I=On(I+F-(F*U+E*X)+P),C=On(C+E-(F*N+E*J)+w)),(f||u)&&(Z=R.getBBox(),I=On(I+f/100*Z.width),C=On(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+J+","+I+","+C+")",R.setAttribute("transform",Z),T&&(R.style[mn]=Z)},Og=function(a,o,c,f,u){var m=360,g=jn(u),v=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=v-f,b=f+S+"deg",O,k;return g&&(O=u.split("_")[1],O==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),O==="cw"&&S<0?S=(S+m*Cd)%m-~~(S/m)*m:O==="ccw"&&S>0&&(S=(S-m*Cd)%m-~~(S/m)*m)),a._pt=k=new Pr(a._pt,o,c,f,S,mg),k.e=b,k.u="deg",a._props.push(c),k},Vd=function(a,o){for(var c in o)a[c]=o[c];return a},Ig=function(a,o,c){var f=Vd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,v,S,b,O,k,R,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[mn]=o,g=Lh(c,1),Xa(c,mn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[mn],m[mn]=o,g=Lh(c,1),m[mn]=S);for(v in ms)S=f[v],b=g[v],S!==b&&u.indexOf(v)<0&&(R=sr(S),F=sr(b),O=R!==F?na(c,v,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Pr(a._pt,g,v,O,k-O,Bc),a._pt.u=F||0,a._props.push(v));Vd(g,f)};Ar("padding,margin,Width,Radius",function(x,a){var o="Top",c="Right",f="Bottom",u="Left",m=(a<3?[o,c,f,u]:[o+u,o+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,v,S,b,O){var k,R;if(arguments.length<4)return k=m.map(function(F){return gs(g,F,S)}),R=k.join(" "),R.split(k[0]).length===5?k[0]:R;k=(b+"").split(" "),R={},m.forEach(function(F,E){return R[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(v,R,O)}});var Wd={name:"css",register:Fc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,o,c,f,u){var m=this._props,g=a.style,v=c.vars.startAt,S,b,O,k,R,F,E,P,w,T,I,C,U,N,X,J;Dc||Fc(),this.styles=this.styles||Rd(a),J=this.styles.props,this.tween=c;for(E in o)if(E!=="autoRound"&&(b=o[E],!(jr[E]&&gd(E,o,c,f,a,u)))){if(R=typeof b,F=Tu[E],R==="function"&&(b=b.call(c,f,a,u),R=typeof b),R==="string"&&~b.indexOf("random(")&&(b=Th(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",Qs.lastIndex=0,Qs.test(S)||(P=sr(S),w=sr(b)),w?P!==w&&(S=na(a,E,S,w)+w):P&&(b+=P),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),J.push(E,0,g[E]);else if(R!=="undefined"){if(v&&E in v?(S=typeof v[E]=="function"?v[E].call(c,f,a,u):v[E],jn(S)&&~S.indexOf("random(")&&(S=Th(S)),sr(S+"")||S==="auto"||(S+=Vr.units[E]||sr(gs(a,E))||""),(S+"").charAt(1)==="="&&(S=gs(a,E))):S=gs(a,E),k=parseFloat(S),T=R==="string"&&b.charAt(1)==="="&&b.substr(0,2),T&&(b=b.substr(2)),O=parseFloat(b),E in qo&&(E==="autoAlpha"&&(k===1&&gs(a,"visibility")==="hidden"&&O&&(k=0),J.push("visibility",0,g.visibility),ia(this,g,"visibility",k?"inherit":"hidden",O?"inherit":"hidden",!O)),E!=="scale"&&E!=="transform"&&(E=qo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),I=E in ms,I){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!o.parseTransform||Lh(a,o.parseTransform),N=o.smoothOrigin!==!1&&U.smooth,C=this._pt=new Pr(this._pt,g,mn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Pr(this._pt,U,"scaleY",U.scaleY,(T?Il(U.scaleY,T+O):O)-U.scaleY||0,Bc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){J.push(Rr,0,g[Rr]),b=Ag(b),U.svg?Hc(a,b,0,N,0,this):(w=parseFloat(b.split(" ")[2])||0,w!==U.zOrigin&&ia(this,U,"zOrigin",U.zOrigin,w),ia(this,g,E,Su(S),Su(b)));continue}else if(E==="svgOrigin"){Hc(a,b,1,N,0,this);continue}else if(E in Fd){Og(this,U,E,k,T?Il(k,T+b):b);continue}else if(E==="smoothOrigin"){ia(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Ig(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(I||(O||O===0)&&(k||k===0)&&!pg.test(b)&&E in g)P=(S+"").substr((k+"").length),O||(O=0),w=sr(b)||(E in Vr.units?Vr.units[E]:P),P!==w&&(k=na(a,E,S,w)),this._pt=new Pr(this._pt,I?U:g,E,k,(T?Il(k,T+O):O)-k,!I&&(w==="px"||E==="zIndex")&&o.autoRound!==!1?vg:Bc),this._pt.u=w||0,P!==w&&w!=="%"&&(this._pt.b=S,this._pt.r=gg);else if(E in g)Cg.call(this,a,E,S,T?T+b:b);else if(E in a)this.add(a,E,S||a[E],T?T+b:b,f,u);else if(E!=="parseTransform"){cc(E,b);continue}I||(E in g?J.push(E,0,g[E]):J.push(E,1,S||a[E])),m.push(E)}}X&&Md(this)},render:function(a,o){if(o.tween._time||!zc())for(var c=o._pt;c;)c.r(a,c.d),c=c._next;else o.styles.revert()},get:gs,aliases:qo,getSetter:function(a,o,c){var f=qo[o];return f&&f.indexOf(",")<0&&(o=f),o in ms&&o!==Rr&&(a._gsap.x||gs(a,"x"))?c&&bd===c?o==="scale"?wg:xg:(bd=c||{})&&(o==="scale"?Mg:Tg):a.style&&!oc(a.style[o])?yg:~o.indexOf("-")?_g:Pc(a,o)},core:{_removeProperty:Xa,_getMatrix:Gc}};Lr.utils.checkPrefix=Gl,Lr.core.getStyleSaver=Rd,function(x,a,o,c){var f=Ar(x+","+a+","+o,function(u){ms[u]=1});Ar(a,function(u){Vr.units[u]="deg",Fd[u]=1}),qo[f[13]]=x+","+a,Ar(c,function(u){var m=u.split(":");qo[m[1]]=f[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Ar("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Vr.units[x]="px"}),Lr.registerPlugin(Wd);var Wc=Lr.registerPlugin(Wd)||Lr;Wc.core.Tween;class Dg{constructor(a,o=!1){window.mars3d&&(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=o)}add(a,o){let c=a.options.symbol.styleOptions.label.font_size,f=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:v,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(O=>{O.style.label&&this.DynamicMaskingArr.push({id:f,uid:O.id,position:O._getLablePosition(),label:O.name,width:O.name?u*O.name.length:0,height:m,color:v,outline:o.label.outline,outlineColor:S,background:o.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(o.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(o.label.color),outlineColor:this.Cesium.Color.fromCssColorString(o.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:o.label.outline,background:o.label.background,color:this.Cesium.Color.fromCssColorString(o.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(o.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(o.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(o=>o.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(o=>o.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,o){let{label:c}=o;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:v}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(f!=null&&(S.color=this.Cesium.Color.fromCssColorString(f),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(f)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),v!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(v),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(v)))})}}getBoundingRectangle(a){var o=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return o!==void 0?new this.Cesium.BoundingRectangle(o.x,o.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var o=0;o<this.DynamicMaskingArr.length;o++){let f=!1,u=this.DynamicMaskingArr[o],m,g,v;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(o);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],v=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,v)){f=!0;break}f||a.push(o)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let o={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},f=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!f.has(g))),m=new Set([...f].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Wc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var v=this.DynamicMaskingArr[g];v.backgroundColor.alpha=c.backgroundColor,v.color.alpha=c.color,v.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(v.id,"vectorId"))==null?void 0:S.getGraphicByAttr(v.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let v=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:O}=v.dynamicMaskingColor;var a=Wc.to(o,{duration:.8+Math.random(),color:b.alpha,outlineColor:O.alpha,backgroundColor:S.alpha,onUpdate:()=>{var R,F;v.backgroundColor.alpha=o.backgroundColor,v.color.alpha=o.color,v.outlineColor.alpha=o.outlineColor,(F=(R=window.map.getLayer(v.id,"vectorId"))==null?void 0:R.getGraphicByAttr(v.uid))==null||F.setStyle({label:{show:!0,outline:v.outline,background:v.background,color:v.color,outlineColor:v.outlineColor,backgroundColor:v.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(o=>{var c;if((c=o.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=o.options.symbol.styleOptions.label;o.eachGraphic(g=>{g.setStyle({label:{color:f.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let o;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:v,vectorId:S}=c;o=window.map.getLayer(S,"vectorId"),o&&o.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:v,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const zg=()=>{var x,a;window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},kg=()=>{var x,a;window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},Bg=()=>{var x,a;window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},Ng=x=>{let a=[];if(x.forEach(o=>{let{id:c}=o,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};o.operate.forEach((u,m)=>{let g=jc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let o=1;o<a.length;o++){let c=a[o].mockData,f=a[o-1].mockData.item;const u=new Map;f.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"&&m.type!="gltf"?u.set(`${m.screenplayId}-${m.type}`,m):a[o].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let v={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[o].mockData.previousPage.unshift(u.get(g)),v=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){v[b]=jd(u.get(g)[b],m[b]);let O={screenplayId:m.screenplayId,type:m.type};O[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?O[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(O[b][k]="false")}),S={...O,...S}}else S[b]=u.get(g)[b],v[b]=m[b];else a[o].mockData.previousPage.some(O=>O.screenplayId===m.screenplayId)||(S={...Xd(m,b),...S}),v[b]=m[b]}),Object.keys(S).length>0&&a[o].mockData.previousPage.push(S)}u.set(g,v)}else{let S=Xd(m);S&&a[o].mockData.previousPage.push(S),u.set(g,m)}}),a[o].mockData.item=Array.from(u.values())}return a},jc=(x,a=null)=>{let{executionProperty:o,screenplayId:c,property:f,type:u,delay:m,delayTime:g}=x;if((f=="add"||f==!0)&&(f="true"),(f=="remove"||f==!1)&&(f="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=f,f=b,c=S.modelId,o=S.type}}let v;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(f);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:O,secondaryScreen:k}=JSON.parse(x.property);O.forEach(F=>{jc(F,a)});let R=a.find(F=>F.type=="splitScreen");k.forEach(F=>{jc(F,R.executionProperty.mapClone)})}else v={screenplayId:c,type:u,executionProperty:f},(o=="clip"||o=="flat")&&(v[o]=f),m&&(v.delay=m),g&&(v.delayTime=g),a&&(u=="flight"?a.unshift(v):a.push(v));else v=a?a.find(S=>S.screenplayId==c):null,v?(o=="clip"||o=="flat"?v[o]?v[o]=jd(v[o],f):(v[o]=f,v.type="model"):v[o]=f,m&&(v[o].delay=m),g&&(v[o].delayTime=g)):(v={screenplayId:c,type:u},m&&(v.delay=m),g&&(v.delayTime=g),o=="clip"||o=="flat"?(v[o]=f,v.type="model"):v[o]=f,a&&(u=="flight"?a.unshift(v):a.push(v)));return a||v},jd=(x,a)=>{const o={...x};for(const c in a)a.hasOwnProperty(c)&&(o[c]=a[c]);return o},Xd=(x,a="all")=>{let{type:o,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,v={};if(a=="all")switch(o){case"model":case"shp":case"plot":c&&c=="true"&&(v={screenplayId:f,type:o,show:"false"}),u&&(v={...v,screenplayId:f,type:o,overallStaining:"false"}),m&&(v={...v,screenplayId:f,type:o,clip:"false"}),g&&(v={...v,screenplayId:f,type:o,flat:"false"});break;case"terrain":v={screenplayId:f,type:o,executionProperty:"true"};break;case"pit":v={screenplayId:f,type:o,executionProperty:"false"};break;case"underground":v={screenplayId:f,type:o,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":v={screenplayId:f,type:o},v[a]="false";break}return Object.keys(v).length>0?v:null},Fg=(x,a)=>{const o={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(o[c]=x[c])}),o},Ug=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Gg=x=>{var o;let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(c=>{let{executionProperty:f,screenplayId:u,property:m,type:g}=c;(f=="show"||f=="overallStaining")&&(a[u]||(a[u]={type:g}),a[u][m]=f)}),window.map.getLayers().forEach(c=>{if((c.type=="3dtiles"||c.type=="geojson"||c.type=="tileset")&&c.options.name!="国界"){let f=c.options.modelId||c.options.vectorId;a[f]?(window.bimModel.editColor(f),window.schemeEvnModify.clearAllModelModify({isClone:!1})):c.remove()}}),(o=window.bimEntity.entityLayer.getGraphicsByAttr())==null||o.forEach(c=>{c.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Hg{constructor(a){Vo(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Vo(this,"terrainCutById",(a,o,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==o))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:o});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==o))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:o});break}});Vo(this,"clearTerrainCutById",(a,o)=>{switch(o==null?void 0:o.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Vo(this,"terrainFlattenById",(a,o,c,f)=>{switch(f==null?void 0:f.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:o});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:o});break}});Vo(this,"clearTerrainFlattenById",(a,o)=>{switch(o==null?void 0:o.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const o=this.flattenedEvnModifyData.find(c=>c.id==a);return o||null}getModelFromMapById(a,o){let c;switch(o==null?void 0:o.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,o,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(o.length>1?o:o[0],{id:c}),f==null?void 0:f.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,o,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(o.length>1?o:o[0],{height:c,id:f}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,o,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(o),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,o,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(o),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,v,b,o):u===0&&m===1?this.modelFlattenById(f,v,S,b,o):u===1&&m===0?this.terrainCutById(v,b,o):u===1&&m===1&&this.terrainFlattenById(v,S,b,o)}}evnModifyByIdAndAddOptionsToStore(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,v,b,o):u===0&&m===1?this.modelFlattenById(f,v,S,b,o):u===1&&m===0?this.terrainCutById(v,b,o):u===1&&m===1&&this.terrainFlattenById(v,S,b,o)}}clearEvnModifyById(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=c.bimEnvModifyData[g].id;u===0&&m===0?this.clearModelCutById(f,v,o):u===0&&m===1?this.clearModelFlattenById(f,v,o):u===1&&m===0?this.clearTerrainCutById(v,o):u===1&&m===1&&this.clearTerrainFlattenById(v,o)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(o=>{const c=bimModel.queryModel(o,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(o=>{const c=bimModel.queryModel(o,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break;case!1:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break}}getModelModifyDataForInitModelById(a){const o=this.getDataFromFlattenedEvnModifyListById(a);if(!o)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=o;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<o.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(o.bimEnvModifyData[g].modifyData).coordinates),id:o.bimEnvModifyData[g].id};m.area.push(S)}return m}else if(f===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<o.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(o.bimEnvModifyData[g].modifyData).coordinates),S={id:o.bimEnvModifyData[g].id,positions:v,height:JSON.parse(o.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Za=null,vs=null,un=null,Oh=null,qd=null;class Vg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,o,c){vs=new mars3d.layer.GraphicLayer({isContinued:!0}),qd=new mars3d.layer.GraphicLayer({isContinued:!0}),window.map.addLayer(qd);var f=this;window.map.addLayer(vs),vs.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;o(m),setTimeout(()=>{f.startDrawGraphic()},500)}),vs.on(mars3d.EventType.editStop,function(u){}),un=c,Za=new mars3d.layer.GraphicLayer,window.map.addLayer(Za),a.length<=1e3?this.viewPoints=a:this.viewPoints=a.filter((u,m)=>{if(m%100==0)return u}),un.Viewovalue==1||un.Viewovalue==4?this.calculateAngle(this.viewPoints):this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a){Oh=new mars3d.graphic.PolylinePrimitive({positions:a.map(o=>[o.lng,o.lat,o.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:{}.VITE_APP_PUBLIC_PATH+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}}),Za.addGraphic(Oh)}getAzimuth(a,o,c,f){const u=R=>R*Math.PI/180,m=R=>R*180/Math.PI,g=u(o),v=u(f),S=u(c-a),b=Math.sin(S)*Math.cos(v),O=Math.cos(g)*Math.sin(v)-Math.sin(g)*Math.cos(v)*Math.cos(S);let k=Math.atan2(b,O);return(m(k)+360)%360}calculateAngle(a){var o=a,c=o.map((f,u)=>{if(u<o.length-1){Cesium.Cartesian3.fromRadians(f.lng,f.lat,f.alt),Cesium.Cartesian3.fromRadians(o[u+1].lng,o[u+1].lat,o[u+1].alt);var m=this.getAzimuth(f.lng,f.lat,o[u+1].lng,o[u+1].lat);const g=new mars3d.graphic.PolylinePrimitive({positions:[a[u-1],a[u]],style:{width:1,color:"rgba(200,200,200,0 )"}});return Za.addGraphic(g),un.Viewovalue==4&&(un.followedX=-1,un.followedZ=f.alt+2),{lng:f.lng,lat:f.lat,alt:f.alt?f.alt+un.followedZ*1:un.followedZ*1,heading:m,pitch:un.followedX*1,duration:(g.distance/un.speed).toFixed(2),stop:0}}});this.viewPoints=c}addGraphicLayer(a){var o=Cesium.Cartesian3.fromRadians(a[0].lng,a[0].lat,a[0].alt),c=Cesium.Cartesian3.fromRadians(a[1].lng,a[1].lat,a[1].alt),f=mars3d.MeasureUtil.getAngle(o,c,!0),u={};un.Viewovalue==1?u={camera:{type:"dy",followedX:un.followedX,followedZ:un.followedZ},interpolation:!0,interpolationDegree:10,autoMiddleDynamicPosition:!0,autoMiddleTimePosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:un.Viewovalue==2?u={camera:{type:"gs",pitch:un.followedX,heading:f,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("rgba(200,200,200,0 )")}}:un.Viewovalue==4?u={camera:{type:"dy",followedX:100,followedZ:1}}:u={camera:{type:"sd",followedZ:un.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("rgba(200,200,200,0 )")}},a=a.map(g=>[g.lng,g.lat,g.alt]),a.length;var m={type:"time",list:a,interpolationAlgorithm:Cesium.HermitePolynomialApproximation,interpolation:!0,speed:un.speed,interpolationDegree:2};this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",autoStop:!0,position:m,offsetHeight:1.6,clockLoop:!0,...u}),Za.addGraphic(this.fixedRoute)}getAzimuthFromCartesian(a,o){const c=F=>F*180/Math.PI,f=Cesium.Cartographic.fromCartesian(a),u=Cesium.Cartographic.fromCartesian(o),m=f.longitude,g=f.latitude,v=u.longitude,S=u.latitude,b=v-m,O=Math.sin(b)*Math.cos(S),k=Math.cos(g)*Math.sin(S)-Math.sin(g)*Math.cos(S)*Math.cos(b);let R=Math.atan2(O,k);return(c(R)+360)%360}addDemoGraphic(a,o){Oh=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,label:{text:o,pixelOffsetY:-50}}}),vs.addGraphic(Oh)}startDrawGraphic(a){vs.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,pixelOffsetY:-20,classificationType:Cesium.ClassificationType.TERRAIN}}).then(o=>{})}start(){Oh.remove(),un.Viewovalue==1||un.Viewovalue==4?map.setCameraViewList(this.viewPoints,{maximumHeight:1}):(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){(un.Viewovalue==1||un.Viewovalue==4)&&map.pauseCameraViewList(),this.fixedRoute&&this.fixedRoute.pause()}resume(){(un.Viewovalue==1||un.Viewovalue==4)&&map.proceedCameraViewList(),this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop(),window.map.pauseCameraViewList()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Za,!0),window.map.removeLayer(vs,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1}removeCameraRoute(){Za.clear(),vs.clear()}removegraphicLayerpoint(){vs.clear()}}class Wg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let o=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:o},style:{...this.style}}).then(f=>{c({id:o,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let o;a.forEach(c=>{let{id:f}=c;o=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(o)})}positionLine(a){let o=this.queryTrafficSimulationLine(a);o&&o.flyTo({scale:2})}deleteLine(a){let o=this.queryTrafficSimulationLine(a);o&&o.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,o=!0){let c=this.queryTrafficSimulationLine(a);o?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,o){let c=this.queryTrafficSimulationLine(a);c.positions=o,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(o=>o.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let o=new Date,c=o.getDate();o.setDate(c+1),this.endDate=o.toISOString(),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),this.style.materialOptions.color="#4ac2ff",window.map.bimMapEdit="0"}processingData(a){let o=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],f=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;f.forEach((g,v)=>{let S=0,b=0,{pointSet:O,interval:k,speed:R}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(O));E.forEach((w,T)=>{T>0&&(u=parseFloat((this.disTance(w,E[T-1].slice(1))/R).toFixed(2)),S+=u),T==0&&(S=b),w.unshift(S)}),b+=k,c=E.reduce((w,T)=>w.concat(T));let P={name:`${v}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};o.push(P)}});let m={name:"交通模拟",czmlId:a,data:o,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,o){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...o),u=window.Cesium.Cartesian3.distance(c,f),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const jg=[Tf,bf],Xg={continuation:null,mapModali:null,install(x){if(jg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Sf),o=document.createElement("div"),c=document.body;if(c.appendChild(o),this.loading=a.mount(o),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Ef),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=bf,Pi.BimCutscenes=Sf,Pi.BimElevationImage=fm,Pi.BimEntity=pm,Pi.BimModel=lm,Pi.BimModify=Hg,Pi.BimTerrainProvider=cm,Pi.BimTrafficSimulation=Wg,Pi.BimVector=um,Pi.Bimroaming=Vg,Pi.Button=Tf,Pi.ChbimPlugins=Xg,Pi.DynamicMasking=Dg,Pi.MapModali=Ef,Pi.PanoramicView=_m,Pi.ViewShed=dm,Pi.getSameKeyData=Fg,Pi.init=zg,Pi.initMap=Gg,Pi.isValidRGBA=Ug,Pi.nextPage=Bg,Pi.operateMapData=Ng,Pi.previousPage=kg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
2702
+ */var Ed,ea,Nl,Dc,Wa,bd,zc,fg=function(){return typeof window<"u"},ms={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,Cd=1e8,kc=/([A-Z])/g,dg=/(left|right|width|margin|padding|x)/i,pg=/[\s,\(]\S/,qo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Bc=function(a,o){return o.set(o.t,o.p,Math.round((o.s+o.c*a)*1e4)/1e4+o.u,o)},mg=function(a,o){return o.set(o.t,o.p,a===1?o.e:Math.round((o.s+o.c*a)*1e4)/1e4+o.u,o)},gg=function(a,o){return o.set(o.t,o.p,a?Math.round((o.s+o.c*a)*1e4)/1e4+o.u:o.b,o)},vg=function(a,o){var c=o.s+o.c*a;o.set(o.t,o.p,~~(c+(c<0?-.5:.5))+o.u,o)},Ad=function(a,o){return o.set(o.t,o.p,a?o.e:o.b,o)},Pd=function(a,o){return o.set(o.t,o.p,a!==1?o.b:o.e,o)},yg=function(a,o,c){return a.style[o]=c},_g=function(a,o,c){return a.style.setProperty(o,c)},xg=function(a,o,c){return a._gsap[o]=c},wg=function(a,o,c){return a._gsap.scaleX=a._gsap.scaleY=c},Mg=function(a,o,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},Tg=function(a,o,c,f,u){var m=a._gsap;m[o]=c,m.renderTransform(u,m)},mn="transform",Rr=mn+"Origin",Sg=function x(a,o){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ms&&u){if(this.tfm=this.tfm||{},a!=="transform")a=qo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=gs(f,g)}):this.tfm[a]=m.x?m[a]:gs(f,a),a===Rr&&(this.tfm.zOrigin=m.zOrigin);else return qo.transform.split(",").forEach(function(g){return x.call(c,g,o)});if(this.props.indexOf(mn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Rr,o,"")),a=mn}(u||o)&&this.props.push(a,o,u[a])},Ld=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Eg=function(){var a=this.props,o=this.target,c=o.style,f=o._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?o[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(kc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),o.setAttribute("data-svg-origin",this.svgo||"")),u=zc(),(!u||!u.isStart)&&!c[mn]&&(Ld(c),f.zOrigin&&c[Rr]&&(c[Rr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Rd=function(a,o){var c={target:a,props:[],revert:Eg,save:Sg};return a._gsap||Lr.core.getCache(a),o&&o.split(",").forEach(function(f){return c.save(f)}),c},Od,Nc=function(a,o){var c=ea.createElementNS?ea.createElementNS((o||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):ea.createElement(a);return c&&c.style?c:ea.createElement(a)},Yo=function x(a,o,c){var f=getComputedStyle(a);return f[o]||f.getPropertyValue(o.replace(kc,"-$1").toLowerCase())||f.getPropertyValue(o)||!c&&x(a,Gl(o)||o,1)||""},Id="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,o,c){var f=o||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Id[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Id[m]:"")+a},Fc=function(){fg()&&window.document&&(Ed=window,ea=Ed.document,Nl=ea.documentElement,Wa=Nc("div")||{style:{}},Nc("div"),mn=Gl(mn),Rr=mn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Od=!!Gl("perspective"),zc=Lr.core.reverting,Dc=1)},Uc=function x(a){var o=Nc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,f=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(o),o.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(f?c.insertBefore(this,f):c.appendChild(this)),Nl.removeChild(o),this.style.cssText=u,m},Dd=function(a,o){for(var c=o.length;c--;)if(a.hasAttribute(o[c]))return a.getAttribute(o[c])},zd=function(a){var o;try{o=a.getBBox()}catch{o=Uc.call(a,!0)}return o&&(o.width||o.height)||a.getBBox===Uc||(o=Uc.call(a,!0)),o&&!o.width&&!o.x&&!o.y?{x:+Dd(a,["x","cx","x1"])||0,y:+Dd(a,["y","cy","y1"])||0,width:0,height:0}:o},kd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&zd(a))},Xa=function(a,o){if(o){var c=a.style,f;o in ms&&o!==Rr&&(o=mn),c.removeProperty?(f=o.substr(0,2),(f==="ms"||o.substr(0,6)==="webkit")&&(o="-"+o),c.removeProperty(f==="--"?o:o.replace(kc,"-$1").toLowerCase())):c.removeAttribute(o)}},ia=function(a,o,c,f,u,m){var g=new Pr(a._pt,o,c,0,1,m?Pd:Ad);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},Bd={deg:1,rad:1,turn:1},bg={grid:1,flex:1},na=function x(a,o,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,v=dg.test(o),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(v?"Width":"Height"),O=100,k=f==="px",R=f==="%",F,E,P,w;if(f===m||!u||Bd[f]||Bd[m])return u;if(m!=="px"&&!k&&(u=x(a,o,c,"px")),w=a.getCTM&&kd(a),(R||m==="%")&&(ms[o]||~o.indexOf("adius")))return F=w?a.getBBox()[v?"width":"height"]:a[b],On(R?u/F*O:u/100*F);if(g[v?"width":"height"]=O+(k?m:f),E=~o.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,w&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===ea||!E.appendChild)&&(E=ea.body),P=E._gsap,P&&R&&P.width&&v&&P.time===qr.time&&!P.uncache)return On(u/P.width*O);if(R&&(o==="height"||o==="width")){var T=a.style[o];a.style[o]=O+f,F=a[b],T?a.style[o]=T:Xa(a,o)}else(R||m==="%")&&!bg[Yo(E,"display")]&&(g.position=Yo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return v&&R&&(P=Na(E),P.time=qr.time,P.width=E[b]),On(k?F*u/O:F&&u?O/F*u:0)},gs=function(a,o,c,f){var u;return Dc||Fc(),o in qo&&o!=="transform"&&(o=qo[o],~o.indexOf(",")&&(o=o.split(",")[0])),ms[o]&&o!=="transform"?(u=Lh(a,f),u=o!=="transformOrigin"?u[o]:u.svg?u.origin:Su(Yo(a,Rr))+" "+u.zOrigin+"px"):(u=a.style[o],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[o]&&Tu[o](a,o,c)||Yo(a,o)||Gf(a,o)||(o==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?na(a,o,u,c)+c:u},Cg=function(a,o,c,f){if(!c||c==="none"){var u=Gl(o,a,1),m=u&&Yo(a,u,1);m&&m!==c?(o=u,c=m):o==="borderColor"&&(c=Yo(a,"borderTopColor"))}var g=new Pr(this._pt,a.style,o,0,1,wd),v=0,S=0,b,O,k,R,F,E,P,w,T,I,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[o],a.style[o]=f,f=Yo(a,o)||f,E?a.style[o]=E:Xa(a,o)),b=[c,f],cd(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;O=Ol.exec(f);)P=O[0],T=f.substring(v,O.index),F?F=(F+1)%5:(T.substr(-5)==="rgba("||T.substr(-5)==="hsla(")&&(F=1),P!==(E=k[S++]||"")&&(R=parseFloat(E)||0,C=E.substr((R+"").length),P.charAt(1)==="="&&(P=Il(R,P)+C),w=parseFloat(P),I=P.substr((w+"").length),v=Ol.lastIndex-I.length,I||(I=I||Vr.units[o]||C,v===f.length&&(f+=I,g.e+=I)),C!==I&&(R=na(a,o,E,I)||0),g._pt={_next:g._pt,p:T||S===1?T:",",s:R,c:w-R,m:F&&F<4||o==="zIndex"?Math.round:0});g.c=v<f.length?f.substring(v,f.length):""}else g.r=o==="display"&&f==="none"?Pd:Ad;return Df.test(f)&&(g.e=0),this._pt=g,g},Nd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Ag=function(a){var o=a.split(" "),c=o[0],f=o[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),o[0]=Nd[c]||c,o[1]=Nd[f]||f,o.join(" ")},Pg=function(a,o){if(o.tween&&o.tween._time===o.tween._dur){var c=o.t,f=c.style,u=o.u,m=c._gsap,g,v,S;if(u==="all"||u===!0)f.cssText="",v=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ms[g]&&(v=1,g=g==="transformOrigin"?Rr:mn),Xa(c,g);v&&(Xa(c,mn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Ld(f)))}},Tu={clearProps:function(a,o,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Pr(a._pt,o,c,0,0,Pg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Fd={},Ud=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Gd=function(a){var o=Yo(a,mn);return Ud(o)?Ph:o.substr(7).match(If).map(On)},Gc=function(a,o){var c=a._gsap||Na(a),f=a.style,u=Gd(a),m,g,v,S;return c.svg&&a.getAttribute("transform")?(v=a.transform.baseVal.consolidate().matrix,u=[v.a,v.b,v.c,v.d,v.e,v.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(v=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Gd(a),v?f.display=v:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),o&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Hc=function(a,o,c,f,u,m){var g=a._gsap,v=u||Gc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,O=g.xOffset||0,k=g.yOffset||0,R=v[0],F=v[1],E=v[2],P=v[3],w=v[4],T=v[5],I=o.split(" "),C=parseFloat(I[0])||0,U=parseFloat(I[1])||0,N,X,J,Z;c?v!==Ph&&(X=R*P-F*E)&&(J=C*(P/X)+U*(-E/X)+(E*T-P*w)/X,Z=C*(-F/X)+U*(R/X)-(R*T-F*w)/X,C=J,U=Z):(N=zd(a),C=N.x+(~I[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(I[1]||I[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(w=C-S,T=U-b,g.xOffset=O+(w*R+T*E)-w,g.yOffset=k+(w*F+T*P)-T):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=o,g.originIsAbsolute=!!c,a.style[Rr]="0px 0px",m&&(ia(m,g,"xOrigin",S,C),ia(m,g,"yOrigin",b,U),ia(m,g,"xOffset",O,g.xOffset),ia(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,o){var c=a._gsap||new md(a);if("x"in c&&!o&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",v=getComputedStyle(a),S=Yo(a,Rr)||"0",b,O,k,R,F,E,P,w,T,I,C,U,N,X,J,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=O=k=E=P=w=T=I=C=0,R=F=1,c.svg=!!(a.getCTM&&kd(a)),v.translate&&((v.translate!=="none"||v.scale!=="none"||v.rotate!=="none")&&(f[mn]=(v.translate!=="none"?"translate3d("+(v.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(v.rotate!=="none"?"rotate("+v.rotate+") ":"")+(v.scale!=="none"?"scale("+v.scale.split(" ").join(",")+") ":"")+(v[mn]!=="none"?v[mn]:"")),f.scale=f.rotate=f.translate="none"),X=Gc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!o&&a.getAttribute("data-svg-origin"),Hc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],tt=X[1],_t=X[2],G=X[3],b=Pt=X[4],O=Et=X[5],X.length===6?(R=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,T=_t||G?Ul(_t,G)*ja+E:0,T&&(F*=Math.abs(Math.cos(T*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),O-=N-(U*tt+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],O=X[13],k=X[14],J=Ul(Wt,Nt),P=J*ja,J&&(Z=Math.cos(-J),ct=Math.sin(-J),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),J=Ul(-_t,Nt),w=J*ja,J&&(Z=Math.cos(-J),ct=Math.sin(-J),At=Rt*Z-Ft*ct,ce=tt*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,tt=ce,_t=re),J=Ul(tt,Rt),E=J*ja,J&&(Z=Math.cos(J),ct=Math.sin(J),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),P&&Math.abs(P)+Math.abs(E)>359.9&&(P=E=0,w=180-w),R=On(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=On(Math.sqrt(Et*Et+Wt*Wt)),J=Ul(Pt,Et),T=Math.abs(J)>2e-4?J*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Ud(Yo(a,mn)),At&&a.setAttribute("transform",At))),Math.abs(T)>90&&Math.abs(T)<270&&(u?(R*=-1,T+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,T+=T<=0?180:-180)),o=o||c.uncache,c.x=b-((c.xPercent=b&&(!o&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=O-((c.yPercent=O&&(!o&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-O)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=On(R),c.scaleY=On(F),c.rotation=On(E)+g,c.rotationX=On(P)+g,c.rotationY=On(w)+g,c.skewX=T+g,c.skewY=I+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!o&&c.zOrigin||0)&&(f[Rr]=Su(S)),c.xOffset=c.yOffset=0,c.force3D=Vr.force3D,c.renderTransform=c.svg?Rg:Od?Hd:Lg,c.uncache=0,c},Su=function(a){return(a=a.split(" "))[0]+" "+a[1]},Vc=function(a,o,c){var f=sr(o);return On(parseFloat(o)+parseFloat(na(a,"x",c+"px",f)))+f},Lg=function(a,o){o.z="0px",o.rotationY=o.rotationX="0deg",o.force3D=0,Hd(a,o)},qa="0deg",Rh="0px",Ya=") ",Hd=function(a,o){var c=o||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,v=c.z,S=c.rotation,b=c.rotationY,O=c.rotationX,k=c.skewX,R=c.skewY,F=c.scaleX,E=c.scaleY,P=c.transformPerspective,w=c.force3D,T=c.target,I=c.zOrigin,C="",U=w==="auto"&&a&&a!==1||w===!0;if(I&&(O!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),J=Math.cos(N),Z;N=parseFloat(O)*Fl,Z=Math.cos(N),m=Vc(T,m,X*Z*-I),g=Vc(T,g,-Math.sin(N)*-I),v=Vc(T,v,J*Z*-I+I)}P!==Rh&&(C+="perspective("+P+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||v!==Rh)&&(C+=v!==Rh||U?"translate3d("+m+", "+g+", "+v+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),O!==qa&&(C+="rotateX("+O+Ya),(k!==qa||R!==qa)&&(C+="skew("+k+", "+R+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),T.style[mn]=C||"translate(0, 0)"},Rg=function(a,o){var c=o||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,v=c.rotation,S=c.skewX,b=c.skewY,O=c.scaleX,k=c.scaleY,R=c.target,F=c.xOrigin,E=c.yOrigin,P=c.xOffset,w=c.yOffset,T=c.forceCSS,I=parseFloat(m),C=parseFloat(g),U,N,X,J,Z;v=parseFloat(v),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,v+=b),v||S?(v*=Fl,S*=Fl,U=Math.cos(v)*O,N=Math.sin(v)*O,X=Math.sin(v-S)*-k,J=Math.cos(v-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,J*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=On(U),N=On(N),X=On(X),J=On(J)):(U=O,J=k,N=X=0),(I&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(I=na(R,"x",m,"px"),C=na(R,"y",g,"px")),(F||E||P||w)&&(I=On(I+F-(F*U+E*X)+P),C=On(C+E-(F*N+E*J)+w)),(f||u)&&(Z=R.getBBox(),I=On(I+f/100*Z.width),C=On(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+J+","+I+","+C+")",R.setAttribute("transform",Z),T&&(R.style[mn]=Z)},Og=function(a,o,c,f,u){var m=360,g=jn(u),v=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=v-f,b=f+S+"deg",O,k;return g&&(O=u.split("_")[1],O==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),O==="cw"&&S<0?S=(S+m*Cd)%m-~~(S/m)*m:O==="ccw"&&S>0&&(S=(S-m*Cd)%m-~~(S/m)*m)),a._pt=k=new Pr(a._pt,o,c,f,S,mg),k.e=b,k.u="deg",a._props.push(c),k},Vd=function(a,o){for(var c in o)a[c]=o[c];return a},Ig=function(a,o,c){var f=Vd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,v,S,b,O,k,R,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[mn]=o,g=Lh(c,1),Xa(c,mn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[mn],m[mn]=o,g=Lh(c,1),m[mn]=S);for(v in ms)S=f[v],b=g[v],S!==b&&u.indexOf(v)<0&&(R=sr(S),F=sr(b),O=R!==F?na(c,v,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Pr(a._pt,g,v,O,k-O,Bc),a._pt.u=F||0,a._props.push(v));Vd(g,f)};Ar("padding,margin,Width,Radius",function(x,a){var o="Top",c="Right",f="Bottom",u="Left",m=(a<3?[o,c,f,u]:[o+u,o+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,v,S,b,O){var k,R;if(arguments.length<4)return k=m.map(function(F){return gs(g,F,S)}),R=k.join(" "),R.split(k[0]).length===5?k[0]:R;k=(b+"").split(" "),R={},m.forEach(function(F,E){return R[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(v,R,O)}});var Wd={name:"css",register:Fc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,o,c,f,u){var m=this._props,g=a.style,v=c.vars.startAt,S,b,O,k,R,F,E,P,w,T,I,C,U,N,X,J;Dc||Fc(),this.styles=this.styles||Rd(a),J=this.styles.props,this.tween=c;for(E in o)if(E!=="autoRound"&&(b=o[E],!(jr[E]&&gd(E,o,c,f,a,u)))){if(R=typeof b,F=Tu[E],R==="function"&&(b=b.call(c,f,a,u),R=typeof b),R==="string"&&~b.indexOf("random(")&&(b=Th(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",Qs.lastIndex=0,Qs.test(S)||(P=sr(S),w=sr(b)),w?P!==w&&(S=na(a,E,S,w)+w):P&&(b+=P),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),J.push(E,0,g[E]);else if(R!=="undefined"){if(v&&E in v?(S=typeof v[E]=="function"?v[E].call(c,f,a,u):v[E],jn(S)&&~S.indexOf("random(")&&(S=Th(S)),sr(S+"")||S==="auto"||(S+=Vr.units[E]||sr(gs(a,E))||""),(S+"").charAt(1)==="="&&(S=gs(a,E))):S=gs(a,E),k=parseFloat(S),T=R==="string"&&b.charAt(1)==="="&&b.substr(0,2),T&&(b=b.substr(2)),O=parseFloat(b),E in qo&&(E==="autoAlpha"&&(k===1&&gs(a,"visibility")==="hidden"&&O&&(k=0),J.push("visibility",0,g.visibility),ia(this,g,"visibility",k?"inherit":"hidden",O?"inherit":"hidden",!O)),E!=="scale"&&E!=="transform"&&(E=qo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),I=E in ms,I){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!o.parseTransform||Lh(a,o.parseTransform),N=o.smoothOrigin!==!1&&U.smooth,C=this._pt=new Pr(this._pt,g,mn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Pr(this._pt,U,"scaleY",U.scaleY,(T?Il(U.scaleY,T+O):O)-U.scaleY||0,Bc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){J.push(Rr,0,g[Rr]),b=Ag(b),U.svg?Hc(a,b,0,N,0,this):(w=parseFloat(b.split(" ")[2])||0,w!==U.zOrigin&&ia(this,U,"zOrigin",U.zOrigin,w),ia(this,g,E,Su(S),Su(b)));continue}else if(E==="svgOrigin"){Hc(a,b,1,N,0,this);continue}else if(E in Fd){Og(this,U,E,k,T?Il(k,T+b):b);continue}else if(E==="smoothOrigin"){ia(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Ig(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(I||(O||O===0)&&(k||k===0)&&!pg.test(b)&&E in g)P=(S+"").substr((k+"").length),O||(O=0),w=sr(b)||(E in Vr.units?Vr.units[E]:P),P!==w&&(k=na(a,E,S,w)),this._pt=new Pr(this._pt,I?U:g,E,k,(T?Il(k,T+O):O)-k,!I&&(w==="px"||E==="zIndex")&&o.autoRound!==!1?vg:Bc),this._pt.u=w||0,P!==w&&w!=="%"&&(this._pt.b=S,this._pt.r=gg);else if(E in g)Cg.call(this,a,E,S,T?T+b:b);else if(E in a)this.add(a,E,S||a[E],T?T+b:b,f,u);else if(E!=="parseTransform"){cc(E,b);continue}I||(E in g?J.push(E,0,g[E]):J.push(E,1,S||a[E])),m.push(E)}}X&&Md(this)},render:function(a,o){if(o.tween._time||!zc())for(var c=o._pt;c;)c.r(a,c.d),c=c._next;else o.styles.revert()},get:gs,aliases:qo,getSetter:function(a,o,c){var f=qo[o];return f&&f.indexOf(",")<0&&(o=f),o in ms&&o!==Rr&&(a._gsap.x||gs(a,"x"))?c&&bd===c?o==="scale"?wg:xg:(bd=c||{})&&(o==="scale"?Mg:Tg):a.style&&!oc(a.style[o])?yg:~o.indexOf("-")?_g:Pc(a,o)},core:{_removeProperty:Xa,_getMatrix:Gc}};Lr.utils.checkPrefix=Gl,Lr.core.getStyleSaver=Rd,function(x,a,o,c){var f=Ar(x+","+a+","+o,function(u){ms[u]=1});Ar(a,function(u){Vr.units[u]="deg",Fd[u]=1}),qo[f[13]]=x+","+a,Ar(c,function(u){var m=u.split(":");qo[m[1]]=f[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Ar("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Vr.units[x]="px"}),Lr.registerPlugin(Wd);var Wc=Lr.registerPlugin(Wd)||Lr;Wc.core.Tween;class Dg{constructor(a,o=!1){window.mars3d&&(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=o)}add(a,o){let c=a.options.symbol.styleOptions.label.font_size,f=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:v,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(O=>{O.style.label&&this.DynamicMaskingArr.push({id:f,uid:O.id,position:O._getLablePosition(),label:O.name,width:O.name?u*O.name.length:0,height:m,color:v,outline:o.label.outline,outlineColor:S,background:o.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(o.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(o.label.color),outlineColor:this.Cesium.Color.fromCssColorString(o.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:o.label.outline,background:o.label.background,color:this.Cesium.Color.fromCssColorString(o.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(o.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(o.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(o=>o.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(o=>o.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,o){let{label:c}=o;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:v}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(f!=null&&(S.color=this.Cesium.Color.fromCssColorString(f),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(f)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),v!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(v),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(v)))})}}getBoundingRectangle(a){var o=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return o!==void 0?new this.Cesium.BoundingRectangle(o.x,o.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var o=0;o<this.DynamicMaskingArr.length;o++){let f=!1,u=this.DynamicMaskingArr[o],m,g,v;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(o);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],v=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,v)){f=!0;break}f||a.push(o)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let o={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},f=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!f.has(g))),m=new Set([...f].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Wc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var v=this.DynamicMaskingArr[g];v.backgroundColor.alpha=c.backgroundColor,v.color.alpha=c.color,v.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(v.id,"vectorId"))==null?void 0:S.getGraphicByAttr(v.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let v=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:O}=v.dynamicMaskingColor;var a=Wc.to(o,{duration:.8+Math.random(),color:b.alpha,outlineColor:O.alpha,backgroundColor:S.alpha,onUpdate:()=>{var R,F;v.backgroundColor.alpha=o.backgroundColor,v.color.alpha=o.color,v.outlineColor.alpha=o.outlineColor,(F=(R=window.map.getLayer(v.id,"vectorId"))==null?void 0:R.getGraphicByAttr(v.uid))==null||F.setStyle({label:{show:!0,outline:v.outline,background:v.background,color:v.color,outlineColor:v.outlineColor,backgroundColor:v.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(o=>{var c;if((c=o.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=o.options.symbol.styleOptions.label;o.eachGraphic(g=>{g.setStyle({label:{color:f.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let o;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:v,vectorId:S}=c;o=window.map.getLayer(S,"vectorId"),o&&o.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:v,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const zg=()=>{var x,a;window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},kg=()=>{var x,a;window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},Bg=()=>{var x,a;window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""}),(a=(x=window.glftSet)==null?void 0:x.glftList)==null||a.map(o=>{o.remove()})},Ng=x=>{let a=[];if(x.forEach(o=>{let{id:c}=o,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};o.operate.forEach((u,m)=>{let g=jc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let o=1;o<a.length;o++){let c=a[o].mockData,f=a[o-1].mockData.item;const u=new Map;f.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"&&m.type!="gltf"?u.set(`${m.screenplayId}-${m.type}`,m):a[o].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let v={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[o].mockData.previousPage.unshift(u.get(g)),v=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){v[b]=jd(u.get(g)[b],m[b]);let O={screenplayId:m.screenplayId,type:m.type};O[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?O[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(O[b][k]="false")}),S={...O,...S}}else S[b]=u.get(g)[b],v[b]=m[b];else a[o].mockData.previousPage.some(O=>O.screenplayId===m.screenplayId)||(S={...Xd(m,b),...S}),v[b]=m[b]}),Object.keys(S).length>0&&a[o].mockData.previousPage.push(S)}u.set(g,v)}else{let S=Xd(m);S&&a[o].mockData.previousPage.push(S),u.set(g,m)}}),a[o].mockData.item=Array.from(u.values())}return a},jc=(x,a=null)=>{let{executionProperty:o,screenplayId:c,property:f,type:u,delay:m,delayTime:g}=x;if((f=="add"||f==!0)&&(f="true"),(f=="remove"||f==!1)&&(f="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=f,f=b,c=S.modelId,o=S.type}}let v;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(f);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:O,secondaryScreen:k}=JSON.parse(x.property);O.forEach(F=>{jc(F,a)});let R=a.find(F=>F.type=="splitScreen");k.forEach(F=>{jc(F,R.executionProperty.mapClone)})}else v={screenplayId:c,type:u,executionProperty:f},(o=="clip"||o=="flat")&&(v[o]=f),m&&(v.delay=m),g&&(v.delayTime=g),a&&(u=="flight"?a.unshift(v):a.push(v));else v=a?a.find(S=>S.screenplayId==c):null,v?(o=="clip"||o=="flat"?v[o]?v[o]=jd(v[o],f):(v[o]=f,v.type="model"):v[o]=f,m&&(v[o].delay=m),g&&(v[o].delayTime=g)):(v={screenplayId:c,type:u},m&&(v.delay=m),g&&(v.delayTime=g),o=="clip"||o=="flat"?(v[o]=f,v.type="model"):v[o]=f,a&&(u=="flight"?a.unshift(v):a.push(v)));return a||v},jd=(x,a)=>{const o={...x};for(const c in a)a.hasOwnProperty(c)&&(o[c]=a[c]);return o},Xd=(x,a="all")=>{let{type:o,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,v={};if(a=="all")switch(o){case"model":case"shp":case"plot":c&&c=="true"&&(v={screenplayId:f,type:o,show:"false"}),u&&(v={...v,screenplayId:f,type:o,overallStaining:"false"}),m&&(v={...v,screenplayId:f,type:o,clip:"false"}),g&&(v={...v,screenplayId:f,type:o,flat:"false"});break;case"terrain":v={screenplayId:f,type:o,executionProperty:"true"};break;case"pit":v={screenplayId:f,type:o,executionProperty:"false"};break;case"underground":v={screenplayId:f,type:o,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":v={screenplayId:f,type:o},v[a]="false";break}return Object.keys(v).length>0?v:null},Fg=(x,a)=>{const o={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(o[c]=x[c])}),o},Ug=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Gg=x=>{var o;let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(c=>{let{executionProperty:f,screenplayId:u,property:m,type:g}=c;(f=="show"||f=="overallStaining")&&(a[u]||(a[u]={type:g}),a[u][m]=f)}),window.map.getLayers().forEach(c=>{if((c.type=="3dtiles"||c.type=="geojson"||c.type=="tileset")&&c.options.name!="国界"){let f=c.options.modelId||c.options.vectorId;a[f]?(window.bimModel.editColor(f),window.schemeEvnModify.clearAllModelModify({isClone:!1})):c.remove()}}),(o=window.bimEntity.entityLayer.getGraphics())==null||o.forEach(c=>{c.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Hg{constructor(a){Vo(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Vo(this,"terrainCutById",(a,o,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==o))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:o});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==o))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:o});break}});Vo(this,"clearTerrainCutById",(a,o)=>{switch(o==null?void 0:o.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Vo(this,"terrainFlattenById",(a,o,c,f)=>{switch(f==null?void 0:f.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:o});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:o});break}});Vo(this,"clearTerrainFlattenById",(a,o)=>{switch(o==null?void 0:o.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const o=this.flattenedEvnModifyData.find(c=>c.id==a);return o||null}getModelFromMapById(a,o){let c;switch(o==null?void 0:o.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,o,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(o.length>1?o:o[0],{id:c}),f==null?void 0:f.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,o,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(o.length>1?o:o[0],{height:c,id:f}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,o,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(o),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,o,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(o),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,v,b,o):u===0&&m===1?this.modelFlattenById(f,v,S,b,o):u===1&&m===0?this.terrainCutById(v,b,o):u===1&&m===1&&this.terrainFlattenById(v,S,b,o)}}evnModifyByIdAndAddOptionsToStore(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,v,b,o):u===0&&m===1?this.modelFlattenById(f,v,S,b,o):u===1&&m===0?this.terrainCutById(v,b,o):u===1&&m===1&&this.terrainFlattenById(v,S,b,o)}}clearEvnModifyById(a,o){o=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const v=c.bimEnvModifyData[g].id;u===0&&m===0?this.clearModelCutById(f,v,o):u===0&&m===1?this.clearModelFlattenById(f,v,o):u===1&&m===0?this.clearTerrainCutById(v,o):u===1&&m===1&&this.clearTerrainFlattenById(v,o)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(o=>{const c=bimModel.queryModel(o,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(o=>{const c=bimModel.queryModel(o,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break;case!1:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break}}getModelModifyDataForInitModelById(a){const o=this.getDataFromFlattenedEvnModifyListById(a);if(!o)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=o;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<o.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(o.bimEnvModifyData[g].modifyData).coordinates),id:o.bimEnvModifyData[g].id};m.area.push(S)}return m}else if(f===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<o.bimEnvModifyData.length;g++){const v=this.getPositions(JSON.parse(o.bimEnvModifyData[g].modifyData).coordinates),S={id:o.bimEnvModifyData[g].id,positions:v,height:JSON.parse(o.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Za=null,vs=null,un=null,Oh=null,qd=null;class Vg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,o,c){vs=new mars3d.layer.GraphicLayer({isContinued:!0}),qd=new mars3d.layer.GraphicLayer({isContinued:!0}),window.map.addLayer(qd);var f=this;window.map.addLayer(vs),vs.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;o(m),setTimeout(()=>{f.startDrawGraphic()},500)}),vs.on(mars3d.EventType.editStop,function(u){}),un=c,Za=new mars3d.layer.GraphicLayer,window.map.addLayer(Za),a.length<=1e3?this.viewPoints=a:this.viewPoints=a.filter((u,m)=>{if(m%100==0)return u}),un.Viewovalue==1||un.Viewovalue==4?this.calculateAngle(this.viewPoints):this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a){Oh=new mars3d.graphic.PolylinePrimitive({positions:a.map(o=>[o.lng,o.lat,o.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:{}.VITE_APP_PUBLIC_PATH+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}}),Za.addGraphic(Oh)}getAzimuth(a,o,c,f){const u=R=>R*Math.PI/180,m=R=>R*180/Math.PI,g=u(o),v=u(f),S=u(c-a),b=Math.sin(S)*Math.cos(v),O=Math.cos(g)*Math.sin(v)-Math.sin(g)*Math.cos(v)*Math.cos(S);let k=Math.atan2(b,O);return(m(k)+360)%360}calculateAngle(a){var o=a,c=o.map((f,u)=>{if(u<o.length-1){Cesium.Cartesian3.fromRadians(f.lng,f.lat,f.alt),Cesium.Cartesian3.fromRadians(o[u+1].lng,o[u+1].lat,o[u+1].alt);var m=this.getAzimuth(f.lng,f.lat,o[u+1].lng,o[u+1].lat);const g=new mars3d.graphic.PolylinePrimitive({positions:[a[u-1],a[u]],style:{width:1,color:"rgba(200,200,200,0 )"}});return Za.addGraphic(g),un.Viewovalue==4&&(un.followedX=-1,un.followedZ=f.alt+2),{lng:f.lng,lat:f.lat,alt:f.alt?f.alt+un.followedZ*1:un.followedZ*1,heading:m,pitch:un.followedX*1,duration:(g.distance/un.speed).toFixed(2),stop:0}}});this.viewPoints=c}addGraphicLayer(a){var o=Cesium.Cartesian3.fromRadians(a[0].lng,a[0].lat,a[0].alt),c=Cesium.Cartesian3.fromRadians(a[1].lng,a[1].lat,a[1].alt),f=mars3d.MeasureUtil.getAngle(o,c,!0),u={};un.Viewovalue==1?u={camera:{type:"dy",followedX:un.followedX,followedZ:un.followedZ},interpolation:!0,interpolationDegree:10,autoMiddleDynamicPosition:!0,autoMiddleTimePosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:un.Viewovalue==2?u={camera:{type:"gs",pitch:un.followedX,heading:f,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("rgba(200,200,200,0 )")}}:un.Viewovalue==4?u={camera:{type:"dy",followedX:100,followedZ:1}}:u={camera:{type:"sd",followedZ:un.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("rgba(200,200,200,0 )")}},a=a.map(g=>[g.lng,g.lat,g.alt]),a.length;var m={type:"time",list:a,interpolationAlgorithm:Cesium.HermitePolynomialApproximation,interpolation:!0,speed:un.speed,interpolationDegree:2};this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",autoStop:!0,position:m,offsetHeight:1.6,clockLoop:!0,...u}),Za.addGraphic(this.fixedRoute)}getAzimuthFromCartesian(a,o){const c=F=>F*180/Math.PI,f=Cesium.Cartographic.fromCartesian(a),u=Cesium.Cartographic.fromCartesian(o),m=f.longitude,g=f.latitude,v=u.longitude,S=u.latitude,b=v-m,O=Math.sin(b)*Math.cos(S),k=Math.cos(g)*Math.sin(S)-Math.sin(g)*Math.cos(S)*Math.cos(b);let R=Math.atan2(O,k);return(c(R)+360)%360}addDemoGraphic(a,o){Oh=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,label:{text:o,pixelOffsetY:-50}}}),vs.addGraphic(Oh)}startDrawGraphic(a){vs.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,pixelOffsetY:-20,classificationType:Cesium.ClassificationType.TERRAIN}}).then(o=>{})}start(){Oh.remove(),un.Viewovalue==1||un.Viewovalue==4?map.setCameraViewList(this.viewPoints,{maximumHeight:1}):(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){(un.Viewovalue==1||un.Viewovalue==4)&&map.pauseCameraViewList(),this.fixedRoute&&this.fixedRoute.pause()}resume(){(un.Viewovalue==1||un.Viewovalue==4)&&map.proceedCameraViewList(),this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop(),window.map.pauseCameraViewList()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Za,!0),window.map.removeLayer(vs,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1}removeCameraRoute(){Za.clear(),vs.clear()}removegraphicLayerpoint(){vs.clear()}}class Wg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let o=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:o},style:{...this.style}}).then(f=>{c({id:o,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let o;a.forEach(c=>{let{id:f}=c;o=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(o)})}positionLine(a){let o=this.queryTrafficSimulationLine(a);o&&o.flyTo({scale:2})}deleteLine(a){let o=this.queryTrafficSimulationLine(a);o&&o.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,o=!0){let c=this.queryTrafficSimulationLine(a);o?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,o){let c=this.queryTrafficSimulationLine(a);c.positions=o,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(o=>o.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let o=new Date,c=o.getDate();o.setDate(c+1),this.endDate=o.toISOString(),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),this.style.materialOptions.color="#4ac2ff",window.map.bimMapEdit="0"}processingData(a){let o=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],f=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;f.forEach((g,v)=>{let S=0,b=0,{pointSet:O,interval:k,speed:R}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(O));E.forEach((w,T)=>{T>0&&(u=parseFloat((this.disTance(w,E[T-1].slice(1))/R).toFixed(2)),S+=u),T==0&&(S=b),w.unshift(S)}),b+=k,c=E.reduce((w,T)=>w.concat(T));let P={name:`${v}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};o.push(P)}});let m={name:"交通模拟",czmlId:a,data:o,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,o){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...o),u=window.Cesium.Cartesian3.distance(c,f),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const jg=[Tf,bf],Xg={continuation:null,mapModali:null,install(x){if(jg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Sf),o=document.createElement("div"),c=document.body;if(c.appendChild(o),this.loading=a.mount(o),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Ef),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=bf,Pi.BimCutscenes=Sf,Pi.BimElevationImage=fm,Pi.BimEntity=pm,Pi.BimModel=lm,Pi.BimModify=Hg,Pi.BimTerrainProvider=cm,Pi.BimTrafficSimulation=Wg,Pi.BimVector=um,Pi.Bimroaming=Vg,Pi.Button=Tf,Pi.ChbimPlugins=Xg,Pi.DynamicMasking=Dg,Pi.MapModali=Ef,Pi.PanoramicView=_m,Pi.ViewShed=dm,Pi.getSameKeyData=Fg,Pi.init=zg,Pi.initMap=Gg,Pi.isValidRGBA=Ug,Pi.nextPage=Bg,Pi.operateMapData=Ng,Pi.previousPage=kg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chbim-plugins",
3
3
  "private": false,
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "description": "此插件和chbim云平台强绑定",
6
6
  "main": "chbim-plugins.js",
7
7
  "keywords": [