qlqz-frame 0.2.8 → 0.2.9
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/dist/index.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -70455,7 +70455,7 @@ class Ewe {
|
|
|
70455
70455
|
let a = this, s = this.opt;
|
|
70456
70456
|
r && this.setFrame(r.width, r.height), this.popData = n;
|
|
70457
70457
|
let o = document.getElementById("markerPopup");
|
|
70458
|
-
o || (o = document.createElement("div"), o.setAttribute("id", "markerPopup")), BE.render(/* @__PURE__ */ We(Sd.Fragment, {
|
|
70458
|
+
o || (o = document.createElement("div"), o.setAttribute("id", "markerPopup")), this.opt.popupContent, BE.render(/* @__PURE__ */ We(Sd.Fragment, {
|
|
70459
70459
|
children: /* @__PURE__ */ Kn("div", {
|
|
70460
70460
|
className: "mtk-pop-content",
|
|
70461
70461
|
style: {
|
|
@@ -74308,7 +74308,7 @@ function Lwe(e) {
|
|
|
74308
74308
|
eventsPropagation: !1,
|
|
74309
74309
|
draggable: !1,
|
|
74310
74310
|
animation: "fade",
|
|
74311
|
-
|
|
74311
|
+
popupContent: i
|
|
74312
74312
|
}), pe.on("click", (Ye) => {
|
|
74313
74313
|
Ye.coordinate, b.current.popClose();
|
|
74314
74314
|
}), ge) {
|
package/dist/index.umd.js
CHANGED
|
@@ -3672,7 +3672,7 @@ Object.assign(no.prototype,{_getValue_unbound:no.prototype.getValue,_setValue_un
|
|
|
3672
3672
|
`),de=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP"," vec4 texelSpecular = texture2D( specularMap, vUv );"," texelSpecular = sRGBToLinear( texelSpecular );"," // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture"," specularFactor *= texelSpecular.rgb;","#endif"].join(`
|
|
3673
3673
|
`),Ee=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
|
|
3674
3674
|
`),Ce=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
|
|
3675
|
-
`),be=G.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",se).replace("#include <metalnessmap_pars_fragment>",me).replace("#include <roughnessmap_fragment>",de).replace("#include <metalnessmap_fragment>",Ee).replace("#include <lights_physical_fragment>",Ce);delete Z.roughness,delete Z.metalness,delete Z.roughnessMap,delete Z.metalnessMap,Z.specular={value:new qt().setHex(1118481)},Z.glossiness={value:.5},Z.specularMap={value:null},Z.glossinessMap={value:null},J.vertexShader=G.vertexShader,J.fragmentShader=be,J.uniforms=Z,J.defines={STANDARD:""},J.color=new qt(1,1,1),J.opacity=1;var Te=[];if(Array.isArray(X.diffuseFactor)){var dt=X.diffuseFactor;J.color.fromArray(dt),J.opacity=dt[3]}if(X.diffuseTexture!==void 0&&Te.push(V.assignTexture(J,"map",X.diffuseTexture)),J.emissive=new qt(0,0,0),J.glossiness=X.glossinessFactor!==void 0?X.glossinessFactor:1,J.specular=new qt(1,1,1),Array.isArray(X.specularFactor)&&J.specular.fromArray(X.specularFactor),X.specularGlossinessTexture!==void 0){var Je=X.specularGlossinessTexture;Te.push(V.assignTexture(J,"glossinessMap",Je)),Te.push(V.assignTexture(J,"specularMap",Je))}return Promise.all(Te)},createMaterial:function(J){var Y=new Ja({defines:J.defines,vertexShader:J.vertexShader,fragmentShader:J.fragmentShader,uniforms:J.uniforms,fog:!0,lights:!0,opacity:J.opacity,transparent:J.transparent});return Y.isGLTFSpecularGlossinessMaterial=!0,Y.color=J.color,Y.map=J.map===void 0?null:J.map,Y.lightMap=null,Y.lightMapIntensity=1,Y.aoMap=J.aoMap===void 0?null:J.aoMap,Y.aoMapIntensity=1,Y.emissive=J.emissive,Y.emissiveIntensity=1,Y.emissiveMap=J.emissiveMap===void 0?null:J.emissiveMap,Y.bumpMap=J.bumpMap===void 0?null:J.bumpMap,Y.bumpScale=1,Y.normalMap=J.normalMap===void 0?null:J.normalMap,J.normalScale&&(Y.normalScale=J.normalScale),Y.displacementMap=null,Y.displacementScale=1,Y.displacementBias=0,Y.specularMap=J.specularMap===void 0?null:J.specularMap,Y.specular=J.specular,Y.glossinessMap=J.glossinessMap===void 0?null:J.glossinessMap,Y.glossiness=J.glossiness,Y.alphaMap=null,Y.envMap=J.envMap===void 0?null:J.envMap,Y.envMapIntensity=1,Y.refractionRatio=.98,Y.extensions.derivatives=!0,Y},cloneMaterial:function(J){var Y=J.clone();Y.isGLTFSpecularGlossinessMaterial=!0;for(var V=this.specularGlossinessParams,X=0,G=V.length;X<G;X++){var Z=J[V[X]];Y[V[X]]=Z&&Z.isColor?Z.clone():Z}return Y},refreshUniforms:function(J,Y,V,X,G){if(G.isGLTFSpecularGlossinessMaterial===!0){var Z=G.uniforms,se=G.defines;Z.opacity.value=G.opacity,Z.diffuse.value.copy(G.color),Z.emissive.value.copy(G.emissive).multiplyScalar(G.emissiveIntensity),Z.map.value=G.map,Z.specularMap.value=G.specularMap,Z.alphaMap.value=G.alphaMap,Z.lightMap.value=G.lightMap,Z.lightMapIntensity.value=G.lightMapIntensity,Z.aoMap.value=G.aoMap,Z.aoMapIntensity.value=G.aoMapIntensity;var me;G.map?me=G.map:G.specularMap?me=G.specularMap:G.displacementMap?me=G.displacementMap:G.normalMap?me=G.normalMap:G.bumpMap?me=G.bumpMap:G.glossinessMap?me=G.glossinessMap:G.alphaMap?me=G.alphaMap:G.emissiveMap&&(me=G.emissiveMap),me!==void 0&&(me.isWebGLRenderTarget&&(me=me.texture),me.matrixAutoUpdate===!0&&me.updateMatrix(),Z.uvTransform.value.copy(me.matrix)),G.envMap&&(Z.envMap.value=G.envMap,Z.envMapIntensity.value=G.envMapIntensity,Z.flipEnvMap.value=G.envMap.isCubeTexture?-1:1,Z.reflectivity.value=G.reflectivity,Z.refractionRatio.value=G.refractionRatio,Z.maxMipLevel.value=J.properties.get(G.envMap).__maxMipLevel),Z.specular.value.copy(G.specular),Z.glossiness.value=G.glossiness,Z.glossinessMap.value=G.glossinessMap,Z.emissiveMap.value=G.emissiveMap,Z.bumpMap.value=G.bumpMap,Z.normalMap.value=G.normalMap,Z.displacementMap.value=G.displacementMap,Z.displacementScale.value=G.displacementScale,Z.displacementBias.value=G.displacementBias,Z.glossinessMap.value!==null&&se.USE_GLOSSINESSMAP===void 0&&(se.USE_GLOSSINESSMAP="",se.USE_ROUGHNESSMAP=""),Z.glossinessMap.value===null&&se.USE_GLOSSINESSMAP!==void 0&&(delete se.USE_GLOSSINESSMAP,delete se.USE_ROUGHNESSMAP)}}}}function x(J,Y,V,X){Zo.call(this,J,Y,V,X)}x.prototype=Object.create(Zo.prototype),x.prototype.constructor=x,x.prototype.copySampleValue_=function(J){for(var Y=this.resultBuffer,V=this.sampleValues,X=this.valueSize,G=J*X*3+X,Z=0;Z!==X;Z++)Y[Z]=V[G+Z];return Y},x.prototype.beforeStart_=x.prototype.copySampleValue_,x.prototype.afterEnd_=x.prototype.copySampleValue_,x.prototype.interpolate_=function(J,Y,V,X){for(var G=this.resultBuffer,Z=this.sampleValues,se=this.valueSize,me=se*2,de=se*3,Ee=X-Y,Ce=(V-Y)/Ee,be=Ce*Ce,Te=be*Ce,dt=J*de,Je=dt-de,Lt=-2*Te+3*be,kt=Te-be,ue=1-Lt,we=kt-be+Ce,yt=0;yt!==se;yt++){var vt=Z[Je+yt+se],nn=Z[Je+yt+me]*Ee,Bt=Z[dt+yt+se],It=Z[dt+yt]*Ee;G[yt]=ue*vt+we*nn+Lt*Bt+kt*It}return G};var b={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},E={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},T={9728:Ms,9729:Pa,9984:o2,9985:QM,9986:l2,9987:eg},L={33071:Mo,33648:mx,10497:U0},C={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},R={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},P={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I={CUBICSPLINE:void 0,LINEAR:ng,STEP:xx},U={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},k={"image/png":lc,"image/jpeg":Lh};function W(J,Y){return typeof J!="string"||J===""?"":(/^https?:\/\//i.test(Y)&&/^\//.test(J)&&(Y=Y.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(J)||/^data:.*,.*$/i.test(J)||/^blob:.*$/i.test(J)?J:Y+J)}var Q;function ie(){return Q=Q||new dc({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Km}),Q}function ne(J,Y,V){for(var X in V.extensions)J[X]===void 0&&(Y.userData.gltfExtensions=Y.userData.gltfExtensions||{},Y.userData.gltfExtensions[X]=V.extensions[X])}function oe(J,Y){Y.extras!==void 0&&(typeof Y.extras=="object"?Object.assign(J.userData,Y.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+Y.extras))}function ge(J,Y,V){for(var X=!1,G=!1,Z=0,se=Y.length;Z<se;Z++){var me=Y[Z];if(me.POSITION!==void 0&&(X=!0),me.NORMAL!==void 0&&(G=!0),X&&G)break}if(!X&&!G)return Promise.resolve(J);for(var de=[],Ee=[],Z=0,se=Y.length;Z<se;Z++){var me=Y[Z];if(X){var Ce=me.POSITION!==void 0?V.getDependency("accessor",me.POSITION):J.attributes.position;de.push(Ce)}if(G){var Ce=me.NORMAL!==void 0?V.getDependency("accessor",me.NORMAL):J.attributes.normal;Ee.push(Ce)}}return Promise.all([Promise.all(de),Promise.all(Ee)]).then(function(be){for(var Te=be[0],dt=be[1],Je=0,Lt=Te.length;Je<Lt;Je++)J.attributes.position!==Te[Je]&&(Te[Je]=Ye(Te[Je]));for(var Je=0,Lt=dt.length;Je<Lt;Je++)J.attributes.normal!==dt[Je]&&(dt[Je]=Ye(dt[Je]));for(var Je=0,Lt=Y.length;Je<Lt;Je++){var kt=Y[Je],ue="morphTarget"+Je;if(X&&kt.POSITION!==void 0){var we=Te[Je];we.name=ue;for(var yt=J.attributes.position,vt=0,nn=we.count;vt<nn;vt++)we.setXYZ(vt,we.getX(vt)+yt.getX(vt),we.getY(vt)+yt.getY(vt),we.getZ(vt)+yt.getZ(vt))}if(G&&kt.NORMAL!==void 0){var Bt=dt[Je];Bt.name=ue;for(var It=J.attributes.normal,vt=0,nn=Bt.count;vt<nn;vt++)Bt.setXYZ(vt,Bt.getX(vt)+It.getX(vt),Bt.getY(vt)+It.getY(vt),Bt.getZ(vt)+It.getZ(vt))}}return X&&(J.morphAttributes.position=Te),G&&(J.morphAttributes.normal=dt),J})}function pe(J,Y){if(J.updateMorphTargets(),Y.weights!==void 0)for(var V=0,X=Y.weights.length;V<X;V++)J.morphTargetInfluences[V]=Y.weights[V];if(Y.extras&&Array.isArray(Y.extras.targetNames)){var G=Y.extras.targetNames;if(J.morphTargetInfluences.length===G.length){J.morphTargetDictionary={};for(var V=0,X=G.length;V<X;V++)J.morphTargetDictionary[G[V]]=V}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function xe(J){var Y=J.extensions&&J.extensions[n.KHR_DRACO_MESH_COMPRESSION],V;return Y?V="draco:"+Y.bufferView+":"+Y.indices+":"+Fe(Y.attributes):V=J.indices+":"+Fe(J.attributes)+":"+J.mode,V}function Fe(J){for(var Y="",V=Object.keys(J).sort(),X=0,G=V.length;X<G;X++)Y+=V[X]+":"+J[V[X]]+";";return Y}function Ye(J){if(J.isInterleavedBufferAttribute){for(var Y=J.count,V=J.itemSize,X=J.array.slice(0,Y*V),G=0,Z=0;G<Y;++G)X[Z++]=J.getX(G),V>=2&&(X[Z++]=J.getY(G)),V>=3&&(X[Z++]=J.getZ(G)),V>=4&&(X[Z++]=J.getW(G));return new Ut(X,V,J.normalized)}return J.clone()}function ze(J,Y,V){this.json=J||{},this.extensions=Y||{},this.options=V||{},this.cache=new t,this.primitiveCache={},this.textureLoader=new o_(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new Sl(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}ze.prototype.parse=function(J,Y){var V=this,X=this.json,G=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(Z){var se={scene:Z[0][X.scene||0],scenes:Z[0],animations:Z[1],cameras:Z[2],asset:X.asset,parser:V,userData:{}};ne(G,se,X),oe(se,X),J(se)}).catch(Y)},ze.prototype.markDefs=function(){for(var J=this.json.nodes||[],Y=this.json.skins||[],V=this.json.meshes||[],X={},G={},Z=0,se=Y.length;Z<se;Z++)for(var me=Y[Z].joints,de=0,Ee=me.length;de<Ee;de++)J[me[de]].isBone=!0;for(var Ce=0,be=J.length;Ce<be;Ce++){var Te=J[Ce];Te.mesh!==void 0&&(X[Te.mesh]===void 0&&(X[Te.mesh]=G[Te.mesh]=0),X[Te.mesh]++,Te.skin!==void 0&&(V[Te.mesh].isSkinnedMesh=!0))}this.json.meshReferences=X,this.json.meshUses=G},ze.prototype.getDependency=function(J,Y){var V=J+":"+Y,X=this.cache.get(V);if(!X){switch(J){case"scene":X=this.loadScene(Y);break;case"node":X=this.loadNode(Y);break;case"mesh":X=this.loadMesh(Y);break;case"accessor":X=this.loadAccessor(Y);break;case"bufferView":X=this.loadBufferView(Y);break;case"buffer":X=this.loadBuffer(Y);break;case"material":X=this.loadMaterial(Y);break;case"texture":X=this.loadTexture(Y);break;case"skin":X=this.loadSkin(Y);break;case"animation":X=this.loadAnimation(Y);break;case"camera":X=this.loadCamera(Y);break;case"light":X=this.extensions[n.KHR_LIGHTS_PUNCTUAL].loadLight(Y);break;default:throw new Error("Unknown type: "+J)}this.cache.add(V,X)}return X},ze.prototype.getDependencies=function(J){var Y=this.cache.get(J);if(!Y){var V=this,X=this.json[J+(J==="mesh"?"es":"s")]||[];Y=Promise.all(X.map(function(G,Z){return V.getDependency(J,Z)})),this.cache.add(J,Y)}return Y},ze.prototype.loadBuffer=function(J){var Y=this.json.buffers[J],V=this.fileLoader;if(Y.type&&Y.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+Y.type+" buffer type is not supported.");if(Y.uri===void 0&&J===0)return Promise.resolve(this.extensions[n.KHR_BINARY_GLTF].body);var X=this.options;return new Promise(function(G,Z){V.load(W(Y.uri,X.path),G,void 0,function(){Z(new Error('THREE.GLTFLoader: Failed to load buffer "'+Y.uri+'".'))})})},ze.prototype.loadBufferView=function(J){var Y=this.json.bufferViews[J];return this.getDependency("buffer",Y.buffer).then(function(V){var X=Y.byteLength||0,G=Y.byteOffset||0;return V.slice(G,G+X)})},ze.prototype.loadAccessor=function(J){var Y=this,V=this.json,X=this.json.accessors[J];if(X.bufferView===void 0&&X.sparse===void 0)return Promise.resolve(null);var G=[];return X.bufferView!==void 0?G.push(this.getDependency("bufferView",X.bufferView)):G.push(null),X.sparse!==void 0&&(G.push(this.getDependency("bufferView",X.sparse.indices.bufferView)),G.push(this.getDependency("bufferView",X.sparse.values.bufferView))),Promise.all(G).then(function(Z){var se=Z[0],me=C[X.type],de=E[X.componentType],Ee=de.BYTES_PER_ELEMENT,Ce=Ee*me,be=X.byteOffset||0,Te=X.bufferView!==void 0?V.bufferViews[X.bufferView].byteStride:void 0,dt=X.normalized===!0,Je,Lt;if(Te&&Te!==Ce){var kt=Math.floor(be/Te),ue="InterleavedBuffer:"+X.bufferView+":"+X.componentType+":"+kt+":"+X.count,we=Y.cache.get(ue);we||(Je=new de(se,kt*Te,X.count*Te/Ee),we=new Nh(Je,Te/Ee),Y.cache.add(ue,we)),Lt=new hc(we,me,be%Te/Ee,dt)}else se===null?Je=new de(X.count*me):Je=new de(se,be,X.count*me),Lt=new Ut(Je,me,dt);if(X.sparse!==void 0){var yt=C.SCALAR,vt=E[X.sparse.indices.componentType],nn=X.sparse.indices.byteOffset||0,Bt=X.sparse.values.byteOffset||0,It=new vt(Z[1],nn,X.sparse.count*yt),$t=new de(Z[2],Bt,X.sparse.count*me);se!==null&&(Lt=new Ut(Lt.array.slice(),Lt.itemSize,Lt.normalized));for(var Xt=0,rn=It.length;Xt<rn;Xt++){var Rt=It[Xt];if(Lt.setX(Rt,$t[Xt*me]),me>=2&&Lt.setY(Rt,$t[Xt*me+1]),me>=3&&Lt.setZ(Rt,$t[Xt*me+2]),me>=4&&Lt.setW(Rt,$t[Xt*me+3]),me>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Lt})},ze.prototype.loadTexture=function(J){var Y=this,V=this.json,X=this.options,G=this.textureLoader,Z=window.URL||window.webkitURL,se=V.textures[J],me=se.extensions||{},de;me[n.MSFT_TEXTURE_DDS]?de=V.images[me[n.MSFT_TEXTURE_DDS].source]:de=V.images[se.source];var Ee=de.uri,Ce=!1;return de.bufferView!==void 0&&(Ee=Y.getDependency("bufferView",de.bufferView).then(function(be){Ce=!0;var Te=new Blob([be],{type:de.mimeType});return Ee=Z.createObjectURL(Te),Ee})),Promise.resolve(Ee).then(function(be){var Te=X.manager.getHandler(be);return Te||(Te=me[n.MSFT_TEXTURE_DDS]?Y.extensions[n.MSFT_TEXTURE_DDS].ddsLoader:G),new Promise(function(dt,Je){Te.load(W(be,X.path),dt,void 0,Je)})}).then(function(be){Ce===!0&&Z.revokeObjectURL(Ee),be.flipY=!1,se.name!==void 0&&(be.name=se.name),de.mimeType in k&&(be.format=k[de.mimeType]);var Te=V.samplers||{},dt=Te[se.sampler]||{};return be.magFilter=T[dt.magFilter]||Pa,be.minFilter=T[dt.minFilter]||eg,be.wrapS=L[dt.wrapS]||U0,be.wrapT=L[dt.wrapT]||U0,be})},ze.prototype.assignTexture=function(J,Y,V){var X=this;return this.getDependency("texture",V.index).then(function(G){if(!G.isCompressedTexture)switch(Y){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":G.format=Lh;break}if(X.extensions[n.KHR_TEXTURE_TRANSFORM]){var Z=V.extensions!==void 0?V.extensions[n.KHR_TEXTURE_TRANSFORM]:void 0;Z&&(G=X.extensions[n.KHR_TEXTURE_TRANSFORM].extendTexture(G,Z))}J[Y]=G})},ze.prototype.assignFinalMaterial=function(J){var Y=J.geometry,V=J.material,X=this.extensions,G=Y.attributes.tangent!==void 0,Z=Y.attributes.color!==void 0,se=Y.attributes.normal===void 0,me=J.isSkinnedMesh===!0,de=Object.keys(Y.morphAttributes).length>0,Ee=de&&Y.morphAttributes.normal!==void 0;if(J.isPoints){var Ce="PointsMaterial:"+V.uuid,be=this.cache.get(Ce);be||(be=new vu,Hn.prototype.copy.call(be,V),be.color.copy(V.color),be.map=V.map,be.sizeAttenuation=!1,this.cache.add(Ce,be)),V=be}else if(J.isLine){var Ce="LineBasicMaterial:"+V.uuid,Te=this.cache.get(Ce);Te||(Te=new Yr,Hn.prototype.copy.call(Te,V),Te.color.copy(V.color),this.cache.add(Ce,Te)),V=Te}if(G||Z||se||me||de){var Ce="ClonedMaterial:"+V.uuid+":";V.isGLTFSpecularGlossinessMaterial&&(Ce+="specular-glossiness:"),me&&(Ce+="skinning:"),G&&(Ce+="vertex-tangents:"),Z&&(Ce+="vertex-colors:"),se&&(Ce+="flat-shading:"),de&&(Ce+="morph-targets:"),Ee&&(Ce+="morph-normals:");var dt=this.cache.get(Ce);dt||(dt=V.isGLTFSpecularGlossinessMaterial?X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(V):V.clone(),me&&(dt.skinning=!0),G&&(dt.vertexTangents=!0),Z&&(dt.vertexColors=Qm),se&&(dt.flatShading=!0),de&&(dt.morphTargets=!0),Ee&&(dt.morphNormals=!0),this.cache.add(Ce,dt)),V=dt}V.aoMap&&Y.attributes.uv2===void 0&&Y.attributes.uv!==void 0&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),Y.setAttribute("uv2",new Ut(Y.attributes.uv.array,2))),V.isGLTFSpecularGlossinessMaterial&&(J.onBeforeRender=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),J.material=V},ze.prototype.loadMaterial=function(J){var Y=this,V=this.json,X=this.extensions,G=V.materials[J],Z,se={},me=G.extensions||{},de=[];if(me[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var Ee=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];Z=Ee.getMaterialType(),de.push(Ee.extendParams(se,G,Y))}else if(me[n.KHR_MATERIALS_UNLIT]){var Ce=X[n.KHR_MATERIALS_UNLIT];Z=Ce.getMaterialType(),de.push(Ce.extendParams(se,G,Y))}else{Z=dc;var be=G.pbrMetallicRoughness||{};if(se.color=new qt(1,1,1),se.opacity=1,Array.isArray(be.baseColorFactor)){var Te=be.baseColorFactor;se.color.fromArray(Te),se.opacity=Te[3]}be.baseColorTexture!==void 0&&de.push(Y.assignTexture(se,"map",be.baseColorTexture)),se.metalness=be.metallicFactor!==void 0?be.metallicFactor:1,se.roughness=be.roughnessFactor!==void 0?be.roughnessFactor:1,be.metallicRoughnessTexture!==void 0&&(de.push(Y.assignTexture(se,"metalnessMap",be.metallicRoughnessTexture)),de.push(Y.assignTexture(se,"roughnessMap",be.metallicRoughnessTexture)))}G.doubleSided===!0&&(se.side=dx);var dt=G.alphaMode||U.OPAQUE;return dt===U.BLEND?se.transparent=!0:(se.transparent=!1,dt===U.MASK&&(se.alphaTest=G.alphaCutoff!==void 0?G.alphaCutoff:.5)),G.normalTexture!==void 0&&Z!==ds&&(de.push(Y.assignTexture(se,"normalMap",G.normalTexture)),se.normalScale=new _t(1,1),G.normalTexture.scale!==void 0&&se.normalScale.set(G.normalTexture.scale,G.normalTexture.scale)),G.occlusionTexture!==void 0&&Z!==ds&&(de.push(Y.assignTexture(se,"aoMap",G.occlusionTexture)),G.occlusionTexture.strength!==void 0&&(se.aoMapIntensity=G.occlusionTexture.strength)),G.emissiveFactor!==void 0&&Z!==ds&&(se.emissive=new qt().fromArray(G.emissiveFactor)),G.emissiveTexture!==void 0&&Z!==ds&&de.push(Y.assignTexture(se,"emissiveMap",G.emissiveTexture)),Promise.all(de).then(function(){var Je;return Z===Ja?Je=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(se):Je=new Z(se),G.name!==void 0&&(Je.name=G.name),Je.map&&(Je.map.encoding=p2),Je.emissiveMap&&(Je.emissiveMap.encoding=p2),Je.specularMap&&(Je.specularMap.encoding=p2),oe(Je,G),G.extensions&&ne(X,Je,G),Je})};function Ze(J,Y,V){var X=Y.attributes,G=[];function Z(Ee,Ce){return V.getDependency("accessor",Ee).then(function(be){J.setAttribute(Ce,be)})}for(var se in X){var me=R[se]||se.toLowerCase();me in J.attributes||G.push(Z(X[se],me))}if(Y.indices!==void 0&&!J.index){var de=V.getDependency("accessor",Y.indices).then(function(Ee){J.setIndex(Ee)});G.push(de)}return oe(J,Y),Promise.all(G).then(function(){return Y.targets!==void 0?ge(J,Y.targets,V):J})}return ze.prototype.loadGeometries=function(J){var Y=this,V=this.extensions,X=this.primitiveCache;function G(Te){return V[n.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(Te,Y).then(function(dt){return Ze(dt,Te,Y)})}for(var Z=[],se=0,me=J.length;se<me;se++){var de=J[se],Ee=xe(de),Ce=X[Ee];if(Ce)Z.push(Ce.promise);else{var be;de.extensions&&de.extensions[n.KHR_DRACO_MESH_COMPRESSION]?be=G(de):be=Ze(new zt,de,Y),X[Ee]={primitive:de,promise:be},Z.push(be)}}return Promise.all(Z)},ze.prototype.loadMesh=function(J){for(var Y=this,V=this.json,X=V.meshes[J],G=X.primitives,Z=[],se=0,me=G.length;se<me;se++){var de=G[se].material===void 0?ie():this.getDependency("material",G[se].material);Z.push(de)}return Promise.all(Z).then(function(Ee){return Y.loadGeometries(G).then(function(Ce){for(var be=[],Te=0,dt=Ce.length;Te<dt;Te++){var Je=Ce[Te],Lt=G[Te],kt,ue=Ee[Te];if(Lt.mode===b.TRIANGLES||Lt.mode===b.TRIANGLE_STRIP||Lt.mode===b.TRIANGLE_FAN||Lt.mode===void 0)kt=X.isSkinnedMesh===!0?new Wx(Je,ue):new xi(Je,ue),kt.isSkinnedMesh===!0&&!kt.geometry.attributes.skinWeight.normalized&&kt.normalizeSkinWeights(),Lt.mode===b.TRIANGLE_STRIP?kt.drawMode=cD:Lt.mode===b.TRIANGLE_FAN&&(kt.drawMode=fD);else if(Lt.mode===b.LINES)kt=new $r(Je,ue);else if(Lt.mode===b.LINE_STRIP)kt=new ps(Je,ue);else if(Lt.mode===b.LINE_LOOP)kt=new U2(Je,ue);else if(Lt.mode===b.POINTS)kt=new Z0(Je,ue);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+Lt.mode);Object.keys(kt.geometry.morphAttributes).length>0&&pe(kt,X),kt.name=X.name||"mesh_"+J,Ce.length>1&&(kt.name+="_"+Te),oe(kt,X),Y.assignFinalMaterial(kt),be.push(kt)}if(be.length===1)return be[0];for(var we=new kh,Te=0,dt=be.length;Te<dt;Te++)we.add(be[Te]);return we})})},ze.prototype.loadCamera=function(J){var Y,V=this.json.cameras[J],X=V[V.type];if(!X){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return V.type==="perspective"?Y=new ra(or.radToDeg(X.yfov),X.aspectRatio||1,X.znear||1,X.zfar||2e6):V.type==="orthographic"&&(Y=new u_(X.xmag/-2,X.xmag/2,X.ymag/2,X.ymag/-2,X.znear,X.zfar)),V.name!==void 0&&(Y.name=V.name),oe(Y,V),Promise.resolve(Y)},ze.prototype.loadSkin=function(J){var Y=this.json.skins[J],V={joints:Y.joints};return Y.inverseBindMatrices===void 0?Promise.resolve(V):this.getDependency("accessor",Y.inverseBindMatrices).then(function(X){return V.inverseBindMatrices=X,V})},ze.prototype.loadAnimation=function(J){for(var Y=this.json,V=Y.animations[J],X=[],G=[],Z=[],se=[],me=[],de=0,Ee=V.channels.length;de<Ee;de++){var Ce=V.channels[de],be=V.samplers[Ce.sampler],Te=Ce.target,dt=Te.node!==void 0?Te.node:Te.id,Je=V.parameters!==void 0?V.parameters[be.input]:be.input,Lt=V.parameters!==void 0?V.parameters[be.output]:be.output;X.push(this.getDependency("node",dt)),G.push(this.getDependency("accessor",Je)),Z.push(this.getDependency("accessor",Lt)),se.push(be),me.push(Te)}return Promise.all([Promise.all(X),Promise.all(G),Promise.all(Z),Promise.all(se),Promise.all(me)]).then(function(kt){for(var ue=kt[0],we=kt[1],yt=kt[2],vt=kt[3],nn=kt[4],Bt=[],It=0,$t=ue.length;It<$t;It++){var Xt=ue[It],rn=we[It],Rt=yt[It],Kt=vt[It],Jt=nn[It];if(Xt!==void 0){Xt.updateMatrix(),Xt.matrixAutoUpdate=!0;var Oe;switch(P[Jt.path]){case P.weights:Oe=Pg;break;case P.rotation:Oe=a_;break;case P.position:case P.scale:default:Oe=Ig;break}var qe=Xt.name?Xt.name:Xt.uuid,st=Kt.interpolation!==void 0?I[Kt.interpolation]:ng,Ot=[];P[Jt.path]===P.weights?Xt.traverse(function(Br){Br.isMesh===!0&&Br.morphTargetInfluences&&Ot.push(Br.name?Br.name:Br.uuid)}):Ot.push(qe);var mt=Rt.array;if(Rt.normalized){var sn;if(mt.constructor===Int8Array)sn=1/127;else if(mt.constructor===Uint8Array)sn=1/255;else if(mt.constructor==Int16Array)sn=1/32767;else if(mt.constructor===Uint16Array)sn=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var xn=new Float32Array(mt.length),_n=0,lr=mt.length;_n<lr;_n++)xn[_n]=mt[_n]*sn;mt=xn}for(var _n=0,lr=Ot.length;_n<lr;_n++){var Mn=new Oe(Ot[_n]+"."+P[Jt.path],rn.array,mt,st);Kt.interpolation==="CUBICSPLINE"&&(Mn.createInterpolant=function(ts){return new x(this.times,this.values,this.getValueSize()/3,ts)},Mn.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),Bt.push(Mn)}}}var Er=V.name!==void 0?V.name:"animation_"+J;return new mu(Er,void 0,Bt)})},ze.prototype.loadNode=function(J){var Y=this.json,V=this.extensions,X=this,G=Y.meshReferences,Z=Y.meshUses,se=Y.nodes[J];return function(){var me=[];return se.mesh!==void 0&&me.push(X.getDependency("mesh",se.mesh).then(function(de){var Ee;if(G[se.mesh]>1){var Ce=Z[se.mesh]++;Ee=de.clone(),Ee.name+="_instance_"+Ce,Ee.onBeforeRender=de.onBeforeRender;for(var be=0,Te=Ee.children.length;be<Te;be++)Ee.children[be].name+="_instance_"+Ce,Ee.children[be].onBeforeRender=de.children[be].onBeforeRender}else Ee=de;return se.weights!==void 0&&Ee.traverse(function(dt){if(dt.isMesh)for(var Je=0,Lt=se.weights.length;Je<Lt;Je++)dt.morphTargetInfluences[Je]=se.weights[Je]}),Ee})),se.camera!==void 0&&me.push(X.getDependency("camera",se.camera)),se.extensions&&se.extensions[n.KHR_LIGHTS_PUNCTUAL]&&se.extensions[n.KHR_LIGHTS_PUNCTUAL].light!==void 0&&me.push(X.getDependency("light",se.extensions[n.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(me)}().then(function(me){var de;if(se.isBone===!0?de=new EA:me.length>1?de=new kh:me.length===1?de=me[0]:de=new an,de!==me[0])for(var Ee=0,Ce=me.length;Ee<Ce;Ee++)de.add(me[Ee]);if(se.name!==void 0&&(de.userData.name=se.name,de.name=no.sanitizeNodeName(se.name)),oe(de,se),se.extensions&&ne(V,de,se),se.matrix!==void 0){var be=new tr;be.fromArray(se.matrix),de.applyMatrix(be)}else se.translation!==void 0&&de.position.fromArray(se.translation),se.rotation!==void 0&&de.quaternion.fromArray(se.rotation),se.scale!==void 0&&de.scale.fromArray(se.scale);return de})},ze.prototype.loadScene=function(){function J(Y,V,X,G){var Z=X.nodes[Y];return G.getDependency("node",Y).then(function(se){if(Z.skin===void 0)return se;var me;return G.getDependency("skin",Z.skin).then(function(de){me=de;for(var Ee=[],Ce=0,be=me.joints.length;Ce<be;Ce++)Ee.push(G.getDependency("node",me.joints[Ce]));return Promise.all(Ee)}).then(function(de){return se.traverse(function(Ee){if(Ee.isMesh){for(var Ce=[],be=[],Te=0,dt=de.length;Te<dt;Te++){var Je=de[Te];if(Je){Ce.push(Je);var Lt=new tr;me.inverseBindMatrices!==void 0&&Lt.fromArray(me.inverseBindMatrices.array,Te*16),be.push(Lt)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',me.joints[Te])}Ee.bind(new k2(Ce,be),Ee.matrixWorld)}}),se})}).then(function(se){V.add(se);var me=[];if(Z.children)for(var de=Z.children,Ee=0,Ce=de.length;Ee<Ce;Ee++){var be=de[Ee];me.push(J(be,se,X,G))}return Promise.all(me)})}return function(V){var X=this.json,G=this.extensions,Z=this.json.scenes[V],se=this,me=new H0;Z.name!==void 0&&(me.name=Z.name),oe(me,Z),Z.extensions&&ne(G,me,Z);for(var de=Z.nodes||[],Ee=[],Ce=0,be=de.length;Ce<be;Ce++)Ee.push(J(de[Ce],me,X,se));return Promise.all(Ee).then(function(){return me})}}(),e}();class tI extends et.Layer{setColors(t){return this.colors=t,this}getColors(){return this.colors}}tI.mergeOptions({colors:["#3480bf","#9cbad2"],zIndex:-1/0});class Nge extends et.renderer.CanvasRenderer{checkResources(){return[]}draw(){this._drawSky(),this.completeRender()}drawOnInteracting(t){this._drawSky()}_drawSky(){const t=this.layer;if(!t)return;const n=t.getMap();let r=n.getContainerExtent().ymin;if(r>0){const i=n.getDevicePixelRatio(),a=n.width*i;r+=30,r*=i,this.prepareCanvas();const s=this.context,o=t.colors||t.options.colors;if(o){const[c,f]=o,d=s.createLinearGradient(a/2,0,a/2,r);d.addColorStop(0,c),d.addColorStop(1,f),t.skyFill=d}if(!t.skyFill)return;s.fillStyle=t.skyFill,s.fillRect(0,0,a,r)}}}tI.registerRenderer("canvas",Nge);const nI={addDevice:"_addDevice_16agt_1",darkForm:"_dark-form_16agt_38",boxWrap:"_box-wrap_16agt_53"};function Uge(e){const{data:t}=e,n=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:t.stationData?"传输正常":"传输中断"}),{station:r,stationData:i}=t;return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[n(),Qn("span",{title:r.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:[r.NAME," ",r.DTU_ID]})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"所属部门",children:r.GROUP_ID}),Ve(Ft.Descriptions.Item,{label:"站点描述",children:r.DESCRIPTION}),Ve(Ft.Descriptions.Item,{label:"点位类型",children:r.GROUP_ID}),Ve(Ft.Descriptions.Item,{label:"点位坐标",children:`${r.LONGTITUDE} ${r.LATTITUDE}`})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",onClick:()=>{e.on&&e.on("设备动态",t.station)},type:"ghost",children:[Ve(Ju.PlaySquareOutlined,{}),"实时动态"]})})]})}const Bge=bt.memo(Uge);function zge(e){const{data:t}=e,n=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:t.STATUS=="正常"?"传输正常":"传输异常"});return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[n(),Ve("span",{title:t.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:t.NAME})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"站点全称",children:t.SHOW_NAME||t.NAME}),Ve(Ft.Descriptions.Item,{label:"站点描述",children:t.DISCRIBE}),Ve(Ft.Descriptions.Item,{label:"点位坐标",children:`${t.LONGITUDE} ${t.LATITUDE}`})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",onClick:()=>{e.on&&e.on("站点详情",t)},type:"ghost",children:[Ve(Ju.PlaySquareOutlined,{}),"站点详情"]})})]})}const Hge=bt.memo(zge);function Gge(e){const{needClose:t,data:n,on:r,hideButtons:i}=e,a=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:n.TYPE});return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[a(),Ve("span",{title:n.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:n.NAME}),t&&Ve("div",{style:{position:"absolute",right:"10px",top:"10px",color:"white"},onClick:()=>{r&&r("close",n)},children:"✖"})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"",children:Ve(Ft.Image,{src:n.PIC})}),Ve(Ft.Descriptions.Item,{label:"",children:n.DISCRIBE})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),!i&&Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",danger:!n.DATATABLE,onClick:()=>{e.on&&e.on("设备数据",n)},type:"primary",children:[Ve(Ju.DashboardOutlined,{}),n.DATATABLE?"设备数据":"暂未接入"]})})]})}const Vge=bt.memo(Gge);function Wge(e){return Qn("div",{style:{width:"100%",height:"100%"},children:[e.popType=="站点点击"&&Ve(Bge,{on:e.on,popType:e.popType,data:e.popData}),e.popType=="站点详情"&&Ve(Hge,{on:e.on,popType:e.popType,data:e.popData}),e.popType=="设备弹窗"&&Ve(Vge,{on:e.on,popType:e.popType,data:e.popData})]})}class jge{constructor(t,n){fb(this,"map");fb(this,"popData");fb(this,"popMarker");fb(this,"opt");this.map=t,this.popData={popType:""},this.opt=n,this.popMarker=void 0,this.map.closePop=()=>{this.popClose()},this.opt.contentWidth=n.contentWidth||600,this.opt.contentHeight=n.contentHeight||400,this.opt.guideLine1len=45,this.opt.guideLine1top=50,this.opt.guideLine2top=32,this.calcOffset(),this.opt.lineColor="#00daf8",this.opt.bgColor="#02003D"}setFrame(t,n){this.opt.contentWidth=t,this.opt.contentHeight=n,this.calcOffset()}calcOffset(){this.opt.contentdx=this.opt.guideLine1top+this.opt.guideLine1len*Math.cos(Math.PI/4),this.opt.dy=-(this.opt.guideLine1top+(this.opt.guideLine1len*Math.cos(Math.PI/4)+5))}popClose(){this.popMarker&&this.popMarker.remove()}checkClose(t){this.popData.popType.includes(t)&&this.popClose()}popShow(t,n,r,i){let a=this,s=this.opt;r&&this.setFrame(r.width,r.height),this.popData=n;let o=document.getElementById("markerPopup");o||(o=document.createElement("div"),o.setAttribute("id","markerPopup")),xb.render(Ve(bt.Fragment,{children:Qn("div",{className:"mtk-pop-content",style:{width:`${s.contentWidth}px`,height:`${s.contentHeight}px`},children:[this.opt.popupContent?Ve(this.opt.popupContent,{on:(c,f)=>{i&&i(c,f)},popType:n.type,popData:n.data}):Ve(Wge,{on:(c,f)=>{i&&i(c,f)},popType:n.type,popData:n.data}),Ve("div",{style:{position:"absolute",right:"10px",top:"10px",color:"white",cursor:"pointer"},onClick:()=>{a.popClose(),i&&i("close",n)},children:"✖"})]})}),o),this.opt.content=o,this.popMarker=new et.ui.InfoWindow({...this.opt,custom:!0,dy:-20}).addTo(this.map),this.popMarker.addTo(this.map).show(t)}}var I3={exports:{}};/**
|
|
3675
|
+
`),be=G.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",se).replace("#include <metalnessmap_pars_fragment>",me).replace("#include <roughnessmap_fragment>",de).replace("#include <metalnessmap_fragment>",Ee).replace("#include <lights_physical_fragment>",Ce);delete Z.roughness,delete Z.metalness,delete Z.roughnessMap,delete Z.metalnessMap,Z.specular={value:new qt().setHex(1118481)},Z.glossiness={value:.5},Z.specularMap={value:null},Z.glossinessMap={value:null},J.vertexShader=G.vertexShader,J.fragmentShader=be,J.uniforms=Z,J.defines={STANDARD:""},J.color=new qt(1,1,1),J.opacity=1;var Te=[];if(Array.isArray(X.diffuseFactor)){var dt=X.diffuseFactor;J.color.fromArray(dt),J.opacity=dt[3]}if(X.diffuseTexture!==void 0&&Te.push(V.assignTexture(J,"map",X.diffuseTexture)),J.emissive=new qt(0,0,0),J.glossiness=X.glossinessFactor!==void 0?X.glossinessFactor:1,J.specular=new qt(1,1,1),Array.isArray(X.specularFactor)&&J.specular.fromArray(X.specularFactor),X.specularGlossinessTexture!==void 0){var Je=X.specularGlossinessTexture;Te.push(V.assignTexture(J,"glossinessMap",Je)),Te.push(V.assignTexture(J,"specularMap",Je))}return Promise.all(Te)},createMaterial:function(J){var Y=new Ja({defines:J.defines,vertexShader:J.vertexShader,fragmentShader:J.fragmentShader,uniforms:J.uniforms,fog:!0,lights:!0,opacity:J.opacity,transparent:J.transparent});return Y.isGLTFSpecularGlossinessMaterial=!0,Y.color=J.color,Y.map=J.map===void 0?null:J.map,Y.lightMap=null,Y.lightMapIntensity=1,Y.aoMap=J.aoMap===void 0?null:J.aoMap,Y.aoMapIntensity=1,Y.emissive=J.emissive,Y.emissiveIntensity=1,Y.emissiveMap=J.emissiveMap===void 0?null:J.emissiveMap,Y.bumpMap=J.bumpMap===void 0?null:J.bumpMap,Y.bumpScale=1,Y.normalMap=J.normalMap===void 0?null:J.normalMap,J.normalScale&&(Y.normalScale=J.normalScale),Y.displacementMap=null,Y.displacementScale=1,Y.displacementBias=0,Y.specularMap=J.specularMap===void 0?null:J.specularMap,Y.specular=J.specular,Y.glossinessMap=J.glossinessMap===void 0?null:J.glossinessMap,Y.glossiness=J.glossiness,Y.alphaMap=null,Y.envMap=J.envMap===void 0?null:J.envMap,Y.envMapIntensity=1,Y.refractionRatio=.98,Y.extensions.derivatives=!0,Y},cloneMaterial:function(J){var Y=J.clone();Y.isGLTFSpecularGlossinessMaterial=!0;for(var V=this.specularGlossinessParams,X=0,G=V.length;X<G;X++){var Z=J[V[X]];Y[V[X]]=Z&&Z.isColor?Z.clone():Z}return Y},refreshUniforms:function(J,Y,V,X,G){if(G.isGLTFSpecularGlossinessMaterial===!0){var Z=G.uniforms,se=G.defines;Z.opacity.value=G.opacity,Z.diffuse.value.copy(G.color),Z.emissive.value.copy(G.emissive).multiplyScalar(G.emissiveIntensity),Z.map.value=G.map,Z.specularMap.value=G.specularMap,Z.alphaMap.value=G.alphaMap,Z.lightMap.value=G.lightMap,Z.lightMapIntensity.value=G.lightMapIntensity,Z.aoMap.value=G.aoMap,Z.aoMapIntensity.value=G.aoMapIntensity;var me;G.map?me=G.map:G.specularMap?me=G.specularMap:G.displacementMap?me=G.displacementMap:G.normalMap?me=G.normalMap:G.bumpMap?me=G.bumpMap:G.glossinessMap?me=G.glossinessMap:G.alphaMap?me=G.alphaMap:G.emissiveMap&&(me=G.emissiveMap),me!==void 0&&(me.isWebGLRenderTarget&&(me=me.texture),me.matrixAutoUpdate===!0&&me.updateMatrix(),Z.uvTransform.value.copy(me.matrix)),G.envMap&&(Z.envMap.value=G.envMap,Z.envMapIntensity.value=G.envMapIntensity,Z.flipEnvMap.value=G.envMap.isCubeTexture?-1:1,Z.reflectivity.value=G.reflectivity,Z.refractionRatio.value=G.refractionRatio,Z.maxMipLevel.value=J.properties.get(G.envMap).__maxMipLevel),Z.specular.value.copy(G.specular),Z.glossiness.value=G.glossiness,Z.glossinessMap.value=G.glossinessMap,Z.emissiveMap.value=G.emissiveMap,Z.bumpMap.value=G.bumpMap,Z.normalMap.value=G.normalMap,Z.displacementMap.value=G.displacementMap,Z.displacementScale.value=G.displacementScale,Z.displacementBias.value=G.displacementBias,Z.glossinessMap.value!==null&&se.USE_GLOSSINESSMAP===void 0&&(se.USE_GLOSSINESSMAP="",se.USE_ROUGHNESSMAP=""),Z.glossinessMap.value===null&&se.USE_GLOSSINESSMAP!==void 0&&(delete se.USE_GLOSSINESSMAP,delete se.USE_ROUGHNESSMAP)}}}}function x(J,Y,V,X){Zo.call(this,J,Y,V,X)}x.prototype=Object.create(Zo.prototype),x.prototype.constructor=x,x.prototype.copySampleValue_=function(J){for(var Y=this.resultBuffer,V=this.sampleValues,X=this.valueSize,G=J*X*3+X,Z=0;Z!==X;Z++)Y[Z]=V[G+Z];return Y},x.prototype.beforeStart_=x.prototype.copySampleValue_,x.prototype.afterEnd_=x.prototype.copySampleValue_,x.prototype.interpolate_=function(J,Y,V,X){for(var G=this.resultBuffer,Z=this.sampleValues,se=this.valueSize,me=se*2,de=se*3,Ee=X-Y,Ce=(V-Y)/Ee,be=Ce*Ce,Te=be*Ce,dt=J*de,Je=dt-de,Lt=-2*Te+3*be,kt=Te-be,ue=1-Lt,we=kt-be+Ce,yt=0;yt!==se;yt++){var vt=Z[Je+yt+se],nn=Z[Je+yt+me]*Ee,Bt=Z[dt+yt+se],It=Z[dt+yt]*Ee;G[yt]=ue*vt+we*nn+Lt*Bt+kt*It}return G};var b={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},E={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},T={9728:Ms,9729:Pa,9984:o2,9985:QM,9986:l2,9987:eg},L={33071:Mo,33648:mx,10497:U0},C={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},R={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},P={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I={CUBICSPLINE:void 0,LINEAR:ng,STEP:xx},U={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},k={"image/png":lc,"image/jpeg":Lh};function W(J,Y){return typeof J!="string"||J===""?"":(/^https?:\/\//i.test(Y)&&/^\//.test(J)&&(Y=Y.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(J)||/^data:.*,.*$/i.test(J)||/^blob:.*$/i.test(J)?J:Y+J)}var Q;function ie(){return Q=Q||new dc({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Km}),Q}function ne(J,Y,V){for(var X in V.extensions)J[X]===void 0&&(Y.userData.gltfExtensions=Y.userData.gltfExtensions||{},Y.userData.gltfExtensions[X]=V.extensions[X])}function oe(J,Y){Y.extras!==void 0&&(typeof Y.extras=="object"?Object.assign(J.userData,Y.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+Y.extras))}function ge(J,Y,V){for(var X=!1,G=!1,Z=0,se=Y.length;Z<se;Z++){var me=Y[Z];if(me.POSITION!==void 0&&(X=!0),me.NORMAL!==void 0&&(G=!0),X&&G)break}if(!X&&!G)return Promise.resolve(J);for(var de=[],Ee=[],Z=0,se=Y.length;Z<se;Z++){var me=Y[Z];if(X){var Ce=me.POSITION!==void 0?V.getDependency("accessor",me.POSITION):J.attributes.position;de.push(Ce)}if(G){var Ce=me.NORMAL!==void 0?V.getDependency("accessor",me.NORMAL):J.attributes.normal;Ee.push(Ce)}}return Promise.all([Promise.all(de),Promise.all(Ee)]).then(function(be){for(var Te=be[0],dt=be[1],Je=0,Lt=Te.length;Je<Lt;Je++)J.attributes.position!==Te[Je]&&(Te[Je]=Ye(Te[Je]));for(var Je=0,Lt=dt.length;Je<Lt;Je++)J.attributes.normal!==dt[Je]&&(dt[Je]=Ye(dt[Je]));for(var Je=0,Lt=Y.length;Je<Lt;Je++){var kt=Y[Je],ue="morphTarget"+Je;if(X&&kt.POSITION!==void 0){var we=Te[Je];we.name=ue;for(var yt=J.attributes.position,vt=0,nn=we.count;vt<nn;vt++)we.setXYZ(vt,we.getX(vt)+yt.getX(vt),we.getY(vt)+yt.getY(vt),we.getZ(vt)+yt.getZ(vt))}if(G&&kt.NORMAL!==void 0){var Bt=dt[Je];Bt.name=ue;for(var It=J.attributes.normal,vt=0,nn=Bt.count;vt<nn;vt++)Bt.setXYZ(vt,Bt.getX(vt)+It.getX(vt),Bt.getY(vt)+It.getY(vt),Bt.getZ(vt)+It.getZ(vt))}}return X&&(J.morphAttributes.position=Te),G&&(J.morphAttributes.normal=dt),J})}function pe(J,Y){if(J.updateMorphTargets(),Y.weights!==void 0)for(var V=0,X=Y.weights.length;V<X;V++)J.morphTargetInfluences[V]=Y.weights[V];if(Y.extras&&Array.isArray(Y.extras.targetNames)){var G=Y.extras.targetNames;if(J.morphTargetInfluences.length===G.length){J.morphTargetDictionary={};for(var V=0,X=G.length;V<X;V++)J.morphTargetDictionary[G[V]]=V}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function xe(J){var Y=J.extensions&&J.extensions[n.KHR_DRACO_MESH_COMPRESSION],V;return Y?V="draco:"+Y.bufferView+":"+Y.indices+":"+Fe(Y.attributes):V=J.indices+":"+Fe(J.attributes)+":"+J.mode,V}function Fe(J){for(var Y="",V=Object.keys(J).sort(),X=0,G=V.length;X<G;X++)Y+=V[X]+":"+J[V[X]]+";";return Y}function Ye(J){if(J.isInterleavedBufferAttribute){for(var Y=J.count,V=J.itemSize,X=J.array.slice(0,Y*V),G=0,Z=0;G<Y;++G)X[Z++]=J.getX(G),V>=2&&(X[Z++]=J.getY(G)),V>=3&&(X[Z++]=J.getZ(G)),V>=4&&(X[Z++]=J.getW(G));return new Ut(X,V,J.normalized)}return J.clone()}function ze(J,Y,V){this.json=J||{},this.extensions=Y||{},this.options=V||{},this.cache=new t,this.primitiveCache={},this.textureLoader=new o_(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new Sl(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}ze.prototype.parse=function(J,Y){var V=this,X=this.json,G=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(Z){var se={scene:Z[0][X.scene||0],scenes:Z[0],animations:Z[1],cameras:Z[2],asset:X.asset,parser:V,userData:{}};ne(G,se,X),oe(se,X),J(se)}).catch(Y)},ze.prototype.markDefs=function(){for(var J=this.json.nodes||[],Y=this.json.skins||[],V=this.json.meshes||[],X={},G={},Z=0,se=Y.length;Z<se;Z++)for(var me=Y[Z].joints,de=0,Ee=me.length;de<Ee;de++)J[me[de]].isBone=!0;for(var Ce=0,be=J.length;Ce<be;Ce++){var Te=J[Ce];Te.mesh!==void 0&&(X[Te.mesh]===void 0&&(X[Te.mesh]=G[Te.mesh]=0),X[Te.mesh]++,Te.skin!==void 0&&(V[Te.mesh].isSkinnedMesh=!0))}this.json.meshReferences=X,this.json.meshUses=G},ze.prototype.getDependency=function(J,Y){var V=J+":"+Y,X=this.cache.get(V);if(!X){switch(J){case"scene":X=this.loadScene(Y);break;case"node":X=this.loadNode(Y);break;case"mesh":X=this.loadMesh(Y);break;case"accessor":X=this.loadAccessor(Y);break;case"bufferView":X=this.loadBufferView(Y);break;case"buffer":X=this.loadBuffer(Y);break;case"material":X=this.loadMaterial(Y);break;case"texture":X=this.loadTexture(Y);break;case"skin":X=this.loadSkin(Y);break;case"animation":X=this.loadAnimation(Y);break;case"camera":X=this.loadCamera(Y);break;case"light":X=this.extensions[n.KHR_LIGHTS_PUNCTUAL].loadLight(Y);break;default:throw new Error("Unknown type: "+J)}this.cache.add(V,X)}return X},ze.prototype.getDependencies=function(J){var Y=this.cache.get(J);if(!Y){var V=this,X=this.json[J+(J==="mesh"?"es":"s")]||[];Y=Promise.all(X.map(function(G,Z){return V.getDependency(J,Z)})),this.cache.add(J,Y)}return Y},ze.prototype.loadBuffer=function(J){var Y=this.json.buffers[J],V=this.fileLoader;if(Y.type&&Y.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+Y.type+" buffer type is not supported.");if(Y.uri===void 0&&J===0)return Promise.resolve(this.extensions[n.KHR_BINARY_GLTF].body);var X=this.options;return new Promise(function(G,Z){V.load(W(Y.uri,X.path),G,void 0,function(){Z(new Error('THREE.GLTFLoader: Failed to load buffer "'+Y.uri+'".'))})})},ze.prototype.loadBufferView=function(J){var Y=this.json.bufferViews[J];return this.getDependency("buffer",Y.buffer).then(function(V){var X=Y.byteLength||0,G=Y.byteOffset||0;return V.slice(G,G+X)})},ze.prototype.loadAccessor=function(J){var Y=this,V=this.json,X=this.json.accessors[J];if(X.bufferView===void 0&&X.sparse===void 0)return Promise.resolve(null);var G=[];return X.bufferView!==void 0?G.push(this.getDependency("bufferView",X.bufferView)):G.push(null),X.sparse!==void 0&&(G.push(this.getDependency("bufferView",X.sparse.indices.bufferView)),G.push(this.getDependency("bufferView",X.sparse.values.bufferView))),Promise.all(G).then(function(Z){var se=Z[0],me=C[X.type],de=E[X.componentType],Ee=de.BYTES_PER_ELEMENT,Ce=Ee*me,be=X.byteOffset||0,Te=X.bufferView!==void 0?V.bufferViews[X.bufferView].byteStride:void 0,dt=X.normalized===!0,Je,Lt;if(Te&&Te!==Ce){var kt=Math.floor(be/Te),ue="InterleavedBuffer:"+X.bufferView+":"+X.componentType+":"+kt+":"+X.count,we=Y.cache.get(ue);we||(Je=new de(se,kt*Te,X.count*Te/Ee),we=new Nh(Je,Te/Ee),Y.cache.add(ue,we)),Lt=new hc(we,me,be%Te/Ee,dt)}else se===null?Je=new de(X.count*me):Je=new de(se,be,X.count*me),Lt=new Ut(Je,me,dt);if(X.sparse!==void 0){var yt=C.SCALAR,vt=E[X.sparse.indices.componentType],nn=X.sparse.indices.byteOffset||0,Bt=X.sparse.values.byteOffset||0,It=new vt(Z[1],nn,X.sparse.count*yt),$t=new de(Z[2],Bt,X.sparse.count*me);se!==null&&(Lt=new Ut(Lt.array.slice(),Lt.itemSize,Lt.normalized));for(var Xt=0,rn=It.length;Xt<rn;Xt++){var Rt=It[Xt];if(Lt.setX(Rt,$t[Xt*me]),me>=2&&Lt.setY(Rt,$t[Xt*me+1]),me>=3&&Lt.setZ(Rt,$t[Xt*me+2]),me>=4&&Lt.setW(Rt,$t[Xt*me+3]),me>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Lt})},ze.prototype.loadTexture=function(J){var Y=this,V=this.json,X=this.options,G=this.textureLoader,Z=window.URL||window.webkitURL,se=V.textures[J],me=se.extensions||{},de;me[n.MSFT_TEXTURE_DDS]?de=V.images[me[n.MSFT_TEXTURE_DDS].source]:de=V.images[se.source];var Ee=de.uri,Ce=!1;return de.bufferView!==void 0&&(Ee=Y.getDependency("bufferView",de.bufferView).then(function(be){Ce=!0;var Te=new Blob([be],{type:de.mimeType});return Ee=Z.createObjectURL(Te),Ee})),Promise.resolve(Ee).then(function(be){var Te=X.manager.getHandler(be);return Te||(Te=me[n.MSFT_TEXTURE_DDS]?Y.extensions[n.MSFT_TEXTURE_DDS].ddsLoader:G),new Promise(function(dt,Je){Te.load(W(be,X.path),dt,void 0,Je)})}).then(function(be){Ce===!0&&Z.revokeObjectURL(Ee),be.flipY=!1,se.name!==void 0&&(be.name=se.name),de.mimeType in k&&(be.format=k[de.mimeType]);var Te=V.samplers||{},dt=Te[se.sampler]||{};return be.magFilter=T[dt.magFilter]||Pa,be.minFilter=T[dt.minFilter]||eg,be.wrapS=L[dt.wrapS]||U0,be.wrapT=L[dt.wrapT]||U0,be})},ze.prototype.assignTexture=function(J,Y,V){var X=this;return this.getDependency("texture",V.index).then(function(G){if(!G.isCompressedTexture)switch(Y){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":G.format=Lh;break}if(X.extensions[n.KHR_TEXTURE_TRANSFORM]){var Z=V.extensions!==void 0?V.extensions[n.KHR_TEXTURE_TRANSFORM]:void 0;Z&&(G=X.extensions[n.KHR_TEXTURE_TRANSFORM].extendTexture(G,Z))}J[Y]=G})},ze.prototype.assignFinalMaterial=function(J){var Y=J.geometry,V=J.material,X=this.extensions,G=Y.attributes.tangent!==void 0,Z=Y.attributes.color!==void 0,se=Y.attributes.normal===void 0,me=J.isSkinnedMesh===!0,de=Object.keys(Y.morphAttributes).length>0,Ee=de&&Y.morphAttributes.normal!==void 0;if(J.isPoints){var Ce="PointsMaterial:"+V.uuid,be=this.cache.get(Ce);be||(be=new vu,Hn.prototype.copy.call(be,V),be.color.copy(V.color),be.map=V.map,be.sizeAttenuation=!1,this.cache.add(Ce,be)),V=be}else if(J.isLine){var Ce="LineBasicMaterial:"+V.uuid,Te=this.cache.get(Ce);Te||(Te=new Yr,Hn.prototype.copy.call(Te,V),Te.color.copy(V.color),this.cache.add(Ce,Te)),V=Te}if(G||Z||se||me||de){var Ce="ClonedMaterial:"+V.uuid+":";V.isGLTFSpecularGlossinessMaterial&&(Ce+="specular-glossiness:"),me&&(Ce+="skinning:"),G&&(Ce+="vertex-tangents:"),Z&&(Ce+="vertex-colors:"),se&&(Ce+="flat-shading:"),de&&(Ce+="morph-targets:"),Ee&&(Ce+="morph-normals:");var dt=this.cache.get(Ce);dt||(dt=V.isGLTFSpecularGlossinessMaterial?X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(V):V.clone(),me&&(dt.skinning=!0),G&&(dt.vertexTangents=!0),Z&&(dt.vertexColors=Qm),se&&(dt.flatShading=!0),de&&(dt.morphTargets=!0),Ee&&(dt.morphNormals=!0),this.cache.add(Ce,dt)),V=dt}V.aoMap&&Y.attributes.uv2===void 0&&Y.attributes.uv!==void 0&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),Y.setAttribute("uv2",new Ut(Y.attributes.uv.array,2))),V.isGLTFSpecularGlossinessMaterial&&(J.onBeforeRender=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),J.material=V},ze.prototype.loadMaterial=function(J){var Y=this,V=this.json,X=this.extensions,G=V.materials[J],Z,se={},me=G.extensions||{},de=[];if(me[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var Ee=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];Z=Ee.getMaterialType(),de.push(Ee.extendParams(se,G,Y))}else if(me[n.KHR_MATERIALS_UNLIT]){var Ce=X[n.KHR_MATERIALS_UNLIT];Z=Ce.getMaterialType(),de.push(Ce.extendParams(se,G,Y))}else{Z=dc;var be=G.pbrMetallicRoughness||{};if(se.color=new qt(1,1,1),se.opacity=1,Array.isArray(be.baseColorFactor)){var Te=be.baseColorFactor;se.color.fromArray(Te),se.opacity=Te[3]}be.baseColorTexture!==void 0&&de.push(Y.assignTexture(se,"map",be.baseColorTexture)),se.metalness=be.metallicFactor!==void 0?be.metallicFactor:1,se.roughness=be.roughnessFactor!==void 0?be.roughnessFactor:1,be.metallicRoughnessTexture!==void 0&&(de.push(Y.assignTexture(se,"metalnessMap",be.metallicRoughnessTexture)),de.push(Y.assignTexture(se,"roughnessMap",be.metallicRoughnessTexture)))}G.doubleSided===!0&&(se.side=dx);var dt=G.alphaMode||U.OPAQUE;return dt===U.BLEND?se.transparent=!0:(se.transparent=!1,dt===U.MASK&&(se.alphaTest=G.alphaCutoff!==void 0?G.alphaCutoff:.5)),G.normalTexture!==void 0&&Z!==ds&&(de.push(Y.assignTexture(se,"normalMap",G.normalTexture)),se.normalScale=new _t(1,1),G.normalTexture.scale!==void 0&&se.normalScale.set(G.normalTexture.scale,G.normalTexture.scale)),G.occlusionTexture!==void 0&&Z!==ds&&(de.push(Y.assignTexture(se,"aoMap",G.occlusionTexture)),G.occlusionTexture.strength!==void 0&&(se.aoMapIntensity=G.occlusionTexture.strength)),G.emissiveFactor!==void 0&&Z!==ds&&(se.emissive=new qt().fromArray(G.emissiveFactor)),G.emissiveTexture!==void 0&&Z!==ds&&de.push(Y.assignTexture(se,"emissiveMap",G.emissiveTexture)),Promise.all(de).then(function(){var Je;return Z===Ja?Je=X[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(se):Je=new Z(se),G.name!==void 0&&(Je.name=G.name),Je.map&&(Je.map.encoding=p2),Je.emissiveMap&&(Je.emissiveMap.encoding=p2),Je.specularMap&&(Je.specularMap.encoding=p2),oe(Je,G),G.extensions&&ne(X,Je,G),Je})};function Ze(J,Y,V){var X=Y.attributes,G=[];function Z(Ee,Ce){return V.getDependency("accessor",Ee).then(function(be){J.setAttribute(Ce,be)})}for(var se in X){var me=R[se]||se.toLowerCase();me in J.attributes||G.push(Z(X[se],me))}if(Y.indices!==void 0&&!J.index){var de=V.getDependency("accessor",Y.indices).then(function(Ee){J.setIndex(Ee)});G.push(de)}return oe(J,Y),Promise.all(G).then(function(){return Y.targets!==void 0?ge(J,Y.targets,V):J})}return ze.prototype.loadGeometries=function(J){var Y=this,V=this.extensions,X=this.primitiveCache;function G(Te){return V[n.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(Te,Y).then(function(dt){return Ze(dt,Te,Y)})}for(var Z=[],se=0,me=J.length;se<me;se++){var de=J[se],Ee=xe(de),Ce=X[Ee];if(Ce)Z.push(Ce.promise);else{var be;de.extensions&&de.extensions[n.KHR_DRACO_MESH_COMPRESSION]?be=G(de):be=Ze(new zt,de,Y),X[Ee]={primitive:de,promise:be},Z.push(be)}}return Promise.all(Z)},ze.prototype.loadMesh=function(J){for(var Y=this,V=this.json,X=V.meshes[J],G=X.primitives,Z=[],se=0,me=G.length;se<me;se++){var de=G[se].material===void 0?ie():this.getDependency("material",G[se].material);Z.push(de)}return Promise.all(Z).then(function(Ee){return Y.loadGeometries(G).then(function(Ce){for(var be=[],Te=0,dt=Ce.length;Te<dt;Te++){var Je=Ce[Te],Lt=G[Te],kt,ue=Ee[Te];if(Lt.mode===b.TRIANGLES||Lt.mode===b.TRIANGLE_STRIP||Lt.mode===b.TRIANGLE_FAN||Lt.mode===void 0)kt=X.isSkinnedMesh===!0?new Wx(Je,ue):new xi(Je,ue),kt.isSkinnedMesh===!0&&!kt.geometry.attributes.skinWeight.normalized&&kt.normalizeSkinWeights(),Lt.mode===b.TRIANGLE_STRIP?kt.drawMode=cD:Lt.mode===b.TRIANGLE_FAN&&(kt.drawMode=fD);else if(Lt.mode===b.LINES)kt=new $r(Je,ue);else if(Lt.mode===b.LINE_STRIP)kt=new ps(Je,ue);else if(Lt.mode===b.LINE_LOOP)kt=new U2(Je,ue);else if(Lt.mode===b.POINTS)kt=new Z0(Je,ue);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+Lt.mode);Object.keys(kt.geometry.morphAttributes).length>0&&pe(kt,X),kt.name=X.name||"mesh_"+J,Ce.length>1&&(kt.name+="_"+Te),oe(kt,X),Y.assignFinalMaterial(kt),be.push(kt)}if(be.length===1)return be[0];for(var we=new kh,Te=0,dt=be.length;Te<dt;Te++)we.add(be[Te]);return we})})},ze.prototype.loadCamera=function(J){var Y,V=this.json.cameras[J],X=V[V.type];if(!X){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return V.type==="perspective"?Y=new ra(or.radToDeg(X.yfov),X.aspectRatio||1,X.znear||1,X.zfar||2e6):V.type==="orthographic"&&(Y=new u_(X.xmag/-2,X.xmag/2,X.ymag/2,X.ymag/-2,X.znear,X.zfar)),V.name!==void 0&&(Y.name=V.name),oe(Y,V),Promise.resolve(Y)},ze.prototype.loadSkin=function(J){var Y=this.json.skins[J],V={joints:Y.joints};return Y.inverseBindMatrices===void 0?Promise.resolve(V):this.getDependency("accessor",Y.inverseBindMatrices).then(function(X){return V.inverseBindMatrices=X,V})},ze.prototype.loadAnimation=function(J){for(var Y=this.json,V=Y.animations[J],X=[],G=[],Z=[],se=[],me=[],de=0,Ee=V.channels.length;de<Ee;de++){var Ce=V.channels[de],be=V.samplers[Ce.sampler],Te=Ce.target,dt=Te.node!==void 0?Te.node:Te.id,Je=V.parameters!==void 0?V.parameters[be.input]:be.input,Lt=V.parameters!==void 0?V.parameters[be.output]:be.output;X.push(this.getDependency("node",dt)),G.push(this.getDependency("accessor",Je)),Z.push(this.getDependency("accessor",Lt)),se.push(be),me.push(Te)}return Promise.all([Promise.all(X),Promise.all(G),Promise.all(Z),Promise.all(se),Promise.all(me)]).then(function(kt){for(var ue=kt[0],we=kt[1],yt=kt[2],vt=kt[3],nn=kt[4],Bt=[],It=0,$t=ue.length;It<$t;It++){var Xt=ue[It],rn=we[It],Rt=yt[It],Kt=vt[It],Jt=nn[It];if(Xt!==void 0){Xt.updateMatrix(),Xt.matrixAutoUpdate=!0;var Oe;switch(P[Jt.path]){case P.weights:Oe=Pg;break;case P.rotation:Oe=a_;break;case P.position:case P.scale:default:Oe=Ig;break}var qe=Xt.name?Xt.name:Xt.uuid,st=Kt.interpolation!==void 0?I[Kt.interpolation]:ng,Ot=[];P[Jt.path]===P.weights?Xt.traverse(function(Br){Br.isMesh===!0&&Br.morphTargetInfluences&&Ot.push(Br.name?Br.name:Br.uuid)}):Ot.push(qe);var mt=Rt.array;if(Rt.normalized){var sn;if(mt.constructor===Int8Array)sn=1/127;else if(mt.constructor===Uint8Array)sn=1/255;else if(mt.constructor==Int16Array)sn=1/32767;else if(mt.constructor===Uint16Array)sn=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var xn=new Float32Array(mt.length),_n=0,lr=mt.length;_n<lr;_n++)xn[_n]=mt[_n]*sn;mt=xn}for(var _n=0,lr=Ot.length;_n<lr;_n++){var Mn=new Oe(Ot[_n]+"."+P[Jt.path],rn.array,mt,st);Kt.interpolation==="CUBICSPLINE"&&(Mn.createInterpolant=function(ts){return new x(this.times,this.values,this.getValueSize()/3,ts)},Mn.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),Bt.push(Mn)}}}var Er=V.name!==void 0?V.name:"animation_"+J;return new mu(Er,void 0,Bt)})},ze.prototype.loadNode=function(J){var Y=this.json,V=this.extensions,X=this,G=Y.meshReferences,Z=Y.meshUses,se=Y.nodes[J];return function(){var me=[];return se.mesh!==void 0&&me.push(X.getDependency("mesh",se.mesh).then(function(de){var Ee;if(G[se.mesh]>1){var Ce=Z[se.mesh]++;Ee=de.clone(),Ee.name+="_instance_"+Ce,Ee.onBeforeRender=de.onBeforeRender;for(var be=0,Te=Ee.children.length;be<Te;be++)Ee.children[be].name+="_instance_"+Ce,Ee.children[be].onBeforeRender=de.children[be].onBeforeRender}else Ee=de;return se.weights!==void 0&&Ee.traverse(function(dt){if(dt.isMesh)for(var Je=0,Lt=se.weights.length;Je<Lt;Je++)dt.morphTargetInfluences[Je]=se.weights[Je]}),Ee})),se.camera!==void 0&&me.push(X.getDependency("camera",se.camera)),se.extensions&&se.extensions[n.KHR_LIGHTS_PUNCTUAL]&&se.extensions[n.KHR_LIGHTS_PUNCTUAL].light!==void 0&&me.push(X.getDependency("light",se.extensions[n.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(me)}().then(function(me){var de;if(se.isBone===!0?de=new EA:me.length>1?de=new kh:me.length===1?de=me[0]:de=new an,de!==me[0])for(var Ee=0,Ce=me.length;Ee<Ce;Ee++)de.add(me[Ee]);if(se.name!==void 0&&(de.userData.name=se.name,de.name=no.sanitizeNodeName(se.name)),oe(de,se),se.extensions&&ne(V,de,se),se.matrix!==void 0){var be=new tr;be.fromArray(se.matrix),de.applyMatrix(be)}else se.translation!==void 0&&de.position.fromArray(se.translation),se.rotation!==void 0&&de.quaternion.fromArray(se.rotation),se.scale!==void 0&&de.scale.fromArray(se.scale);return de})},ze.prototype.loadScene=function(){function J(Y,V,X,G){var Z=X.nodes[Y];return G.getDependency("node",Y).then(function(se){if(Z.skin===void 0)return se;var me;return G.getDependency("skin",Z.skin).then(function(de){me=de;for(var Ee=[],Ce=0,be=me.joints.length;Ce<be;Ce++)Ee.push(G.getDependency("node",me.joints[Ce]));return Promise.all(Ee)}).then(function(de){return se.traverse(function(Ee){if(Ee.isMesh){for(var Ce=[],be=[],Te=0,dt=de.length;Te<dt;Te++){var Je=de[Te];if(Je){Ce.push(Je);var Lt=new tr;me.inverseBindMatrices!==void 0&&Lt.fromArray(me.inverseBindMatrices.array,Te*16),be.push(Lt)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',me.joints[Te])}Ee.bind(new k2(Ce,be),Ee.matrixWorld)}}),se})}).then(function(se){V.add(se);var me=[];if(Z.children)for(var de=Z.children,Ee=0,Ce=de.length;Ee<Ce;Ee++){var be=de[Ee];me.push(J(be,se,X,G))}return Promise.all(me)})}return function(V){var X=this.json,G=this.extensions,Z=this.json.scenes[V],se=this,me=new H0;Z.name!==void 0&&(me.name=Z.name),oe(me,Z),Z.extensions&&ne(G,me,Z);for(var de=Z.nodes||[],Ee=[],Ce=0,be=de.length;Ce<be;Ce++)Ee.push(J(de[Ce],me,X,se));return Promise.all(Ee).then(function(){return me})}}(),e}();class tI extends et.Layer{setColors(t){return this.colors=t,this}getColors(){return this.colors}}tI.mergeOptions({colors:["#3480bf","#9cbad2"],zIndex:-1/0});class Nge extends et.renderer.CanvasRenderer{checkResources(){return[]}draw(){this._drawSky(),this.completeRender()}drawOnInteracting(t){this._drawSky()}_drawSky(){const t=this.layer;if(!t)return;const n=t.getMap();let r=n.getContainerExtent().ymin;if(r>0){const i=n.getDevicePixelRatio(),a=n.width*i;r+=30,r*=i,this.prepareCanvas();const s=this.context,o=t.colors||t.options.colors;if(o){const[c,f]=o,d=s.createLinearGradient(a/2,0,a/2,r);d.addColorStop(0,c),d.addColorStop(1,f),t.skyFill=d}if(!t.skyFill)return;s.fillStyle=t.skyFill,s.fillRect(0,0,a,r)}}}tI.registerRenderer("canvas",Nge);const nI={addDevice:"_addDevice_16agt_1",darkForm:"_dark-form_16agt_38",boxWrap:"_box-wrap_16agt_53"};function Uge(e){const{data:t}=e,n=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:t.stationData?"传输正常":"传输中断"}),{station:r,stationData:i}=t;return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[n(),Qn("span",{title:r.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:[r.NAME," ",r.DTU_ID]})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"所属部门",children:r.GROUP_ID}),Ve(Ft.Descriptions.Item,{label:"站点描述",children:r.DESCRIPTION}),Ve(Ft.Descriptions.Item,{label:"点位类型",children:r.GROUP_ID}),Ve(Ft.Descriptions.Item,{label:"点位坐标",children:`${r.LONGTITUDE} ${r.LATTITUDE}`})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",onClick:()=>{e.on&&e.on("设备动态",t.station)},type:"ghost",children:[Ve(Ju.PlaySquareOutlined,{}),"实时动态"]})})]})}const Bge=bt.memo(Uge);function zge(e){const{data:t}=e,n=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:t.STATUS=="正常"?"传输正常":"传输异常"});return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[n(),Ve("span",{title:t.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:t.NAME})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"站点全称",children:t.SHOW_NAME||t.NAME}),Ve(Ft.Descriptions.Item,{label:"站点描述",children:t.DISCRIBE}),Ve(Ft.Descriptions.Item,{label:"点位坐标",children:`${t.LONGITUDE} ${t.LATITUDE}`})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",onClick:()=>{e.on&&e.on("站点详情",t)},type:"ghost",children:[Ve(Ju.PlaySquareOutlined,{}),"站点详情"]})})]})}const Hge=bt.memo(zge);function Gge(e){const{needClose:t,data:n,on:r,hideButtons:i}=e,a=()=>Ve("span",{style:{border:"1px solid #042e6ece",background:"#042e6e78",fontSize:"14px",padding:"2px 4px"},children:n.TYPE});return Qn("div",{className:nI.addDevice,children:[Qn("div",{className:"pop-title",children:[a(),Ve("span",{title:n.NAME,className:"ellipsis",style:{padding:"0px 4px",maxWidth:"270px"},children:n.NAME}),t&&Ve("div",{style:{position:"absolute",right:"10px",top:"10px",color:"white"},onClick:()=>{r&&r("close",n)},children:"✖"})]}),Ve("div",{className:"pop-centent",children:Qn(Ft.Descriptions,{labelStyle:{color:"#fff"},contentStyle:{color:"#ffffffd1"},column:1,children:[Ve(Ft.Descriptions.Item,{label:"",children:Ve(Ft.Image,{src:n.PIC})}),Ve(Ft.Descriptions.Item,{label:"",children:n.DISCRIBE})]})}),Ve(Ft.Divider,{style:{margin:"6px 0px"}}),!i&&Ve("div",{className:"pop-bottom",children:Qn(Ft.Button,{size:"small",danger:!n.DATATABLE,onClick:()=>{e.on&&e.on("设备数据",n)},type:"primary",children:[Ve(Ju.DashboardOutlined,{}),n.DATATABLE?"设备数据":"暂未接入"]})})]})}const Vge=bt.memo(Gge);function Wge(e){return Qn("div",{style:{width:"100%",height:"100%"},children:[e.popType=="站点点击"&&Ve(Bge,{on:e.on,popType:e.popType,data:e.popData}),e.popType=="站点详情"&&Ve(Hge,{on:e.on,popType:e.popType,data:e.popData}),e.popType=="设备弹窗"&&Ve(Vge,{on:e.on,popType:e.popType,data:e.popData})]})}class jge{constructor(t,n){fb(this,"map");fb(this,"popData");fb(this,"popMarker");fb(this,"opt");this.map=t,this.popData={popType:""},this.opt=n,this.popMarker=void 0,this.map.closePop=()=>{this.popClose()},this.opt.contentWidth=n.contentWidth||600,this.opt.contentHeight=n.contentHeight||400,this.opt.guideLine1len=45,this.opt.guideLine1top=50,this.opt.guideLine2top=32,this.calcOffset(),this.opt.lineColor="#00daf8",this.opt.bgColor="#02003D"}setFrame(t,n){this.opt.contentWidth=t,this.opt.contentHeight=n,this.calcOffset()}calcOffset(){this.opt.contentdx=this.opt.guideLine1top+this.opt.guideLine1len*Math.cos(Math.PI/4),this.opt.dy=-(this.opt.guideLine1top+(this.opt.guideLine1len*Math.cos(Math.PI/4)+5))}popClose(){this.popMarker&&this.popMarker.remove()}checkClose(t){this.popData.popType.includes(t)&&this.popClose()}popShow(t,n,r,i){let a=this,s=this.opt;r&&this.setFrame(r.width,r.height),this.popData=n;let o=document.getElementById("markerPopup");o||(o=document.createElement("div"),o.setAttribute("id","markerPopup")),this.opt.popupContent,xb.render(Ve(bt.Fragment,{children:Qn("div",{className:"mtk-pop-content",style:{width:`${s.contentWidth}px`,height:`${s.contentHeight}px`},children:[this.opt.popupContent?Ve(this.opt.popupContent,{on:(c,f)=>{i&&i(c,f)},popType:n.type,popData:n.data}):Ve(Wge,{on:(c,f)=>{i&&i(c,f)},popType:n.type,popData:n.data}),Ve("div",{style:{position:"absolute",right:"10px",top:"10px",color:"white",cursor:"pointer"},onClick:()=>{a.popClose(),i&&i("close",n)},children:"✖"})]})}),o),this.opt.content=o,this.popMarker=new et.ui.InfoWindow({...this.opt,custom:!0,dy:-20}).addTo(this.map),this.popMarker.addTo(this.map).show(t)}}var I3={exports:{}};/**
|
|
3676
3676
|
* @license
|
|
3677
3677
|
* Lodash <https://lodash.com/>
|
|
3678
3678
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -3698,7 +3698,7 @@ __p += '`),_r&&(St+=`' +
|
|
|
3698
3698
|
function print() { __p += __j.call(arguments, '') }
|
|
3699
3699
|
`:`;
|
|
3700
3700
|
`)+St+`return __p
|
|
3701
|
-
}`;var Bn=Xu(function(){return Mr(fe,Sn+"return "+St).apply(n,Ae)});if(Bn.source=St,Ed(Bn))throw Bn;return Bn}function OE(p){return Vr(p).toLowerCase()}function PC(p){return Vr(p).toUpperCase()}function IC(p,_,A){if(p=Vr(p),p&&(A||_===n))return zf(p);if(!p||!(_=yr(_)))return p;var B=Do(p),te=Do(_),fe=X_(B,te),Ae=Z_(B,te)+1;return Vl(B,fe,Ae).join("")}function Vw(p,_,A){if(p=Vr(p),p&&(A||_===n))return p.slice(0,Ll(p)+1);if(!p||!(_=yr(_)))return p;var B=Do(p),te=Z_(B,Do(_))+1;return Vl(B,0,te).join("")}function FC(p,_,A){if(p=Vr(p),p&&(A||_===n))return p.replace(Gt,"");if(!p||!(_=yr(_)))return p;var B=Do(p),te=X_(B,Do(_));return Vl(B,te).join("")}function gF(p,_){var A=ie,B=ne;if(ji(_)){var te="separator"in _?_.separator:te;A="length"in _?ur(_.length):A,B="omission"in _?yr(_.omission):B}p=Vr(p);var fe=p.length;if(Hf(p)){var Ae=Do(p);fe=Ae.length}if(A>=fe)return p;var De=A-so(B);if(De<1)return B;var Ge=Ae?Vl(Ae,0,De).join(""):p.slice(0,De);if(te===n)return Ge+B;if(Ae&&(De+=Ge.length-De),bE(te)){if(p.slice(De).search(te)){var ft,ht=Ge;for(te.global||(te=Vf(te.source,Vr(Se.exec(te))+"g")),te.lastIndex=0;ft=te.exec(ht);)var St=ft.index;Ge=Ge.slice(0,St===n?De:St)}}else if(p.indexOf(yr(te),De)!=De){var Zt=Ge.lastIndexOf(te);Zt>-1&&(Ge=Ge.slice(0,Zt))}return Ge+B}function LE(p){return p=Vr(p),p&&oa.test(p)?p.replace(Br,sE):p}var kC=Wl(function(p,_,A){return p+(A?" ":"")+_.toUpperCase()}),Ww=Uv("toUpperCase");function f1(p,_,A){return p=Vr(p),_=A?n:_,_===n?py(p)?my(p):yv(p):p.match(_)||[]}var Xu=ir(function(p,_){try{return ba(p,n,_)}catch(A){return Ed(A)?A:new Zn(A)}}),cm=Fs(function(p,_){return za(_,function(A){A=No(A),Zi(p,A,n1(p[A],p))}),p});function yF(p){var _=p==null?0:p.length,A=Tn();return p=_?Hr(p,function(B){if(typeof B[1]!="function")throw new oo(s);return[A(B[0]),B[1]]}):[],ir(function(B){for(var te=-1;++te<_;){var fe=p[te];if(ba(fe[0],this,B))return ba(fe[1],this,B)}})}function xF(p){return Iu(Ci(p,v))}function DE(p){return function(){return p}}function _F(p,_){return p==null||p!==p?_:p}var wF=zv(),bF=zv(!0);function Bs(p){return p}function jw(p){return Fc(typeof p=="function"?p:Ci(p,v))}function SF(p){return hi(Ci(p,v))}function NC(p,_){return ca(p,Ci(_,v))}var PE=ir(function(p,_){return function(A){return ah(A,p,_)}}),EF=ir(function(p,_){return function(A){return ah(p,A,_)}});function fm(p,_,A){var B=ss(_),te=Dc(_,B);A==null&&!(ji(_)&&(te.length||!B.length))&&(A=_,_=p,p=this,te=Dc(_,ss(_)));var fe=!(ji(A)&&"chain"in A)||!!A.chain,Ae=$c(p);return za(te,function(De){var Ge=_[De];p[De]=Ge,Ae&&(p.prototype[De]=function(){var ft=this.__chain__;if(fe||ft){var ht=p(this.__wrapped__),St=ht.__actions__=Lr(this.__actions__);return St.push({func:Ge,args:arguments,thisArg:p}),ht.__chain__=ft,ht}return Ge.apply(p,bu([this.value()],arguments))})}),p}function UC(){return Ba._===this&&(Ba._=yy),this}function Yw(){}function BC(p){return p=ur(p),ir(function(_){return Uu(_,p)})}var zC=ky(Hr),HC=ky(Sp),Ql=ky(Ha);function Ad(p){return hh(p)?cy(No(p)):gt(p)}function gh(p){return function(_){return p==null?n:ku(p,_)}}var GC=Hv(),VC=Hv(!0);function h1(){return[]}function IE(){return!1}function TF(){return{}}function yh(){return""}function $w(){return!0}function FE(p,_){if(p=ur(p),p<1||p>ze)return[];var A=Y,B=wi(p,Y);_=Tn(_),p-=Y;for(var te=_v(B,_);++A<p;)_(A);return te}function WC(p){return ar(p)?Hr(p,No):zo(p)?[p]:Lr(o0(Vr(p)))}function zs(p){var _=++Wf;return Vr(p)+_}var hm=Xp(function(p,_){return p+_},0),jC=Gv("ceil"),m0=Xp(function(p,_){return p/_},1),Cd=Gv("floor");function MF(p){return p&&p.length?Lc(p,Bs,rh):n}function YC(p,_){return p&&p.length?Lc(p,Tn(_,2),rh):n}function Zc(p){return $_(p,Bs)}function $C(p,_){return $_(p,Tn(_,2))}function qC(p){return p&&p.length?Lc(p,Bs,Qi):n}function Pi(p,_){return p&&p.length?Lc(p,Tn(_,2),Qi):n}var ea=Xp(function(p,_){return p*_},1),Go=Gv("round"),g0=Xp(function(p,_){return p-_},0);function hl(p){return p&&p.length?hy(p,Bs):0}function AF(p,_){return p&&p.length?hy(p,Tn(_,2)):0}return ae.after=d0,ae.ary=t1,ae.assign=QI,ae.assignIn=_C,ae.assignInWith=sm,ae.assignWith=JI,ae.at=eF,ae.before=p0,ae.bind=n1,ae.bindAll=cm,ae.bindKey=nm,ae.castArray=FI,ae.chain=$n,ae.chunk=l0,ae.compact=yw,ae.concat=xw,ae.cond=yF,ae.conforms=xF,ae.constant=DE,ae.countBy=Ky,ae.create=tF,ae.curry=r1,ae.curryRight=i1,ae.debounce=rm,ae.defaults=nF,ae.defaultsDeep=wC,ae.defer=iC,ae.delay=Rw,ae.difference=jy,ae.differenceBy=_w,ae.differenceWith=Hc,ae.drop=cE,ae.dropRight=fE,ae.dropRightWhile=Gc,ae.dropWhile=ww,ae.fill=Yy,ae.filter=X3,ae.flatMap=TI,ae.flatMapDeep=Ei,ae.flatMapDepth=K3,ae.flatten=$u,ae.flattenDeep=hE,ae.flattenDepth=dE,ae.flip=aC,ae.flow=wF,ae.flowRight=bF,ae.fromPairs=bw,ae.functions=sF,ae.functionsIn=oF,ae.groupBy=Q3,ae.initial=qv,ae.intersection=pE,ae.intersectionBy=Wc,ae.intersectionWith=u0,ae.invert=uF,ae.invertBy=cF,ae.invokeMap=eC,ae.iteratee=jw,ae.keyBy=Qy,ae.keys=ss,ae.keysIn=Ho,ae.map=Mw,ae.mapKeys=hF,ae.mapValues=dF,ae.matches=SF,ae.matchesProperty=NC,ae.memoize=wd,ae.merge=pF,ae.mergeWith=EC,ae.method=PE,ae.methodOf=EF,ae.mixin=fm,ae.negate=a1,ae.nthArg=BC,ae.omit=vF,ae.omitBy=mF,ae.once=CI,ae.orderBy=Aw,ae.over=zC,ae.overArgs=RI,ae.overEvery=HC,ae.overSome=Ql,ae.partial=Ow,ae.partialRight=sC,ae.partition=tm,ae.pick=Nw,ae.pickBy=om,ae.property=Ad,ae.propertyOf=gh,ae.pull=vE,ae.pullAll=c0,ae.pullAllBy=Xv,ae.pullAllWith=Zv,ae.pullAt=Ew,ae.range=GC,ae.rangeRight=VC,ae.rearg=Lw,ae.reject=AI,ae.remove=Kv,ae.rest=OI,ae.reverse=Qv,ae.sampleSize=Bo,ae.set=l1,ae.setWith=MC,ae.shuffle=Jy,ae.slice=Zy,ae.sortBy=rC,ae.sortedUniq=yE,ae.sortedUniqBy=em,ae.split=um,ae.spread=LI,ae.tail=h,ae.take=g,ae.takeRight=S,ae.takeRightWhile=O,ae.takeWhile=N,ae.tap=vn,ae.throttle=DI,ae.thru=In,ae.toArray=gC,ae.toPairs=u1,ae.toPairsIn=AC,ae.toPath=WC,ae.toPlainObject=xC,ae.transform=CC,ae.unary=PI,ae.union=K,ae.unionBy=le,ae.unionWith=ye,ae.uniq=Ie,ae.uniqBy=it,ae.uniqWith=un,ae.unset=Uw,ae.unzip=Un,ae.unzipWith=At,ae.update=v0,ae.updateWith=Td,ae.values=qu,ae.valuesIn=Bw,ae.without=An,ae.words=f1,ae.wrap=II,ae.xor=zn,ae.xorBy=Ln,ae.xorWith=$e,ae.zip=Ue,ae.zipObject=We,ae.zipObjectDeep=pt,ae.zipWith=wt,ae.entries=u1,ae.entriesIn=AC,ae.extend=_C,ae.extendWith=sm,fm(ae,ae),ae.add=hm,ae.attempt=Xu,ae.camelCase=LC,ae.capitalize=c1,ae.ceil=jC,ae.clamp=ME,ae.clone=kI,ae.cloneDeep=UI,ae.cloneDeepWith=BI,ae.cloneWith=NI,ae.conformsTo=oC,ae.deburr=Kl,ae.defaultTo=_F,ae.divide=m0,ae.endsWith=AE,ae.eq=Xl,ae.escape=zw,ae.escapeRegExp=vh,ae.every=q3,ae.find=EI,ae.findIndex=$y,ae.findKey=kw,ae.findLast=Z3,ae.findLastIndex=Vc,ae.findLastKey=bC,ae.floor=Cd,ae.forEach=_E,ae.forEachRight=wE,ae.forIn=rF,ae.forInRight=iF,ae.forOwn=aF,ae.forOwnRight=SC,ae.get=EE,ae.gt=lC,ae.gte=uC,ae.has=lF,ae.hasIn=TE,ae.head=Sw,ae.identity=Bs,ae.includes=J3,ae.indexOf=Uo,ae.inRange=RC,ae.invoke=fF,ae.isArguments=bd,ae.isArray=ar,ae.isArrayBuffer=s1,ae.isArrayLike=as,ae.isArrayLikeObject=da,ae.isBoolean=cC,ae.isBuffer=Sd,ae.isDate=zI,ae.isElement=fC,ae.isEmpty=HI,ae.isEqual=GI,ae.isEqualWith=hC,ae.isError=Ed,ae.isFinite=dC,ae.isFunction=$c,ae.isInteger=Dw,ae.isLength=im,ae.isMap=Pw,ae.isMatch=pC,ae.isMatchWith=VI,ae.isNaN=WI,ae.isNative=OW,ae.isNil=YI,ae.isNull=jI,ae.isNumber=vC,ae.isObject=ji,ae.isObjectLike=Di,ae.isPlainObject=o1,ae.isRegExp=bE,ae.isSafeInteger=$I,ae.isSet=Iw,ae.isString=Fw,ae.isSymbol=zo,ae.isTypedArray=am,ae.isUndefined=SE,ae.isWeakMap=qI,ae.isWeakSet=XI,ae.join=ql,ae.kebabCase=Md,ae.last=Aa,ae.lastIndexOf=qy,ae.lowerCase=Ns,ae.lowerFirst=Us,ae.lt=mC,ae.lte=ZI,ae.max=MF,ae.maxBy=YC,ae.mean=Zc,ae.meanBy=$C,ae.min=qC,ae.minBy=Pi,ae.stubArray=h1,ae.stubFalse=IE,ae.stubObject=TF,ae.stubString=yh,ae.stubTrue=$w,ae.multiply=ea,ae.nth=Xy,ae.noConflict=UC,ae.noop=Yw,ae.now=Yc,ae.pad=CE,ae.padEnd=fl,ae.padStart=mh,ae.parseInt=qc,ae.random=OC,ae.reduce=MI,ae.reduceRight=tC,ae.repeat=RE,ae.replace=lm,ae.result=TC,ae.round=Go,ae.runInContext=He,ae.sample=nC,ae.size=Cw,ae.snakeCase=DC,ae.some=e1,ae.sortedIndex=f0,ae.sortedIndexBy=mE,ae.sortedIndexOf=Jv,ae.sortedLastIndex=Tw,ae.sortedLastIndexBy=gE,ae.sortedLastIndexOf=h0,ae.startCase=Hw,ae.startsWith=Xc,ae.subtract=g0,ae.sum=hl,ae.sumBy=AF,ae.template=Gw,ae.times=FE,ae.toFinite=ph,ae.toInteger=ur,ae.toLength=yC,ae.toLower=OE,ae.toNumber=Zl,ae.toSafeInteger=KI,ae.toString=Vr,ae.toUpper=PC,ae.trim=IC,ae.trimEnd=Vw,ae.trimStart=FC,ae.truncate=gF,ae.unescape=LE,ae.uniqueId=zs,ae.upperCase=kC,ae.upperFirst=Ww,ae.each=_E,ae.eachRight=wE,ae.first=Sw,fm(ae,function(){var p={};return Ds(ae,function(_,A){br.call(ae.prototype,A)||(p[A]=_)}),p}(),{chain:!1}),ae.VERSION=r,za(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){ae[p].placeholder=ae}),za(["drop","take"],function(p,_){rr.prototype[p]=function(A){A=A===n?1:Xi(ur(A),0);var B=this.__filtered__&&!_?new rr(this):this.clone();return B.__filtered__?B.__takeCount__=wi(A,B.__takeCount__):B.__views__.push({size:wi(A,Y),type:p+(B.__dir__<0?"Right":"")}),B},rr.prototype[p+"Right"]=function(A){return this.reverse()[p](A).reverse()}}),za(["filter","map","takeWhile"],function(p,_){var A=_+1,B=A==pe||A==Fe;rr.prototype[p]=function(te){var fe=this.clone();return fe.__iteratees__.push({iteratee:Tn(te,3),type:A}),fe.__filtered__=fe.__filtered__||B,fe}}),za(["head","last"],function(p,_){var A="take"+(_?"Right":"");rr.prototype[p]=function(){return this[A](1).value()[0]}}),za(["initial","tail"],function(p,_){var A="drop"+(_?"":"Right");rr.prototype[p]=function(){return this.__filtered__?new rr(this):this[A](1)}}),rr.prototype.compact=function(){return this.filter(Bs)},rr.prototype.find=function(p){return this.filter(p).head()},rr.prototype.findLast=function(p){return this.reverse().find(p)},rr.prototype.invokeMap=ir(function(p,_){return typeof p=="function"?new rr(this):this.map(function(A){return ah(A,p,_)})}),rr.prototype.reject=function(p){return this.filter(a1(Tn(p)))},rr.prototype.slice=function(p,_){p=ur(p);var A=this;return A.__filtered__&&(p>0||_<0)?new rr(A):(p<0?A=A.takeRight(-p):p&&(A=A.drop(p)),_!==n&&(_=ur(_),A=_<0?A.dropRight(-_):A.take(_-p)),A)},rr.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},rr.prototype.toArray=function(){return this.take(Y)},Ds(rr.prototype,function(p,_){var A=/^(?:filter|find|map|reject)|While$/.test(_),B=/^(?:head|last)$/.test(_),te=ae[B?"take"+(_=="last"?"Right":""):_],fe=B||/^find/.test(_);te&&(ae.prototype[_]=function(){var Ae=this.__wrapped__,De=B?[1]:arguments,Ge=Ae instanceof rr,ft=De[0],ht=Ge||ar(Ae),St=function(vr){var _r=te.apply(ae,bu([vr],De));return B&&Zt?_r[0]:_r};ht&&A&&typeof ft=="function"&&ft.length!=1&&(Ge=ht=!1);var Zt=this.__chain__,Sn=!!this.__actions__.length,Fn=fe&&!Zt,Bn=Ge&&!Sn;if(!fe&&ht){Ae=Bn?Ae:new rr(this);var Dn=p.apply(Ae,De);return Dn.__actions__.push({func:In,args:[St],thisArg:n}),new Va(Dn,Zt)}return Fn&&Bn?p.apply(this,De):(Dn=this.thru(St),Fn?B?Dn.value()[0]:Dn.value():Dn)})}),za(["pop","push","shift","sort","splice","unshift"],function(p){var _=rd[p],A=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",B=/^(?:pop|shift)$/.test(p);ae.prototype[p]=function(){var te=arguments;if(B&&!this.__chain__){var fe=this.value();return _.apply(ar(fe)?fe:[],te)}return this[A](function(Ae){return _.apply(ar(Ae)?Ae:[],te)})}}),Ds(rr.prototype,function(p,_){var A=ae[_];if(A){var B=A.name+"";br.call(Sc,B)||(Sc[B]=[]),Sc[B].push({name:_,func:A})}}),Sc[qp(n,L).name]=[{name:"wrapper",func:n}],rr.prototype.clone=Io,rr.prototype.reverse=sw,rr.prototype.value=wy,ae.prototype.at=er,ae.prototype.chain=Kn,ae.prototype.commit=jc,ae.prototype.next=xE,ae.prototype.plant=wI,ae.prototype.reverse=bI,ae.prototype.toJSON=ae.prototype.valueOf=ae.prototype.value=SI,ae.prototype.first=ae.prototype.head,Au&&(ae.prototype[Au]=$3),ae},Gf=rw();tl?((tl.exports=Gf)._=Gf,yc._=Gf):Ba._=Gf}).call(hb)}(I3,I3.exports);var Yge=I3.exports;const $ge={map:null,threeLayer:null,gltfLoader:null,vecLayer:null,popup:null,distanceTool:null,areaTool:null,ready:!1,topicStatus:{},setBaseLayer:()=>{},topicStatusChange:()=>{}},qge=(e,t,n)=>new et.VectorLayer(e,n||{}).addTo(t),MV=(e,t,n)=>{const[r,i]=e.split("-");switch(r){case"baidu":t.setSpatialReference({projection:"baidu"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"4326":t.setSpatialReference({projection:"EPSG:4326"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"3857":t.setSpatialReference({projection:"EPSG:3857"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"4490":t.setSpatialReference({projection:"EPSG:4490"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"TDTSD":t.setSpatialReference({projection:"EPSG:4490",resolutions:[1.40625,.703125,.3515625,.17578125,.087890625,.0439453125,.02197265625,.010986328125,.0054931640625,.00274658203125,.001373291015625,.0006866455078125,.00034332275390625,.000171661376953125,858306884765625e-19,4291534423828125e-20,21457672119140625e-21,10728836059570312e-21,5364418029785156e-21,2682209014892578e-21,1341104507446289e-21]}),t.setBaseLayer(Xge(e,n[e]));break;default:t.setSpatialReference(null),t.setBaseLayer(new et.TileLayer(r,n[e]));break}},Xge=(e,t)=>{if(Yge.isArray(t)){const n=t.map((r,i)=>new et.TileLayer(`${e}_${i}`,r));return new et.GroupTileLayer(e,n)}return new et.TileLayer(e,t)},AV=e=>new et.ui.ToolTip(e||"",{cssName:"maptalks-tooltip",showTimeout:0,dy:-60});class Zge{constructor(){fb(this,"listeners",{})}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}emit(t,...n){const r=this.listeners[t];r&&r.forEach(i=>{i(...n)})}off(t,n){const r=this.listeners[t];r&&(this.listeners[t]=r.filter(i=>i!==n))}}const CV=bt.createContext($ge);function RV(e){const{onMouseMove:t,mtkConfig:n,showCoors:r,popupContent:i}=e,a=bt.useRef(),s=bt.useRef(),[o,c]=bt.useState(!1),f=bt.useRef(),d=bt.useRef(),v=bt.useRef(),y=bt.useRef(),x=bt.useRef(),b=bt.useRef(),E=bt.useRef(),T=bt.useRef(new Zge),[L,C]=bt.useState("");bt.useEffect(()=>{if(!(n!=null&&n.mapCenter))throw new Error("mtkConfig 需要在地图组件生命周期最初就给到");const U=n.mapCenter||[120.555,36.198],k=n.mapDefaultZoom||10,W=n.maxZoom||20,Q=n.minZoom||2,ie=n.pitch||null,ne=n.bearing||0,oe=[233,233,233],ge=n.sky||!1;let pe=new et.Map(a.current,{center:U,zoom:k,bearing:ne,maxZoom:W||k+6,minZoom:Q||2,fogColor:oe,attribution:"",seamlessZoom:!1});ie&&pe.setPitch(ie),pe.on("mousemove",function(Ye){t&&typeof t=="function"&&t(Ye);const ze=Ye.coordinate.y.toFixed(4),Ze=Ye.coordinate.x.toFixed(4);C(`${Ze},${ze}`)}),d.current=new et.DistanceTool().addTo(pe),d.current.disable(),f.current=new et.AreaTool().addTo(pe),f.current.disable(),v.current=new et.DrawTool({mode:"Point"}).addTo(pe).disable();const xe=e.baseLayer||n.activeBaselayerConfig;if(MV(xe,pe,n),b.current=new jge(pe,{eventsPropagation:!1,draggable:!1,animation:"fade",pupupContent:i}),pe.on("click",Ye=>{Ye.coordinate,b.current.popClose()}),ge){const Ye=new tI("sky",{zIndex:-1/0});pe.addLayer(Ye)}E.current=qge("base-vecLayer",pe,{}),E.current.show(),s.current=pe;let Fe=Promise.resolve("test");return Promise.all([Fe,R()]).then(([Ye,ze])=>{e.onReady&&e.onReady(pe),c(!0)}).catch(Ye=>{}),()=>{}},[]);function R(){return y.current=new kge,new Promise((U,k)=>{let W=new P3("three");P3.prototype.coordinateToXYZ=function(Q,ie=0){const ne=this.distanceToVector3(ie,ie).x;return this.coordinateToVector3(Q,ne)},W.prepareToDraw=function(Q,ie,ne){const oe=new c_(16777215);oe.position.set(0,10,10).normalize(),ie.add(new hS("#fff")),ie.add(oe),U(x)},W.config("animation",!0),x.current=W.addTo(s.current)})}bt.useEffect(()=>()=>{},[e.baseLayer]);const P=U=>{MV(U,s.current,n)},I={map:s.current,threeLayer:x.current,gltfLoader:y.current,vecLayer:E.current,popup:b.current,distanceTool:d.current,areaTool:f.current,ready:o,drawTool:v.current,eventBus:T.current,changeBaseLayer:P};return Ve(CV.Provider,{value:I,children:Qn("div",{className:`mtk-map-wrapper ${e.className}`,style:e.styles?{...e.styles}:{},children:[Ve("div",{style:{width:"100%",height:"100%"},className:"mtk-map",ref:a}),e.showCoors&&Ve("div",{style:{color:"#fff",position:"absolute",bottom:0,right:0},children:L}),Ve(ec,{children:o&&e.children})]})})}const OV=()=>bt.useContext(CV),Kge={modal:"_modal_11ti9_1",radio:"_radio_11ti9_4",content:"_content_11ti9_7"},Qge=new RegExp(/^[\-\+]?(0(\.\d{1,8})?|([1-9](\d)?)(\.\d{1,8})?|1[0-7]\d{1}(\.\d{1,8})?|180(([.][0]{1,8})?))$/),Jge=new RegExp(/^[\-\+]?((0|([1-8]\d?))(\.\d{1,10})?|90(\.0{1,10})?)$/),eye=e=>fs("/rest/sysFile/upload",{file:e});function tye(e){const{value:t,onChange:n,disabled:r}=e,[i,a]=bt.useState(!1),[s,o]=bt.useState(t),c={maxCount:1,showUploadList:!1,headers:{},customRequest({file:f}){a(!0),eye(f).then(({data:d})=>{o(d.path),n&&n(d.path)}).catch(()=>{}).finally(()=>{a(!1)})}};return Ve(Ft.Spin,{spinning:i,children:Qn(Ft.Input.Group,{compact:!0,children:[Ve(Ft.Input,{value:s,onChange:f=>{o(f.target.value.trim()),n&&n(f.target.value)},placeholder:"若已有地址可直接填写",style:{width:"calc(100% - 32px)"},disabled:r}),Ve(Ft.Tooltip,{title:"上传自动获取文件地址",children:Ve(Ft.Upload,{...c,children:Ve(Ft.Button,{icon:Ve(Ju.FileAddOutlined,{})})})})]})})}function LV(e){const[t]=Ft.Form.useForm(),{visible:n,onCancel:r,onOk:i,info:a={},title:s,className:o,columns:c,destroyOnClose:f,width:d,disabledField:v}=e,[y,x]=bt.useState(!1),b=(C,R)=>C.defaultValue?C.defaultValue(R):R&&R[C.key]?R[C.key]:null,E=()=>Ve(ec,{children:c.filter(C=>!C.hidden).map(C=>C.formRender?C.formRender(a):C.columnType==sr.boolean?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:!!(a&&a[C.key]),rules:[{required:!C.is_nullable}],valuePropName:"checked",children:Ve(Ft.Checkbox,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.switch?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:!!(a&&a[C.key]),rules:[{required:!C.is_nullable}],valuePropName:"checked",children:Ve(Ft.Switch,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.string?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:new RegExp(/^(?!\s)(?!.*\s$)/),message:"首末尾不能是空格"}],children:Ve(Ft.Input,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.singleDict?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.Select,{disabled:v&&v.includes(C.key),children:C.options?C.options(a):[]})}):C.columnType==sr.multiDict?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.Select,{mode:"multiple",disabled:v&&v.includes(C.key),children:C.options?C.options(a):[]})}):C.columnType==sr.text?Ve(Ft.Form.Item,{label:C.title,name:C.key,required:!C.is_nullable,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:new RegExp(/^(?!\s)(?!.*\s$)/),message:"首末尾不能是空格"}],children:Ve(Ft.Input.TextArea,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.number?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.latitude?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:Jge,message:"请输入正确的纬度,最多8位小数"}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.longitude?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:Qge,message:"请输入正确的经度,最多8位小数"}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.timestamp?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key]):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker,{showTime:!0,disabled:v&&v.includes(C.key)})}):C.columnType==sr.date?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key]):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.time?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key],"HH:mm:ss"):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker.TimePicker,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.int?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.InputNumber,{precision:0,style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.file||C.columnType==sr.photo?Ve(Ft.Form.Item,{required:!C.is_nullable,label:C.title,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(tye,{disabled:v&&v.includes(C.key)})}):Ve(ec,{}))}),T=()=>Ve(Ft.Form.Item,{wrapperCol:{span:24},style:{textAlign:"center"},children:Ve(Ft.Button,{loading:y,htmlType:"submit",children:" 确认 "})}),L=()=>Qn(ec,{children:[Ve("span",{style:{verticalAlign:"middle"},children:s}),Ve(Ju.DoubleRightOutlined,{style:{fontSize:12,color:"#999999",verticalAlign:"middle",margin:"0 5px"}}),Ve("span",{style:{verticalAlign:"middle"}})]});return Ve(Ft.Modal,{destroyOnClose:f,title:L(),width:d||900,visible:n,footer:!1,onCancel:r,className:B6(Kge.modal,o),children:Qn(Ft.Form,{form:t,labelCol:{span:5},wrapperCol:{span:17},onFinish:C=>{i&&(x(!0),i(C).finally(()=>{x(!1)}))},children:[E(),T()]})})}const nye={modal:"_modal_11ti9_1",radio:"_radio_11ti9_4",content:"_content_11ti9_7"};function DV(e){const[t]=Ft.Form.useForm(),{visible:n,onCancel:r,info:i,title:a,className:s,columns:o,destroyOnClose:c,width:f}=e,d=()=>i?Ve(ec,{children:o.map((x,b)=>{if(!x.hidden)return Ve(Ft.Form.Item,{label:x.title,children:x.render?x.render(i[x.key||x.dataIndex],i,0):i[x.key||x.dataIndex]})})}):null,v=()=>Ve(Ft.Form.Item,{wrapperCol:{span:24},style:{textAlign:"center"},children:Ve(Ft.Button,{onClick:()=>{e.onOk&&e.onOk()},children:"确认"})}),y=()=>Qn(ec,{children:[Ve("span",{style:{verticalAlign:"middle"},children:a}),Ve(Ju.DoubleRightOutlined,{style:{fontSize:12,color:"#999999",verticalAlign:"middle",margin:"0 5px"}}),Ve("span",{style:{verticalAlign:"middle"}})]});return Ve(Ft.Modal,{destroyOnClose:c,title:y(),width:f||900,visible:n,footer:!1,onCancel:r,className:B6(nye.modal,s),children:Qn(Ft.Form,{size:"small",form:t,labelCol:{span:5},wrapperCol:{span:17},children:[d(),v()]})})}const rye={tableArea:"_tableArea_1rary_1",tableFooter:"_tableFooter_1rary_6"};function PV(e){const{loading:t,page:n,pageSize:r,total:i,dataSource:a,selectedRowKeys:s,setSelectedRowKeys:o,enableRowSelection:c,scroll:f,columns:d,onPageChange:v,size:y,style:x}=e,b={selectedRowKeys:s,onChange:E=>{o&&o(E)}};return Qn("div",{className:`${rye.tableArea} wrapper`,style:x,children:[Ve(Ft.Table,{size:y||"middle",className:"tableList",columns:d,dataSource:a,pagination:!1,loading:t,rowSelection:c?{...b}:void 0,rowKey:"id",scroll:f||void 0,rowClassName:(E,T)=>{let L="light-row";return T%2===1&&(L="dark-row"),L}}),Ve("div",{style:{position:"absolute",bottom:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:Ve(Ft.Pagination,{size:y||"middle",style:{margin:"5px 0 0 0 "},current:n,total:i,pageSize:r,showSizeChanger:!0,onChange:(E,T)=>{v&&v(E,T)}})})]})}const iye=gn.div`
|
|
3701
|
+
}`;var Bn=Xu(function(){return Mr(fe,Sn+"return "+St).apply(n,Ae)});if(Bn.source=St,Ed(Bn))throw Bn;return Bn}function OE(p){return Vr(p).toLowerCase()}function PC(p){return Vr(p).toUpperCase()}function IC(p,_,A){if(p=Vr(p),p&&(A||_===n))return zf(p);if(!p||!(_=yr(_)))return p;var B=Do(p),te=Do(_),fe=X_(B,te),Ae=Z_(B,te)+1;return Vl(B,fe,Ae).join("")}function Vw(p,_,A){if(p=Vr(p),p&&(A||_===n))return p.slice(0,Ll(p)+1);if(!p||!(_=yr(_)))return p;var B=Do(p),te=Z_(B,Do(_))+1;return Vl(B,0,te).join("")}function FC(p,_,A){if(p=Vr(p),p&&(A||_===n))return p.replace(Gt,"");if(!p||!(_=yr(_)))return p;var B=Do(p),te=X_(B,Do(_));return Vl(B,te).join("")}function gF(p,_){var A=ie,B=ne;if(ji(_)){var te="separator"in _?_.separator:te;A="length"in _?ur(_.length):A,B="omission"in _?yr(_.omission):B}p=Vr(p);var fe=p.length;if(Hf(p)){var Ae=Do(p);fe=Ae.length}if(A>=fe)return p;var De=A-so(B);if(De<1)return B;var Ge=Ae?Vl(Ae,0,De).join(""):p.slice(0,De);if(te===n)return Ge+B;if(Ae&&(De+=Ge.length-De),bE(te)){if(p.slice(De).search(te)){var ft,ht=Ge;for(te.global||(te=Vf(te.source,Vr(Se.exec(te))+"g")),te.lastIndex=0;ft=te.exec(ht);)var St=ft.index;Ge=Ge.slice(0,St===n?De:St)}}else if(p.indexOf(yr(te),De)!=De){var Zt=Ge.lastIndexOf(te);Zt>-1&&(Ge=Ge.slice(0,Zt))}return Ge+B}function LE(p){return p=Vr(p),p&&oa.test(p)?p.replace(Br,sE):p}var kC=Wl(function(p,_,A){return p+(A?" ":"")+_.toUpperCase()}),Ww=Uv("toUpperCase");function f1(p,_,A){return p=Vr(p),_=A?n:_,_===n?py(p)?my(p):yv(p):p.match(_)||[]}var Xu=ir(function(p,_){try{return ba(p,n,_)}catch(A){return Ed(A)?A:new Zn(A)}}),cm=Fs(function(p,_){return za(_,function(A){A=No(A),Zi(p,A,n1(p[A],p))}),p});function yF(p){var _=p==null?0:p.length,A=Tn();return p=_?Hr(p,function(B){if(typeof B[1]!="function")throw new oo(s);return[A(B[0]),B[1]]}):[],ir(function(B){for(var te=-1;++te<_;){var fe=p[te];if(ba(fe[0],this,B))return ba(fe[1],this,B)}})}function xF(p){return Iu(Ci(p,v))}function DE(p){return function(){return p}}function _F(p,_){return p==null||p!==p?_:p}var wF=zv(),bF=zv(!0);function Bs(p){return p}function jw(p){return Fc(typeof p=="function"?p:Ci(p,v))}function SF(p){return hi(Ci(p,v))}function NC(p,_){return ca(p,Ci(_,v))}var PE=ir(function(p,_){return function(A){return ah(A,p,_)}}),EF=ir(function(p,_){return function(A){return ah(p,A,_)}});function fm(p,_,A){var B=ss(_),te=Dc(_,B);A==null&&!(ji(_)&&(te.length||!B.length))&&(A=_,_=p,p=this,te=Dc(_,ss(_)));var fe=!(ji(A)&&"chain"in A)||!!A.chain,Ae=$c(p);return za(te,function(De){var Ge=_[De];p[De]=Ge,Ae&&(p.prototype[De]=function(){var ft=this.__chain__;if(fe||ft){var ht=p(this.__wrapped__),St=ht.__actions__=Lr(this.__actions__);return St.push({func:Ge,args:arguments,thisArg:p}),ht.__chain__=ft,ht}return Ge.apply(p,bu([this.value()],arguments))})}),p}function UC(){return Ba._===this&&(Ba._=yy),this}function Yw(){}function BC(p){return p=ur(p),ir(function(_){return Uu(_,p)})}var zC=ky(Hr),HC=ky(Sp),Ql=ky(Ha);function Ad(p){return hh(p)?cy(No(p)):gt(p)}function gh(p){return function(_){return p==null?n:ku(p,_)}}var GC=Hv(),VC=Hv(!0);function h1(){return[]}function IE(){return!1}function TF(){return{}}function yh(){return""}function $w(){return!0}function FE(p,_){if(p=ur(p),p<1||p>ze)return[];var A=Y,B=wi(p,Y);_=Tn(_),p-=Y;for(var te=_v(B,_);++A<p;)_(A);return te}function WC(p){return ar(p)?Hr(p,No):zo(p)?[p]:Lr(o0(Vr(p)))}function zs(p){var _=++Wf;return Vr(p)+_}var hm=Xp(function(p,_){return p+_},0),jC=Gv("ceil"),m0=Xp(function(p,_){return p/_},1),Cd=Gv("floor");function MF(p){return p&&p.length?Lc(p,Bs,rh):n}function YC(p,_){return p&&p.length?Lc(p,Tn(_,2),rh):n}function Zc(p){return $_(p,Bs)}function $C(p,_){return $_(p,Tn(_,2))}function qC(p){return p&&p.length?Lc(p,Bs,Qi):n}function Pi(p,_){return p&&p.length?Lc(p,Tn(_,2),Qi):n}var ea=Xp(function(p,_){return p*_},1),Go=Gv("round"),g0=Xp(function(p,_){return p-_},0);function hl(p){return p&&p.length?hy(p,Bs):0}function AF(p,_){return p&&p.length?hy(p,Tn(_,2)):0}return ae.after=d0,ae.ary=t1,ae.assign=QI,ae.assignIn=_C,ae.assignInWith=sm,ae.assignWith=JI,ae.at=eF,ae.before=p0,ae.bind=n1,ae.bindAll=cm,ae.bindKey=nm,ae.castArray=FI,ae.chain=$n,ae.chunk=l0,ae.compact=yw,ae.concat=xw,ae.cond=yF,ae.conforms=xF,ae.constant=DE,ae.countBy=Ky,ae.create=tF,ae.curry=r1,ae.curryRight=i1,ae.debounce=rm,ae.defaults=nF,ae.defaultsDeep=wC,ae.defer=iC,ae.delay=Rw,ae.difference=jy,ae.differenceBy=_w,ae.differenceWith=Hc,ae.drop=cE,ae.dropRight=fE,ae.dropRightWhile=Gc,ae.dropWhile=ww,ae.fill=Yy,ae.filter=X3,ae.flatMap=TI,ae.flatMapDeep=Ei,ae.flatMapDepth=K3,ae.flatten=$u,ae.flattenDeep=hE,ae.flattenDepth=dE,ae.flip=aC,ae.flow=wF,ae.flowRight=bF,ae.fromPairs=bw,ae.functions=sF,ae.functionsIn=oF,ae.groupBy=Q3,ae.initial=qv,ae.intersection=pE,ae.intersectionBy=Wc,ae.intersectionWith=u0,ae.invert=uF,ae.invertBy=cF,ae.invokeMap=eC,ae.iteratee=jw,ae.keyBy=Qy,ae.keys=ss,ae.keysIn=Ho,ae.map=Mw,ae.mapKeys=hF,ae.mapValues=dF,ae.matches=SF,ae.matchesProperty=NC,ae.memoize=wd,ae.merge=pF,ae.mergeWith=EC,ae.method=PE,ae.methodOf=EF,ae.mixin=fm,ae.negate=a1,ae.nthArg=BC,ae.omit=vF,ae.omitBy=mF,ae.once=CI,ae.orderBy=Aw,ae.over=zC,ae.overArgs=RI,ae.overEvery=HC,ae.overSome=Ql,ae.partial=Ow,ae.partialRight=sC,ae.partition=tm,ae.pick=Nw,ae.pickBy=om,ae.property=Ad,ae.propertyOf=gh,ae.pull=vE,ae.pullAll=c0,ae.pullAllBy=Xv,ae.pullAllWith=Zv,ae.pullAt=Ew,ae.range=GC,ae.rangeRight=VC,ae.rearg=Lw,ae.reject=AI,ae.remove=Kv,ae.rest=OI,ae.reverse=Qv,ae.sampleSize=Bo,ae.set=l1,ae.setWith=MC,ae.shuffle=Jy,ae.slice=Zy,ae.sortBy=rC,ae.sortedUniq=yE,ae.sortedUniqBy=em,ae.split=um,ae.spread=LI,ae.tail=h,ae.take=g,ae.takeRight=S,ae.takeRightWhile=O,ae.takeWhile=N,ae.tap=vn,ae.throttle=DI,ae.thru=In,ae.toArray=gC,ae.toPairs=u1,ae.toPairsIn=AC,ae.toPath=WC,ae.toPlainObject=xC,ae.transform=CC,ae.unary=PI,ae.union=K,ae.unionBy=le,ae.unionWith=ye,ae.uniq=Ie,ae.uniqBy=it,ae.uniqWith=un,ae.unset=Uw,ae.unzip=Un,ae.unzipWith=At,ae.update=v0,ae.updateWith=Td,ae.values=qu,ae.valuesIn=Bw,ae.without=An,ae.words=f1,ae.wrap=II,ae.xor=zn,ae.xorBy=Ln,ae.xorWith=$e,ae.zip=Ue,ae.zipObject=We,ae.zipObjectDeep=pt,ae.zipWith=wt,ae.entries=u1,ae.entriesIn=AC,ae.extend=_C,ae.extendWith=sm,fm(ae,ae),ae.add=hm,ae.attempt=Xu,ae.camelCase=LC,ae.capitalize=c1,ae.ceil=jC,ae.clamp=ME,ae.clone=kI,ae.cloneDeep=UI,ae.cloneDeepWith=BI,ae.cloneWith=NI,ae.conformsTo=oC,ae.deburr=Kl,ae.defaultTo=_F,ae.divide=m0,ae.endsWith=AE,ae.eq=Xl,ae.escape=zw,ae.escapeRegExp=vh,ae.every=q3,ae.find=EI,ae.findIndex=$y,ae.findKey=kw,ae.findLast=Z3,ae.findLastIndex=Vc,ae.findLastKey=bC,ae.floor=Cd,ae.forEach=_E,ae.forEachRight=wE,ae.forIn=rF,ae.forInRight=iF,ae.forOwn=aF,ae.forOwnRight=SC,ae.get=EE,ae.gt=lC,ae.gte=uC,ae.has=lF,ae.hasIn=TE,ae.head=Sw,ae.identity=Bs,ae.includes=J3,ae.indexOf=Uo,ae.inRange=RC,ae.invoke=fF,ae.isArguments=bd,ae.isArray=ar,ae.isArrayBuffer=s1,ae.isArrayLike=as,ae.isArrayLikeObject=da,ae.isBoolean=cC,ae.isBuffer=Sd,ae.isDate=zI,ae.isElement=fC,ae.isEmpty=HI,ae.isEqual=GI,ae.isEqualWith=hC,ae.isError=Ed,ae.isFinite=dC,ae.isFunction=$c,ae.isInteger=Dw,ae.isLength=im,ae.isMap=Pw,ae.isMatch=pC,ae.isMatchWith=VI,ae.isNaN=WI,ae.isNative=OW,ae.isNil=YI,ae.isNull=jI,ae.isNumber=vC,ae.isObject=ji,ae.isObjectLike=Di,ae.isPlainObject=o1,ae.isRegExp=bE,ae.isSafeInteger=$I,ae.isSet=Iw,ae.isString=Fw,ae.isSymbol=zo,ae.isTypedArray=am,ae.isUndefined=SE,ae.isWeakMap=qI,ae.isWeakSet=XI,ae.join=ql,ae.kebabCase=Md,ae.last=Aa,ae.lastIndexOf=qy,ae.lowerCase=Ns,ae.lowerFirst=Us,ae.lt=mC,ae.lte=ZI,ae.max=MF,ae.maxBy=YC,ae.mean=Zc,ae.meanBy=$C,ae.min=qC,ae.minBy=Pi,ae.stubArray=h1,ae.stubFalse=IE,ae.stubObject=TF,ae.stubString=yh,ae.stubTrue=$w,ae.multiply=ea,ae.nth=Xy,ae.noConflict=UC,ae.noop=Yw,ae.now=Yc,ae.pad=CE,ae.padEnd=fl,ae.padStart=mh,ae.parseInt=qc,ae.random=OC,ae.reduce=MI,ae.reduceRight=tC,ae.repeat=RE,ae.replace=lm,ae.result=TC,ae.round=Go,ae.runInContext=He,ae.sample=nC,ae.size=Cw,ae.snakeCase=DC,ae.some=e1,ae.sortedIndex=f0,ae.sortedIndexBy=mE,ae.sortedIndexOf=Jv,ae.sortedLastIndex=Tw,ae.sortedLastIndexBy=gE,ae.sortedLastIndexOf=h0,ae.startCase=Hw,ae.startsWith=Xc,ae.subtract=g0,ae.sum=hl,ae.sumBy=AF,ae.template=Gw,ae.times=FE,ae.toFinite=ph,ae.toInteger=ur,ae.toLength=yC,ae.toLower=OE,ae.toNumber=Zl,ae.toSafeInteger=KI,ae.toString=Vr,ae.toUpper=PC,ae.trim=IC,ae.trimEnd=Vw,ae.trimStart=FC,ae.truncate=gF,ae.unescape=LE,ae.uniqueId=zs,ae.upperCase=kC,ae.upperFirst=Ww,ae.each=_E,ae.eachRight=wE,ae.first=Sw,fm(ae,function(){var p={};return Ds(ae,function(_,A){br.call(ae.prototype,A)||(p[A]=_)}),p}(),{chain:!1}),ae.VERSION=r,za(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){ae[p].placeholder=ae}),za(["drop","take"],function(p,_){rr.prototype[p]=function(A){A=A===n?1:Xi(ur(A),0);var B=this.__filtered__&&!_?new rr(this):this.clone();return B.__filtered__?B.__takeCount__=wi(A,B.__takeCount__):B.__views__.push({size:wi(A,Y),type:p+(B.__dir__<0?"Right":"")}),B},rr.prototype[p+"Right"]=function(A){return this.reverse()[p](A).reverse()}}),za(["filter","map","takeWhile"],function(p,_){var A=_+1,B=A==pe||A==Fe;rr.prototype[p]=function(te){var fe=this.clone();return fe.__iteratees__.push({iteratee:Tn(te,3),type:A}),fe.__filtered__=fe.__filtered__||B,fe}}),za(["head","last"],function(p,_){var A="take"+(_?"Right":"");rr.prototype[p]=function(){return this[A](1).value()[0]}}),za(["initial","tail"],function(p,_){var A="drop"+(_?"":"Right");rr.prototype[p]=function(){return this.__filtered__?new rr(this):this[A](1)}}),rr.prototype.compact=function(){return this.filter(Bs)},rr.prototype.find=function(p){return this.filter(p).head()},rr.prototype.findLast=function(p){return this.reverse().find(p)},rr.prototype.invokeMap=ir(function(p,_){return typeof p=="function"?new rr(this):this.map(function(A){return ah(A,p,_)})}),rr.prototype.reject=function(p){return this.filter(a1(Tn(p)))},rr.prototype.slice=function(p,_){p=ur(p);var A=this;return A.__filtered__&&(p>0||_<0)?new rr(A):(p<0?A=A.takeRight(-p):p&&(A=A.drop(p)),_!==n&&(_=ur(_),A=_<0?A.dropRight(-_):A.take(_-p)),A)},rr.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},rr.prototype.toArray=function(){return this.take(Y)},Ds(rr.prototype,function(p,_){var A=/^(?:filter|find|map|reject)|While$/.test(_),B=/^(?:head|last)$/.test(_),te=ae[B?"take"+(_=="last"?"Right":""):_],fe=B||/^find/.test(_);te&&(ae.prototype[_]=function(){var Ae=this.__wrapped__,De=B?[1]:arguments,Ge=Ae instanceof rr,ft=De[0],ht=Ge||ar(Ae),St=function(vr){var _r=te.apply(ae,bu([vr],De));return B&&Zt?_r[0]:_r};ht&&A&&typeof ft=="function"&&ft.length!=1&&(Ge=ht=!1);var Zt=this.__chain__,Sn=!!this.__actions__.length,Fn=fe&&!Zt,Bn=Ge&&!Sn;if(!fe&&ht){Ae=Bn?Ae:new rr(this);var Dn=p.apply(Ae,De);return Dn.__actions__.push({func:In,args:[St],thisArg:n}),new Va(Dn,Zt)}return Fn&&Bn?p.apply(this,De):(Dn=this.thru(St),Fn?B?Dn.value()[0]:Dn.value():Dn)})}),za(["pop","push","shift","sort","splice","unshift"],function(p){var _=rd[p],A=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",B=/^(?:pop|shift)$/.test(p);ae.prototype[p]=function(){var te=arguments;if(B&&!this.__chain__){var fe=this.value();return _.apply(ar(fe)?fe:[],te)}return this[A](function(Ae){return _.apply(ar(Ae)?Ae:[],te)})}}),Ds(rr.prototype,function(p,_){var A=ae[_];if(A){var B=A.name+"";br.call(Sc,B)||(Sc[B]=[]),Sc[B].push({name:_,func:A})}}),Sc[qp(n,L).name]=[{name:"wrapper",func:n}],rr.prototype.clone=Io,rr.prototype.reverse=sw,rr.prototype.value=wy,ae.prototype.at=er,ae.prototype.chain=Kn,ae.prototype.commit=jc,ae.prototype.next=xE,ae.prototype.plant=wI,ae.prototype.reverse=bI,ae.prototype.toJSON=ae.prototype.valueOf=ae.prototype.value=SI,ae.prototype.first=ae.prototype.head,Au&&(ae.prototype[Au]=$3),ae},Gf=rw();tl?((tl.exports=Gf)._=Gf,yc._=Gf):Ba._=Gf}).call(hb)}(I3,I3.exports);var Yge=I3.exports;const $ge={map:null,threeLayer:null,gltfLoader:null,vecLayer:null,popup:null,distanceTool:null,areaTool:null,ready:!1,topicStatus:{},setBaseLayer:()=>{},topicStatusChange:()=>{}},qge=(e,t,n)=>new et.VectorLayer(e,n||{}).addTo(t),MV=(e,t,n)=>{const[r,i]=e.split("-");switch(r){case"baidu":t.setSpatialReference({projection:"baidu"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"4326":t.setSpatialReference({projection:"EPSG:4326"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"3857":t.setSpatialReference({projection:"EPSG:3857"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"4490":t.setSpatialReference({projection:"EPSG:4490"}),t.setBaseLayer(new et.TileLayer(e,n[e]));break;case"TDTSD":t.setSpatialReference({projection:"EPSG:4490",resolutions:[1.40625,.703125,.3515625,.17578125,.087890625,.0439453125,.02197265625,.010986328125,.0054931640625,.00274658203125,.001373291015625,.0006866455078125,.00034332275390625,.000171661376953125,858306884765625e-19,4291534423828125e-20,21457672119140625e-21,10728836059570312e-21,5364418029785156e-21,2682209014892578e-21,1341104507446289e-21]}),t.setBaseLayer(Xge(e,n[e]));break;default:t.setSpatialReference(null),t.setBaseLayer(new et.TileLayer(r,n[e]));break}},Xge=(e,t)=>{if(Yge.isArray(t)){const n=t.map((r,i)=>new et.TileLayer(`${e}_${i}`,r));return new et.GroupTileLayer(e,n)}return new et.TileLayer(e,t)},AV=e=>new et.ui.ToolTip(e||"",{cssName:"maptalks-tooltip",showTimeout:0,dy:-60});class Zge{constructor(){fb(this,"listeners",{})}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}emit(t,...n){const r=this.listeners[t];r&&r.forEach(i=>{i(...n)})}off(t,n){const r=this.listeners[t];r&&(this.listeners[t]=r.filter(i=>i!==n))}}const CV=bt.createContext($ge);function RV(e){const{onMouseMove:t,mtkConfig:n,showCoors:r,popupContent:i}=e,a=bt.useRef(),s=bt.useRef(),[o,c]=bt.useState(!1),f=bt.useRef(),d=bt.useRef(),v=bt.useRef(),y=bt.useRef(),x=bt.useRef(),b=bt.useRef(),E=bt.useRef(),T=bt.useRef(new Zge),[L,C]=bt.useState("");bt.useEffect(()=>{if(!(n!=null&&n.mapCenter))throw new Error("mtkConfig 需要在地图组件生命周期最初就给到");const U=n.mapCenter||[120.555,36.198],k=n.mapDefaultZoom||10,W=n.maxZoom||20,Q=n.minZoom||2,ie=n.pitch||null,ne=n.bearing||0,oe=[233,233,233],ge=n.sky||!1;let pe=new et.Map(a.current,{center:U,zoom:k,bearing:ne,maxZoom:W||k+6,minZoom:Q||2,fogColor:oe,attribution:"",seamlessZoom:!1});ie&&pe.setPitch(ie),pe.on("mousemove",function(Ye){t&&typeof t=="function"&&t(Ye);const ze=Ye.coordinate.y.toFixed(4),Ze=Ye.coordinate.x.toFixed(4);C(`${Ze},${ze}`)}),d.current=new et.DistanceTool().addTo(pe),d.current.disable(),f.current=new et.AreaTool().addTo(pe),f.current.disable(),v.current=new et.DrawTool({mode:"Point"}).addTo(pe).disable();const xe=e.baseLayer||n.activeBaselayerConfig;if(MV(xe,pe,n),b.current=new jge(pe,{eventsPropagation:!1,draggable:!1,animation:"fade",popupContent:i}),pe.on("click",Ye=>{Ye.coordinate,b.current.popClose()}),ge){const Ye=new tI("sky",{zIndex:-1/0});pe.addLayer(Ye)}E.current=qge("base-vecLayer",pe,{}),E.current.show(),s.current=pe;let Fe=Promise.resolve("test");return Promise.all([Fe,R()]).then(([Ye,ze])=>{e.onReady&&e.onReady(pe),c(!0)}).catch(Ye=>{}),()=>{}},[]);function R(){return y.current=new kge,new Promise((U,k)=>{let W=new P3("three");P3.prototype.coordinateToXYZ=function(Q,ie=0){const ne=this.distanceToVector3(ie,ie).x;return this.coordinateToVector3(Q,ne)},W.prepareToDraw=function(Q,ie,ne){const oe=new c_(16777215);oe.position.set(0,10,10).normalize(),ie.add(new hS("#fff")),ie.add(oe),U(x)},W.config("animation",!0),x.current=W.addTo(s.current)})}bt.useEffect(()=>()=>{},[e.baseLayer]);const P=U=>{MV(U,s.current,n)},I={map:s.current,threeLayer:x.current,gltfLoader:y.current,vecLayer:E.current,popup:b.current,distanceTool:d.current,areaTool:f.current,ready:o,drawTool:v.current,eventBus:T.current,changeBaseLayer:P};return Ve(CV.Provider,{value:I,children:Qn("div",{className:`mtk-map-wrapper ${e.className}`,style:e.styles?{...e.styles}:{},children:[Ve("div",{style:{width:"100%",height:"100%"},className:"mtk-map",ref:a}),e.showCoors&&Ve("div",{style:{color:"#fff",position:"absolute",bottom:0,right:0},children:L}),Ve(ec,{children:o&&e.children})]})})}const OV=()=>bt.useContext(CV),Kge={modal:"_modal_11ti9_1",radio:"_radio_11ti9_4",content:"_content_11ti9_7"},Qge=new RegExp(/^[\-\+]?(0(\.\d{1,8})?|([1-9](\d)?)(\.\d{1,8})?|1[0-7]\d{1}(\.\d{1,8})?|180(([.][0]{1,8})?))$/),Jge=new RegExp(/^[\-\+]?((0|([1-8]\d?))(\.\d{1,10})?|90(\.0{1,10})?)$/),eye=e=>fs("/rest/sysFile/upload",{file:e});function tye(e){const{value:t,onChange:n,disabled:r}=e,[i,a]=bt.useState(!1),[s,o]=bt.useState(t),c={maxCount:1,showUploadList:!1,headers:{},customRequest({file:f}){a(!0),eye(f).then(({data:d})=>{o(d.path),n&&n(d.path)}).catch(()=>{}).finally(()=>{a(!1)})}};return Ve(Ft.Spin,{spinning:i,children:Qn(Ft.Input.Group,{compact:!0,children:[Ve(Ft.Input,{value:s,onChange:f=>{o(f.target.value.trim()),n&&n(f.target.value)},placeholder:"若已有地址可直接填写",style:{width:"calc(100% - 32px)"},disabled:r}),Ve(Ft.Tooltip,{title:"上传自动获取文件地址",children:Ve(Ft.Upload,{...c,children:Ve(Ft.Button,{icon:Ve(Ju.FileAddOutlined,{})})})})]})})}function LV(e){const[t]=Ft.Form.useForm(),{visible:n,onCancel:r,onOk:i,info:a={},title:s,className:o,columns:c,destroyOnClose:f,width:d,disabledField:v}=e,[y,x]=bt.useState(!1),b=(C,R)=>C.defaultValue?C.defaultValue(R):R&&R[C.key]?R[C.key]:null,E=()=>Ve(ec,{children:c.filter(C=>!C.hidden).map(C=>C.formRender?C.formRender(a):C.columnType==sr.boolean?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:!!(a&&a[C.key]),rules:[{required:!C.is_nullable}],valuePropName:"checked",children:Ve(Ft.Checkbox,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.switch?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:!!(a&&a[C.key]),rules:[{required:!C.is_nullable}],valuePropName:"checked",children:Ve(Ft.Switch,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.string?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:new RegExp(/^(?!\s)(?!.*\s$)/),message:"首末尾不能是空格"}],children:Ve(Ft.Input,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.singleDict?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.Select,{disabled:v&&v.includes(C.key),children:C.options?C.options(a):[]})}):C.columnType==sr.multiDict?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.Select,{mode:"multiple",disabled:v&&v.includes(C.key),children:C.options?C.options(a):[]})}):C.columnType==sr.text?Ve(Ft.Form.Item,{label:C.title,name:C.key,required:!C.is_nullable,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:new RegExp(/^(?!\s)(?!.*\s$)/),message:"首末尾不能是空格"}],children:Ve(Ft.Input.TextArea,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.number?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.latitude?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:Jge,message:"请输入正确的纬度,最多8位小数"}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.longitude?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable},{pattern:Qge,message:"请输入正确的经度,最多8位小数"}],children:Ve(Ft.InputNumber,{style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.timestamp?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key]):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker,{showTime:!0,disabled:v&&v.includes(C.key)})}):C.columnType==sr.date?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key]):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.time?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:a&&a[C.key]?on(a[C.key],"HH:mm:ss"):null,rules:[{required:!C.is_nullable}],children:Ve(Ft.DatePicker.TimePicker,{disabled:v&&v.includes(C.key)})}):C.columnType==sr.int?Ve(Ft.Form.Item,{label:C.title,required:!C.is_nullable,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(Ft.InputNumber,{precision:0,style:{width:"100%"},disabled:v&&v.includes(C.key)})}):C.columnType==sr.file||C.columnType==sr.photo?Ve(Ft.Form.Item,{required:!C.is_nullable,label:C.title,name:C.key,initialValue:b(C,a),rules:[{required:!C.is_nullable}],children:Ve(tye,{disabled:v&&v.includes(C.key)})}):Ve(ec,{}))}),T=()=>Ve(Ft.Form.Item,{wrapperCol:{span:24},style:{textAlign:"center"},children:Ve(Ft.Button,{loading:y,htmlType:"submit",children:" 确认 "})}),L=()=>Qn(ec,{children:[Ve("span",{style:{verticalAlign:"middle"},children:s}),Ve(Ju.DoubleRightOutlined,{style:{fontSize:12,color:"#999999",verticalAlign:"middle",margin:"0 5px"}}),Ve("span",{style:{verticalAlign:"middle"}})]});return Ve(Ft.Modal,{destroyOnClose:f,title:L(),width:d||900,visible:n,footer:!1,onCancel:r,className:B6(Kge.modal,o),children:Qn(Ft.Form,{form:t,labelCol:{span:5},wrapperCol:{span:17},onFinish:C=>{i&&(x(!0),i(C).finally(()=>{x(!1)}))},children:[E(),T()]})})}const nye={modal:"_modal_11ti9_1",radio:"_radio_11ti9_4",content:"_content_11ti9_7"};function DV(e){const[t]=Ft.Form.useForm(),{visible:n,onCancel:r,info:i,title:a,className:s,columns:o,destroyOnClose:c,width:f}=e,d=()=>i?Ve(ec,{children:o.map((x,b)=>{if(!x.hidden)return Ve(Ft.Form.Item,{label:x.title,children:x.render?x.render(i[x.key||x.dataIndex],i,0):i[x.key||x.dataIndex]})})}):null,v=()=>Ve(Ft.Form.Item,{wrapperCol:{span:24},style:{textAlign:"center"},children:Ve(Ft.Button,{onClick:()=>{e.onOk&&e.onOk()},children:"确认"})}),y=()=>Qn(ec,{children:[Ve("span",{style:{verticalAlign:"middle"},children:a}),Ve(Ju.DoubleRightOutlined,{style:{fontSize:12,color:"#999999",verticalAlign:"middle",margin:"0 5px"}}),Ve("span",{style:{verticalAlign:"middle"}})]});return Ve(Ft.Modal,{destroyOnClose:c,title:y(),width:f||900,visible:n,footer:!1,onCancel:r,className:B6(nye.modal,s),children:Qn(Ft.Form,{size:"small",form:t,labelCol:{span:5},wrapperCol:{span:17},children:[d(),v()]})})}const rye={tableArea:"_tableArea_1rary_1",tableFooter:"_tableFooter_1rary_6"};function PV(e){const{loading:t,page:n,pageSize:r,total:i,dataSource:a,selectedRowKeys:s,setSelectedRowKeys:o,enableRowSelection:c,scroll:f,columns:d,onPageChange:v,size:y,style:x}=e,b={selectedRowKeys:s,onChange:E=>{o&&o(E)}};return Qn("div",{className:`${rye.tableArea} wrapper`,style:x,children:[Ve(Ft.Table,{size:y||"middle",className:"tableList",columns:d,dataSource:a,pagination:!1,loading:t,rowSelection:c?{...b}:void 0,rowKey:"id",scroll:f||void 0,rowClassName:(E,T)=>{let L="light-row";return T%2===1&&(L="dark-row"),L}}),Ve("div",{style:{position:"absolute",bottom:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:Ve(Ft.Pagination,{size:y||"middle",style:{margin:"5px 0 0 0 "},current:n,total:i,pageSize:r,showSizeChanger:!0,onChange:(E,T)=>{v&&v(E,T)}})})]})}const iye=gn.div`
|
|
3702
3702
|
width: 100%;
|
|
3703
3703
|
height: auto;
|
|
3704
3704
|
padding: 4px;
|