1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7179],{15642:function(e,t,r){function n(e,t){let r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:function(){return n}}),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count,u=(r&&r.dstIndex?r.dstIndex:0)*o,f=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[f],u+=o,f+=a},makeDense:n},Symbol.toStringTag,{value:"Module"}))},385:function(e,t,r){r.d(t,{f:function(){return a},n:function(){return s}});var n=r(90331);function o(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count,u=(r&&r.dstIndex?r.dstIndex:0)*o,f=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[f],n[u+1]=s[f+1],u+=o,f+=a}function s(e,t,r){let s=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,u=t.typedBufferStride,f=r?r.count:t.count,l=(r&&r.dstIndex?r.dstIndex:0)*a,c=(r&&r.srcIndex?r.srcIndex:0)*u;if((0,n.U)(t.elementType)){let e=(0,n.Op)(t.elementType);if((0,n.B3)(t.elementType))for(let t=0;t<f;++t)s[l]=Math.max(i[c]/e,-1),s[l+1]=Math.max(i[c+1]/e,-1),l+=a,c+=u;else for(let t=0;t<f;++t)s[l]=i[c]/e,s[l+1]=i[c+1]/e,l+=a,c+=u}else o(e,t,r);return e}function a(e,t,r,n){let o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count,i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,copy:o,normalizeIntegerBuffer:s,fill:a},Symbol.toStringTag,{value:"Module"}))},56999:function(e,t,r){r.d(t,{a:function(){return i},n:function(){return s},s:function(){return a},t:function(){return o}});var n=r(45150);function o(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");let o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],f=r[4],l=r[5],c=r[6],d=r[7],p=r[8],m=e.typedBuffer,h=e.typedBufferStride,y=t.typedBuffer,T=t.typedBufferStride;for(let e=0;e<o;e++){let t=e*h,r=e*T,n=y[r],o=y[r+1],_=y[r+2],x=y[r+3];m[t]=s*n+u*o+c*_,m[t+1]=a*n+f*o+d*_,m[t+2]=i*n+l*o+p*_,m[t+3]=x}}function s(e,t){let r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*o,r=e*a,i=s[r],u=s[r+1],f=s[r+2],l=i*i+u*u+f*f;if(l>0){let e=1/Math.sqrt(l);n[t]=e*i,n[t+1]=e*u,n[t+2]=e*f}}}function a(e,t,r){let n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){let t=e*s,n=e*i;o[t]=r*a[n],o[t+1]=r*a[n+1],o[t+2]=r*a[n+2],o[t+3]=r*a[n+3]}}function i(e,t,r){let n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){let t=e*s,n=e*i;o[t]=a[n]>>r,o[t+1]=a[n+1]>>r,o[t+2]=a[n+2]>>r,o[t+3]=a[n+3]>>r}}Object.freeze(Object.defineProperty({__proto__:null,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");let o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],f=r[4],l=r[5],c=r[6],d=r[7],p=r[8],m=r[9],h=r[10],y=r[11],T=r[12],_=r[13],x=r[14],b=r[15],g=e.typedBuffer,w=e.typedBufferStride,S=t.typedBuffer,A=t.typedBufferStride;for(let e=0;e<o;e++){let t=e*w,r=e*A,n=S[r],o=S[r+1],I=S[r+2],E=S[r+3];g[t]=s*n+f*o+p*I+T*E,g[t+1]=a*n+l*o+m*I+_*E,g[t+2]=i*n+c*o+h*I+x*E,g[t+3]=u*n+d*o+y*I+b*E}},transformMat3:o,normalize:s,scale:a,shiftRight:i},Symbol.toStringTag,{value:"Module"}))},32101:function(e,t,r){function n(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count,u=(r&&r.dstIndex?r.dstIndex:0)*o,f=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[f],n[u+1]=s[f+1],n[u+2]=s[f+2],n[u+3]=s[f+3],u+=o,f+=a}function o(e,t,r,n,o,s){let a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count,f=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[f]=t,a[f+1]=r,a[f+2]=n,a[f+3]=o,f+=i}r.d(t,{c:function(){return n},f:function(){return o}}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,fill:o},Symbol.toStringTag,{value:"Module"}))},26139:function(e,t,r){r.d(t,{G:function(){return o}});var n=r(70375);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s||!s.match||!s.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});return new o(parseInt(r,10),parseInt(s,10),t)}}},90331:function(e,t,r){function n(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}function o(e){switch(e){case"u8":case"u16":case"u32":return!1;case"i8":case"i16":case"i32":case"f32":case"f64":return!0}}function s(e){switch(e){case"u8":case"u16":case"u32":case"i8":case"i16":case"i32":return!0;case"f32":case"f64":return!1}}function a(e){switch(e){case"u8":return 255;case"u16":return 65535;case"u32":return 4294967295;case"i8":return 127;case"i16":return 32767;case"i32":return 2147483647;case"f32":return 3402823e32;case"f64":return 179769e303}}
1r.d(t,{B3:function(){return o},Op:function(){return a},U:function(){return s},n1:function(){return n}})},64122:function(e,t,r){r.d(t,{gS:function(){return o}});var n=r(90331);function o(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,n.n1)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count,u=(r&&r.dstIndex?r.dstIndex:0)*o,f=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<9;++e)n[u+e]=s[f+e];u+=o,f+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count,u=(r&&r.dstIndex?r.dstIndex:0)*o,f=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<16;++e)n[u+e]=s[f+e];u+=o,f+=a}}},Symbol.toStringTag,{value:"Module"})),r(15642),r(385),r(14789),r(32101)},91420:function(e,t,r){r.d(t,{C:function(){return f}});var n=r(66341),o=r(67979),s=r(70375),a=r(61681),i=r(78668),u=r(3466);class f{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,u.HK)(e)?((0,i.k_)(t),(0,u.AH)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if((0,a.Wi)(this._streamDataRequester))return(await (0,n.default)(t,{responseType:l[e]})).data;let u=await (0,o.q6)(this._streamDataRequester.request(t,e,r));if(!0===u.ok)return u.value;throw(0,i.r9)(u.error),new s.Z("",`Request for resource failed: ${u.error}`)}}let l={image:"image",binary:"array-buffer",json:"json"}},1731:function(e,t,r){r.d(t,{DA:function(){return a},jX:function(){return i},nh:function(){return s}});var n=r(86098),o=r(71454);function s(e,t=o.p){return"number"==typeof e?t(e):(0,n.Uc)(e)||(0,n.lq)(e)?new Uint32Array(e):e}function a(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,n=(0,o.$z)(r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1):(n[e++]=t+1,n[e++]=t),n[e++]=t+2}else{let t=0;for(let o=0;o<r;o+=1)if(o%2==0){let r=e[o],s=e[o+1],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}else{let r=e[o+1],s=e[o],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}}return n}function i(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);let r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}{let t=e[0],o=e[1],s=0;for(let a=0;a<r;++a){let r=e[a+2];n[s++]=t,n[s++]=o,n[s++]=r,o=r}return n}}},64987:function(e,t,r){r.d(t,{Q:function(){return G}});var n,o,s,a,i=r(61681),u=r(39100),f=r(70375),l=r(13802);class c{error(e){throw new f.Z("gltf-loader-error",e)}errorUnsupported(e){throw new f.Z("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){l.Z.getLogger("esri.views.3d.glTF").warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}}var d=r(91907),p=r(86114),m=r(78668),h=r(3466),y=r(26139),T=r(24455),_=r(10663),x=r(61044),b=r(63338),g=r(15642);class w{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){let e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){let t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}(n=s||(s={})).SCALAR="SCALAR",n.VEC2="VEC2",n.VEC3="VEC3",n.VEC4="VEC4",n.MAT2="MAT2",n.MAT3="MAT3",n.MAT4="MAT4",(o=a||(a={}))[o.ARRAY_BUFFER=34962]="ARRAY_BUFFER",o[o.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER";var S=r(27755);let A={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},I={pbrMetallicRoughness:A,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},E={ESRI_externalColorMixMode:"tint"},O=(e={})=>{let t={...A,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,S.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...E,...e.extras});return{...I,...e,pbrMetallicRoughness:t,extras:r}},v={magFilter:d.cw.LINEAR,minFilter:d.cw.LINEAR_MIPMAP_LINEAR,wrapS:d.e8.REPEAT,wrapT:d.e8.REPEAT},U=e=>({...v,...e}),N={MAGIC:1179937895,CHUNK_TYPE_JSON:1313821514,CHUNK_TYPE_BIN:5130562};class C{constructor(e,t,r,n,o){let s,a;this._context=e,this._errorContext=t,this.uri=r,this.json=n,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._baseUri=(this.uri.replace(/^(.*\/)?([^/]*)$/,(e,t,r)=>(s=t||"",a=r||"","")),{dirPart:s,filePart:a}).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==n.scenes,"Sce
1nes must be defined."),t.errorUnsupportedIf(null==n.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==n.nodes,"Nodes must be defined."),this._computeNodeParents()}static async load(e,t,r,n){if((0,h.HK)(r)){let n=(0,h.sJ)(r);if(n&&"model/gltf-binary"!==n.mediaType)try{let o=JSON.parse(n.isBase64?atob(n.data):n.data);return new C(e,t,r,o)}catch{}let o=(0,h.AH)(r);if(C._isGLBData(o))return this._fromGLBData(e,t,r,o)}if(r.endsWith(".gltf")){let o=await e.loadJSON(r,n);return new C(e,t,r,o)}let o=await e.loadBinary(r,n);if(C._isGLBData(o))return this._fromGLBData(e,t,r,o);let s=await e.loadJSON(r,n);return new C(e,t,r,s)}static _isGLBData(e){if(null==e)return!1;let t=new w(e);return t.remainingBytes()>=4&&t.readUint32()===N.MAGIC}static async _fromGLBData(e,t,r,n){let o=await C._parseGLBData(t,n);return new C(e,t,r,o.json,o.binaryData)}static async _parseGLBData(e,t){let r=new w(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");let n=r.readUint32(),o=r.readUint32(),s=r.readUint32();e.assert(n===N.MAGIC,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=s,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==o,"An unsupported GLB container version was detected. Only version 2 is supported.");let a,i,u=0;for(;r.remainingBytes()>=8;){let t=r.readUint32(),n=r.readUint32();0===u?(e.assert(n===N.CHUNK_TYPE_JSON,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),a=await P(r.readUint8Array(t))):1===u?(e.errorUnsupportedIf(n!==N.CHUNK_TYPE_BIN,"Second GLB chunk expected to be BIN."),i=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),u+=1}return a||e.error("No GLB JSON chunk detected."),{json:a,binaryData:i}}async getBuffer(e,t){let r=this.json.buffers[e],n=this._errorContext;if(null==r.uri)return n.assert(null!=this._glbBuffer,"GLB buffer not present"),this._glbBuffer;let o=await this._getBufferLoader(e,t);return n.assert(o.byteLength===r.byteLength,"Buffer byte lengths should match."),o}async _getBufferLoader(e,t){let r=this._bufferLoaders.get(e);if(r)return r;let n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){let r=this._errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");let n=this.json.accessors[e];r.errorUnsupportedIf(null==n?.bufferView,"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(n.type in[s.MAT2,s.MAT3,s.MAT4],`AttributeType ${n.type} is not supported`);let o=this.json.bufferViews[n.bufferView],a=await this.getBuffer(o.buffer,t),i=L[n.type],u=F[n.componentType],f=i*u,l=o.byteStride||f;return{raw:a.buffer,byteStride:l,byteOffset:a.byteOffset+(o.byteOffset||0)+(n.byteOffset||0),entryCount:n.count,isDenselyPacked:l===f,componentCount:i,componentByteSize:u,componentType:n.componentType,min:n.min,max:n.max,normalized:!!n.normalized}}async getIndexData(e,t){if(null==e.indices)return;let r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case d.g.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case d.g.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case d.g.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case d.g.UNSIGNED_BYTE:return(0,g.m)(this._wrapAccessor(b.D_,r));case d.g.UNSIGNED_SHORT:return(0,g.m)(this._wrapAccessor(b.av,r));case d.g.UNSIGNED_INT:return(0,g.m)(this._wrapAccessor(b.Nu,r))}}async getPositionData(e,t){let r=this._errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");let n=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(n.componentType!==d.g.FLOAT,"Expected type FLOAT for POSITION vertex attribute, but found "+d.g[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"POSITION vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(b.ct,n)}async getNormalData(e,t){let r=this._errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");let n=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(n.componentType!==d.g.FLOAT,"Expected type FLOAT for NORMAL vertex attribute, but found "+d.g[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"NORMAL vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(b.ct,n)}async getTangentData(e,t){let r=this._errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");let n=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(n.componentType!==d.g.FLOAT,"Expected type FLOAT for TANGENT vertex attribute, but found "+d.g[n.componentType]),r.errorUnsupportedIf(4!==n.componentCount,"TANGENT vertex attribute must have 4 components, but found "+n.componentCount.toFixed()),new b.ek(n.raw,n.byteOffset,n.byteStride,n.byteOffset+n.byteStride*n.entryCount)}async getTextureCoordinates(e,t){let r=this._errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");let n=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==n.componentCount,"TEXCOORD_0 vertex attribute must have 2
1components, but found "+n.componentCount.toFixed()),n.componentType===d.g.FLOAT?this._wrapAccessor(b.Eu,n):(r.errorUnsupportedIf(!n.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),function(e){switch(e.componentType){case d.g.BYTE:return new b.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case d.g.UNSIGNED_BYTE:return new b.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case d.g.SHORT:return new b.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case d.g.UNSIGNED_SHORT:return new b.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case d.g.UNSIGNED_INT:return new b.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case d.g.FLOAT:return new b.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(n))}async getVertexColors(e,t){let r=this._errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");let n=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==n.componentCount&&3!==n.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+n.componentCount.toFixed()),4===n.componentCount){if(n.componentType===d.g.FLOAT)return this._wrapAccessor(b.ek,n);if(n.componentType===d.g.UNSIGNED_BYTE)return this._wrapAccessor(b.mc,n);if(n.componentType===d.g.UNSIGNED_SHORT)return this._wrapAccessor(b.v6,n)}else if(3===n.componentCount){if(n.componentType===d.g.FLOAT)return this._wrapAccessor(b.ct,n);if(n.componentType===d.g.UNSIGNED_BYTE)return this._wrapAccessor(b.ne,n);if(n.componentType===d.g.UNSIGNED_SHORT)return this._wrapAccessor(b.mw,n)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+d.g[n.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){let o=null!=e.material?O(this.json.materials[e.material]):O(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),f=r?this.getTexture(o.occlusionTexture,t):void 0,l=r?this.getTexture(o.emissiveTexture,t):void 0,c=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:d,occlusionTexture:await f,emissiveTexture:await l,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await c,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform}}return n}async getTexture(e,t){if(!e)return;this._errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");let r=e.index,n=this._errorContext,o=this.json.textures[r],s=U(null!=o.sampler?this.json.samplers[o.sampler]:{});n.errorUnsupportedIf(null==o.source,"Source is expected to be defined for a texture.");let a=this.json.images[o.source],i=await this._loadTextureImageData(r,o,t);return(0,p.s1)(this._textureCache,r,()=>{let e,t;let o=e=>(n.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:i,wrapS:33071===(e=s.wrapS)||33648===e||10497===e?s.wrapS:o(s.wrapS),wrapT:33071===(t=s.wrapT)||33648===t||10497===t?s.wrapT:o(s.wrapT),minFilter:s.minFilter,name:a.name,id:r}})}getNodeTransform(e){if(void 0===e)return B;let t=this._nodeTransformCache.get(e);if(!t){let r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,T.m)((0,u.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,u.b)(r),n.translation&&(0,T.v)(t,t,n.translation),n.rotation&&(M[3]=(0,_.g)(M,n.rotation),(0,T.e)(t,t,M[3],M)),n.scale&&(0,T.k)(t,t,n.scale)):t=r,this._nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}
1_resolveUri(e){return(0,h.hF)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){let e=y.G.parse(this.json.asset.version,"glTF");R.validate(e)}_checkRequiredExtensionsSupported(){let e=this.json,t=this._errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){let n=this._textureLoaders.get(e);if(n)return n;let o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){let r=this.json.images[e.source];if(r.uri)return this._context.loadImage(this._resolveUri(r.uri),t);let n=this._errorContext;n.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),n.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");let o=this.json.bufferViews[r.bufferView],s=await this.getBuffer(o.buffer,t);return n.errorUnsupportedIf(null!=o.byteStride,"byteStride not supported for image buffer"),j(new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset||0),o.byteLength),r.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;let e=await (0,m.WW)(Array.from(this._bufferLoaders.values())),t=await (0,m.WW)(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+t.reduce((e,t)=>e+(t?t.width*t.height*4:0),0)}}let R=new y.G(2,0,"glTF"),B=(0,T.y)((0,u.c)(),Math.PI/2),M=(0,x.a)(),L={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},F={[d.g.BYTE]:1,[d.g.UNSIGNED_BYTE]:1,[d.g.SHORT]:2,[d.g.UNSIGNED_SHORT]:2,[d.g.FLOAT]:4,[d.g.UNSIGNED_INT]:4};async function P(e){return new Promise((t,r)=>{let n=new Blob([e]),o=new FileReader;o.onload=()=>{t(JSON.parse(o.result))},o.onerror=e=>{r(e)},o.readAsText(n)})}async function j(e,t){return new Promise((r,n)=>{let o=new Blob([e],{type:t}),s=URL.createObjectURL(o),a=new Image,i=()=>{URL.revokeObjectURL(s),"decode"in a?a.decode().then(()=>r(a),()=>r(a)).then(f):(r(a),f())},u=e=>{URL.revokeObjectURL(s),n(e),f()},f=()=>{a.removeEventListener("load",i),a.removeEventListener("error",u)};a.addEventListener("load",i),a.addEventListener("error",u),a.src=s})}let D=0;async function G(e,t,r={},n=!0){let o=await C.load(e,V,t,r),s="gltf_"+D++,a={lods:[],materials:new Map,textures:new Map,meta:function(e){let t=e.json,r=null;return t.nodes.forEach(e=>{let t=e.extras;(0,i.pC)(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}(o)},f=!(!o.json.asset.extras||"symbolResource"!==o.json.asset.extras.ESRI_type),l=new Map;for(let e of(await k(o,async(e,t,f,c)=>{let p=l.get(f)??0;l.set(f,p+1);let m=void 0!==e.mode?e.mode:d.MX.TRIANGLES,h=m===d.MX.TRIANGLES||m===d.MX.TRIANGLE_STRIP||m===d.MX.TRIANGLE_FAN?m:null;if((0,i.Wi)(h))return void V.warnUnsupported("Unsupported primitive mode ("+d.MX[m]+"). Skipping primitive.");if(!o.hasPositions(e))return void V.warn("Skipping primitive without POSITION vertex attribute.");let y=o.getPositionData(e,r),T=o.getMaterial(e,r,n),_=o.hasNormals(e)?o.getNormalData(e,r):null,x=o.hasTangents(e)?o.getTangentData(e,r):null,b=o.hasTextureCoordinates(e)?o.getTextureCoordinates(e,r):null,g=o.hasVertexColors(e)?o.getVertexColors(e,r):null,w=o.getIndexData(e,r),S={transform:(0,u.b)(t),attributes:{position:await y,normal:_?await _:null,texCoord0:b?await b:null,color:g?await g:null,tangent:x?await x:null},indices:await w,primitiveType:h,material:function(e,t,r){let n=t=>{let n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){let r=function(e,t={}){return{data:e,parameters:{wrap:{s:d.e8.REPEAT,t:d.e8.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:H.includes(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){let r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(o,r)}return o}(a,await T,s)},A=null;(0,i.pC)(a.meta)&&(0,i.pC)(a.meta.ESRI_lod)&&"screenSpaceRadius"===a.meta.ESRI_lod.metric&&(A=a.meta.ESRI_lod.thresholds[f]),a.lods[f]=a.lods[f]||{parts:[],name:c,lodThreshold:A},a.lods[f].parts[p]=S}),a.lods))e.parts=e.parts.filter(e=>!!e);let c=await o.getLoadedBuffersSize();return{model:a,meta:{isEsriSymbolResource:f,uri:o.uri},customMeta:{},size:c}}
1async function k(e,t){let r=e.json,n=r.scenes[r.scene||0].nodes,o=n.length>1,s=[];for(let e of n){let t=r.nodes[e];s.push(a(e,0)),t.extensions&&t.extensions.MSFT_lod&&Array.isArray(t.extensions.MSFT_lod.ids)&&!o&&t.extensions.MSFT_lod.ids.forEach((e,t)=>a(e,t+1))}async function a(n,o){let i=r.nodes[n],u=e.getNodeTransform(n);if(V.warnUnsupportedIf(null!=i.weights,"Morph targets are not supported."),null!=i.mesh){let e=r.meshes[i.mesh];for(let r of e.primitives)s.push(t(r,u,o,e.name))}for(let e of i.children||[])s.push(a(e,o))}await Promise.all(s)}let V=new c,H=[d.cw.LINEAR_MIPMAP_LINEAR,d.cw.LINEAR_MIPMAP_NEAREST]},71454:function(e,t,r){function n(e){if(Array.isArray(e)){if(e.length<1024)return e;for(let t of e)if(t>=65536)return new Uint32Array(e);return new Uint16Array(e)}if(e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT)return e;for(let t of e)if(t>=65536)return e;return new Uint16Array(e)}function o(e){let t=3*e;return t<=1024?Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}r.d(t,{$z:function(){return o},DX:function(){return f},mi:function(){return n},p:function(){return u}});let s=(()=>{let e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})(),a=[0],i=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return a;
1if(e<1024)return Array.from(new Uint16Array(i.buffer,0,e));if(e<i.length)return new Uint16Array(i.buffer,0,e);if(e>s.length){s=new Uint32Array(Math.max(2*s.length,e));for(let e=0;e<s.length;e++)s[e]=e}return new Uint32Array(s.buffer,0,e)}function f(e){if(1===e)return a;if(e<1024)return Array.from(new Uint16Array(i.buffer,0,e));if(e<i.length)return new Uint16Array(i.slice(0,e));if(e>s.length){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}return new Uint32Array(s.slice(0,e))}},14634:function(e,t,r){r.d(t,{K:function(){return n}});let n=2.1}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.