1import{aF as m,aG as D}from"./index-ec743896.js";import"./Graphic-b38a95b0.js";import{ea as Q,ax as c,d1 as E,cj as L,ay as W,eb as V,l as b,s as H,eI as B,bx as j,j as h,k as T,Q as k,O as N,bU as q,az as O,fF as J,w as K,a3 as X,ar as Y,aF as Z,fG as ee}from"./projectors-89580c2c.js";import{o as te,p as ie,i as G}from"./mediaLayerUtils-0ceb687f.js";import"./SimpleRenderer-83319c78.js";import"./SimpleMarkerSymbol-561835ce.js";import"./rasterizingUtils-0a47cdf7.js";import"./TextSymbol-57f1eab9.js";import"./CIMSymbolHelper-e15f6174.js";import{p as re,a as se}from"./Tile-177ac237.js";import"./defaults-3796da81.js";import"./OverrideHelper-568fa265.js";import"./EffectView-c733d290.js";import{e as oe}from"./Container-3833bb6a.js";import"./WGLContainer-5a1d0962.js";import"./ProgramTemplate-46761392.js";import{A as P,h as ne}from"./Texture-12c48ff4.js";import"./BufferObject-f9badb60.js";import"./Utils-9f79cbf3.js";import"./MapView-dc83c12e.js";import"./GridShader-880a755e.js";import"./pbf-a4c8b2f7.js";import"./FramebufferObject-95ebe40d.js";import"./FeatureCommandQueue-bb484fd4.js";import"./UpdateTracking2D-0612363e.js";import"./TexturedLineMeshWriter-18c2d939.js";import"./aaBoundingBox-320413aa.js";import"./UnknownTimeZone-2ef5095d.js";import"./fieldUtils-415e03cd.js";import"./renderState-7afaba56.js";import"./glsl-b445156e.js";import"./testSVGPremultipliedAlpha-e4527cb2.js";import"./GraphicsView2D-059bdfed.js";import"./earcut-5a6c70eb.js";import"./vec3f32-5edf24fc.js";import"./normalizeUtils-13dbdedd.js";import"./asyncUtils-c128580c.js";import"./UpdatingHandles-2cbd8cdf.js";import"./projectionUtils-65ca48fc.js";import"./TileKey-a9913e43.js";import{n as ae}from"./vec2f64-1f37f5b9.js";import{h as me,m as pe}from"./utils-470989d6.js";import{f as le}from"./OverlayContainer-58f4a51d.js";import{b as he}from"./LayerView2D-fc9b817c.js";import{d as de}from"./LayerView-36837ce5.js";import{f as ce}from"./Scheduler-b837355d.js";import"./getPopupProvider-997a7607.js";import"./jsonUtils-87334bc8.js";import"./typeUtils-c530565a.js";import"./createFeatureId-0ffcb182.js";import"./typeUtils-24903583.js";import"./screenUtils-c9e101bc.js";import"./PictureMarkerSymbol-ff7b77f8.js";import"./normalizeUtilsSync-8fd9be52.js";import"./normalizeUtilsCommon-305fa5aa.js";import"./vec32-cc67dc50.js";import"./commonProperties-2cdd0fc6.js";import"./colorRamps-136740f8.js";import"./ColorStop-cd3f703c.js";import"./visualVariableUtils-183f75d9.js";import"./lengthUtils-4e4cc01a.js";import"./jsonUtils-f3c6ea51.js";import"./layerUtils-e17c9ca4.js";import"./defaultsJSON-59981e75.js";import"./defaultCIMValues-eec8d472.js";import"./definitions-c9d1325d.js";import"./BidiEngine-2d6f1cc5.js";import"./labelPoint-016a877f.js";import"./OptimizedGeometry-0f89db72.js";import"./memoryEstimations-e39a3b7f.js";import"./GeometryUtils-d806ae25.js";import"./utils-cbb88351.js";import"./fontUtils-90230ac4.js";import"./Rect-ea14f53a.js";import"./BoundingBox-f89c8d18.js";import"./Queue-875ec290.js";import"./ReactiveMap-7d651aa2.js";import"./signal-c6bff383.js";import"./Query-855c25fd.js";import"./Field-545bfca1.js";import"./fieldType-d07b5726.js";import"./arcadeUtils-ff917068.js";import"./quickselect-b7b34c34.js";import"./colorUtils-e66bf786.js";import"./vec42-42452832.js";import"./vec4f64-c1b9eff9.js";import"./FieldsIndex-d079d0d3.js";import"./timeZoneUtils-48a51224.js";import"./ArcadeExpression-e90a0f92.js";import"./TimeOnly-63691752.js";import"./enum-04c2c7e8.js";import"./quantizationUtils-c65f38be.js";import"./parser-e8753ad4.js";import"./mat4f32-176526a0.js";import"./mat4-6eafcee1.js";import"./enums-f9b09dbc.js";import"./VertexArrayObject-bc224e72.js";import"./VertexAttributeLocations-5351167d.js";import"./VertexElementDescriptor-2925c6af.js";import"./VertexBuffer-f34939b0.js";import"./config-1337d16e.js";import"./featureConversionUtils-824de5e1.js";import"./OptimizedFeature-12739fdd.js";import"./OptimizedFeatureSet-5dc8ee29.js";import"./Cyclical-976bf4bf.js";import"./CollectionFlattener-05fbfd0e.js";import"./workers-dcb5a3b8.js";import"./intl-ad646b03.js";import"./GraphicsCollection-ad48d5fc.js";import"./TileInfo-3c4aa26a.js";import"./TileKey-4739c75b.js";
1import"./jsxFactory-f9f03aee.js";import"./uuid-409b6a0c.js";import"./sanitizerUtils-8778e332.js";import"./Map-d496c183.js";import"./Basemap-ed0c857e.js";import"./loadAll-49a2a2f4.js";import"./PortalItem-c1e0ac6b.js";import"./isBasemap-a44d5d0f.js";import"./writeUtils-9d1c4624.js";import"./persistable-061755af.js";import"./MD5-715f37cd.js";import"./multiOriginJSONSupportUtils-c978f4c3.js";import"./resourceExtension-296c26fa.js";import"./PolygonCollection-12c34299.js";import"./TablesMixin-b62f11eb.js";import"./HeightModelInfo-b60513ff.js";import"./unitBezier-0bb0dc5d.js";import"./imageUtils-8d625b3a.js";import"./capabilities-2af38b34.js";import"./Version-ddbf928d.js";import"./GraphShaderModule-476b565e.js";import"./ShaderBuilder-09022b3b.js";import"./utils-3eb62380.js";import"./constants-f7650527.js";import"./CircularArray-50add9d1.js";import"./SymbolFader-fc9d470f.js";import"./constants-cf7964f9.js";import"./streamLayerUtils-f73eea50.js";import"./QueueProcessor-9055de0e.js";import"./TurboLine-f42ccd16.js";import"./DoubleArray-eaf5f7f5.js";import"./mat4f64-78ff2589.js";import"./AttributeStore-9c722d29.js";import"./FeatureStoreQueryAdapter-7f06e073.js";import"./labelUtils-79d85921.js";import"./diffUtils-b5347bb0.js";import"./queryUtils-af9ace68.js";import"./timeSupport-259e31cb.js";import"./FeatureMetadata-10f97293.js";import"./densifyCurvedGeometry-5f027f91.js";import"./dehydratedFeatures-04a91927.js";import"./utils-9bb59dea.js";import"./utils-89e1adff.js";import"./grouping-12ef0594.js";import"./utils-574c1df2.js";import"./utils-959993e6.js";import"./layerViewUtils-caa119a9.js";const F=[1,1],y=j(),ue={none:"None",loop:"Loop",oscillate:"Oscillate"};function ye(t){return t?{type:"CIMAnimatedSymbolProperties",...t,playAnimation:t.playing,repeatType:t.repeatType?ue[t.repeatType]:void 0}:{type:"CIMAnimatedSymbolProperties"}}class fe extends oe{constructor(e){super(),this.elementView=e,this.isWrapAround=!1,this.wrapAroundShift=0,this.perspectiveTransform=ae(),this._handles=new Q,this._vertices=new Float32Array(8),this._indices=new Uint16Array([0,0,0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1,1]),this._handles.add([c(()=>this.elementView.element.opacity,i=>this.opacity=i,E),c(()=>[this.elementView.coords],()=>{this.requestRender()},E),c(()=>["animationOptions"in this.elementView.element&&this.elementView.element.animationOptions],()=>{this.texture=L(this.texture),this.requestRender()},E),W(()=>this.elementView.element.loaded,()=>{const i=this.elementView.element;this.ready(),te(i)&&i.content!=null&&(this._handles.add([V(i.content,"play",()=>this.requestRender()),V(i.content,"loadeddata",()=>this.requestRender()),V(i.content,"loaded",()=>this.requestRender())]),"requestVideoFrameCallback"in i.content?i.content.requestVideoFrameCallback(()=>this.requestRender()):this._handles.add([V(i.content,"seeked",()=>this.requestRender())]),this.requestRender())},E)]),e.element.load().catch(i=>{b.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new H("element-load-error","Element cannot be displayed",{element:e,error:i}))})}getMesh(e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this._handles.destroy(),this.texture=L(this.texture)}get textureSize(){return F}get dvsMat3(){return this.parent.dvsMat3}beforeRender(e){const{context:i}=e,r=this.elementView.element.content;if(r!=null){const s=r instanceof HTMLImageElement,a=r instanceof HTMLVideoElement,p=s?r.naturalWidth:a?r.videoWidth:r.width,n=s?r.naturalHeight:a?r.videoHeight:r.height;if(this._updatePerspectiveTransform(p,n),this.texture)if(a)if(r.readyState>=r.HAVE_CURRENT_DATA)e.animationsEnabled&&this._updateTextureAndRequestRender(r);else{const o=()=>{this._updateTextureAndRequestRender(r),r.removeEventListener("canplay",o),r.removeEventListener("seeked",o)};r.addEventListener("canplay",o),r.addEventListener("seeked",o)}else"getFrame"in r&&e.animationsEnabled&&this.requestRender();else{const o=new ne(p,n);if(o.wrapMode=33071,o.preMultiplyAlpha=!0,"getFrame"in r){const w=u=>{this.texture?this.texture.setData(u):this.texture=new P(i,o,u)};"animationOptions"in this.elementView.element&&(this._player=me(r,ye(this.elementView.element.animationOptions),null,w))}else this.texture=new P(i,o,r);this.texture.generateMipmap(),a&&this._requestVideoFrame(r)}}super.beforeRender(e)}_updateTextureAndRequestRender(e){this.texture.setData(e),this.texture.generateMipmap(),this._requestVideoFrame(e)}_requestVideoFrame(e){"requestVideoFrameCallback"in e?e.requestVideoFrameCallback(()=>this.requestRender()):e.paused||this.requestRender()}_createTransforms(){return null}draw(e,i){this.isReady&&this.texture!=null?(pe(e,this._player),i.render(e,{transform:{dvs:this.dvsMat3},config:{perspective:this.perspectiveTransform,texSize:F,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity,texture:{texture:this.texture,unit:0}},position:this._vertices,tex:this._indices}
1)):this.requestRender()}updateDrawCoords(e,i,r,s){const{coords:a,bounds:p}=this.elementView;if(a==null||p==null)return;const[n,o,w,u]=a.rings[0],z=this._vertices,{x:g,y:x}=e;z.set([o[0]-g,o[1]-x,n[0]-g,n[1]-x,w[0]-g,w[1]-x,u[0]-g,u[1]-x]);let R=i;if(s){const[S,,A]=p,{worldWidth:C,xBounds:I}=s,[$,M]=I;S<$&&A>$?R=C:A>M&&S<M&&(R=-C)}this.wrapAroundShift=R,this.isWrapAround=R!==0}_updatePerspectiveTransform(e,i){const r=this._vertices;ie(y,[0,0,e,0,0,i,e,i],[r[0],r[1],r[4],r[5],r[2],r[3],r[6],r[7]]),B(this.perspectiveTransform,y[6]/y[8]*e,y[7]/y[8]*i)}}let v=class extends k{constructor(t){super(t),this.editSourcePoints=!1}};m([h()],v.prototype,"editSourcePoints",void 0),v=m([T("esri.views.3d.layers.support.MediaLayerInteractionOptions.ReshapeOptions")],v);let d=class extends k{constructor(e){super(e),this.tool="transform",this.reshapeOptions=new v}};m([h()],d.prototype,"tool",void 0),m([h({type:v})],d.prototype,"reshapeOptions",void 0),d=m([T("esri.views.3d.layers.support.MediaLayerInteractionOptions")],d);const _e=t=>{const e=t;let i=class extends e{constructor(...r){super(...r),this.layer=null,this.interactive=!1,this.interactionOptions=new d,this.selectedElement=null}highlight(r,s){throw new Error("missing implementation")}};return m([h()],i.prototype,"layer",void 0),m([h()],i.prototype,"interactive",void 0),m([h({type:d})],i.prototype,"interactionOptions",void 0),m([h()],i.prototype,"selectedElement",void 0),i=m([T("esri.views.layers.MediaLayerView")],i),i};let _=class extends he(_e(de)){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new N}initialize(){this.addHandles([c(()=>[this.interactive,this.suspended],async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:t}=await D(()=>import("./MediaLayerInteraction-d2bbb20e.js"),["assets/MediaLayerInteraction-d2bbb20e.js","assets/index-ec743896.js","assets/index-d75b69d0.css","assets/projectors-89580c2c.js","assets/UpdatingHandles-2cbd8cdf.js","assets/MapView-dc83c12e.js","assets/Texture-12c48ff4.js","assets/Cyclical-976bf4bf.js","assets/enums-f9b09dbc.js","assets/jsonUtils-87334bc8.js","assets/typeUtils-c530565a.js","assets/CollectionFlattener-05fbfd0e.js","assets/workers-dcb5a3b8.js","assets/Queue-875ec290.js","assets/intl-ad646b03.js","assets/GraphicsCollection-ad48d5fc.js","assets/Graphic-b38a95b0.js","assets/getPopupProvider-997a7607.js","assets/fieldUtils-415e03cd.js","assets/createFeatureId-0ffcb182.js","assets/typeUtils-24903583.js","assets/SimpleMarkerSymbol-561835ce.js","assets/screenUtils-c9e101bc.js","assets/aaBoundingBox-320413aa.js","assets/DoubleArray-eaf5f7f5.js","assets/mat4f64-78ff2589.js","assets/TextSymbol-57f1eab9.js","assets/PictureMarkerSymbol-ff7b77f8.js","assets/projectionUtils-65ca48fc.js","assets/TileInfo-3c4aa26a.js","assets/TileKey-4739c75b.js","assets/jsxFactory-f9f03aee.js","assets/uuid-409b6a0c.js","assets/sanitizerUtils-8778e332.js","assets/jsxFactory-cd7ff2fe.css","assets/asyncUtils-c128580c.js","assets/signal-c6bff383.js","assets/Map-d496c183.js","assets/Basemap-ed0c857e.js","assets/loadAll-49a2a2f4.js","assets/PortalItem-c1e0ac6b.js","assets/isBasemap-a44d5d0f.js","assets/writeUtils-9d1c4624.js","assets/layerUtils-e17c9ca4.js","assets/persistable-061755af.js","assets/MD5-715f37cd.js","assets/multiOriginJSONSupportUtils-c978f4c3.js","assets/resourceExtension-296c26fa.js","assets/PolygonCollection-12c34299.js","assets/mat4f32-176526a0.js","assets/mat4-6eafcee1.js","assets/TablesMixin-b62f11eb.js","assets/HeightModelInfo-b60513ff.js","assets/timeZoneUtils-48a51224.js","assets/ReactiveMap-7d651aa2.js","assets/Query-855c25fd.js","assets/Field-545bfca1.js","assets/fieldType-d07b5726.js","assets/vec2f64-1f37f5b9.js","assets/Tile-177ac237.js","assets/TileKey-a9913e43.js","assets/arcadeUtils-ff917068.js","assets/quickselect-b7b34c34.js","assets/normalizeUtils-13dbdedd.js","assets/normalizeUtilsCommon-305fa5aa.js","assets/utils-9bb59dea.js","assets/utils-89e1adff.js","assets/Scheduler-b837355d.js","assets/vec32-cc67dc50.js","assets/unitBezier-0bb0dc5d.js","assets/definitions-c9d1325d.js","assets/imageUtils-8d625b3a.js","assets/capabilities-2af38b34.js","assets/Version-ddbf928d.js"]);this._interaction=new t({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)},q),c(()=>this.interactionOptions,t=>{this._interaction&&(this._interaction.options=t)},q),c(()=>this.selectedElement,t=>{this._interaction&&(this._interaction.selectedElement=t)},q)])}attach(){this.addAttachHandles([O(()=>this.layer.effectiveSource,"refresh",()=>{this._tileStrategy.refresh(t=>this._updateTile(t)),this.requestUpdate()}),O(()=>this.layer.effectiveSource,"change",({element:t})=>this._elementUpdateHandler(t))]),this._overlayContainer=new le,this.container.addChild(this._overlayContainer),this._fetchQueue=new re({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(t,e)=>this._queryElements(t,e),scheduler:this.scheduler,priority:ce.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new se({cachePolicy:"purge",resampling:!0,acquireTile:t=>this._acquireTile(t),releaseTile:t=>this._releaseTile(t),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){var t;this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),(t=this._debugGraphicsView)==null||t.destroy()}supportsSpatialReference(t){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(t){var e;this._tileStrategy.update(t),(e=this._debugGraphicsView)==null||e.update(t)}async hitTest(t,e){const i=[],r=t.normalize(),s=[r.x,r.y];for(const{elementView:{normalizedCoords:a,element:p}}of this._elementReferences.values())a!=null&&J(a.rings,s)&&i.push({type:"media",element:p,layer:this.layer,mapPoint:t,sourcePoint:p.toSource(t)});return i.reverse()}canResume(){return this.layer.source!=null&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh(t=>this._updateTile(t))}_acquireTile(t){const e=new ve(t.clone());return this._updateTile(e),e}_updateTile(t){this._updatingHandles.addPromise(this._fetchQueue.push(t.key).then(e=>{const[i,r]=t.setElements(e);this._referenceElements(t,i),this._dereferenceElements(t,r),this.requestUpdate()},e=>{K(e)||b.getLogger(this).error(e)}))}_releaseTile(t){this._fetchQueue.abort(t.key.id),t.elements&&this._dereferenceElements(t,t.elements),this.requestUpdate()}async _queryElements(t,e){const i=this.layer.effectiveSource;if(i==null)return[];this.view.featuresTilingScheme.getTileBounds(l,t,!0);const r=new X({xmin:l[0],ymin:l[1],xmax:l[2],ymax:l[3],spatialReference:this.view.spatialReference});return i.queryElements(r,e)}_referenceElements(t,e){if(this.layer.source!=null)for(const i of e)this._referenceElement(t,i)}_referenceElement(t,e){Y(this._elementReferences,e.uid,()=>{const i=new G({element:e,spatialReference:this.view.spatialReference}),r=new fe(i);return this._overlayContainer.addChild(r),this.elements.add(e),this._updatingHandles.addPromise(e.load().catch(s=>{b.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new H("element-load-error","Element cannot be displayed",{element:e,error:s}))})),{debugGraphic:null,elementView:i,overlay:r,tiles:new Set}}).tiles.add(t)}_dereferenceElements(t,e){for(const i of e)this._dereferenceElement(t,i)}_dereferenceElement(t,e){var r;const i=this._elementReferences.get(e.uid);i.tiles.delete(t),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),(r=this._debugGraphicsView)==null||r.graphics.remove(i.debugGraphic))}_elementUpdateHandler(t){var r;let e=this._elementReferences.get(t.uid);if(e){const s=e.elementView.normalizedCoords;if(s==null)return this._overlayContainer.removeChild(e.overlay),e.overlay.destroy(),e.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),void((r=this._debugGraphicsView)==null?void 0:r.graphics.remove(e.debugGraphic));const a=[],p=[];for(const n of this._tileStrategy.tiles){const o=U(this.view.featuresTilingScheme,n,s);e.tiles.has(n)?o||p.push(n):o&&a.push(n)}for(const n of a)this._referenceElement(n,t);for(const n of p)this._dereferenceElement(n,t);return e=this._elementReferences.get(t.uid),void((e==null?void 0:e.debugGraphic)&&(e.debugGraphic.geometry=e.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:e.debugGraphic,property:"geometry"})))}const i=new G({element:t,spatialReference:this.view.spatialReference}).normalizedCoords;if(i!=null)for(const s of this._tileStrategy.tiles)U(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,t)}};m([h()],_.prototype,"layer",void 0),m([h({readOnly:!0})],_.prototype,"elements",void 0),_=m([T("esri.views.2d.layers.MediaLayerView2D")],_);const l=Z(),f={xmin:0,ymin:0,xmax:0,ymax:0};function U(t,e,i){return t.getTileBounds(l,e.key,!0),f.xmin=l[0],f.ymin=l[1],f.xmax=l[2],f.ymax=l[3],ee(f,i)}class ve{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const i=[],r=new Set(this.elements);this.elements=e;for(const s of e)r.has(s)?r.delete(s):i.push(s);return this.isReady=!0,[i,Array.from(r)]}destroy(){}}const fr=_;export{fr as default};
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.