chbim-plugins 0.0.150 → 0.0.152
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 +9 -7
- package/chbim-plugins.umd.cjs +2 -2
- package/package.json +2 -5
- package/README.md +0 -273
package/chbim-plugins.js
CHANGED
|
@@ -24451,7 +24451,7 @@ class y1 {
|
|
|
24451
24451
|
["MultiPolygon"]
|
|
24452
24452
|
]), this.avoidanceArr = [], this.editDate = {
|
|
24453
24453
|
id: ""
|
|
24454
|
-
}, this.isDynamicMasking = s) : console.error("未引入指定插件");
|
|
24454
|
+
}, this.isDynamicMasking = s, this.disabled = !1) : console.error("未引入指定插件");
|
|
24455
24455
|
}
|
|
24456
24456
|
/**
|
|
24457
24457
|
* 移除矢量数据
|
|
@@ -24601,6 +24601,8 @@ class y1 {
|
|
|
24601
24601
|
break;
|
|
24602
24602
|
}
|
|
24603
24603
|
m ? window.mapClone.mapEx.addLayer(Pe) : window.map.addLayer(Pe), Pe.bindPopup((Wt) => {
|
|
24604
|
+
if (this.disabled == !0)
|
|
24605
|
+
return !1;
|
|
24604
24606
|
let $e = '<div class="bim-map-popup">';
|
|
24605
24607
|
return Object.keys(Wt.graphic.attr).forEach((Mi, Oe) => {
|
|
24606
24608
|
Wt.graphic.attr[Mi] && ($e += `<p><b>${Mi}</b> : ${Wt.graphic.attr[Mi]}</p>`);
|
|
@@ -31125,7 +31127,7 @@ class O1 {
|
|
|
31125
31127
|
*/
|
|
31126
31128
|
getDataFromFlattenedEvnModifyListById(a) {
|
|
31127
31129
|
const s = this.flattenedEvnModifyData.find((c) => c.id == a);
|
|
31128
|
-
return s
|
|
31130
|
+
return s || null;
|
|
31129
31131
|
}
|
|
31130
31132
|
/**
|
|
31131
31133
|
* 通过modelId从map对象中获取对应模型
|
|
@@ -31310,7 +31312,7 @@ class O1 {
|
|
|
31310
31312
|
for (let g = 0; g < c.bimEnvModifyData.length; g++) {
|
|
31311
31313
|
const _ = this.getPositions(
|
|
31312
31314
|
JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates
|
|
31313
|
-
), S = JSON.parse(c.bimEnvModifyData[g].modifyData).depth, b = c.bimEnvModifyData[g].id
|
|
31315
|
+
), S = JSON.parse(c.bimEnvModifyData[g].modifyData).depth, b = c.bimEnvModifyData[g].id;
|
|
31314
31316
|
u === 0 && m === 0 ? this.modelCutById(f, _, b, s) : u === 0 && m === 1 ? this.modelFlattenById(f, _, S, b, s) : u === 1 && m === 0 ? this.terrainCutById(_, b, s) : u === 1 && m === 1 && this.terrainFlattenById(_, S, b, s);
|
|
31315
31317
|
}
|
|
31316
31318
|
}
|
|
@@ -31330,7 +31332,7 @@ class O1 {
|
|
|
31330
31332
|
for (let g = 0; g < c.bimEnvModifyData.length; g++) {
|
|
31331
31333
|
const _ = this.getPositions(
|
|
31332
31334
|
JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates
|
|
31333
|
-
), S = JSON.parse(c.bimEnvModifyData[g].modifyData).depth, b = c.bimEnvModifyData[g].id
|
|
31335
|
+
), S = JSON.parse(c.bimEnvModifyData[g].modifyData).depth, b = c.bimEnvModifyData[g].id;
|
|
31334
31336
|
u === 0 && m === 0 ? this.modelCutById(f, _, b, s) : u === 0 && m === 1 ? this.modelFlattenById(f, _, S, b, s) : u === 1 && m === 0 ? this.terrainCutById(_, b, s) : u === 1 && m === 1 && this.terrainFlattenById(_, S, b, s);
|
|
31335
31337
|
}
|
|
31336
31338
|
}
|
|
@@ -31348,7 +31350,7 @@ class O1 {
|
|
|
31348
31350
|
bimEnvModify: { embsId: f, dataType: u, modifyType: m }
|
|
31349
31351
|
} = c;
|
|
31350
31352
|
for (let g = 0; g < c.bimEnvModifyData.length; g++) {
|
|
31351
|
-
const _ = c.bimEnvModifyData[g].id
|
|
31353
|
+
const _ = c.bimEnvModifyData[g].id;
|
|
31352
31354
|
u === 0 && m === 0 ? this.clearModelCutById(f, _, s) : u === 0 && m === 1 ? this.clearModelFlattenById(f, _, s) : u === 1 && m === 0 ? this.clearTerrainCutById(_, s) : u === 1 && m === 1 && this.clearTerrainFlattenById(_, s);
|
|
31353
31355
|
}
|
|
31354
31356
|
}
|
|
@@ -31415,7 +31417,7 @@ class O1 {
|
|
|
31415
31417
|
positions: this.getPositions(
|
|
31416
31418
|
JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates
|
|
31417
31419
|
),
|
|
31418
|
-
id: s.bimEnvModifyData[g].id
|
|
31420
|
+
id: s.bimEnvModifyData[g].id
|
|
31419
31421
|
};
|
|
31420
31422
|
m.area.push(S);
|
|
31421
31423
|
}
|
|
@@ -31430,7 +31432,7 @@ class O1 {
|
|
|
31430
31432
|
const _ = this.getPositions(
|
|
31431
31433
|
JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates
|
|
31432
31434
|
), S = {
|
|
31433
|
-
id: s.bimEnvModifyData[g].id
|
|
31435
|
+
id: s.bimEnvModifyData[g].id,
|
|
31434
31436
|
positions: _,
|
|
31435
31437
|
height: JSON.parse(s.bimEnvModifyData[g].modifyData).depth
|
|
31436
31438
|
};
|
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -2637,7 +2637,7 @@ __p += '`),Ui&&(de+=`' +
|
|
|
2637
2637
|
function print() { __p += __j.call(arguments, '') }
|
|
2638
2638
|
`:`;
|
|
2639
2639
|
`)+de+`return __p
|
|
2640
|
-
}`;var Mi=Np(function(){return Fi(ut,Je+"return "+de).apply(s,yt)});if(Mi.source=de,cf(Mi))throw Mi;return Mi}function P_(r){return Zi(r).toLowerCase()}function L_(r){return Zi(r).toUpperCase()}function R_(r,h,v){if(r=Zi(r),r&&(v||h===s))return ya(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=ts(O,Y),yt=bs(O,Y)+1;return xn(O,ut,yt).join("")}function O_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.slice(0,_a(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=bs(O,ar(h))+1;return xn(O,0,Y).join("")}function I_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.replace(lo,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ts(O,ar(h));return xn(O,Y).join("")}function D_(r,h){var v=ct,O=Rt;if(wn(h)){var Y="separator"in h?h.separator:Y;v="length"in h?wi(h.length):v,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var yt=ar(r);ut=yt.length}if(v>=ut)return r;var bt=v-$r(O);if(bt<1)return O;var Bt=yt?xn(yt,0,bt).join(""):r.slice(0,bt);if(Y===s)return Bt+O;if(yt&&(bt+=Bt.length-bt),ff(Y)){if(r.slice(bt).search(Y)){var oe,le=Bt;for(Y.global||(Y=Kn(Y.source,Zi(jl.exec(Y))+"g")),Y.lastIndex=0;oe=Y.exec(le);)var de=oe.index;Bt=Bt.slice(0,de===s?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ke=Bt.lastIndexOf(Y);ke>-1&&(Bt=Bt.slice(0,ke))}return Bt+O}function z_(r){return r=Zi(r),r&&qo.test(r)?r.replace(Ao,th):r}var k_=ze(function(r,h,v){return r+(v?" ":"")+h.toUpperCase()}),mf=Me("toUpperCase");function Bp(r,h,v){return r=Zi(r),h=v?s:h,h===s?Ls(r)?jc(r):ol(r):r.match(h)||[]}var Np=ae(function(r,h){try{return yr(r,s,h)}catch(v){return cf(v)?v:new ai(v)}}),B_=Vs(function(r,h){return Ji(h,function(v){v=us(v),Bo(r,v,hf(r[v],r))}),r});function N_(r){var h=r==null?0:r.length,v=si();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[v(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(yr(ut[0],this,O))return yr(ut[1],this,O)}})}function F_(r){return Ra(wr(r,I))}function gf(r){return function(){return r}}function U_(r,h){return r==null||r!==r?h:r}var G_=Oi(),H_=Oi(!0);function Gr(r){return r}function vf(r){return H(typeof r=="function"?r:wr(r,I))}function V_(r){return gt(wr(r,I))}function W_(r,h){return Ct(r,wr(h,I))}var j_=ae(function(r,h){return function(v){return e(v,r,h)}}),X_=ae(function(r,h){return function(v){return e(r,v,h)}});function yf(r,h,v){var O=Jn(h),Y=Us(h,O);v==null&&!(wn(h)&&(Y.length||!O.length))&&(v=h,h=r,r=this,Y=Us(h,Jn(h)));var ut=!(wn(v)&&"chain"in v)||!!v.chain,yt=js(r);return Ji(Y,function(bt){var Bt=h[bt];r[bt]=Bt,yt&&(r.prototype[bt]=function(){var oe=this.__chain__;if(ut||oe){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Bt,args:arguments,thisArg:r}),le.__chain__=oe,le}return Bt.apply(r,fo([this.value()],arguments))})}),r}function q_(){return gn._===this&&(gn._=Kr),this}function _f(){}function Y_(r){return r=wi(r),ae(function(h){return J(h,r)})}var Z_=Nn(Yi),J_=Nn(Bh),$_=Nn(Po);function Fp(r){return nf(r)?$o(us(r)):$t(r)}function K_(r){return function(h){return r==null?s:ls(r,h)}}var Q_=eu(),t1=eu(!0);function xf(){return[]}function wf(){return!1}function e1(){return{}}function i1(){return""}function n1(){return!0}function r1(r,h){if(r=wi(r),r<1||r>ce)return[];var v=It,O=Vn(r,It);h=si(h),r-=It;for(var Y=Ro(O,h);++v<r;)h(v);return Y}function o1(r){return vi(r)?Yi(r,us):to(r)?[r]:er(op(Zi(r)))}function s1(r){var h=++ur;return Zi(r)+h}var a1=Tr(function(r,h){return r+h},0),l1=dh("ceil"),h1=Tr(function(r,h){return r/h},1),u1=dh("floor");function c1(r){return r&&r.length?Mo(r,Gr,uh):s}function f1(r,h){return r&&r.length?Mo(r,si(h,2),uh):s}function d1(r){return va(r,Gr)}function p1(r,h){return va(r,si(h,2))}function m1(r){return r&&r.length?Mo(r,Gr,rt):s}function g1(r,h){return r&&r.length?Mo(r,si(h,2),rt):s}var v1=Tr(function(r,h){return r*h},1),y1=dh("round"),_1=Tr(function(r,h){return r-h},0);function x1(r){return r&&r.length?Qo(r,Gr):0}function w1(r,h){return r&&r.length?Qo(r,si(h,2)):0}return it.after=Vv,it.ary=gp,it.assign=Ly,it.assignIn=Lp,it.assignInWith=Qu,it.assignWith=Ry,it.at=Oy,it.before=vp,it.bind=hf,it.bindAll=B_,it.bindKey=yp,it.castArray=ey,it.chain=dp,it.chunk=u0,it.compact=c0,it.concat=f0,it.cond=N_,it.conforms=F_,it.constant=gf,it.countBy=xv,it.create=Iy,it.curry=_p,it.curryRight=xp,it.debounce=wp,it.defaults=Dy,it.defaultsDeep=zy,it.defer=Wv,it.delay=jv,it.difference=d0,it.differenceBy=p0,it.differenceWith=m0,it.drop=g0,it.dropRight=v0,it.dropRightWhile=y0,it.dropWhile=_0,it.fill=x0,it.filter=Tv,it.flatMap=Ev,it.flatMapDeep=bv,it.flatMapDepth=Cv,it.flatten=hp,it.flattenDeep=w0,it.flattenDepth=T0,it.flip=Xv,it.flow=G_,it.flowRight=H_,it.fromPairs=M0,it.functions=Hy,it.functionsIn=Vy,it.groupBy=Av,it.initial=E0,it.intersection=b0,it.intersectionBy=C0,it.intersectionWith=A0,it.invert=jy,it.invertBy=Xy,it.invokeMap=Lv,it.iteratee=vf,it.keyBy=Rv,it.keys=Jn,it.keysIn=Ur,it.map=qu,it.mapKeys=Yy,it.mapValues=Zy,it.matches=V_,it.matchesProperty=W_,it.memoize=Zu,it.merge=Jy,it.mergeWith=Rp,it.method=j_,it.methodOf=X_,it.mixin=yf,it.negate=Ju,it.nthArg=Y_,it.omit=$y,it.omitBy=Ky,it.once=qv,it.orderBy=Ov,it.over=Z_,it.overArgs=Yv,it.overEvery=J_,it.overSome=$_,it.partial=uf,it.partialRight=Tp,it.partition=Iv,it.pick=Qy,it.pickBy=Op,it.property=Fp,it.propertyOf=K_,it.pull=O0,it.pullAll=cp,it.pullAllBy=I0,it.pullAllWith=D0,it.pullAt=z0,it.range=Q_,it.rangeRight=t1,it.rearg=Zv,it.reject=kv,it.remove=k0,it.rest=Jv,it.reverse=af,it.sampleSize=Nv,it.set=e_,it.setWith=i_,it.shuffle=Fv,it.slice=B0,it.sortBy=Hv,it.sortedUniq=W0,it.sortedUniqBy=j0,it.split=E_,it.spread=$v,it.tail=X0,it.take=q0,it.takeRight=Y0,it.takeRightWhile=Z0,it.takeWhile=J0,it.tap=cv,it.throttle=Kv,it.thru=Xu,it.toArray=Cp,it.toPairs=Ip,it.toPairsIn=Dp,it.toPath=o1,it.toPlainObject=Pp,it.transform=n_,it.unary=Qv,it.union=$0,it.unionBy=K0,it.unionWith=Q0,it.uniq=tv,it.uniqBy=ev,it.uniqWith=iv,it.unset=r_,it.unzip=lf,it.unzipWith=fp,it.update=o_,it.updateWith=s_,it.values=gh,it.valuesIn=a_,it.without=nv,it.words=Bp,it.wrap=ty,it.xor=rv,it.xorBy=ov,it.xorWith=sv,it.zip=av,it.zipObject=lv,it.zipObjectDeep=hv,it.zipWith=uv,it.entries=Ip,it.entriesIn=Dp,it.extend=Lp,it.extendWith=Qu,yf(it,it),it.add=a1,it.attempt=Np,it.camelCase=c_,it.capitalize=zp,it.ceil=l1,it.clamp=l_,it.clone=iy,it.cloneDeep=ry,it.cloneDeepWith=oy,it.cloneWith=ny,it.conformsTo=sy,it.deburr=kp,it.defaultTo=U_,it.divide=h1,it.endsWith=f_,it.eq=Uo,it.escape=d_,it.escapeRegExp=p_,it.every=wv,it.find=Mv,it.findIndex=ap,it.findKey=ky,it.findLast=Sv,it.findLastIndex=lp,it.findLastKey=By,it.floor=u1,it.forEach=pp,it.forEachRight=mp,it.forIn=Ny,it.forInRight=Fy,it.forOwn=Uy,it.forOwnRight=Gy,it.get=df,it.gt=ay,it.gte=ly,it.has=Wy,it.hasIn=pf,it.head=up,it.identity=Gr,it.includes=Pv,it.indexOf=S0,it.inRange=h_,it.invoke=qy,it.isArguments=Pl,it.isArray=vi,it.isArrayBuffer=hy,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=uy,it.isBuffer=ka,it.isDate=cy,it.isElement=fy,it.isEmpty=dy,it.isEqual=py,it.isEqualWith=my,it.isError=cf,it.isFinite=gy,it.isFunction=js,it.isInteger=Mp,it.isLength=$u,it.isMap=Sp,it.isMatch=vy,it.isMatchWith=yy,it.isNaN=_y,it.isNative=xy,it.isNil=Ty,it.isNull=wy,it.isNumber=Ep,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=ou,it.isRegExp=ff,it.isSafeInteger=My,it.isSet=bp,it.isString=Ku,it.isSymbol=to,it.isTypedArray=mh,it.isUndefined=Sy,it.isWeakMap=Ey,it.isWeakSet=by,it.join=P0,it.kebabCase=m_,it.last=bo,it.lastIndexOf=L0,it.lowerCase=g_,it.lowerFirst=v_,it.lt=Cy,it.lte=Ay,it.max=c1,it.maxBy=f1,it.mean=d1,it.meanBy=p1,it.min=m1,it.minBy=g1,it.stubArray=xf,it.stubFalse=wf,it.stubObject=e1,it.stubString=i1,it.stubTrue=n1,it.multiply=v1,it.nth=R0,it.noConflict=q_,it.noop=_f,it.now=Yu,it.pad=y_,it.padEnd=__,it.padStart=x_,it.parseInt=w_,it.random=u_,it.reduce=Dv,it.reduceRight=zv,it.repeat=T_,it.replace=M_,it.result=t_,it.round=y1,it.runInContext=Lt,it.sample=Bv,it.size=Uv,it.snakeCase=S_,it.some=Gv,it.sortedIndex=N0,it.sortedIndexBy=F0,it.sortedIndexOf=U0,it.sortedLastIndex=G0,it.sortedLastIndexBy=H0,it.sortedLastIndexOf=V0,it.startCase=b_,it.startsWith=C_,it.subtract=_1,it.sum=x1,it.sumBy=w1,it.template=A_,it.times=r1,it.toFinite=Xs,it.toInteger=wi,it.toLength=Ap,it.toLower=P_,it.toNumber=Co,it.toSafeInteger=Py,it.toString=Zi,it.toUpper=L_,it.trim=R_,it.trimEnd=O_,it.trimStart=I_,it.truncate=D_,it.unescape=z_,it.uniqueId=s1,it.upperCase=k_,it.upperFirst=mf,it.each=pp,it.eachRight=mp,it.first=up,yf(it,function(){var r={};return Nr(it,function(h,v){Ti.call(it.prototype,v)||(r[v]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){_i.prototype[r]=function(v){v=v===s?1:vn(wi(v),0);var O=this.__filtered__&&!h?new _i(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(v,O.__takeCount__):O.__views__.push({size:Vn(v,It),type:r+(O.__dir__<0?"Right":"")}),O},_i.prototype[r+"Right"]=function(v){return this.reverse()[r](v).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var v=h+1,O=v==G||v==Et;_i.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:si(Y,3),type:v}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var v="take"+(h?"Right":"");_i.prototype[r]=function(){return this[v](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var v="drop"+(h?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[v](1)}}),_i.prototype.compact=function(){return this.filter(Gr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new _i(this):this.map(function(v){return e(v,r,h)})}),_i.prototype.reject=function(r){return this.filter(Ju(si(r)))},_i.prototype.slice=function(r,h){r=wi(r);var v=this;return v.__filtered__&&(r>0||h<0)?new _i(v):(r<0?v=v.takeRight(-r):r&&(v=v.drop(r)),h!==s&&(h=wi(h),v=h<0?v.dropRight(-h):v.take(h-r)),v)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(It)},Nr(_i.prototype,function(r,h){var v=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var yt=this.__wrapped__,bt=O?[1]:arguments,Bt=yt instanceof _i,oe=bt[0],le=Bt||vi(yt),de=function(Ri){var Ui=Y.apply(it,fo([Ri],bt));return O&&ke?Ui[0]:Ui};le&&v&&typeof oe=="function"&&oe.length!=1&&(Bt=le=!1);var ke=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ke,Mi=Bt&&!Je;if(!ut&&le){yt=Mi?yt:new _i(this);var ui=r.apply(yt,bt);return ui.__actions__.push({func:Xu,args:[de],thisArg:s}),new qn(ui,ke)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],v=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[v](function(yt){return h.apply(vi(yt)?yt:[],Y)})}}),Nr(_i.prototype,function(r,h){var v=it[h];if(v){var O=v.name+"";Ti.call(rs,O)||(rs[O]=[]),rs[O].push({name:h,func:v})}}),rs[$i(s,T).name]=[{name:"wrapper",func:s}],_i.prototype.clone=ba,_i.prototype.reverse=Ou,_i.prototype.value=Ca,it.prototype.at=fv,it.prototype.chain=dv,it.prototype.commit=pv,it.prototype.next=mv,it.prototype.plant=vv,it.prototype.reverse=yv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=_v,it.prototype.first=it.prototype.head,ns&&(it.prototype[ns]=gv),it},es=Xc();Zr?((Zr.exports=es)._=es,Zo._=es):gn._=es}).call(Er)}(lu,lu.exports);var am=lu.exports;const ec=tc(am);class lm{constructor(a=[],s=!1){Ba(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=a,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=s):console.error("未引入指定插件")}remove(a,s=null){s&&s.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,s){return new Promise((c,f)=>{let u,m=s==null?void 0:s.isClone;if(typeof a!="object"){let g=window.map.getLayer(a,"vectorId");if(g)return c(g);u=this.query(a)}else{let g=window.map.getLayer(a.id,"vectorId");if(g)return c(g);u=a}if(u){let{value:g,url:_,id:S,title:b}=u;new Cesium.Resource({url:_}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:C,materialType:U,materialOptions:N,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_near:Z,distanceDisplayCondition_far:ct,zIndex:Rt,label:tt,fill:_t,diffHeight:G,outline:Pt,outlineStyle:Et,color:At,pixelSize:ce,outlineColor:re,outlineWidth:Ft,classificationType:It,setHeight:Nt}=JSON.parse(L),Pe;switch(tt.height==""&&(tt.height=null),this.isDynamicMasking?(tt.color=Cesium.Color.fromCssColorString(tt.color).withAlpha(0),tt.outlineColor=Cesium.Color.fromCssColorString(tt.outlineColor).withAlpha(.001),tt.backgroundColor=Cesium.Color.fromCssColorString(tt.backgroundColor).withAlpha(.001),tt.background=!1,tt.outline=!1,tt.show=!1):(tt.color=Cesium.Color.fromCssColorString(tt.color),tt.outlineColor=Cesium.Color.fromCssColorString(tt.outlineColor),tt.backgroundColor=Cesium.Color.fromCssColorString(tt.backgroundColor)),T){case"LineString":case"MultiLineString":tt.backgroundPadding=5,Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:C,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,materialType:U,materialOptions:N,classificationType:It,setHeight:Nt,label:tt}},hasZIndex:!0,zIndex:Rt});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:_t,diffHeight:G,clampToGround:X,materialType:U,materialOptions:N,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,outlineStyle:Et,outline:Pt,classificationType:It,setHeight:Nt,label:tt}}});break;case"Point":case"MultiPoint":Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointC",styleOptions:{color:At,pixelSize:ce,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:tt}}});break}m?window.mapClone.mapEx.addLayer(Pe):window.map.addLayer(Pe),Pe.bindPopup(Wt=>{let $e='<div class="bim-map-popup">';return Object.keys(Wt.graphic.attr).forEach((Si,Oe)=>{Wt.graphic.attr[Si]&&($e+=`<p><b>${Si}</b> : ${Wt.graphic.attr[Si]}</p>`)}),$e+="</div>",$e});let pe=ec.debounce(Wt=>{window.dynamicMasking.add(Wt,JSON.parse(L))},500);Pe.readyPromise.then(Wt=>{window.dynamicMasking&&pe(Wt),c(Wt)}).catch(Wt=>{console.error("测试shp矢量加载失败",Wt),c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})})}else c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】「"+b+"」链接地址有误",type:"error",id:S,url:_})})}else c({tite:"【矢量】ID:「"+a+"」已删除",type:"error",id:a})})}updateData(a){this.vectorArr=a}processingKML(a){let s,c=2e3,f=!0,{kmlInfo:u}=a,{fill:m,areaColor:g,areaSideColor:_,transparency:S,isAreaSideColor:b,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:C}=u,U={fill:m,color:g,opacity:S||.5,outline:b,outlineColor:_,outlineWidth:2,clampToGround:C,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:s,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:f,clampToGround:C||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(s=>s.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,s,c){let f=window.map.getLayer(a,"vectorId"),u=bf(s,c);f&&(f.eachGraphic(m=>{m.label&&m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),u.label&&u.label.height==""&&(u.label.height=null),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let s=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,vectorId:"border",format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(f){console.error(f)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(s)}switchDynamicMasking(a){this.isDynamicMasking=a}}class hm{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,s=>{console.error("地形服务加载失败",s),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(s=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",s)})):console.error("未引入指定插件")}add(a,s){if(s==null?void 0:s.isClone)mapClone?window.mapClone.mapEx.terrainProvider=window.map.terrainProvider:console.error("副屏幕未初始化");else{let{url:f,id:u}=a;if(this.terrainProviderId==u&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:u,type:"xyz",url:f,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=u}}show(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!0:window.map.hasTerrain=!0}hide(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!1:window.map.hasTerrain=!1}on(a,s){a=="load"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class um{constructor(a=[],s){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,s?this.gisTkone={Authorization:`Bearer ${s}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,s=!0,c){let f;if(typeof a!="object"?f=a:f=a.imageXyzId,window.map.getLayer(f,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:g,layerHue:_,layerSaturation:S,layerGamma:b,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let C=this.query(a);C||D("缺少树结构");let{gisInfo:U}=C;F=U.id,L=U.order,E=C.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:g,hue:_,gamma:b,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:s?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,C=>{k(C)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(C=>{this.elevationImageLayer.on(fnType.get(C),U=>{c[C](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(s=>s.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class cm{constructor(a,...s){Ba(this,"manualFreed",ec.debounce(()=>{let{lng:a,lat:s,alt:c,pitch:f}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,s,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(f,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,s){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,s){this[a].push(s)}remove(a,s){this[a]=this[a].filter(function(c){return c!==s})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,s,c,f=[],u={}){let m,g,_;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,_=m.find((S,b)=>{if(S.id==s)return g=b,S}),c){case"delete":m.splice(g,1);break;case"update":_.excavationDetails=f;break;case"add":m.push(u);break;case"edit":_.excavationDetails=u.excavationDetails,_.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=ec.throttle(()=>{let{lng:s,lat:c,alt:f,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let g=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([s,c,f],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,g))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,s,c="id"){let f;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==s)return f=m,f;if(m.children&&m.children.length>0&&(f=this.findPnodeId(m.children,s,c),f))return f}return f}}disTance(a,s,c){let f,u,m;return f=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...s),m=Cesium.Cartesian3.distance(f,u),m>c}calculateDistance(a,s){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let f=(s-s/5)*(Math.abs(c)/90)+s/5;return Math.round(f)}}class fm{constructor(a=[],s){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,s){a=="change"||a=="collection"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}offAll(){this.events={}}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}add(a,s=null,c){return new Promise((f,u)=>{var m;if(this.entityLayer){let g,_,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S)):f({tite:"【标绘】 ID:「"+a+"」已删除",type:"error",id:a}));else{if(typeof a!="object"?(g=this.entityLayer.getGraphicByAttr(a,"entityId"),_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a):f({tite:"【标绘】ID:「"+a+"」已删除",type:"error",id:a})):(g=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||s,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&s&&(S.attr.entityId=s)),g)return f();this.entityLayer.addGraphic(S),f(S)}}else f(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(s=>s.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,s=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");s==null||s.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,s=null){var f,u;(s==null?void 0:s.isClone)?this.entityCloneLayer&&((f=this.entityCloneLayer.getGraphicByAttr(a,"entityId"))==null||f.remove()):this.entityLayer.getGraphicByAttr(a,"entityId")&&((u=this.entityLayer.getGraphicByAttr(a,"entityId"))==null||u.remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){(this.entityCloneLayer==null||this.entityCloneLayer.state=="destroy")&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((s,c)=>{let{type:f,style:u}=a;if(a.drawShow=!1,f=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:g,theme_color:_,font_color:S,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(g){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
|
|
2640
|
+
}`;var Mi=Np(function(){return Fi(ut,Je+"return "+de).apply(s,yt)});if(Mi.source=de,cf(Mi))throw Mi;return Mi}function P_(r){return Zi(r).toLowerCase()}function L_(r){return Zi(r).toUpperCase()}function R_(r,h,v){if(r=Zi(r),r&&(v||h===s))return ya(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=ts(O,Y),yt=bs(O,Y)+1;return xn(O,ut,yt).join("")}function O_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.slice(0,_a(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=bs(O,ar(h))+1;return xn(O,0,Y).join("")}function I_(r,h,v){if(r=Zi(r),r&&(v||h===s))return r.replace(lo,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ts(O,ar(h));return xn(O,Y).join("")}function D_(r,h){var v=ct,O=Rt;if(wn(h)){var Y="separator"in h?h.separator:Y;v="length"in h?wi(h.length):v,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var yt=ar(r);ut=yt.length}if(v>=ut)return r;var bt=v-$r(O);if(bt<1)return O;var Bt=yt?xn(yt,0,bt).join(""):r.slice(0,bt);if(Y===s)return Bt+O;if(yt&&(bt+=Bt.length-bt),ff(Y)){if(r.slice(bt).search(Y)){var oe,le=Bt;for(Y.global||(Y=Kn(Y.source,Zi(jl.exec(Y))+"g")),Y.lastIndex=0;oe=Y.exec(le);)var de=oe.index;Bt=Bt.slice(0,de===s?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ke=Bt.lastIndexOf(Y);ke>-1&&(Bt=Bt.slice(0,ke))}return Bt+O}function z_(r){return r=Zi(r),r&&qo.test(r)?r.replace(Ao,th):r}var k_=ze(function(r,h,v){return r+(v?" ":"")+h.toUpperCase()}),mf=Me("toUpperCase");function Bp(r,h,v){return r=Zi(r),h=v?s:h,h===s?Ls(r)?jc(r):ol(r):r.match(h)||[]}var Np=ae(function(r,h){try{return yr(r,s,h)}catch(v){return cf(v)?v:new ai(v)}}),B_=Vs(function(r,h){return Ji(h,function(v){v=us(v),Bo(r,v,hf(r[v],r))}),r});function N_(r){var h=r==null?0:r.length,v=si();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[v(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(yr(ut[0],this,O))return yr(ut[1],this,O)}})}function F_(r){return Ra(wr(r,I))}function gf(r){return function(){return r}}function U_(r,h){return r==null||r!==r?h:r}var G_=Oi(),H_=Oi(!0);function Gr(r){return r}function vf(r){return H(typeof r=="function"?r:wr(r,I))}function V_(r){return gt(wr(r,I))}function W_(r,h){return Ct(r,wr(h,I))}var j_=ae(function(r,h){return function(v){return e(v,r,h)}}),X_=ae(function(r,h){return function(v){return e(r,v,h)}});function yf(r,h,v){var O=Jn(h),Y=Us(h,O);v==null&&!(wn(h)&&(Y.length||!O.length))&&(v=h,h=r,r=this,Y=Us(h,Jn(h)));var ut=!(wn(v)&&"chain"in v)||!!v.chain,yt=js(r);return Ji(Y,function(bt){var Bt=h[bt];r[bt]=Bt,yt&&(r.prototype[bt]=function(){var oe=this.__chain__;if(ut||oe){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Bt,args:arguments,thisArg:r}),le.__chain__=oe,le}return Bt.apply(r,fo([this.value()],arguments))})}),r}function q_(){return gn._===this&&(gn._=Kr),this}function _f(){}function Y_(r){return r=wi(r),ae(function(h){return J(h,r)})}var Z_=Nn(Yi),J_=Nn(Bh),$_=Nn(Po);function Fp(r){return nf(r)?$o(us(r)):$t(r)}function K_(r){return function(h){return r==null?s:ls(r,h)}}var Q_=eu(),t1=eu(!0);function xf(){return[]}function wf(){return!1}function e1(){return{}}function i1(){return""}function n1(){return!0}function r1(r,h){if(r=wi(r),r<1||r>ce)return[];var v=It,O=Vn(r,It);h=si(h),r-=It;for(var Y=Ro(O,h);++v<r;)h(v);return Y}function o1(r){return vi(r)?Yi(r,us):to(r)?[r]:er(op(Zi(r)))}function s1(r){var h=++ur;return Zi(r)+h}var a1=Tr(function(r,h){return r+h},0),l1=dh("ceil"),h1=Tr(function(r,h){return r/h},1),u1=dh("floor");function c1(r){return r&&r.length?Mo(r,Gr,uh):s}function f1(r,h){return r&&r.length?Mo(r,si(h,2),uh):s}function d1(r){return va(r,Gr)}function p1(r,h){return va(r,si(h,2))}function m1(r){return r&&r.length?Mo(r,Gr,rt):s}function g1(r,h){return r&&r.length?Mo(r,si(h,2),rt):s}var v1=Tr(function(r,h){return r*h},1),y1=dh("round"),_1=Tr(function(r,h){return r-h},0);function x1(r){return r&&r.length?Qo(r,Gr):0}function w1(r,h){return r&&r.length?Qo(r,si(h,2)):0}return it.after=Vv,it.ary=gp,it.assign=Ly,it.assignIn=Lp,it.assignInWith=Qu,it.assignWith=Ry,it.at=Oy,it.before=vp,it.bind=hf,it.bindAll=B_,it.bindKey=yp,it.castArray=ey,it.chain=dp,it.chunk=u0,it.compact=c0,it.concat=f0,it.cond=N_,it.conforms=F_,it.constant=gf,it.countBy=xv,it.create=Iy,it.curry=_p,it.curryRight=xp,it.debounce=wp,it.defaults=Dy,it.defaultsDeep=zy,it.defer=Wv,it.delay=jv,it.difference=d0,it.differenceBy=p0,it.differenceWith=m0,it.drop=g0,it.dropRight=v0,it.dropRightWhile=y0,it.dropWhile=_0,it.fill=x0,it.filter=Tv,it.flatMap=Ev,it.flatMapDeep=bv,it.flatMapDepth=Cv,it.flatten=hp,it.flattenDeep=w0,it.flattenDepth=T0,it.flip=Xv,it.flow=G_,it.flowRight=H_,it.fromPairs=M0,it.functions=Hy,it.functionsIn=Vy,it.groupBy=Av,it.initial=E0,it.intersection=b0,it.intersectionBy=C0,it.intersectionWith=A0,it.invert=jy,it.invertBy=Xy,it.invokeMap=Lv,it.iteratee=vf,it.keyBy=Rv,it.keys=Jn,it.keysIn=Ur,it.map=qu,it.mapKeys=Yy,it.mapValues=Zy,it.matches=V_,it.matchesProperty=W_,it.memoize=Zu,it.merge=Jy,it.mergeWith=Rp,it.method=j_,it.methodOf=X_,it.mixin=yf,it.negate=Ju,it.nthArg=Y_,it.omit=$y,it.omitBy=Ky,it.once=qv,it.orderBy=Ov,it.over=Z_,it.overArgs=Yv,it.overEvery=J_,it.overSome=$_,it.partial=uf,it.partialRight=Tp,it.partition=Iv,it.pick=Qy,it.pickBy=Op,it.property=Fp,it.propertyOf=K_,it.pull=O0,it.pullAll=cp,it.pullAllBy=I0,it.pullAllWith=D0,it.pullAt=z0,it.range=Q_,it.rangeRight=t1,it.rearg=Zv,it.reject=kv,it.remove=k0,it.rest=Jv,it.reverse=af,it.sampleSize=Nv,it.set=e_,it.setWith=i_,it.shuffle=Fv,it.slice=B0,it.sortBy=Hv,it.sortedUniq=W0,it.sortedUniqBy=j0,it.split=E_,it.spread=$v,it.tail=X0,it.take=q0,it.takeRight=Y0,it.takeRightWhile=Z0,it.takeWhile=J0,it.tap=cv,it.throttle=Kv,it.thru=Xu,it.toArray=Cp,it.toPairs=Ip,it.toPairsIn=Dp,it.toPath=o1,it.toPlainObject=Pp,it.transform=n_,it.unary=Qv,it.union=$0,it.unionBy=K0,it.unionWith=Q0,it.uniq=tv,it.uniqBy=ev,it.uniqWith=iv,it.unset=r_,it.unzip=lf,it.unzipWith=fp,it.update=o_,it.updateWith=s_,it.values=gh,it.valuesIn=a_,it.without=nv,it.words=Bp,it.wrap=ty,it.xor=rv,it.xorBy=ov,it.xorWith=sv,it.zip=av,it.zipObject=lv,it.zipObjectDeep=hv,it.zipWith=uv,it.entries=Ip,it.entriesIn=Dp,it.extend=Lp,it.extendWith=Qu,yf(it,it),it.add=a1,it.attempt=Np,it.camelCase=c_,it.capitalize=zp,it.ceil=l1,it.clamp=l_,it.clone=iy,it.cloneDeep=ry,it.cloneDeepWith=oy,it.cloneWith=ny,it.conformsTo=sy,it.deburr=kp,it.defaultTo=U_,it.divide=h1,it.endsWith=f_,it.eq=Uo,it.escape=d_,it.escapeRegExp=p_,it.every=wv,it.find=Mv,it.findIndex=ap,it.findKey=ky,it.findLast=Sv,it.findLastIndex=lp,it.findLastKey=By,it.floor=u1,it.forEach=pp,it.forEachRight=mp,it.forIn=Ny,it.forInRight=Fy,it.forOwn=Uy,it.forOwnRight=Gy,it.get=df,it.gt=ay,it.gte=ly,it.has=Wy,it.hasIn=pf,it.head=up,it.identity=Gr,it.includes=Pv,it.indexOf=S0,it.inRange=h_,it.invoke=qy,it.isArguments=Pl,it.isArray=vi,it.isArrayBuffer=hy,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=uy,it.isBuffer=ka,it.isDate=cy,it.isElement=fy,it.isEmpty=dy,it.isEqual=py,it.isEqualWith=my,it.isError=cf,it.isFinite=gy,it.isFunction=js,it.isInteger=Mp,it.isLength=$u,it.isMap=Sp,it.isMatch=vy,it.isMatchWith=yy,it.isNaN=_y,it.isNative=xy,it.isNil=Ty,it.isNull=wy,it.isNumber=Ep,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=ou,it.isRegExp=ff,it.isSafeInteger=My,it.isSet=bp,it.isString=Ku,it.isSymbol=to,it.isTypedArray=mh,it.isUndefined=Sy,it.isWeakMap=Ey,it.isWeakSet=by,it.join=P0,it.kebabCase=m_,it.last=bo,it.lastIndexOf=L0,it.lowerCase=g_,it.lowerFirst=v_,it.lt=Cy,it.lte=Ay,it.max=c1,it.maxBy=f1,it.mean=d1,it.meanBy=p1,it.min=m1,it.minBy=g1,it.stubArray=xf,it.stubFalse=wf,it.stubObject=e1,it.stubString=i1,it.stubTrue=n1,it.multiply=v1,it.nth=R0,it.noConflict=q_,it.noop=_f,it.now=Yu,it.pad=y_,it.padEnd=__,it.padStart=x_,it.parseInt=w_,it.random=u_,it.reduce=Dv,it.reduceRight=zv,it.repeat=T_,it.replace=M_,it.result=t_,it.round=y1,it.runInContext=Lt,it.sample=Bv,it.size=Uv,it.snakeCase=S_,it.some=Gv,it.sortedIndex=N0,it.sortedIndexBy=F0,it.sortedIndexOf=U0,it.sortedLastIndex=G0,it.sortedLastIndexBy=H0,it.sortedLastIndexOf=V0,it.startCase=b_,it.startsWith=C_,it.subtract=_1,it.sum=x1,it.sumBy=w1,it.template=A_,it.times=r1,it.toFinite=Xs,it.toInteger=wi,it.toLength=Ap,it.toLower=P_,it.toNumber=Co,it.toSafeInteger=Py,it.toString=Zi,it.toUpper=L_,it.trim=R_,it.trimEnd=O_,it.trimStart=I_,it.truncate=D_,it.unescape=z_,it.uniqueId=s1,it.upperCase=k_,it.upperFirst=mf,it.each=pp,it.eachRight=mp,it.first=up,yf(it,function(){var r={};return Nr(it,function(h,v){Ti.call(it.prototype,v)||(r[v]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){_i.prototype[r]=function(v){v=v===s?1:vn(wi(v),0);var O=this.__filtered__&&!h?new _i(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(v,O.__takeCount__):O.__views__.push({size:Vn(v,It),type:r+(O.__dir__<0?"Right":"")}),O},_i.prototype[r+"Right"]=function(v){return this.reverse()[r](v).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var v=h+1,O=v==G||v==Et;_i.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:si(Y,3),type:v}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var v="take"+(h?"Right":"");_i.prototype[r]=function(){return this[v](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var v="drop"+(h?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[v](1)}}),_i.prototype.compact=function(){return this.filter(Gr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new _i(this):this.map(function(v){return e(v,r,h)})}),_i.prototype.reject=function(r){return this.filter(Ju(si(r)))},_i.prototype.slice=function(r,h){r=wi(r);var v=this;return v.__filtered__&&(r>0||h<0)?new _i(v):(r<0?v=v.takeRight(-r):r&&(v=v.drop(r)),h!==s&&(h=wi(h),v=h<0?v.dropRight(-h):v.take(h-r)),v)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(It)},Nr(_i.prototype,function(r,h){var v=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var yt=this.__wrapped__,bt=O?[1]:arguments,Bt=yt instanceof _i,oe=bt[0],le=Bt||vi(yt),de=function(Ri){var Ui=Y.apply(it,fo([Ri],bt));return O&&ke?Ui[0]:Ui};le&&v&&typeof oe=="function"&&oe.length!=1&&(Bt=le=!1);var ke=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ke,Mi=Bt&&!Je;if(!ut&&le){yt=Mi?yt:new _i(this);var ui=r.apply(yt,bt);return ui.__actions__.push({func:Xu,args:[de],thisArg:s}),new qn(ui,ke)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],v=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[v](function(yt){return h.apply(vi(yt)?yt:[],Y)})}}),Nr(_i.prototype,function(r,h){var v=it[h];if(v){var O=v.name+"";Ti.call(rs,O)||(rs[O]=[]),rs[O].push({name:h,func:v})}}),rs[$i(s,T).name]=[{name:"wrapper",func:s}],_i.prototype.clone=ba,_i.prototype.reverse=Ou,_i.prototype.value=Ca,it.prototype.at=fv,it.prototype.chain=dv,it.prototype.commit=pv,it.prototype.next=mv,it.prototype.plant=vv,it.prototype.reverse=yv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=_v,it.prototype.first=it.prototype.head,ns&&(it.prototype[ns]=gv),it},es=Xc();Zr?((Zr.exports=es)._=es,Zo._=es):gn._=es}).call(Er)}(lu,lu.exports);var am=lu.exports;const ec=tc(am);class lm{constructor(a=[],s=!1){Ba(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=a,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=s,this.disabled=!1):console.error("未引入指定插件")}remove(a,s=null){s&&s.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,s){return new Promise((c,f)=>{let u,m=s==null?void 0:s.isClone;if(typeof a!="object"){let g=window.map.getLayer(a,"vectorId");if(g)return c(g);u=this.query(a)}else{let g=window.map.getLayer(a.id,"vectorId");if(g)return c(g);u=a}if(u){let{value:g,url:_,id:S,title:b}=u;new Cesium.Resource({url:_}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:C,materialType:U,materialOptions:N,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_near:Z,distanceDisplayCondition_far:ct,zIndex:Rt,label:tt,fill:_t,diffHeight:G,outline:Pt,outlineStyle:Et,color:At,pixelSize:ce,outlineColor:re,outlineWidth:Ft,classificationType:It,setHeight:Nt}=JSON.parse(L),Pe;switch(tt.height==""&&(tt.height=null),this.isDynamicMasking?(tt.color=Cesium.Color.fromCssColorString(tt.color).withAlpha(0),tt.outlineColor=Cesium.Color.fromCssColorString(tt.outlineColor).withAlpha(.001),tt.backgroundColor=Cesium.Color.fromCssColorString(tt.backgroundColor).withAlpha(.001),tt.background=!1,tt.outline=!1,tt.show=!1):(tt.color=Cesium.Color.fromCssColorString(tt.color),tt.outlineColor=Cesium.Color.fromCssColorString(tt.outlineColor),tt.backgroundColor=Cesium.Color.fromCssColorString(tt.backgroundColor)),T){case"LineString":case"MultiLineString":tt.backgroundPadding=5,Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:C,clampToGround:X,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,materialType:U,materialOptions:N,classificationType:It,setHeight:Nt,label:tt}},hasZIndex:!0,zIndex:Rt});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:_t,diffHeight:G,clampToGround:X,materialType:U,materialOptions:N,distanceDisplayCondition:K,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:Z,outlineStyle:Et,outline:Pt,classificationType:It,setHeight:Nt,label:tt}}});break;case"Point":case"MultiPoint":Pe=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointC",styleOptions:{color:At,pixelSize:ce,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:tt}}});break}m?window.mapClone.mapEx.addLayer(Pe):window.map.addLayer(Pe),Pe.bindPopup(Wt=>{if(this.disabled==!0)return!1;let $e='<div class="bim-map-popup">';return Object.keys(Wt.graphic.attr).forEach((Si,Oe)=>{Wt.graphic.attr[Si]&&($e+=`<p><b>${Si}</b> : ${Wt.graphic.attr[Si]}</p>`)}),$e+="</div>",$e});let pe=ec.debounce(Wt=>{window.dynamicMasking.add(Wt,JSON.parse(L))},500);Pe.readyPromise.then(Wt=>{window.dynamicMasking&&pe(Wt),c(Wt)}).catch(Wt=>{console.error("测试shp矢量加载失败",Wt),c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})})}else c({tite:"【矢量】「"+F+"」无法加载",type:"error",id:D,url:_})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】「"+b+"」链接地址有误",type:"error",id:S,url:_})})}else c({tite:"【矢量】ID:「"+a+"」已删除",type:"error",id:a})})}updateData(a){this.vectorArr=a}processingKML(a){let s,c=2e3,f=!0,{kmlInfo:u}=a,{fill:m,areaColor:g,areaSideColor:_,transparency:S,isAreaSideColor:b,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:C}=u,U={fill:m,color:g,opacity:S||.5,outline:b,outlineColor:_,outlineWidth:2,clampToGround:C,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:s,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:f,clampToGround:C||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(s=>s.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,s,c){let f=window.map.getLayer(a,"vectorId"),u=bf(s,c);f&&(f.eachGraphic(m=>{m.label&&m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),u.label&&u.label.height==""&&(u.label.height=null),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let s=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,vectorId:"border",format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(f){console.error(f)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(s)}switchDynamicMasking(a){this.isDynamicMasking=a}}class hm{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,s=>{console.error("地形服务加载失败",s),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(s=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",s)})):console.error("未引入指定插件")}add(a,s){if(s==null?void 0:s.isClone)mapClone?window.mapClone.mapEx.terrainProvider=window.map.terrainProvider:console.error("副屏幕未初始化");else{let{url:f,id:u}=a;if(this.terrainProviderId==u&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:u,type:"xyz",url:f,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=u}}show(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!0:window.map.hasTerrain=!0}hide(a){(a==null?void 0:a.isClone)?window.mapClone.mapEx.hasTerrain=!1:window.map.hasTerrain=!1}on(a,s){a=="load"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class um{constructor(a=[],s){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,s?this.gisTkone={Authorization:`Bearer ${s}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,s=!0,c){let f;if(typeof a!="object"?f=a:f=a.imageXyzId,window.map.getLayer(f,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:g,layerHue:_,layerSaturation:S,layerGamma:b,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let C=this.query(a);C||D("缺少树结构");let{gisInfo:U}=C;F=U.id,L=U.order,E=C.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:g,hue:_,gamma:b,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:s?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,C=>{k(C)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(C=>{this.elevationImageLayer.on(fnType.get(C),U=>{c[C](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(s=>s.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class cm{constructor(a,...s){Ba(this,"manualFreed",ec.debounce(()=>{let{lng:a,lat:s,alt:c,pitch:f}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,s,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(f,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,s){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,s){this[a].push(s)}remove(a,s){this[a]=this[a].filter(function(c){return c!==s})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,s,c,f=[],u={}){let m,g,_;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,_=m.find((S,b)=>{if(S.id==s)return g=b,S}),c){case"delete":m.splice(g,1);break;case"update":_.excavationDetails=f;break;case"add":m.push(u);break;case"edit":_.excavationDetails=u.excavationDetails,_.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=ec.throttle(()=>{let{lng:s,lat:c,alt:f,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let g=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([s,c,f],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,g))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,s,c="id"){let f;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==s)return f=m,f;if(m.children&&m.children.length>0&&(f=this.findPnodeId(m.children,s,c),f))return f}return f}}disTance(a,s,c){let f,u,m;return f=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...s),m=Cesium.Cartesian3.distance(f,u),m>c}calculateDistance(a,s){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let f=(s-s/5)*(Math.abs(c)/90)+s/5;return Math.round(f)}}class fm{constructor(a=[],s){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,s){a=="change"||a=="collection"?this.events[a]?this.events[a].push(s):this.events[a]=[s]:console.log("未开放自定义")}emit(a,...s){this.events[a]!=null&&this.events[a].forEach(c=>c(...s))}off(a,s){this.events[a]=this.events[a].filter(c=>c!==s)}offAll(){this.events={}}once(a,s){const c=()=>{s(),this.off(a,c)};this.on(a,c)}add(a,s=null,c){return new Promise((f,u)=>{var m;if(this.entityLayer){let g,_,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S)):f({tite:"【标绘】 ID:「"+a+"」已删除",type:"error",id:a}));else{if(typeof a!="object"?(g=this.entityLayer.getGraphicByAttr(a,"entityId"),_=this.query(a),_?(S=JSON.parse(_.bimPlanPainting.graphic),S.attr=S.attr||{},S.attr.entityId=a):f({tite:"【标绘】ID:「"+a+"」已删除",type:"error",id:a})):(g=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||s,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&s&&(S.attr.entityId=s)),g)return f();this.entityLayer.addGraphic(S),f(S)}}else f(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(s=>s.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,s=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");s==null||s.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,s=null){var f,u;(s==null?void 0:s.isClone)?this.entityCloneLayer&&((f=this.entityCloneLayer.getGraphicByAttr(a,"entityId"))==null||f.remove()):this.entityLayer.getGraphicByAttr(a,"entityId")&&((u=this.entityLayer.getGraphicByAttr(a,"entityId"))==null||u.remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){(this.entityCloneLayer==null||this.entityCloneLayer.state=="destroy")&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((s,c)=>{let{type:f,style:u}=a;if(a.drawShow=!1,f=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:g,theme_color:_,font_color:S,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:b,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(g){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
|
|
2641
2641
|
<div class="title">${m}</div>
|
|
2642
2642
|
</div>`,R.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(R).then(C=>{setTimeout(()=>{this.entityItem=C,this.entityLayer.startEditing(C),s(C)},500)})}else this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m),s(m)},500)})})}stopDraw(a=!0){this.entityLayer&&this.entityLayer.stopDraw(),a&&this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem(a){let s=this.entityLayer.getGraphicByAttr(a,"entityId");s?this.entityItem=s:this.removeEntityItem()}edit(a,s,c,f){let u=bf(s,c);if(s.vectorStyle&&this.entityItem)if(s.vectorStyle.divType==5)this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.LEFT});else{if(this.entityItem.type=="circleP"&&Object.keys(u).length==1&&Object.keys(u)[0]=="radius"&&u.radius==this.entityItem.options.style.radius)return!1;this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.CENTER})}}enableDragging(a=!0){a?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:a=>{this.emit("change",a)}},{text:"收藏对象",callback:a=>{this.emit("collection",a)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData(a){let s={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},c={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{},isMirror:!1};const f=document.createElement("div");f.innerHTML=a;const u=f.querySelector(".entity-div-style");return console.log("解耦",u),Object.keys(s).forEach(m=>{m=="--theme-color2"||m=="--theme-color3"?c.divStyle[s[m]]=u.style.getPropertyValue(m)||"#fff":c[s[m]]=u.style.getPropertyValue(m)}),c.title=u.querySelector(".title")?u.querySelector(".title").innerText:"标题",c.content=u.querySelector(".content")?u.querySelector(".content").innerText:"内容",c.divType=u.classList[1]?u.classList[1].replace("entity-div-style",""):"",c.isMirror=u.classList.contains("isMirror"),console.log("解耦",c),c}updateHtml(a,s){let{theme_color:c,font_color:f,title:u,content:m,divStyle:g}=s,{theme_color2:_,theme_color3:S}=g,b="";switch(a){case"1":b=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${c};--theme-font-color1:${f};">
|
|
2643
2643
|
<div class="title">${u}</div>
|
|
@@ -2703,4 +2703,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
2703
2703
|
* Subject to the terms at https://gsap.com/standard-license or for
|
|
2704
2704
|
* Club GSAP members, the agreement issued with that membership.
|
|
2705
2705
|
* @author: Jack Doyle, jack@greensock.com
|
|
2706
|
-
*/var Sd,Qs,Nl,Ic,Wa,Ed,Dc,ug=function(){return typeof window<"u"},ds={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,f,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(f,g)}):this.tfm[a]=m.x?m[a]:ps(f,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,f=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[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(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),f.zOrigin&&c[Lr]&&(c[Lr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(f){return c.save(f)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var f=getComputedStyle(a);return f[s]||f.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||f.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var f=s||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Wa=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("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(s),s.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(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},Xa=function(a,s){if(s){var c=a.style,f;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(f=s.substr(0,2),(f==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(f==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,f,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),I=100,k=f==="px",D=f==="%",F,E,L,T;if(f===m||!u||kd[f]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*I:u/100*F);if(g[_?"width":"height"]=I+(k?m:f),E=~s.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*I);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=I+f,F=a[b],M?a.style[s]=M:Xa(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return _&&D&&(L=Na(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/I:F&&u?I/F*u:0)},ps=function(a,s,c,f){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,f),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,f){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,I,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[s],a.style[s]=f,f=Xo(a,s)||f,E?a.style[s]=E:Xa(a,s)),b=[c,f],ud(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;I=Ol.exec(f);)L=I[0],M=f.substring(_,I.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===f.length&&(f+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<f.length?f.substring(_,f.length):""}else g.r=s==="display"&&f==="none"?Ad:Cd;return If.test(f)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],f=s[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),s[0]=Bd[c]||c,s[1]=Bd[f]||f,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,f=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)f.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),Xa(c,g);_&&(Xa(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(f)))}},Tu={clearProps:function(a,s,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Na(a),f=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?f.display=_:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,f,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,I=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=I+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",I,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=I=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(f[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),f.scale=f.rotate=f.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(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],I=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,M=_t||G?Ul(_t,G)*ja+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),I-=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],I=X[13],k=X[14],K=Ul(Wt,Nt),L=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),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),K=Ul(-_t,Nt),T=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),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),K=Ul(tt,Rt),E=K*ja,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=I-((c.yPercent=I&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-I)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(f[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var f=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",f)))+f},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},qa="0deg",Rh="0px",Ya=") ",Gd=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,I=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(I!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(I)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),I!==qa&&(C+="rotateX("+I+Ya),(k!==qa||D!==qa)&&(C+="skew("+k+", "+D+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,I=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*I,N=Math.sin(_)*I,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=I,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(f||u)&&(Z=D.getBBox(),R=Rn(R+f/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,f,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=_-f,b=f+S+"deg",I,k;return g&&(I=u.split("_")[1],I==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),I==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:I==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,f,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var f=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,I,k,D,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),Xa(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=f[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),I=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,I,k-I,kc),a._pt.u=F||0,a._props.push(_));Hd(g,f)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",f="Bottom",u="Left",m=(a<3?[s,c,f,u]:[s+u,s+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,I){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,I)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,f,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,f,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,f,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,f,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),I=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&I&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",I?"inherit":"hidden",!I)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+I):I)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(I||I===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),I||(I=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+I):I)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,f,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var f=jo[s];return f&&f.indexOf(",")<0&&(s=f),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:Xa,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var f=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[f[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[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"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!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=s):console.error("未引入指定插件")}add(a,s){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:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(I=>{I.style.label&&this.DynamicMaskingArr.push({id:f,uid:I.id,position:I._getLablePosition(),label:I.name,width:I.name?u*I.name.length:0,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_}=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),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let f=!1,u=this.DynamicMaskingArr[s],m,g,_;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(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){f=!0;break}f||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={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=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.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 _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:I}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:I.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.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 s;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{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:""})},Dg=()=>{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:""})},zg=()=>{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:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,f=a[s-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"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=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"){_[b]=Wd(u.get(g)[b],m[b]);let I={screenplayId:m.screenplayId,type:m.type};I[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?I[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(I[b][k]="false")}),S={...I,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(I=>I.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,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,s=S.type}}let _;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:I,secondaryScreen:k}=JSON.parse(x.property);I.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:f},(s=="clip"||s=="flat")&&(_[s]=f),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],f):(_[s]=f,_.type="model"):_[s]=f,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=f,_.type="model"):_[s]=f,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:f,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:f,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:f,type:s,clip:"false"}),g&&(_={..._,screenplayId:f,type:s,flat:"false"});break;case"terrain":_={screenplayId:f,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:f,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:f,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:f,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:f,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[f]||(a[f]={type:m}),a[f][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?(window.bimModel.editColor(c),window.schemeEvnModify.clearAllModelModify({isClone:!1})):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.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 Ug{constructor(a){Ba(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Ba(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Ba(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.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}});Ba(this,"terrainFlattenById",(a,s,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:s});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:s});break}});Ba(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.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 s=this.flattenedEvnModifyData.find(c=>c.id==a);return s?(s.id=s.id.toString(),s):null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.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,s,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[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,s,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(s.length>1?s:s[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,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(s),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,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(s),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,s){s=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 _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=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 _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}clearEvnModifyById(a,s){s=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 _=c.bimEnvModifyData[g].id.toString();u===0&&m===0?this.clearModelCutById(f,_,s):u===0&&m===1?this.clearModelFlattenById(f,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=bimModel.queryModel(s,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 s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=s;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),id:s.bimEnvModifyData[g].id.toString()};m.area.push(S)}return m}else if(f===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),S={id:s.bimEnvModifyData[g].id.toString(),positions:_,height:JSON.parse(s.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 Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var f=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{f.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(f=>[f.lng,f.lat,f.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=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}});ms.addGraphic(c)}startDrawGraphic(a){ms.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,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{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 s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(f=>{c({id:s,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:f}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,s){let c=this.queryTrafficSimulationLine(a);c.positions=s,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),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 s=[{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,_)=>{let S=0,b=0,{pointSet:I,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(I));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${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}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...s),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 Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
|
|
2706
|
+
*/var Sd,Qs,Nl,Ic,Wa,Ed,Dc,ug=function(){return typeof window<"u"},ds={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,f,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(f,g)}):this.tfm[a]=m.x?m[a]:ps(f,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,f=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[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(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),f.zOrigin&&c[Lr]&&(c[Lr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(f){return c.save(f)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var f=getComputedStyle(a);return f[s]||f.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||f.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var f=s||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Wa=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("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(s),s.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(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},Xa=function(a,s){if(s){var c=a.style,f;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(f=s.substr(0,2),(f==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(f==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,f,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),I=100,k=f==="px",D=f==="%",F,E,L,T;if(f===m||!u||kd[f]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*I:u/100*F);if(g[_?"width":"height"]=I+(k?m:f),E=~s.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*I);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=I+f,F=a[b],M?a.style[s]=M:Xa(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return _&&D&&(L=Na(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/I:F&&u?I/F*u:0)},ps=function(a,s,c,f){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,f),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,f){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,I,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[s],a.style[s]=f,f=Xo(a,s)||f,E?a.style[s]=E:Xa(a,s)),b=[c,f],ud(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;I=Ol.exec(f);)L=I[0],M=f.substring(_,I.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===f.length&&(f+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<f.length?f.substring(_,f.length):""}else g.r=s==="display"&&f==="none"?Ad:Cd;return If.test(f)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],f=s[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),s[0]=Bd[c]||c,s[1]=Bd[f]||f,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,f=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)f.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),Xa(c,g);_&&(Xa(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(f)))}},Tu={clearProps:function(a,s,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Na(a),f=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?f.display=_:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,f,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,I=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=I+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",I,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=I=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(f[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),f.scale=f.rotate=f.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(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],I=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,M=_t||G?Ul(_t,G)*ja+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),I-=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],I=X[13],k=X[14],K=Ul(Wt,Nt),L=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),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),K=Ul(-_t,Nt),T=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),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),K=Ul(tt,Rt),E=K*ja,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=I-((c.yPercent=I&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-I)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(f[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var f=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",f)))+f},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},qa="0deg",Rh="0px",Ya=") ",Gd=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,I=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(I!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(I)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),I!==qa&&(C+="rotateX("+I+Ya),(k!==qa||D!==qa)&&(C+="skew("+k+", "+D+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,I=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*I,N=Math.sin(_)*I,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=I,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(f||u)&&(Z=D.getBBox(),R=Rn(R+f/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,f,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=_-f,b=f+S+"deg",I,k;return g&&(I=u.split("_")[1],I==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),I==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:I==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,f,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var f=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,I,k,D,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),Xa(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=f[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),I=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,I,k-I,kc),a._pt.u=F||0,a._props.push(_));Hd(g,f)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",f="Bottom",u="Left",m=(a<3?[s,c,f,u]:[s+u,s+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,I){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,I)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,f,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,f,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,f,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,f,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),I=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&I&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",I?"inherit":"hidden",!I)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+I):I)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(I||I===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),I||(I=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+I):I)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,f,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var f=jo[s];return f&&f.indexOf(",")<0&&(s=f),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:Xa,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var f=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[f[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[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"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!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=s):console.error("未引入指定插件")}add(a,s){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:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(I=>{I.style.label&&this.DynamicMaskingArr.push({id:f,uid:I.id,position:I._getLablePosition(),label:I.name,width:I.name?u*I.name.length:0,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_}=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),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let f=!1,u=this.DynamicMaskingArr[s],m,g,_;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(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){f=!0;break}f||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={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=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.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 _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:I}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:I.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.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 s;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{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:""})},Dg=()=>{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:""})},zg=()=>{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:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,f=a[s-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"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=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"){_[b]=Wd(u.get(g)[b],m[b]);let I={screenplayId:m.screenplayId,type:m.type};I[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?I[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(I[b][k]="false")}),S={...I,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(I=>I.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,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,s=S.type}}let _;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:I,secondaryScreen:k}=JSON.parse(x.property);I.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:f},(s=="clip"||s=="flat")&&(_[s]=f),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],f):(_[s]=f,_.type="model"):_[s]=f,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=f,_.type="model"):_[s]=f,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:f,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:f,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:f,type:s,clip:"false"}),g&&(_={..._,screenplayId:f,type:s,flat:"false"});break;case"terrain":_={screenplayId:f,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:f,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:f,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:f,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:f,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[f]||(a[f]={type:m}),a[f][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?(window.bimModel.editColor(c),window.schemeEvnModify.clearAllModelModify({isClone:!1})):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.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 Ug{constructor(a){Ba(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Ba(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Ba(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.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}});Ba(this,"terrainFlattenById",(a,s,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:s});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:s});break}});Ba(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.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 s=this.flattenedEvnModifyData.find(c=>c.id==a);return s||null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.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,s,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[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,s,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(s.length>1?s:s[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,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(s),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,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(s),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,s){s=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 _=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,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=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 _=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,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}clearEvnModifyById(a,s){s=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 _=c.bimEnvModifyData[g].id;u===0&&m===0?this.clearModelCutById(f,_,s):u===0&&m===1?this.clearModelFlattenById(f,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=bimModel.queryModel(s,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 s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=s;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),id:s.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<s.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),S={id:s.bimEnvModifyData[g].id,positions:_,height:JSON.parse(s.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 Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var f=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{f.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(f=>[f.lng,f.lat,f.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=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}});ms.addGraphic(c)}startDrawGraphic(a){ms.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,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{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 s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(f=>{c({id:s,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:f}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,s){let c=this.queryTrafficSimulationLine(a);c.positions=s,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),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 s=[{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,_)=>{let S=0,b=0,{pointSet:I,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(I));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${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}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...s),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 Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chbim-plugins",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.152",
|
|
5
5
|
"description": "此插件和chbim云平台强绑定",
|
|
6
6
|
"main": "chbim-plugins.js",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"vue",
|
|
9
|
-
"Cesium"
|
|
10
|
-
],
|
|
7
|
+
"keywords": ["vue", "Cesium"],
|
|
11
8
|
"author": "zhang",
|
|
12
9
|
"license": "ISC"
|
|
13
10
|
}
|
package/README.md
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
<br />
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="#">
|
|
5
|
-
<img src="https://chbim.ccshcc.cn/baseResources//Logo/Logo.png" alt="Logo" height="60">
|
|
6
|
-
</a>
|
|
7
|
-
<h3 align="center">基于<font color="#4bbbef"> CHBIM云平台 </font>服务的插件</h3>
|
|
8
|
-
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
## 使用指南
|
|
12
|
-
|
|
13
|
-
1. 此插件和 CHBIM 平台强绑定
|
|
14
|
-
2. node 版本>=16.14.2
|
|
15
|
-
|
|
16
|
-
#### 安装
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
npm i chbim-plugins
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
#### 引入
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
import "chbim-plugins/style.css";
|
|
26
|
-
import { ChbimPlugins } from "chbim-plugins";
|
|
27
|
-
......
|
|
28
|
-
......
|
|
29
|
-
......
|
|
30
|
-
app.use(ChbimPlugins);
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
#### 使用
|
|
34
|
-
|
|
35
|
-
在需要使用的.vue 文件里面引入
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
import {
|
|
39
|
-
BimTerrainProvider, // 地形
|
|
40
|
-
BimElevationImage, // 瓦片
|
|
41
|
-
BimModel, // 模型
|
|
42
|
-
BimVector, // 矢量
|
|
43
|
-
BimEntity, // 注记
|
|
44
|
-
PanoramicView, // 全景图
|
|
45
|
-
......
|
|
46
|
-
} from "chbim-plugins";
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
添加模型为例:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
/* data 为模型树的扁平化json */
|
|
53
|
-
window.bimModel = new BimModel(data);
|
|
54
|
-
|
|
55
|
-
/* 给地图添加模型
|
|
56
|
-
** id => 模型id
|
|
57
|
-
** fn => 自定义注册事件
|
|
58
|
-
*/
|
|
59
|
-
window.bimModel.add(id,fn).then((e) => {
|
|
60
|
-
if (e.type == "error") {
|
|
61
|
-
console.error('失败')
|
|
62
|
-
}
|
|
63
|
-
}).catch((e) => {
|
|
64
|
-
console.error('失败')
|
|
65
|
-
})
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### API
|
|
69
|
-
|
|
70
|
-
#### window.bimElevationImage `影像`
|
|
71
|
-
|
|
72
|
-
##### add( id || xyzParameter,isGisTkone,fn)添加影像
|
|
73
|
-
|
|
74
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
75
|
-
| ------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
-
| id | String | “ ” | 需要添加的影像 id |
|
|
77
|
-
| xyzParameter | Object | { } | 三方影像数据 `{imageXyzId:影像id,url:影像路由,zIndex:影像层级,minimumLevel:服务支持的最小层级,maximumLevel:服务支持的最大层级,chinaCRS:标识瓦片的国内坐标系(用于自动纠偏或加偏)}` chinaCRS 默认 GCJ02 |
|
|
78
|
-
| isGisTkone | Boolean | true | 是否开启 Tkone 验证,三方影像不需要开启验证 |
|
|
79
|
-
| fn | Object | { } | 例如:绑定 click 事件 `{ click: (e) => { console.log(e) } }` |
|
|
80
|
-
|
|
81
|
-
##### remove( id )添加影像
|
|
82
|
-
|
|
83
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
84
|
-
| -------- | ------ | -------- | ----------------- |
|
|
85
|
-
| id | String | “ ” | 需要移除的影像 id |
|
|
86
|
-
|
|
87
|
-
##### query( id )查询影像的数据
|
|
88
|
-
|
|
89
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
90
|
-
| -------- | ------ | -------- | ------------------------------- |
|
|
91
|
-
| id | String | “ ” | 需要查询的模型 id,返回模型数据 |
|
|
92
|
-
|
|
93
|
-
<br /><br />
|
|
94
|
-
|
|
95
|
-
#### window.bimModel `模型`
|
|
96
|
-
|
|
97
|
-
##### add( id,fn,list )添加模型
|
|
98
|
-
|
|
99
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
100
|
-
| -------- | ------ | -------- | ------------------------------------------------------------ |
|
|
101
|
-
| id | String | “ ” | 需要添加的模型 id |
|
|
102
|
-
| fn | Object | { } | 例如:绑定 click 事件 `{ click: (e) => { console.log(e) } }` |
|
|
103
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
104
|
-
|
|
105
|
-
##### remove( id,list )移除模型
|
|
106
|
-
|
|
107
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
108
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
109
|
-
| id | String | “ ” | 需要移除的模型 id |
|
|
110
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
111
|
-
|
|
112
|
-
##### selected( id )选中模型
|
|
113
|
-
|
|
114
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
115
|
-
| -------- | ------- | -------- | ------------------------------------------------------------ |
|
|
116
|
-
| id | String | “ ” | 需要选中的模型 id |
|
|
117
|
-
| fn | Object | { } | 例如:绑定 click 事件 `{ click: (e) => { console.log(e) } }` |
|
|
118
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
119
|
-
| flyTo | Boolean | true | 默认会自动飞行,模型选中变红,设置`false`不会飞行 |
|
|
120
|
-
|
|
121
|
-
##### query( id )查询模型的数据
|
|
122
|
-
|
|
123
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
124
|
-
| -------- | ------ | -------- | ------------------------------- |
|
|
125
|
-
| id | String | “ ” | 需要查询的模型 id,返回模型数据 |
|
|
126
|
-
|
|
127
|
-
##### queryModel( id )查询 map 上模型的实体
|
|
128
|
-
|
|
129
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
130
|
-
| -------- | ------ | -------- | ------------------------------- |
|
|
131
|
-
| id | String | “ ” | 需要查询的模型 id,返回模型实体 |
|
|
132
|
-
|
|
133
|
-
##### editColor( id,newColor,list )模型染色
|
|
134
|
-
|
|
135
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
136
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
137
|
-
| id | String | “ ” | 模型 id |
|
|
138
|
-
| newColor | String | “ ” | css 颜色值 |
|
|
139
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
140
|
-
|
|
141
|
-
##### editOpacity( id,opacity)模型染色
|
|
142
|
-
|
|
143
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
144
|
-
| -------- | ------ | -------- | ------------ |
|
|
145
|
-
| id | String | “ ” | 模型 id |
|
|
146
|
-
| opacity | String | “ ” | 透明度值 0~1 |
|
|
147
|
-
|
|
148
|
-
<br /><br />
|
|
149
|
-
|
|
150
|
-
#### window.bimVector `矢量`
|
|
151
|
-
|
|
152
|
-
##### add( id,list )添加矢量
|
|
153
|
-
|
|
154
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
155
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
156
|
-
| id | Object | “ ” | 需要添加的矢量 id |
|
|
157
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
158
|
-
|
|
159
|
-
##### remove( id,list )移除矢量
|
|
160
|
-
|
|
161
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
162
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
163
|
-
| id | String | “ ” | 需要移除的矢量 id |
|
|
164
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
165
|
-
|
|
166
|
-
##### selected( id )添加矢量
|
|
167
|
-
|
|
168
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
169
|
-
| -------- | ------ | -------- | ------------------------------------------ |
|
|
170
|
-
| id | Object | “ ” | 需要选中的矢量 id ,选中会飞行到选中的矢量 |
|
|
171
|
-
|
|
172
|
-
##### query( id )查询矢量数据
|
|
173
|
-
|
|
174
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
175
|
-
| -------- | ------ | -------- | -------------------------------- |
|
|
176
|
-
| id | Object | “ ” | 需要选中的矢量 id ,返回矢量数据 |
|
|
177
|
-
|
|
178
|
-
##### queryVector( id )查询矢量实体
|
|
179
|
-
|
|
180
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
181
|
-
| -------- | ------ | -------- | -------------------------------- |
|
|
182
|
-
| id | Object | “ ” | 需要选中的矢量 id ,返回矢量实体 |
|
|
183
|
-
|
|
184
|
-
<br /><br />
|
|
185
|
-
|
|
186
|
-
#### window.bimEntity `标绘`
|
|
187
|
-
|
|
188
|
-
##### add( id,entityId,list )添加标绘
|
|
189
|
-
|
|
190
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
191
|
-
| -------- | ------ | -------- | ----------------------------------------------- |
|
|
192
|
-
| id | Object | “ ” | 需要添加的标绘 id |
|
|
193
|
-
| entityId | String | null | 临时添加的标绘是不带 id 的,需要自定义的一个 id |
|
|
194
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
195
|
-
|
|
196
|
-
##### remove( id,list )移除标绘
|
|
197
|
-
|
|
198
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
199
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
200
|
-
| id | String | “ ” | 需要移除的标绘 id |
|
|
201
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
202
|
-
|
|
203
|
-
##### query( id )查询标绘数据
|
|
204
|
-
|
|
205
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
206
|
-
| -------- | ------ | -------- | -------------------------------- |
|
|
207
|
-
| id | Object | “ ” | 需要选中的矢量 id ,返回矢量数据 |
|
|
208
|
-
|
|
209
|
-
##### queryEntity( id )查询标绘实体
|
|
210
|
-
|
|
211
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
212
|
-
| -------- | ------ | -------- | -------------------------------- |
|
|
213
|
-
| id | Object | “ ” | 需要选中的矢量 id ,返回矢量实体 |
|
|
214
|
-
|
|
215
|
-
<br /><br />
|
|
216
|
-
|
|
217
|
-
#### window.bimModify `环境修改`
|
|
218
|
-
|
|
219
|
-
##### evnModifyById( id,list )添加环境修改
|
|
220
|
-
|
|
221
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
222
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
223
|
-
| id | Object | “ ” | 需要添加的环境修改的 id |
|
|
224
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
225
|
-
|
|
226
|
-
##### clearEvnModifyById( id,list )移除环境修改
|
|
227
|
-
|
|
228
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
229
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
230
|
-
| id | String | “ ” | 需要移除的环境修改 id |
|
|
231
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
232
|
-
|
|
233
|
-
##### clearAllModelModify( list )移除所有对于模型的环境修改
|
|
234
|
-
|
|
235
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
236
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
237
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
238
|
-
|
|
239
|
-
##### clearAllTerrainModify( list )移除所有对于地形的环境修改
|
|
240
|
-
|
|
241
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
242
|
-
| -------- | ------ | -------- | ------------------------------------------- |
|
|
243
|
-
| list | Object | { } | 字段目前用于处理分屏数据 `{ isClone:true }` |
|
|
244
|
-
|
|
245
|
-
##### clearAllEvnModify()移除所有的环境修改
|
|
246
|
-
|
|
247
|
-
<br /><br />
|
|
248
|
-
|
|
249
|
-
#### window.Bimroaming `漫游`
|
|
250
|
-
|
|
251
|
-
##### init( viewPoints, savePoint, option )初始化漫游
|
|
252
|
-
|
|
253
|
-
| 类参数名 | 类型 | 默认参数 | 描述 |
|
|
254
|
-
| ---------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
255
|
-
| viewPoints | Array | [] | 漫游路径的点集,每个点是一个对象{lng: 0, lat: 0, alt: 0} |
|
|
256
|
-
| savePoint | Function | null | 新增点的回调函数 |
|
|
257
|
-
| option | Object | { } | 漫游配置项 followedX:距离视角的距离, followedZ:距离视角垂直高度,smooth:平衡值使漫游转角顺滑, speed:飞行速度 ,Viewovalue:类型 (1:第一人称 2:跟随 3:俯视) |
|
|
258
|
-
|
|
259
|
-
##### startDrawGraphic()添加点
|
|
260
|
-
|
|
261
|
-
##### start()开始漫游
|
|
262
|
-
|
|
263
|
-
##### pause()暂停漫游
|
|
264
|
-
|
|
265
|
-
##### resume()继续漫游
|
|
266
|
-
|
|
267
|
-
##### stop()停止漫游
|
|
268
|
-
|
|
269
|
-
##### remove()移除漫游
|
|
270
|
-
|
|
271
|
-
### 版本控制
|
|
272
|
-
|
|
273
|
-
该项目使用 Git 进行版本管理。
|