@arcgis/core 4.33.0-next.20250311 → 4.33.0-next.20250312
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{bc988b9d3990380be907.js → 0a98dc3ea67ce97a6e7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{eacab4bd6eb58e545f73.js → 11f9d7cd95891596b716.js} +1 -1
- package/assets/esri/core/workers/chunks/{5b1b93665c93955491c4.js → 3ee2cf2db08164cde43c.js} +44 -44
- package/assets/esri/core/workers/chunks/4d95cc85f4b73e857b1f.js +1 -0
- package/assets/esri/core/workers/chunks/54ace3e4802934f3f9f2.js +1 -0
- package/assets/esri/core/workers/chunks/5820808c7659460969d4.js +1 -0
- package/assets/esri/core/workers/chunks/add0770399a63b7635b5.js +1 -0
- package/assets/esri/core/workers/chunks/b2f8702a9f54fff23ad9.js +1 -0
- package/assets/esri/core/workers/chunks/b8b8425e8b1246cdc86d.js +1 -0
- package/assets/esri/core/workers/chunks/{0137c17f15d79134b4ca.js → d0ad20548eb4786b7750.js} +36 -36
- package/assets/esri/core/workers/chunks/d0fbd4c6bffe0cb98d14.js +1 -0
- package/assets/esri/core/workers/chunks/dd6f18bbab50be139d20.js +1 -0
- package/assets/esri/core/workers/chunks/de6864e120243cf0bee8.js +1 -0
- package/assets/esri/core/workers/chunks/fc7ce48c7b31a4665a9b.js +1 -0
- package/chunks/DefaultMaterial.glsl.js +21 -21
- package/chunks/Pattern.glsl.js +23 -25
- package/chunks/RealisticTree.glsl.js +12 -12
- package/chunks/Terrain.glsl.js +27 -27
- package/core/LRUCache.js +1 -1
- package/core/MemCache.js +1 -1
- package/geometry/support/ShortArray.js +5 -0
- package/interfaces.d.ts +18 -4
- package/layers/video/VideoController.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -77
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/FocusAreas.js +1 -1
- package/views/animation/easing.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/GoTo.js +1 -1
- package/widgets/support/goToUtils.js +1 -1
- package/assets/esri/core/workers/chunks/3bbf7f89bc37c01b453b.js +0 -1
- package/assets/esri/core/workers/chunks/40f2c8022fd583c43f42.js +0 -1
- package/assets/esri/core/workers/chunks/4f2bb248dd258b493663.js +0 -1
- package/assets/esri/core/workers/chunks/5295e685ae839087c568.js +0 -1
- package/assets/esri/core/workers/chunks/54b115ecf446b4095d3e.js +0 -1
- package/assets/esri/core/workers/chunks/5a536de1ecae424bad05.js +0 -1
- package/assets/esri/core/workers/chunks/7ca9230681d05ef89059.js +0 -1
- package/assets/esri/core/workers/chunks/840c02610d845114ace7.js +0 -1
- package/assets/esri/core/workers/chunks/a4228101f709f0bb9a3d.js +0 -1
- package/assets/esri/core/workers/chunks/ffd28a9b1d8db3a731f4.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(91829),l(46686),l(32680),l(49255),l(76591),l(76597),l(82991),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(54849),l(74081),l(98619),l(62602),l(22393),l(59469),l(25618),l(96598),l(51406),l(42398),l(11955),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(60517),l(14113);var s=l(28491)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1891],{431:(t,e,n)=>{n.d(e,{o6:()=>C,HY:()=>b,hx:()=>L,Jb:()=>w});var r=n(9318);function o(t,e,n){const r=e/3,o=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?o[t+1]++:i[e+1]++};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],o=t[3*e+2];s(n,r),s(r,o),s(o,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=o[t+1],n=i[t+1];o[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*r),l=o[n],f=(t,e,n)=>{if(t<e){const r=o[t+1]++;u[2*r]=e,u[2*r+1]=n}else{const r=i[e+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=n}};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],o=t[3*e+2];f(n,r,e),f(r,o,e),f(o,n,e)}const N=(t,e)=>{const n=2*t,r=e-t;for(let t=1;t<r;t++){const e=u[n+2*t],r=u[n+2*t+1];let o=t-1;for(;o>=0&&u[n+2*o]>e;o--)u[n+2*o+2]=u[n+2*o],u[n+2*o+3]=u[n+2*o+1];u[n+2*o+2]=e,u[n+2*o+3]=r}};for(let t=0;t<n;t++)N(o[t],o[t+1]),N(l+i[t],l+i[t+1]);const E=new Int32Array(3*r),I=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,O=(t,e)=>{const n=I(t,e);E[3*e+n]=-1},A=(t,e,n,r)=>{const o=I(t,e);E[3*e+o]=r;const i=I(n,r);E[3*r+i]=e};for(let t=0;t<n;t++){let e=o[t];const n=o[t+1];let r=i[t];const s=i[t+1];for(;e<n&&r<s;){const n=u[2*e],o=u[2*l+2*r];n===o?(A(t,u[2*e+1],o,u[2*l+2*r+1]),e++,r++):n<o?(O(t,u[2*e+1]),e++):(O(o,u[2*l+2*r+1]),r++)}for(;e<n;)O(t,u[2*e+1]),e++;for(;r<s;)O(u[2*l+2*r],u[2*l+2*r+1]),r++}return E}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),f=n(4431),N=n(34727);function E(t,e,n,r,o,i=2){const s=1/(Math.abs(n)+Math.abs(r)+Math.abs(o)),a=n*s,c=r*s,u=o<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=o<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,f=e*i;t[f]=I(u),t[f+1]=I(l)}function I(t){return(0,N.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class O{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?p:d}write(t,e,n){v.seed=this._edgeHashFunction(n);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,o),t.variantExtension.set(e,s)}}const A=new Float32Array(6),T=new Uint32Array(A.buffer),h=new Uint32Array(1);function d(t){return A[0]=t.position0[0],A[1]=t.position0[1],A[2]=t.position0[2],A[3]=t.position1[0],A[4]=t.position1[1],A[5]=t.position1[2],h[0]=31*(31*(31*(31*(31*(166811+T[0])+T[1])+T[2])+T[3])+T[4])+T[5],h[0]}function p(t){const e=A;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),h[0]=5381;for(let t=0;t<T.length;t++)h[0]=31*h[0]+T[t];return h[0]}const S=1e4;function g(t){return Math.round(t*S)/S}class R{constructor(){this._commonWriter=new O}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.g)(M,n.faceNormal0,n.faceNormal1),(0,u.n)(M,M);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;E(r,e,M[0],M[1],M[2],o)}static{this.Layout=a.gr}static{this.glLayout=(0,f.U)(a.gr,1)}}class m{constructor(){this._commonWriter=new O}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;E(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;E(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],o)}}static{this.Layout=a.In}static{this.glLayout=(0,f.U)(a.In,1)}}const M=(0,l.vt)(),v=new c.A;var P=n(93406);function C(t){const e=L(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return y.updateSettings(t.writerSettings),D.updateSettings(t.writerSettings),(0,P.K)(e,y,D)}function L(t,e,n,i){if(e){const e=o(n,i,t.count);return new U(n,i,e,t)}const s=(0,r.b)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:i}),c=o(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class U{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const y=new R,D=new m,w=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),b=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var r=n(4431),o=n(1843),i=n(46540);const s=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(a),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var r=n(63907),o=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((r=>{const i=t.fields.get(r),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f32:r.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(34727),o=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),f=i?t:new Uint32Array(t,0,l*e),N=n?.minReduction??0,E=n?.originalIndices||null,I=E?E.length:0,O=n?.componentOffsets||null;let A=0;if(O)for(let t=0;t<O.length-1;t++){const e=O[t+1]-O[t];e>A&&(A=e)}else A=l;const T=Math.floor(1.1*A)+1;(null==u||u.length<2*T)&&(u=new Uint32Array((0,r.cU)(2*T)));for(let t=0;t<2*T;t++)u[t]=0;let h=0;const d=!!O&&!!E,p=d?I:l;let S=(0,o.my)(l);const g=new Uint32Array(I),R=1.96;let m=0!==N?Math.ceil(4*R*R/(N*N)*N*(1-N)):p,M=1,v=O?O[1]:p;for(let t=0;t<p;t++){if(t===m){const e=1-h/t;if(e+R*Math.sqrt(e*(1-e)/t)<N)return null;m*=2}if(t===v){for(let t=0;t<2*T;t++)u[t]=0;if(E)for(let t=O[M-1];t<O[M];t++)g[t]=S[E[t]];v=O[++M]}const n=d?E[t]:t,r=n*e,o=c(f,r,e);let i=o%T,a=h;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(s(f,r,t*e,e)){a=S[t];break}}i++,i>=T&&(i-=T)}a===h&&(u[2*i]=o,u[2*i+1]=n+1,h++),S[n]=a}if(0!==N&&1-h/l<N)return null;if(d){for(let t=O[M-1];t<g.length;t++)g[t]=S[E[t]];S=(0,o.uW)(g)}const P=i?new Array(h):new Uint32Array(h*e);h=0;for(let t=0;t<p;t++)S[t]===h&&(a(f,(d?E[t]:t)*e,P,h*e,e),h++);if(E&&!d){const t=new Uint32Array(I);for(let e=0;e<t.length;e++)t[e]=S[E[e]];S=(0,o.uW)(t)}return{buffer:Array.isArray(P)?P:P.buffer,indices:S,uniqueCount:h}}function s(t,e,n,r){for(let o=0;o<r;o++)if(t[e+o]!==t[n+o])return!1;return!0}function a(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[e+i]}function c(t,e,n){let r=0;for(let o=0;o<n;o++)r=t[e+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>O,Io:()=>S,KJ:()=>u,Sp:()=>N,XM:()=>l,YN:()=>f,ZH:()=>I,cU:()=>o,gg:()=>E,hs:()=>a,kU:()=>c,or:()=>m,pF:()=>v,pq:()=>M,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,r,o){return s(r,o,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function f(t){return Math.asin(i(t,-1,1))}function N(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function E(t,e,n=1e-6){return!N(t,e,n)&&t>e}function I(t,e,n=1e-6){return!N(t,e,n)&&t<e}function O(t,e,n=1e-6){return N(t,e,n)||t>e}const A=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function T(t){return A.setFloat64(0,t),A.getBigInt64(0)}const h=BigInt("1000000"),d=p(1);function p(t){const e=T(t=Math.abs(t)),n=function(t){return A.setBigInt64(0,t),A.getFloat64(0)}(e<=h?h:e-h);return Math.abs(t-n)}function S(t,e,n=d){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&p(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const r=T(t),o=T(e);return r<0==o<0&&!((r<o?o-r:r-o)>h)}function g(t){return R(Math.max(-M,Math.min(t,M)))}function R(t){return r[0]=t,r[0]}function m(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(N(e,1)&&N(n,1)&&N(r,1))}const M=R(34028234663852886e22);function v(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}},46540:(t,e,n)=>{var r;function o(t){return t===r.POSITION}n.d(e,{b:()=>o,r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},74038:(t,e,n)=>{n.d(e,{_:()=>r});class r{constructor(t,e,n,r,o,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=r,this.stride=o,this.normalized=i,this.divisor=s}}},91829:(t,e,n)=>{function r(){return[0,0,0,0]}function o(t,e,n,r){return[t,e,n,r]}function i(t,e,n,r){return[t,e,n,r]}function s(t,e=[0,0,0,0]){const n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function a(){return o(1,1,1,1)}function c(){return o(1,0,0,0)}function u(){return o(0,1,0,0)}function l(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}n.d(e,{CN:()=>i,Un:()=>E,ci:()=>s,fA:()=>o,uY:()=>N,vt:()=>r});const N=[0,0,0,0],E=a(),I=c(),O=u(),A=l(),T=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:E,UNIT_W:T,UNIT_X:I,UNIT_Y:O,UNIT_Z:A,ZEROS:N,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:i,fromArray:s,fromValues:o,ones:a,unitW:f,unitX:c,unitY:u,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,e,n)=>{n.d(e,{K:()=>c});var r=n(34727),o=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const r=t.vertices.position,o=t.vertices.componentIndex,s=O.position0,c=O.position1,f=O.faceNormal0,E=O.faceNormal1,{edges:I,normals:A}=l(t),T=I.length/4,h=e.allocate(T);let d=0;const p=T,R=n?.allocate(p);let M=0,v=0,P=0;N.length=0;for(let t=0;t<T;++t){const e=4*t;r.getVec(I.data[e],s),r.getVec(I.data[e+1],c);const n=N.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}N.sort(((t,e)=>e.length-t.length));const C=new Array,L=new Array;N.forAll((({length:t,index:l})=>{const N=I.data[l],T=I.data[l+1],p=I.data[l+2],U=I.data[l+3],y=U===a;if(r.getVec(N,s),r.getVec(T,c),y){const t=3*p;(0,i.i)(f,A.data[t],A.data[t+1],A.data[t+2]),(0,i.c)(E,f),O.componentIndex=o.get(N),O.cosAngle=(0,i.f)(f,E)}else{let t=3*p;if((0,i.i)(f,A.data[t],A.data[t+1],A.data[t+2]),t=3*U,(0,i.i)(E,A.data[t],A.data[t+1],A.data[t+2]),O.componentIndex=o.get(N),O.cosAngle=(0,i.f)(f,E),function(t,e){return t.cosAngle>e}(O,g))return;O.cosAngle<-.9999&&(0,i.c)(E,f)}v+=t,P++,y||function(t,e){return t.cosAngle<e}(O,m)?(e.write(h,d++,O),C.push(t)):u(O,S)&&(R&&n&&n.write(R,M++,O),L.push(t))}));const U=new Float32Array(C.reverse()),y=new Float32Array(L.reverse()),D=R&&n?{instancesData:R.slice(0,M),lodInfo:{lengths:y}}:void 0;return{regular:{instancesData:h.slice(0,d),lodInfo:{lengths:U}},silhouette:D,averageEdgeLength:v/P}}function u(t,e){const n=(0,r.XM)(t.cosAngle);return(0,i.o)(T,t.position1,t.position0),n*((0,i.f)((0,i.e)(A,t.faceNormal0,t.faceNormal1),T)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,r=t.neighbors,o=t.vertices.position;E.length=I.length=0;for(let t=0;t<e;t++){const e=3*t,s=r[e],c=r[e+1],u=r[e+2],l=n[e],f=n[e+1],N=n[e+2];o.getVec(l,h),o.getVec(f,d),o.getVec(N,p),(0,i.d)(d,d,h),(0,i.d)(p,p,h),(0,i.e)(h,d,p),(0,i.n)(h,h),I.pushArray(h),(s===a||l<f)&&(E.push(l),E.push(f),E.push(t),E.push(s)),(c===a||f<N)&&(E.push(f),E.push(N),E.push(t),E.push(c)),(u===a||N<l)&&(E.push(N),E.push(l),E.push(t),E.push(u))}return{edges:E,normals:I}}class f{constructor(){this.index=0,this.length=0}}const N=new o.A({allocator:t=>t||new f,deallocator:null}),E=new o.A({deallocator:null}),I=new o.A({deallocator:null}),O=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},A=(0,s.vt)(),T=(0,s.vt)(),h=(0,s.vt)(),d=(0,s.vt)(),p=(0,s.vt)(),S=(0,r.kU)(4),g=Math.cos(S),R=(0,r.kU)(35),m=Math.cos(R)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2944],{24151:(t,e,n)=>{var a;n.d(e,{RT:()=>a}),function(t){t[t.Global=1]="Global",t[t.Local=2]="Local"}(a||(a={}))},46540:(t,e,n)=>{var a;function s(t){return t===a.POSITION}n.d(e,{b:()=>s,r:()=>a}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(a||(a={}))},46610:(t,e,n)=>{n.d(e,{K:()=>a,n:()=>s});class a{constructor(t,e,n=e){this.data=t,this.size=e,this.stride=n}}class s extends a{constructor(t,e,n,a=!1,s=n){super(t,n,s),this.indices=e,this.exclusive=a}}},48353:(t,e,n)=>{n.d(e,{l:()=>c});var a=n(34727),s=n(58083),i=n(51850);function r(t,e,n){const a=Math.sin(t),s=Math.cos(t),i=Math.sin(e),r=Math.cos(e),o=n;return o[0]=-a,o[4]=-i*s,o[8]=r*s,o[12]=0,o[1]=s,o[5]=-i*a,o[9]=r*a,o[13]=0,o[2]=0,o[6]=r,o[10]=i,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=n(37539),h=n(21325);function c(t,e,n,a){const i=(0,o.Tp)(t,a);if(null==i)return!1;const c=i.source.spatialReferenceId,M=i.dest.spatialReferenceId;if(c===M&&!u(M)&&(c!==o.rz.UNKNOWN||(0,h.aI)(t,a)))return(0,s.kN)(n,e),!0;if(u(M)){const t=o.w5[c][o.rz.LON_LAT],a=o.w5[o.rz.LON_LAT][M];return null!=t&&null!=a&&(t(e,0,f,0),a(f,0,d,0),r(l*f[0],l*f[1],n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}const A=u(c);if((M===o.rz.WEB_MERCATOR||M===o.rz.PLATE_CARREE||M===o.rz.WGS84||M===o.rz.CGCS2000)&&(c===o.rz.WGS84||A||c===o.rz.WEB_MERCATOR||c===o.rz.CGCS2000)){const t=o.w5[c][o.rz.LON_LAT],a=o.w5[o.rz.LON_LAT][M];return null!=t&&null!=a&&(t(e,0,f,0),a(f,0,d,0),A?function(t,e,n){r(t,e,n),(0,s.mg)(n,n)}(l*f[0],l*f[1],n):(0,s.D_)(n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}return!1}function u(t){return t===o.rz.SPHERICAL_ECEF||t===o.rz.SPHERICAL_MARS_PCPF||t===o.rz.SPHERICAL_MOON_PCPF||t===o.rz.WGS84_ECEF}const l=(0,a.kU)(1),f=(0,i.vt)(),d=(0,i.vt)()},57005:(t,e,n)=>{n.d(e,{ab:()=>Tt,gm:()=>Lt});var a=n(77690),s=n(29242),i=n(9093),r=n(67026),o=n(82534),h=n(38954),c=n(51850),u=n(87317),l=n(91829),f=n(73941),d=n(98764),M=n(48353),A=n(9762),_=n(37539),E=n(27921),m=n(21325),I=n(32114),T=n(24151),O=n(48163),v=n(46610);const N=1e-6,P=(0,c.vt)(),S=(0,c.vt)();function b(t,e,n,a,s,i,r,o,h,c){return function(t,e,n){let a=mt(t.maxVert[0],t.minVert[0]),s=0;for(let e=1;e<7;++e){const n=mt(t.maxVert[e],t.minVert[e]);n>a&&(a=n,s=e)}Mt(e,t.minVert[s]),Mt(n,t.maxVert[s])}(t,a,s),mt(a,s)<N?1:(ft(r,a,s),_t(r,r),function(t,e,n,a){const{data:s,size:i}=t;let r=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<s.length;t+=i){F[0]=s[t]-e[0],F[1]=s[t+1]-e[1],F[2]=s[t+2]-e[2];const a=n[0]*F[0]+n[1]*F[1]+n[2]*F[2],i=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],h=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-a*a/i;h>r&&(r=h,o=t)}return Mt(a,s,o),r}(e,a,r,i)<N?2:(ft(o,s,i),_t(o,o),ft(h,i,a),_t(h,h),At(n,o,r),_t(n,n),X(e,n,r,o,h,c),0))}const R=(0,c.vt)(),g=(0,c.vt)(),C=(0,c.vt)(),L=(0,c.vt)(),p=(0,c.vt)(),j=(0,c.vt)(),w=(0,c.vt)(),x=(0,c.vt)();function z(t,e,n,a,s,i,r,o,h){(function(t,e,n,a,s){!function(t,e,n,a,s){const{data:i,size:r}=t;Mt(a,i),Mt(s,a),n[0]=It(H,e),n[1]=n[0];for(let t=r;t<i.length;t+=r){const r=i[t]*e[0]+i[t+1]*e[1]+i[t+2]*e[2];r<n[0]&&(n[0]=r,Mt(a,i,t)),r>n[1]&&(n[1]=r,Mt(s,i,t))}}(t,e,D,s,a);const i=It(n,e);D[1]-N<=i&&(a[0]=void 0),D[0]+N>=i&&(s[0]=void 0)})(t,e,n,R,g),void 0!==R[0]&&(ft(C,R,n),_t(C,C),ft(L,R,a),_t(L,L),ft(p,R,s),_t(p,p),At(j,L,i),_t(j,j),At(w,p,r),_t(w,w),At(x,C,o),_t(x,x),X(t,j,i,L,C,h),X(t,w,r,p,L,h),X(t,x,o,C,p,h)),void 0!==g[0]&&(ft(C,g,n),_t(C,C),ft(L,g,a),_t(L,L),ft(p,g,s),_t(p,p),At(j,L,i),_t(j,j),At(w,p,r),_t(w,w),At(x,C,o),_t(x,x),X(t,j,i,L,C,h),X(t,w,r,p,L,h),X(t,x,o,C,p,h))}const F=[0,0,0],D=(0,O.vt)(),q=(0,c.vt)(),V=(0,c.vt)(),U=(0,c.vt)(),y=(0,c.vt)(),B=(0,c.vt)(),G=(0,c.vt)();function X(t,e,n,a,s,i){if(Et(e)<N)return;At(q,n,e),At(V,a,e),At(U,s,e),Y(t,e,D),B[1]=D[0],y[1]=D[1],G[1]=y[1]-B[1];const r=[n,a,s],o=[q,V,U];for(let n=0;n<3;++n){Y(t,r[n],D),B[0]=D[0],y[0]=D[1],Y(t,o[n],D),B[2]=D[0],y[2]=D[1],G[0]=y[0]-B[0],G[2]=y[2]-B[2];const a=ut(G);a<i.quality&&(Mt(i.b0,r[n]),Mt(i.b1,e),Mt(i.b2,o[n]),i.quality=a)}}const H=(0,c.vt)();function Y(t,e,n){const{data:a,size:s}=t;n[0]=Number.POSITIVE_INFINITY,n[1]=Number.NEGATIVE_INFINITY;for(let t=0;t<a.length;t+=s){const s=a[t]*e[0]+a[t+1]*e[1]+a[t+2]*e[2];n[0]=Math.min(n[0],s),n[1]=Math.max(n[1],s)}}function Q(t,e,n){n.center=t,n.halfSize=(0,h.h)(e,e,.5),n.quaternion=o.zK}const k=(0,c.vt)(),W=(0,c.vt)(),Z=(0,c.vt)(),K=(0,c.vt)(),J=(0,c.vt)(),$=(0,c.vt)();function tt(t,e,n){Mt(k,e),Math.abs(e[0])>Math.abs(e[1])&&Math.abs(e[0])>Math.abs(e[2])?k[0]=0:Math.abs(e[1])>Math.abs(e[2])?k[1]=0:k[2]=0,Et(k)<N&&(k[0]=k[1]=k[2]=1),At(W,e,k),_t(W,W),At(Z,e,W),_t(Z,Z),et(t,e,W,Z,K,J),ft($,J,K),ot(e,W,Z,K,J,$,n)}function et(t,e,n,a,s,i){Y(t,e,D),s[0]=D[0],i[0]=D[1],Y(t,n,D),s[1]=D[0],i[1]=D[1],Y(t,a,D),s[2]=D[0],i[2]=D[1]}const nt=(0,c.vt)(),at=(0,c.vt)(),st=(0,c.vt)(),it=(0,s.fA)(1,0,0,0,1,0,0,0,1),rt=(0,o.vt)();function ot(t,e,n,a,s,i,r){it[0]=t[0],it[1]=t[1],it[2]=t[2],it[3]=e[0],it[4]=e[1],it[5]=e[2],it[6]=n[0],it[7]=n[1],it[8]=n[2],r.quaternion=function(t,e){const n=e[0]+e[4]+e[8];if(n>0){let a=Math.sqrt(n+1);t[3]=.5*a,a=.5/a,t[0]=(e[5]-e[7])*a,t[1]=(e[6]-e[2])*a,t[2]=(e[1]-e[3])*a}else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const a=(n+1)%3,s=(n+2)%3;let i=Math.sqrt(e[3*n+n]-e[3*a+a]-e[3*s+s]+1);t[n]=.5*i,i=.5/i,t[3]=(e[3*a+s]-e[3*s+a])*i,t[a]=(e[3*a+n]+e[3*n+a])*i,t[s]=(e[3*s+n]+e[3*n+s])*i}return t}(rt,it),lt(nt,a,s),dt(nt,nt,.5),dt(at,t,nt[0]),dt(st,e,nt[1]),lt(at,at,st),dt(st,n,nt[2]),r.center=(0,h.g)(at,at,st),r.halfSize=(0,h.h)(nt,i,.5)}class ht{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let e=0;this.minProj=new Float64Array(this.buffer,e,7),e+=56,this.maxProj=new Float64Array(this.buffer,e,7),e+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const n=new Array(7),a=new Array(7),{data:s,size:i}=t;for(let t=0;t<s.length;t+=i){let e=s[t];e<this.minProj[0]&&(this.minProj[0]=e,n[0]=t),e>this.maxProj[0]&&(this.maxProj[0]=e,a[0]=t),e=s[t+1],e<this.minProj[1]&&(this.minProj[1]=e,n[1]=t),e>this.maxProj[1]&&(this.maxProj[1]=e,a[1]=t),e=s[t+2],e<this.minProj[2]&&(this.minProj[2]=e,n[2]=t),e>this.maxProj[2]&&(this.maxProj[2]=e,a[2]=t),e=s[t]+s[t+1]+s[t+2],e<this.minProj[3]&&(this.minProj[3]=e,n[3]=t),e>this.maxProj[3]&&(this.maxProj[3]=e,a[3]=t),e=s[t]+s[t+1]-s[t+2],e<this.minProj[4]&&(this.minProj[4]=e,n[4]=t),e>this.maxProj[4]&&(this.maxProj[4]=e,a[4]=t),e=s[t]-s[t+1]+s[t+2],e<this.minProj[5]&&(this.minProj[5]=e,n[5]=t),e>this.maxProj[5]&&(this.maxProj[5]=e,a[5]=t),e=s[t]-s[t+1]-s[t+2],e<this.minProj[6]&&(this.minProj[6]=e,n[6]=t),e>this.maxProj[6]&&(this.maxProj[6]=e,a[6]=t)}for(let t=0;t<7;++t){let e=n[t];Mt(this.minVert[t],s,e),e=a[t],Mt(this.maxVert[t],s,e)}}}class ct{constructor(){this.b0=(0,c.fA)(1,0,0),this.b1=(0,c.fA)(0,1,0),this.b2=(0,c.fA)(0,0,1),this.quality=0}}function ut(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function lt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function ft(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function dt(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Mt(t,e,n=0){t[0]=e[n],t[1]=e[n+1],t[2]=e[n+2]}function At(t,e,n){const a=e[0],s=e[1],i=e[2],r=n[0],o=n[1],h=n[2];t[0]=s*h-i*o,t[1]=i*r-a*h,t[2]=a*o-s*r}function _t(t,e){const n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];if(n>0){const a=1/Math.sqrt(n);t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a}}function Et(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function mt(t,e){const n=e[0]-t[0],a=e[1]-t[1],s=e[2]-t[2];return n*n+a*a+s*s}function It(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}class Tt{constructor(t=c.uY,e=Xt,n=o.zK){this._data=[t[0],t[1],t[2],e[0],e[1],e[2],n[0],n[1],n[2],n[3]]}clone(){const t=new Tt;return t._data=this._data.slice(),t}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const e=new Tt;return e._data=t.slice(),e}static fromJSON(t){return new Tt(t.center,t.halfSize,t.quaternion)}copy(t){this._data=t.data.slice()}get center(){return(0,h.i)(I.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,e,n){this._data[0]=t,this._data[1]=e,this._data[2]=n}get halfSize(){return(0,h.i)(I.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,r.hZ)(I.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const e=Ot,n=this._data;e[0]=n[6],e[1]=n[7],e[2]=n[8],e[3]=n[9];for(let a=0;a<8;++a){const s=t[a];s[0]=(1&a?-1:1)*n[3],s[1]=(2&a?-1:1)*n[4],s[2]=(4&a?-1:1)*n[5],(0,h.w)(s,s,e),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]}}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],e=this._data[4],n=this._data[5];return Math.sqrt(t*t+e*e+n*n)}intersectSphere(t){Pt[0]=this._data[0]-t[0],Pt[1]=this._data[1]-t[1],Pt[2]=this._data[2]-t[2];const e=this.getQuaternion(vt);return(0,r.Xr)(Ot,e),(0,h.w)(Pt,Pt,Ot),(0,h.x)(Pt,Pt),St[0]=Math.min(Pt[0],this._data[3]),St[1]=Math.min(Pt[1],this._data[4]),St[2]=Math.min(Pt[2],this._data[5]),(0,h.y)(St,Pt)<t[3]*t[3]}intersectSphereWithMBS(t,e=this.radius){const n=this._data;Pt[0]=n[0]-t[0],Pt[1]=n[1]-t[1],Pt[2]=n[2]-t[2];const a=t[3],s=a+e;return!((0,h.z)(Pt)>s*s)&&(Ot[0]=-n[6],Ot[1]=-n[7],Ot[2]=-n[8],Ot[3]=n[9],(0,h.w)(Pt,Pt,Ot),(0,h.x)(Pt,Pt),St[0]=Math.min(Pt[0],n[3]),St[1]=Math.min(Pt[1],n[4]),St[2]=Math.min(Pt[2],n[5]),(0,h.y)(St,Pt)<a*a)}intersectPlane(t){const e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],n=this.projectedRadius((0,E.Qj)(t));return e>n?1:e<-n?-1:0}intersectRay(t,e,n=0){const a=this._data,s=Ot;s[0]=-a[6],s[1]=-a[7],s[2]=-a[8],s[3]=a[9],Pt[0]=t[0]-a[0],Pt[1]=t[1]-a[1],Pt[2]=t[2]-a[2];const i=(0,h.w)(Pt,Pt,Ot),r=(0,h.w)(St,e,Ot);let o=-1/0,c=1/0;const u=this.getHalfSize(Dt);for(let t=0;t<3;t++){const e=i[t],a=r[t],s=u[t]+n;if(Math.abs(a)>1e-6){const t=(s-e)/a,n=(-s-e)/a;o=Math.max(o,Math.min(t,n)),c=Math.min(c,Math.max(t,n))}else if(e>s||e<-s)return!1}return o<=c}projectedArea(t,e,n,s){const i=this.getQuaternion(vt);(0,r.Xr)(Ot,i),Pt[0]=t[0]-this._data[0],Pt[1]=t[1]-this._data[1],Pt[2]=t[2]-this._data[2],(0,h.w)(Pt,Pt,Ot);const o=this.getHalfSize(Dt),c=Pt[0]<-o[0]?-1:Pt[0]>o[0]?1:0,l=Pt[1]<-o[1]?-1:Pt[1]>o[1]?1:0,f=Pt[2]<-o[2]?-1:Pt[2]>o[2]?1:0,d=Math.abs(c)+Math.abs(l)+Math.abs(f);if(0===d)return 1/0;const M=1===d?4:6,A=6*(c+3*l+9*f+13);(0,a.I0)(qt,i),(0,a.hs)(qt,qt,o);const _=this.getCenter(zt);for(let t=0;t<M;t++){const n=Ct[A+t];(0,h.i)(Pt,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),(0,h.q)(Pt,Pt,qt),(0,h.g)(bt,_,Pt),bt[3]=1,(0,u.t)(bt,bt,e);const a=1/Math.max(1e-6,bt[3]);gt[2*t]=bt[0]*a,gt[2*t+1]=bt[1]*a}const E=2*M-2;let m=gt[0]*(gt[3]-gt[E+1])+gt[E]*(gt[1]-gt[E-1]);for(let t=2;t<E;t+=2)m+=gt[t]*(gt[t+3]-gt[t-1]);return Math.abs(m)*n*s*.125}projectedRadius(t){const e=this.getQuaternion(vt);return(0,r.Xr)(Ot,e),(0,h.w)(Pt,t,Ot),Math.abs(Pt[0]*this._data[3])+Math.abs(Pt[1]*this._data[4])+Math.abs(Pt[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,E.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,E.Qj)(t))}toAaBoundingBox(t){const e=this.getQuaternion(vt),n=(0,a.I0)(qt,e),s=this._data[3]*Math.abs(n[0])+this._data[4]*Math.abs(n[3])+this._data[5]*Math.abs(n[6]),i=this._data[3]*Math.abs(n[1])+this._data[4]*Math.abs(n[4])+this._data[5]*Math.abs(n[7]),r=this._data[3]*Math.abs(n[2])+this._data[4]*Math.abs(n[5])+this._data[5]*Math.abs(n[8]);t[0]=this._data[0]-s,t[1]=this._data[1]-i,t[2]=this._data[2]-r,t[3]=this._data[0]+s,t[4]=this._data[1]+i,t[5]=this._data[2]+r}transform(t,e,n,a=0,s=(0,d.lO)(n),i=(0,d.lO)(e),o=(0,_.jd)(e,i)){if(n===s)e.isGeographic?function(t,e,n,a,s=(0,d.lO)(n)){const i=(0,f.tO)(n),o=1+Math.max(0,a)/(i.radius+t.centerZ);t.getCenter(xt),xt[2]+=a,(0,A.projectBuffer)(xt,n,0,xt,s,0),e.center=xt;const c=t.getQuaternion(vt);e.quaternion=c,(0,r.Xr)(Ot,c),(0,h.i)(yt,0,0,1),(0,h.w)(yt,yt,Ot);const u=t.getHalfSize(Dt);(0,h.i)(yt,u[0]*Math.abs(yt[0]),u[1]*Math.abs(yt[1]),u[2]*Math.abs(yt[2])),(0,h.h)(yt,yt,i.inverseFlattening),(0,h.g)(yt,u,yt),e.halfSize=(0,h.h)(yt,yt,o)}(this,t,e,a,i):function(t,e,n,a,s=(0,d.lO)(n),i=(0,_.jd)(n,s)){t.getCorners(Ut),t.getCenter(xt),xt[2]+=a,(0,M.l)(n,xt,Vt,s),e.setCenter(Vt[12],Vt[13],Vt[14]);const o=2*Math.sqrt(1+Vt[0]+Vt[5]+Vt[10]);Ot[0]=(Vt[6]-Vt[9])/o,Ot[1]=(Vt[8]-Vt[2])/o,Ot[2]=(Vt[1]-Vt[4])/o,Ot[3]=.25*o;const c=t.getQuaternion(vt);e.quaternion=(0,r.lw)(Ot,Ot,c),(0,r.Xr)(Ot,Ot),(0,h.i)(Bt,0,0,0);const u=e.getCenter(Ft);for(const t of Ut)t[2]+=a,i(t,0,t,0),(0,h.a)(yt,t,u),(0,h.w)(yt,yt,Ot),(0,h.x)(yt,yt),(0,h.D)(Bt,Bt,yt);e.halfSize=Bt}(this,t,e,a,i,o);else if(e.isWGS84&&(n.isWebMercator||(0,m.r1)(n)))!function(t,e,n,a,s){e.getCenter(zt),zt[2]+=s;const i=(0,d.lO)(n);(0,A.projectBuffer)(zt,t,0,zt,i,0),pt(i,e,zt,n,a)}(e,this,n,t,a);else if(e.isWebMercator&&(0,m.r1)(n))!function(t,e,n,a,s){e.getCenter(zt),zt[2]+=s,pt(t,e,zt,n,a)}(e,this,n,t,a);else{const s=this.getCenter(zt);s[2]+=a,(0,A.projectBuffer)(s,e,0,s,n,0),t.center=s,this!==t&&(t.quaternion=this.getQuaternion(vt),t.halfSize=this.getHalfSize(Dt))}}}const Ot=(0,o.vt)(),vt=(0,o.vt)(),Nt=(0,o.vt)(),Pt=(0,c.vt)(),St=(0,c.vt)(),bt=(0,l.vt)();function Rt(t,e=new Tt){return function(t,e){const{data:n,size:a}=t,s=n.length/a;if(s<=0)return;const i=new ht(t);lt(P,i.minProj,i.maxProj),dt(P,P,.5),ft(S,i.maxProj,i.minProj);const r=ut(S),o=new ct;o.quality=r,s<14&&(t=new v.K(new Float64Array(i.buffer,112,42),3));const h=(0,c.vt)(),u=(0,c.vt)(),l=(0,c.vt)(),f=(0,c.vt)(),d=(0,c.vt)(),M=(0,c.vt)(),A=(0,c.vt)();switch(b(i,t,A,h,u,l,f,d,M,o)){case 1:return void Q(P,S,e);case 2:return void tt(t,f,e)}z(t,A,h,u,l,f,d,M,o),et(t,o.b0,o.b1,o.b2,K,J);const _=(0,c.vt)();ft(_,J,K),o.quality=ut(_),o.quality<r?ot(o.b0,o.b1,o.b2,K,J,_,e):Q(P,S,e)}(t,e),e}const gt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Ct=(()=>{const t=new Int8Array(162);let e=0;const n=n=>{for(let a=0;a<n.length;a++)t[e+a]=n[a];e+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),t})();function Lt(t,e,n,a,s){const i=t.getQuaternion(vt);s.quaternion=i,(0,r.Xr)(Ot,i);const o=t.getCenter(zt),u=t.getHalfSize(Dt);if(a===T.RT.Global){(0,h.w)(yt,o,Ot),(0,h.x)(Bt,yt),(0,h.A)(Gt,Bt,u),(0,h.a)(Gt,Bt,Gt);const a=(0,h.l)(Gt);(0,h.g)(Gt,Bt,u);const i=(0,h.l)(Gt);if(a<n)s.center=o,(0,h.i)(yt,n,n,n),s.halfSize=(0,h.g)(yt,u,yt);else{const r=i>0?1+e/i:1,o=a>0?1+n/a:1,c=(o+r)/2,l=(o-r)/2;(0,h.h)(Gt,Bt,l),s.halfSize=(0,h.b)(Gt,Gt,u,c),(0,h.h)(Gt,Bt,c),(0,h.b)(Gt,Gt,u,l),(0,h.B)(yt,yt),(0,h.C)(yt,Gt,yt);const f=t.getQuaternion(Nt);s.center=(0,h.w)(yt,yt,f)}}else{s.center=(0,h.b)(yt,o,c.Cb,(n+e)/2);const t=(0,h.w)(yt,c.Cb,Ot);(0,h.x)(t,t),s.halfSize=(0,h.b)(Bt,u,t,(n-e)/2)}return s}function pt(t,e,n,s,i){const r=e.getQuaternion(vt),o=(0,a.I0)(qt,r),h=e.getHalfSize(Dt);for(let t=0;t<8;++t){for(let e=0;e<3;++e)xt[e]=h[e]*(t&1<<e?-1:1);for(let e=0;e<3;++e){let a=n[e];for(let t=0;t<3;++t)a+=xt[t]*o[3*t+e];jt[3*t+e]=a}}(0,A.projectBuffer)(jt,t,0,jt,s,0,8),Rt(wt,i)}const jt=new Array(24),wt=new v.K(jt,3),xt=(0,c.vt)(),zt=(0,c.vt)(),Ft=(0,c.vt)(),Dt=(0,c.vt)(),qt=(0,s.vt)(),Vt=(0,i.vt)(),Ut=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],yt=(0,c.vt)(),Bt=(0,c.vt)(),Gt=(0,c.vt)(),Xt=(0,c.CN)(-1,-1,-1)},67026:(t,e,n)=>{n.d(e,{A6:()=>A,Xd:()=>u,Xr:()=>d,hZ:()=>E,lw:()=>l,t2:()=>g,x8:()=>c});var a=n(29242),s=n(82534),i=n(51850),r=n(34304),o=n(38954),h=n(87317);function c(t,e,n){n*=.5;const a=Math.sin(n);return t[0]=a*e[0],t[1]=a*e[1],t[2]=a*e[2],t[3]=Math.cos(n),t}function u(t,e){const n=2*Math.acos(e[3]),a=Math.sin(n/2);return a>(0,r.FD)()?(t[0]=e[0]/a,t[1]=e[1]/a,t[2]=e[2]/a):(t[0]=1,t[1]=0,t[2]=0),n}function l(t,e,n){const a=e[0],s=e[1],i=e[2],r=e[3],o=n[0],h=n[1],c=n[2],u=n[3];return t[0]=a*u+r*o+s*c-i*h,t[1]=s*u+r*h+i*o-a*c,t[2]=i*u+r*c+a*h-s*o,t[3]=r*u-a*o-s*h-i*c,t}function f(t,e,n,a){const s=e[0],i=e[1],o=e[2],h=e[3];let c,u,l,f,d,M=n[0],A=n[1],_=n[2],E=n[3];return u=s*M+i*A+o*_+h*E,u<0&&(u=-u,M=-M,A=-A,_=-_,E=-E),1-u>(0,r.FD)()?(c=Math.acos(u),l=Math.sin(c),f=Math.sin((1-a)*c)/l,d=Math.sin(a*c)/l):(f=1-a,d=a),t[0]=f*s+d*M,t[1]=f*i+d*A,t[2]=f*o+d*_,t[3]=f*h+d*E,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function M(t,e){const n=e[0]+e[4]+e[8];let a;if(n>0)a=Math.sqrt(n+1),t[3]=.5*a,a=.5/a,t[0]=(e[5]-e[7])*a,t[1]=(e[6]-e[2])*a,t[2]=(e[1]-e[3])*a;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const s=(n+1)%3,i=(n+2)%3;a=Math.sqrt(e[3*n+n]-e[3*s+s]-e[3*i+i]+1),t[n]=.5*a,a=.5/a,t[3]=(e[3*s+i]-e[3*i+s])*a,t[s]=(e[3*s+n]+e[3*n+s])*a,t[i]=(e[3*i+n]+e[3*n+i])*a}return t}function A(t,e,n,a){const s=.5*Math.PI/180;e*=s,n*=s,a*=s;const i=Math.sin(e),r=Math.cos(e),o=Math.sin(n),h=Math.cos(n),c=Math.sin(a),u=Math.cos(a);return t[0]=i*h*u-r*o*c,t[1]=r*o*u+i*h*c,t[2]=r*h*c-i*o*u,t[3]=r*h*u+i*o*c,t}const _=h.c,E=h.s,m=h.g,I=l,T=h.b,O=h.h,v=h.l,N=h.j,P=N,S=h.f,b=S,R=h.n,g=h.a,C=h.e,L=(0,i.vt)(),p=(0,i.fA)(1,0,0),j=(0,i.fA)(0,1,0),w=(0,s.vt)(),x=(0,s.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],a=e[1],s=e[2];return t[0]=n,t[1]=a,t[2]=s,t[3]=Math.sqrt(Math.abs(1-n*n-a*a-s*s)),t},conjugate:d,copy:_,dot:O,equals:C,exactEquals:g,fromEuler:A,fromMat3:M,getAxisAngle:u,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],a=e[1],s=e[2],i=e[3],r=n*n+a*a+s*s+i*i,o=r?1/r:0;return t[0]=-n*o,t[1]=-a*o,t[2]=-s*o,t[3]=i*o,t},len:P,length:N,lerp:v,mul:I,multiply:l,normalize:R,random:function(t){const e=r.Ov,n=e(),a=e(),s=e(),i=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=i*Math.sin(2*Math.PI*a),t[1]=i*Math.cos(2*Math.PI*a),t[2]=o*Math.sin(2*Math.PI*s),t[3]=o*Math.cos(2*Math.PI*s),t},rotateX:function(t,e,n){n*=.5;const a=e[0],s=e[1],i=e[2],r=e[3],o=Math.sin(n),h=Math.cos(n);return t[0]=a*h+r*o,t[1]=s*h+i*o,t[2]=i*h-s*o,t[3]=r*h-a*o,t},rotateY:function(t,e,n){n*=.5;const a=e[0],s=e[1],i=e[2],r=e[3],o=Math.sin(n),h=Math.cos(n);return t[0]=a*h-i*o,t[1]=s*h+r*o,t[2]=i*h+a*o,t[3]=r*h-s*o,t},rotateZ:function(t,e,n){n*=.5;const a=e[0],s=e[1],i=e[2],r=e[3],o=Math.sin(n),h=Math.cos(n);return t[0]=a*h+s*o,t[1]=s*h-a*o,t[2]=i*h+r*o,t[3]=r*h-i*o,t},rotationTo:function(t,e,n){const a=(0,o.f)(e,n);return a<-.999999?((0,o.e)(L,p,e),(0,o.H)(L)<1e-6&&(0,o.e)(L,j,e),(0,o.n)(L,L),c(t,L,Math.PI),t):a>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.e)(L,e,n),t[0]=L[0],t[1]=L[1],t[2]=L[2],t[3]=1+a,R(t,t))},scale:T,set:E,setAxes:function(t,e,n,a){const s=z;return s[0]=n[0],s[3]=n[1],s[6]=n[2],s[1]=a[0],s[4]=a[1],s[7]=a[2],s[2]=-e[0],s[5]=-e[1],s[8]=-e[2],R(t,M(t,s))},setAxisAngle:c,slerp:f,sqlerp:function(t,e,n,a,s,i){return f(w,e,s,i),f(x,n,a,i),f(t,w,x,2*i*(1-i)),t},sqrLen:b,squaredLength:S,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},98764:(t,e,n)=>{n.d(e,{Y0:()=>c,lO:()=>u});var a=n(73941),s=n(16930),i=n(21325);const r=new s.A(a.fv),o=new s.A(a.FY),h=new s.A(a.LJ),c=new s.A(a.Ro);function u(t){const e=l.get(t);if(e)return e;let n=r;if(t)if(t===o)n=o;else if(t===h)n=h;else{const e=t.wkid,a=t.latestWkid;if(null!=e||null!=a)(0,i.tl)(e)||(0,i.tl)(a)?n=o:((0,i.ZL)(e)||(0,i.ZL)(a))&&(n=h);else{const e=t.wkt2??t.wkt;if(e){const t=e.toUpperCase();t===f?n=o:t===d&&(n=h)}}}return l.set(t,n),n}const l=new Map,f=o.wkt.toUpperCase(),d=h.wkt.toUpperCase()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4060],{4902:(e,t,i)=>{i.d(t,{A:()=>u});var r=i(90237),s=i(40608);let l=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable")],t),t};let n=class extends(o(class{})){};var a;n=(0,r._)([(0,s.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=n},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),s=i(92602),l=i(70333),o=i(78888),n=i(60999),a=i(49186),u=i(53966),h=i(97768),c=i(74887),p=i(84952),d=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(83531),_=i(20655),w=i(80812),A=i(41318),v=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!l.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,n;if(s)o=i.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(s?await i.reload():(i=new w.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const i=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,h=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return i&&r&&!(0,p.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(90237),s=i(53966),l=i(10107),o=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,l.MZ)()],t.prototype,"title",null),(0,r._)([(0,l.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},36708:(e,t,i)=>{i.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>a,z7:()=>u});var r=i(37955),s=i(36563),l=i(97768),o=i(74887),n=i(14012);function a(e,t,i={}){return h(e,t,i,d)}function u(e,t,i={}){return h(e,t,i,y)}function h(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,l.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,n.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function c(e,t,i,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.xt)(h),i(e)}const d=a(e,((e,i)=>{c(),(0,r.wb)(e)&&(n=e,u=(0,r.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,s.hA)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let n=null;function a(){n=(0,l.xt)(n)}return new Promise(((r,l)=>{n=(0,s.vE)([(0,o.u7)(i,(()=>{a(),l((0,o.NK)())})),h(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}i(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},44159:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(93687);class s{static{this.pool=new r.A(s,null,null,25,50)}static getId(e,t,i,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${i}/${r}`}constructor(e,t,i,r){this.set(e,t,i,r)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,i=63&this.level;return(3&this.world)<<30|t<<22|e<<8|i}acquire(e,t,i,r){this.set(e,t,i,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,i,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,i,r,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(i),this.col=parseFloat(r),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+i,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,i){const r=this.clone();return r.col+=e,r.row+=t,i.normalizeKey(r),r}getChildKeys(){const e=this.level+1,t=this.row<<1,i=this.col<<1,r=this.world;return[new s(e,t,i,r),new s(e,t,i+1,r),new s(e,t+1,i,r),new s(e,t+1,i+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},48757:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ce});var r=i(90237),s=i(78888),l=i(60999),o=i(49186),n=i(4718),a=i(92071),u=i(74887),h=i(84952),c=i(10107),p=(i(44208),i(53966)),d=i(36005),y=i(40608),f=i(43937),m=i(5443),g=i(16930),_=i(4146),w=i(52136),A=i(89186),v=i(18768),S=i(63074),x=i(69208),b=i(16131),I=i(8303),P=i(54310),R=i(25036);let M=null;var T=i(34275);class E{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:i,data:r,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=i;const n=Math.max(this._maxTextureSize,4096);if(t>n||i>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(e),new o.A("SpriteSource",e)}let a;for(let e=0;e<r.length;e+=4)a=r[e+3]/255,r[e]=r[e]*a,r[e+1]=r[e+1]*a,r[e+2]=r[e+2]*a;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,i;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,i=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,i=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,T.mw)(t.data)||(0,T.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:i}:{...U(t),json:i}}const i=(0,h.An)(this.baseURL),r=i.query?"?"+(0,h.x0)(i.query):"",l=this._isRetina?"@2x":"",n=`${i.path}${l}.${this._spriteImageFormat}${r}`,a=`${i.path}${l}.json${r}`,[u,c]=await Promise.all([(0,s.A)(a,t),(0,s.A)(n,{responseType:"image",...t})]);return{...U(c.data),json:u.data}}}function U(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var z=i(87045),L=i(25943),O=i(21325),D=i(28735),j=i(44159);class C{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const i=await this.fetchTileIndex();return(0,u.Te)(t),this._getIndexedDataKey(i,e)}_getIndexedDataKey(e,t){const i=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new j.A(r.level-1,r.row>>1,r.col>>1,r.world),i.push(r);let s,l,o=e,n=i.pop();if(1===o)return n;for(;i.length;)if(s=i.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var k=i(97768);class ${constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:i,row:r,col:s}=e,l=new j.A(e);return this._tilemap.fetchAvailabilityUpsample(i,r,s,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.zf)(e))throw e;return null}))}}var B=i(91869);class N{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,u.u7)(e,(()=>{t.every((e=>(0,u.G4)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.o8)(e)))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const F=new Map;function K(e,t){return(0,B.tE)(F,e,(()=>new N(e))).getData(t).finally((()=>F.delete(e)))}class Z{constructor(e,t,i){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const r=(0,h.An)(this.sourceUrl),s=(0,n.o8)(i),l=s.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(r.path,t.path)),l[e]=(0,h.a6)(t.path,{...r.query,...t.query}))}this.tileServers=l;const o=i.capabilities&&i.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===i?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(s.tileInfo);const p=i.tileMap?(0,h.a6)((0,h.fj)(r.path,i.tileMap),r.query??{}):null;u?(this.type="vector-tile",this.tilemap=new $(new L.d({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(i.fullExtent),this.initialExtent=m.A.fromJSON(i.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,i,r){return function(e,t,i,r,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=i.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return K((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,i.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,i,r)}isCompatibleWith(e){const t=this.tileInfo,i=e.tileInfo;if(!t.spatialReference.equals(i.spatialReference))return!1;if(!t.origin.equals(i.origin))return!1;if(Math.round(t.dpi)!==Math.round(i.dpi))return!1;const r=t.lods,s=i.lods,l=Math.min(r.length,s.length);for(let e=0;e<l;e++){const t=r[e],i=s[e];if(t.level!==i.level||Math.round(t.scale)!==Math.round(i.scale))return!1}return!0}}function q(...e){let t;for(const i of e)if(null!=i)if((0,h.BQ)(i)){if(t){const e=t.split("://")[0];t=e+":"+i.trim()}}else t=(0,h.oP)(i)?i:(0,h.fj)(t,i);return t?(0,h.UC)(t):void 0}async function Q(e,t,i,r,l){let o,n,a;if((0,u.Te)(l),"string"==typeof i){const e=(0,h.S8)(i);a=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=i&&(a={data:i},o=i.jsonUrl||null,n=r);const c=a?.data;if(G(c))return e.styleUrl=o||null,async function(e,t,i,r){const s=i?(0,h.nM)(i):(0,h.gd)();e.styleBase=s,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const i=t.sources.esri;i.url?await Q(e,"esri",q(s,i.url),void 0,r):l.push(Q(e,"esri",i,s,r))}for(const i of Object.keys(t.sources))"esri"!==i&&"vector"===t.sources[i].type&&(t.sources[i].url?l.push(Q(e,i,q(s,t.sources[i].url),void 0,r)):t.sources[i].tiles&&l.push(Q(e,i,t.sources[i],s,r)));await Promise.all(l)}(e,c,n,l);if(function(e){return!G(e)}(c))return e.sourceUrl?V(e,c,n,!1,t,l):(e.sourceUrl=o||null,V(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function G(e){return!!e&&"sources"in e&&!!e.sources}async function V(e,t,i,r,s,l){const o=i?(0,h.UC)(i)+"/":(0,h.gd)(),a=function(e){const t=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const i=e?.tileInfo;return null!=i&&(null==i.rows&&(i.rows=t),null==i.cols&&(i.cols=t)),e}const i={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let r=null;if(H(e)){const{bounds:t}=e;if(t){const e=(0,D.Gh)({x:t[0],y:t[1],spatialReference:(0,n.o8)(O.KK)}),i=(0,D.Gh)({x:t[2],y:t[3],spatialReference:(0,n.o8)(O.KK)});r={xmin:e.x,ymin:e.y,xmax:i.x,ymax:i.y,spatialReference:(0,n.o8)(O.ch)}}}null===r&&(r=i);let s=78271.51696400007,l=295828763.7957775;const o=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?+e.maxzoom:22;for(let e=0;e<=a;e++)o.push({level:e,scale:l,resolution:s}),s/=2,l/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:i,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:t,cols:t,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,n.o8)(O.ch)}}}(t),u=new Z(s,(0,h.a6)(o,l?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(u.fullExtent):t.fullExtent=u.fullExtent.clone()),t.tileInfo&&u.tileInfo&&t.tileInfo.lods.length<u.tileInfo.lods.length&&(t.tileInfo=u.tileInfo)}if(r&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=s),e.sourceNameToSource[s]=u,!H(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?Q(e,"",q(o,t.defaultStyles,"root.json"),void 0,l):Q(e,"",t.defaultStyles,q(o,"root.json"),l)}}var W=i(88788),J=i(39131),X=i(97159),Y=i(86738),ee=i(91806);const te=1e-6;function ie(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const i=e.origin,r=t.origin;if(Math.abs(i.x-r.x)>=te||Math.abs(i.y-r.y)>=te)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function re(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const i=e.size[0],r=e.format,s=e.dpi,l=new Y.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new ee.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[i,i],dpi:s,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var se=i(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function oe(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le((()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL))):null}let ne;function ae(){return ne??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let i=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=t.getContext("webgl2"),null!=i&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=oe(i)?.getUnmaskedRenderer()??"unknown")),null==i)return i;e.available=!0,e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const r=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return r&&(e.supportsHighPrecisionFragment=r.precision>0),i}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),ne}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let he=class extends((0,S.dM)((0,R.j)((0,P.J)((0,A.f)((0,v.b)((0,b.q)((0,I.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.QP).then((async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,W.v)(this.portalItem,"portal-item"))})).catch(u.QP).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const i=this._getDefaultAttribution(t.path);return i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const i=(0,J.py)(e);t.styleUrl=(0,X.e)(e,i)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new z.A;if(e.length>1)for(let i=0;i<e.length;i++)ie(t,e[i].tileInfo)&&(t=re(t,e[i].tileInfo));return t}readTilemapCache(e,t){const i=t.capabilities?.includes("Tilemap");return i?new L.d({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const i=ae().maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new E({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},i);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const i=ae().maxTextureSize,r=e.spriteUrl,s=r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new E(e,i);try{await l.load(t);const i=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(i,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.QP)(e)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const i=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:i||r})}getStyleLayer(e){return(0,n.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,i){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const i=await async function(e,t){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await Q(i,"esri",e,s,t),{layerDefinition:i.validatedSource,url:r,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style.sprite&&q(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style.glyphs&&q(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===i.spriteFormat&&(await function(){if(M)return M;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return M=new Promise((t=>{const i=new Image;i.onload=()=>{i.onload=i.onerror=null,t(i.width>0&&i.height>0)},i.onerror=()=>{i.onload=i.onerror=null,t(!1)},i.src="data:image/webp;base64,"+e.lossy})),M}()||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySource",i.sourceNameToSource[i.primarySourceName]),this._set("styleRepository",new se.A(i.style)),this.read(i.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),i=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const s=t[1]||"";for(const e of i)if(e.toLowerCase().includes(r))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,r._)([(0,c.MZ)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,r._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"initialExtent",null),(0,r._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,r._)([(0,c.MZ)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,r._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],he.prototype,"refreshInterval",void 0),(0,r._)([(0,c.MZ)()],he.prototype,"style",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,r._)([(0,c.MZ)({type:g.A,readOnly:!0})],he.prototype,"spatialReference",null),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,r._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,r._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,r._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],he.prototype,"tileInfo",null),(0,r._)([(0,c.MZ)()],he.prototype,"tilemapCache",void 0),(0,r._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,r._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,r._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],he.prototype,"version",void 0),(0,r._)([(0,d.w)("version",["version","currentVersion"])],he.prototype,"readVersion",null),he=(0,r._)([(0,y.$)("esri.layers.VectorTileLayer")],he);const ce=he},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(90237),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,l.$)("esri.layers.mixins.APIKeyMixin")],t),t}},66344:(e,t,i)=>{var r,s;i.d(t,{q:()=>a}),(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class l{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,l){t=e.id+t;const n=this._db.get(t);if(n&&(this._size-=n.size,e.size-=n.size,this._db.delete(t),n.entry!==i&&this._notifyRemove(t,n.entry,n.size,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,s,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,r.ALL);const a=1+Math.max(l,-4)- -3;this._db.set(t,new o(i,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===i){for(this._size-=l.size,e.size-=l.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}l.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach((i=>{const{id:s,name:l}=i;if(r.startsWith(s)){const i=t[l]||0;t[l]=i+e.size}}))}));const r={};this._users.forEach((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(n)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[l,o]of this._db)if(0===o.lifetime&&(!r||l.startsWith(r))){const r=t??this._users.get(l.split(n)[0]);if(this._purgeItem(l,o,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(const[s,l]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(n)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class o{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const n=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new l,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,l.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},78553:(e,t,i)=>{i.d(t,{D:()=>l,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),l=i(25482),o=i(88930),n=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),h=i(43937),c=i(98623);let p=class extends l.A{static{r=this}static get allTime(){return y}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;return s>=t&&s<=i?o=s:t>=s&&t<=l&&(o=t),i>=s&&i<=l?n=i:l>=t&&l<=i&&(n=l),null==o||null==n||isNaN(o)||isNaN(n)?r.empty:new r({start:o===-1/0?null:new Date(o),end:n===1/0?null:new Date(n)})}offset(e,t,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.S1)(l,e,t,i)),null!=n&&(s.end=(0,o.S1)(n,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=r=(0,s._)([(0,u.$)("esri.time.TimeExtent")],p);const d=p,y=new p,f=new p({start:void 0,end:void 0})},88788:(e,t,i)=>{i.d(t,{m:()=>o,v:()=>l});var r=i(84952),s=i(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,i){const s=(0,r.An)(e.itemUrl);return{...n(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:i?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t){return{origin:t,url:(0,r.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}}}]);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n,NormalType as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{
|
|
5
|
+
import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n,NormalType as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as u}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as h,addAmbientBoostFactor as p,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as C,PBRMode as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as P,ReadShadowMapDraw as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as S,normalTextureUV as T,emissiveTextureUV as V,occlusionTextureUV as A,metallicRoughnessTextureUV as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as E}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as I,addCameraPosition as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as _}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as R,If as z}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as G}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as W}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as k}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as H}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as q}from"../webscene/support/AlphaCutoff.js";function J(J){const K=new H,{attributes:Q,vertex:X,fragment:Y,varyings:Z}=K,{output:ee,normalType:re,offsetBackfaces:oe,instancedColor:ie,spherical:ae,receiveShadows:le,snowCover:se,pbrMode:ne,textureAlphaPremultiplied:te,instancedDoublePrecision:de,hasVertexColors:ce,hasVertexTangents:me,hasColorTexture:ge,hasNormalTexture:ve,hasNormalTextureTransform:ue,hasColorTextureTransform:be}=J;if(I(X,J),Q.add(W.POSITION,"vec3"),Z.add("vpos","vec3",{invariant:!0}),K.include($,J),K.include(s,J),K.include(v,J),K.include(S,J),!i(ee))return K.include(u,J),K;K.include(T,J),K.include(V,J),K.include(A,J),K.include(M,J),U(X,J),K.include(n,J),K.include(l,J);const we=re===t.Attribute||re===t.Compressed;return we&&oe&&K.include(o),K.include(b,J),K.include(g,J),ie&&K.attributes.add(W.INSTANCECOLOR,"vec4"),Z.add("vPositionLocal","vec3"),K.include(c,J),K.include(r,J),K.include(d,J),K.include(m,J),X.uniforms.add(new F("externalColor",(r=>"ignore"===r.colorMixMode?e:r.externalColor))),Z.add("vcolorExt","vec4"),K.include(N,J),X.main.add(R`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
vcolorExt = externalColor;
|
|
8
|
-
${
|
|
8
|
+
${z(ie,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
9
9
|
vcolorExt *= vvColor();
|
|
10
10
|
vcolorExt *= getSymbolColor();
|
|
11
11
|
forwardColorMixMode();
|
|
@@ -13,11 +13,11 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
13
13
|
vpos = getVertexInLocalOriginSpace();
|
|
14
14
|
vPositionLocal = vpos - view[3].xyz;
|
|
15
15
|
vpos = subtractOrigin(vpos);
|
|
16
|
-
${
|
|
16
|
+
${z(we,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
17
17
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
18
|
-
${
|
|
18
|
+
${z(me,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
19
19
|
gl_Position = transformPosition(proj, view, vpos);
|
|
20
|
-
${
|
|
20
|
+
${z(we&&oe,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
21
21
|
|
|
22
22
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
23
23
|
forwardLinearDepth();
|
|
@@ -28,18 +28,18 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
28
28
|
forwardOcclusionUV();
|
|
29
29
|
forwardMetallicRoughnessUV();
|
|
30
30
|
|
|
31
|
-
if (vcolorExt.a < ${
|
|
31
|
+
if (vcolorExt.a < ${R.float(q)}) {
|
|
32
32
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
33
|
}
|
|
34
|
-
`),
|
|
34
|
+
`),K.include(h,J),K.include(w,J),K.include(D,J),K.include(de?P:O,J),K.fragment.include(a,J),K.include(k,J),U(Y,J),Y.uniforms.add(X.uniforms.get("localOrigin"),new B("ambient",(e=>e.ambient)),new B("diffuse",(e=>e.diffuse)),new _("opacity",(e=>e.opacity)),new _("layerOpacity",(e=>e.layerOpacity))),ge&&Y.uniforms.add(new G("tex",(e=>e.texture))),K.include(C,J),K.include(L,J),Y.include(E),K.include(y,J),p(Y),f(Y),x(Y),Y.main.add(R`
|
|
35
35
|
discardBySlice(vpos);
|
|
36
36
|
discardByTerrainDepth();
|
|
37
|
-
${ge?
|
|
38
|
-
vec4 texColor = texture(tex, ${
|
|
39
|
-
${
|
|
40
|
-
discardOrAdjustAlpha(texColor);`:
|
|
37
|
+
${ge?R`
|
|
38
|
+
vec4 texColor = texture(tex, ${be?"colorUV":"vuv0"});
|
|
39
|
+
${z(te,"texColor.rgb /= texColor.a;")}
|
|
40
|
+
discardOrAdjustAlpha(texColor);`:R`vec4 texColor = vec4(1.0);`}
|
|
41
41
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
42
|
-
${re===t.ScreenDerivative?
|
|
42
|
+
${re===t.ScreenDerivative?R`vec3 normal = screenDerivativeNormal(vPositionLocal);`:R`shadingParams.normalView = vNormalWorld;
|
|
43
43
|
vec3 normal = shadingNormal(shadingParams);`}
|
|
44
44
|
applyPBRFactors();
|
|
45
45
|
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
@@ -47,15 +47,15 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
47
47
|
vec3 posWorld = vpos + localOrigin;
|
|
48
48
|
|
|
49
49
|
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
50
|
-
float shadow = ${le?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":
|
|
50
|
+
float shadow = ${le?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":z(ae,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
51
51
|
|
|
52
52
|
vec3 matColor = max(ambient, diffuse);
|
|
53
|
-
vec3 albedo = mixExternalColor(${
|
|
54
|
-
float opacity_ = layerOpacity * mixExternalOpacity(${
|
|
55
|
-
${ve?`mat3 tangentSpace = computeTangentSpace(${me?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${
|
|
53
|
+
vec3 albedo = mixExternalColor(${z(ce,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
54
|
+
float opacity_ = layerOpacity * mixExternalOpacity(${z(ce,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, int(colorMixMode));
|
|
55
|
+
${ve?`mat3 tangentSpace = computeTangentSpace(${me?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${ue?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
56
56
|
vec3 normalGround = ${ae?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
57
57
|
|
|
58
|
-
${
|
|
58
|
+
${z(se,R`
|
|
59
59
|
float snow = smoothstep(0.5, 0.55, dot(normal, normalGround));
|
|
60
60
|
albedo = mix(albedo, vec3(1), snow);
|
|
61
61
|
shadingNormal = mix(shadingNormal, normal, snow);
|
|
@@ -63,11 +63,11 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
63
63
|
|
|
64
64
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
65
65
|
|
|
66
|
-
${ne===
|
|
66
|
+
${ne===j.Normal||ne===j.Schematic?R`
|
|
67
67
|
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
68
|
-
${
|
|
68
|
+
${z(se,R`mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);`)}
|
|
69
69
|
vec4 emission = ${se?"mix(getEmissions(), vec4(0.0), snow)":"getEmissions()"};
|
|
70
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:
|
|
70
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:R`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
71
71
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
72
72
|
outputColorHighlightOID(finalColor, vpos);
|
|
73
|
-
`),
|
|
73
|
+
`),K}const K=Object.freeze(Object.defineProperty({__proto__:null,build:J},Symbol.toStringTag,{value:"Module"}));export{K as D,J as b};
|
package/chunks/Pattern.glsl.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c,addCameraPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as
|
|
6
|
-
const mat2 rotate45 = mat2(${g.float(
|
|
7
|
-
${g.float(
|
|
8
|
-
`),
|
|
5
|
+
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c,addCameraPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g,If as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as m}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{Style as f}from"../views/3d/webgl-engine/materials/PatternStyle.js";import{outputColorHighlightOID as u}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as w}from"../views/webgl/ShaderBuilder.js";const b=.70710678118,h=b,y=.08715574274,S=10,j=1;function x(x){const T=new w,{vertex:P,fragment:R,attributes:V,varyings:D}=T,O=x.output===e.Highlight;c(P,x),T.include(r,x),T.include(a,x),T.include(n,x),T.include(t,x),T.fragment.include(o,x),T.include(u,x),T.include(i,x),x.draped?P.uniforms.add(new v("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):V.add(m.BOUNDINGRECT,"mat3"),V.add(m.POSITION,"vec3"),V.add(m.UVMAPSPACE,"vec4"),x.vvColor&&V.add(m.COLORFEATUREATTRIBUTE,"float"),x.hasVertexColors||D.add("vColor","vec4"),D.add("vpos","vec3",{invariant:!0}),D.add("vuv","vec2"),P.uniforms.add(new s("uColor",(e=>e.color)));const A=x.style===f.ForwardDiagonal||x.style===f.BackwardDiagonal||x.style===f.DiagonalCross;return A&&P.code.add(g`
|
|
6
|
+
const mat2 rotate45 = mat2(${g.float(b)}, ${g.float(-.70710678118)},
|
|
7
|
+
${g.float(h)}, ${g.float(b)});
|
|
8
|
+
`),x.draped||(d(P,x),P.uniforms.add(new v("worldToScreenPerDistanceRatio",(e=>1/e.camera.perScreenPixelRatio))),P.code.add(g`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
|
|
9
9
|
float projectedLength = dot(halfVector, point - center) / dot(halfVector, halfVector);
|
|
10
10
|
return center + halfVector * clamp(projectedLength, -1.0, 1.0);
|
|
11
|
-
}`),
|
|
11
|
+
}`),P.code.add(g`vec3 intersectRayPlane(vec3 rayDir, vec3 rayOrigin, vec3 planeNormal, vec3 planePoint) {
|
|
12
12
|
float d = dot(planeNormal, planePoint);
|
|
13
13
|
float t = (d - dot(planeNormal, rayOrigin)) / dot(planeNormal, rayDir);
|
|
14
14
|
return rayOrigin + t * rayDir;
|
|
15
|
-
}`),
|
|
15
|
+
}`),P.code.add(g`
|
|
16
16
|
float boundingRectDistanceToCamera() {
|
|
17
17
|
vec3 center = vec3(boundingRect[0][0], boundingRect[0][1], boundingRect[0][2]);
|
|
18
18
|
vec3 halfU = vec3(boundingRect[1][0], boundingRect[1][1], boundingRect[1][2]);
|
|
@@ -22,7 +22,7 @@ return rayOrigin + t * rayDir;
|
|
|
22
22
|
vec3 viewDir = - vec3(view[0][2], view[1][2], view[2][2]);
|
|
23
23
|
|
|
24
24
|
float viewAngle = dot(viewDir, n);
|
|
25
|
-
float minViewAngle = ${g.float(
|
|
25
|
+
float minViewAngle = ${g.float(y)};
|
|
26
26
|
|
|
27
27
|
if (abs(viewAngle) < minViewAngle) {
|
|
28
28
|
// view direction is (almost) parallel to plane -> clamp it to min angle
|
|
@@ -42,15 +42,13 @@ return rayOrigin + t * rayDir;
|
|
|
42
42
|
|
|
43
43
|
return length(closestPoint - cameraPosition);
|
|
44
44
|
}
|
|
45
|
-
`)),
|
|
45
|
+
`)),P.code.add(g`
|
|
46
46
|
vec2 scaledUV() {
|
|
47
|
-
vec2 uv = uvMapSpace.xy ${
|
|
48
|
-
vec2 uvCellOrigin = uvMapSpace.zw ${
|
|
47
|
+
vec2 uv = uvMapSpace.xy ${p(A," * rotate45")};
|
|
48
|
+
vec2 uvCellOrigin = uvMapSpace.zw ${p(A," * rotate45")};
|
|
49
49
|
|
|
50
|
-
${
|
|
51
|
-
|
|
52
|
-
float worldToScreenRatio = worldToScreenPerDistanceRatio / distanceToCamera;
|
|
53
|
-
`}
|
|
50
|
+
${p(!x.draped,g`float distanceToCamera = boundingRectDistanceToCamera();
|
|
51
|
+
float worldToScreenRatio = worldToScreenPerDistanceRatio / distanceToCamera;`)}
|
|
54
52
|
|
|
55
53
|
// Logarithmically discretize ratio to avoid jittering
|
|
56
54
|
float step = 0.1;
|
|
@@ -58,21 +56,21 @@ return rayOrigin + t * rayDir;
|
|
|
58
56
|
discreteWorldToScreenRatio = ceil(discreteWorldToScreenRatio / step) * step;
|
|
59
57
|
discreteWorldToScreenRatio = exp(discreteWorldToScreenRatio);
|
|
60
58
|
|
|
61
|
-
vec2 uvOffset = mod(uvCellOrigin * discreteWorldToScreenRatio, ${g.float(
|
|
59
|
+
vec2 uvOffset = mod(uvCellOrigin * discreteWorldToScreenRatio, ${g.float(S)});
|
|
62
60
|
return uvOffset + (uv * discreteWorldToScreenRatio);
|
|
63
61
|
}
|
|
64
|
-
`),
|
|
62
|
+
`),P.main.add(g`
|
|
65
63
|
vuv = scaledUV();
|
|
66
64
|
vpos = position;
|
|
67
65
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
68
66
|
forwardNormalizedVertexColor();
|
|
69
67
|
forwardObjectAndLayerIdColor();
|
|
70
|
-
${
|
|
68
|
+
${x.hasVertexColors?"vColor *= uColor;":x.vvColor?"vColor = uColor * interpolateVVColor(colorFeatureAttribute);":"vColor = uColor;"}
|
|
71
69
|
gl_Position = transformPosition(proj, view, vpos);
|
|
72
|
-
`),
|
|
73
|
-
const float lineWidth = ${g.float(
|
|
74
|
-
const float spacing = ${g.float(
|
|
75
|
-
const float spacingINV = ${g.float(1/
|
|
70
|
+
`),R.include(l),x.draped&&R.uniforms.add(new v("texelSize",(e=>1/e.camera.pixelRatio))),O||(R.code.add(g`
|
|
71
|
+
const float lineWidth = ${g.float(j)};
|
|
72
|
+
const float spacing = ${g.float(S)};
|
|
73
|
+
const float spacingINV = ${g.float(1/S)};
|
|
76
74
|
|
|
77
75
|
float coverage(float p, float txlSize) {
|
|
78
76
|
p = mod(p, spacing);
|
|
@@ -88,7 +86,7 @@ return rayOrigin + t * rayDir;
|
|
|
88
86
|
|
|
89
87
|
return coverage / txlSize;
|
|
90
88
|
}
|
|
91
|
-
`),
|
|
89
|
+
`),x.draped||R.code.add(g`const int maxSamples = 5;
|
|
92
90
|
float sampleAA(float p) {
|
|
93
91
|
vec2 dxdy = abs(vec2(dFdx(p), dFdy(p)));
|
|
94
92
|
float fwidth = dxdy.x + dxdy.y;
|
|
@@ -109,10 +107,10 @@ accumulator += coverage(p + step.x * dxdy.x + step.y * dxdy.y, fwidth);
|
|
|
109
107
|
}
|
|
110
108
|
accumulator /= float(samples.x * samples.y);
|
|
111
109
|
return accumulator;
|
|
112
|
-
}`)),
|
|
110
|
+
}`)),R.main.add(g`
|
|
113
111
|
discardBySlice(vpos);
|
|
114
112
|
discardByTerrainDepth();
|
|
115
113
|
vec4 color = vColor;
|
|
116
|
-
${
|
|
114
|
+
${p(!O,g`color.a *= ${C(x)};`)}
|
|
117
115
|
outputColorHighlightOID(color, vpos);
|
|
118
|
-
`),
|
|
116
|
+
`),T}function C(e){function o(o){return e.draped?g`coverage(vuv.${o}, texelSize)`:g`sampleAA(vuv.${o})`}switch(e.style){case f.ForwardDiagonal:case f.Horizontal:return o("y");case f.BackwardDiagonal:case f.Vertical:return o("x");case f.DiagonalCross:case f.Cross:return g`1.0 - (1.0 - ${o("x")}) * (1.0 - ${o("y")})`;default:return"0.0"}}const T=Object.freeze(Object.defineProperty({__proto__:null,build:x},Symbol.toStringTag,{value:"Module"}));export{T as P,x as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as
|
|
5
|
+
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as g}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as v,addAmbientBoostFactor as b,addLightingGlobalFactor as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as p,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as f,PhysicallyBasedRenderingParameters as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as y,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as M,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as F,If as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as V}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as T}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as B}from"../webscene/support/AlphaCutoff.js";function R(R){const _=new T,{attributes:z,vertex:k,fragment:G,varyings:U}=_,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=R,X=J===f.Normal||J===f.Schematic;if(M(k,R),z.add(I.POSITION,"vec3"),U.add("vpos","vec3",{invariant:!0}),_.include(j,R),_.include(l,R),_.include(c,R),_.include(L,R),o(W)&&(S(_.vertex,R),_.include(t,R),_.include(a,R),H&&_.include(r),q&&_.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3",{invariant:!0}),_.include(n,R),_.include(e,R),_.include(s,R),_.include(d,R),k.uniforms.add(new E("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add(F`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
vcolorExt = externalColor;
|
|
8
8
|
${N(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
@@ -10,7 +10,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
10
10
|
vcolorExt *= getSymbolColor();
|
|
11
11
|
forwardColorMixMode();
|
|
12
12
|
|
|
13
|
-
bool alphaCut = vcolorExt.a < ${
|
|
13
|
+
bool alphaCut = vcolorExt.a < ${F.float(B)};
|
|
14
14
|
vpos = getVertexInLocalOriginSpace();
|
|
15
15
|
localvpos = vpos - view[3].xyz;
|
|
16
16
|
vpos = subtractOrigin(vpos);
|
|
@@ -24,11 +24,11 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
24
24
|
|
|
25
25
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
26
26
|
${N(H,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
27
|
-
`)),
|
|
27
|
+
`)),o(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:o}=R;_.include(v,R),_.include(m,R),_.include(O,R),_.include(R.instancedDoublePrecision?y:C,R),_.fragment.include(i,R),_.include(V,R),S(_.fragment,R),p(G),b(G),w(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new A("ambient",(e=>e.ambient)),new A("diffuse",(e=>e.diffuse)),new D("opacity",(e=>e.opacity)),new D("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new $("tex",(e=>e.texture))),_.include(x,R),_.include(u,R),G.include(P),h(G),G.main.add(F`
|
|
28
28
|
discardBySlice(vpos);
|
|
29
29
|
discardByTerrainDepth();
|
|
30
30
|
vec4 texColor = ${e?`texture(tex, ${r?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
31
|
-
${N(e,`${N(
|
|
31
|
+
${N(e,`${N(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
32
32
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
33
33
|
applyPBRFactors();
|
|
34
34
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -36,13 +36,13 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
36
36
|
|
|
37
37
|
float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
|
|
38
38
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
39
|
-
float shadow = ${
|
|
39
|
+
float shadow = ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
40
40
|
vec3 matColor = max(ambient, diffuse);
|
|
41
|
-
${
|
|
42
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode))
|
|
41
|
+
${R.hasVertexColors?F`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
42
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:F`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
43
43
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
|
|
44
44
|
${N(K,"albedo = mix(albedo, vec3(1), 0.9);")}
|
|
45
|
-
${
|
|
45
|
+
${F`vec3 shadingNormal = normalize(vNormalWorld);
|
|
46
46
|
albedo *= 1.2;
|
|
47
47
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
48
48
|
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
@@ -51,9 +51,9 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
51
51
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
52
52
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
53
53
|
${N(X,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
|
|
54
|
-
${X
|
|
55
|
-
${N(K
|
|
54
|
+
${X?F`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
55
|
+
${N(K,F`mrr = vec3(0.0, 1.0, 0.04);`)}
|
|
56
56
|
vec4 emission = ${K?"vec4(0.0)":"getEmissions()"};
|
|
57
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance)
|
|
57
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:F`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
58
58
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
59
|
-
outputColorHighlightOID(finalColor, vpos);`)}return
|
|
59
|
+
outputColorHighlightOID(finalColor, vpos);`)}return _.include(g,R),_}const _=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{_ as R,R as b};
|