@arcgis/map-components 5.2.0-next.129 → 5.2.0-next.130

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.
Files changed (160) hide show
  1. package/dist/cdn/{XHF3WRCS.js → 4IQGYUKD.js} +1 -1
  2. package/dist/cdn/{EFTRT3PC.js → 4J5X3RUS.js} +1 -1
  3. package/dist/cdn/{ZNFXHSNB.js → 4XLFPSJA.js} +1 -1
  4. package/dist/cdn/{2FXJBJQN.js → 5F5KCXDO.js} +1 -1
  5. package/dist/cdn/5S4BCDOW.js +2 -0
  6. package/dist/cdn/{4Q5CHT35.js → 5W3B6N7U.js} +1 -1
  7. package/dist/cdn/{YXFHYEU3.js → 7EJR45XN.js} +1 -1
  8. package/dist/cdn/{Q6QM5JFF.js → 7YFZUDWN.js} +1 -1
  9. package/dist/cdn/{S5NMZQ7S.js → AB5ED2JR.js} +1 -1
  10. package/dist/cdn/{XIU3BXC4.js → BAHKHMBR.js} +1 -1
  11. package/dist/cdn/BAOWXZTE.js +2 -0
  12. package/dist/cdn/BEAV4EJ5.js +2 -0
  13. package/dist/cdn/{SI275RZJ.js → BMMTFWDL.js} +1 -1
  14. package/dist/cdn/{YPW4CF4Y.js → BQ7NE3DK.js} +1 -1
  15. package/dist/cdn/{B62BAX3X.js → CWCTE5IC.js} +1 -1
  16. package/dist/cdn/{3AHZESDA.js → EF7GIYDU.js} +1 -1
  17. package/dist/cdn/EL7UV72L.js +2 -0
  18. package/dist/cdn/{FJREYXK7.js → ERHYWMHC.js} +1 -1
  19. package/dist/cdn/{XPIYOTEC.js → EV3HM55D.js} +1 -1
  20. package/dist/cdn/{5S3AIVW2.js → F3I3X5LJ.js} +1 -1
  21. package/dist/cdn/{JALZMYVE.js → F6AE2AOX.js} +1 -1
  22. package/dist/cdn/{WWASAY4M.js → I2ADFUKC.js} +1 -1
  23. package/dist/cdn/{UCX6CLDZ.js → JDF3QJHI.js} +1 -1
  24. package/dist/cdn/{ML3CEDNN.js → JMKQ5ZE3.js} +1 -1
  25. package/dist/cdn/{DFPVC4EG.js → JNNG6SGW.js} +1 -1
  26. package/dist/cdn/{HOBKD5P4.js → JXXITWQ3.js} +1 -1
  27. package/dist/cdn/JYFFD5QA.js +2 -0
  28. package/dist/cdn/{XFD7GEAG.js → K3TUMGVI.js} +1 -1
  29. package/dist/cdn/{GK6NLJ6Q.js → MCU53PRF.js} +1 -1
  30. package/dist/cdn/{Q2MFXSAM.js → N6IIYBKZ.js} +1 -1
  31. package/dist/cdn/{L5FBV74B.js → NST47N4L.js} +1 -1
  32. package/dist/cdn/{7XKNWVD4.js → ORZZVKYZ.js} +1 -1
  33. package/dist/cdn/OSMCEUNX.js +2 -0
  34. package/dist/cdn/{3FO2I44H.js → QAXZ4V3U.js} +1 -1
  35. package/dist/cdn/{VLDII7DK.js → QJWPUYT2.js} +1 -1
  36. package/dist/cdn/{3NUE2TJM.js → R54YGQ26.js} +1 -1
  37. package/dist/cdn/{2DJC25HT.js → RQ3C7MN3.js} +1 -1
  38. package/dist/cdn/{D2ILHVVB.js → RXRZKDP2.js} +1 -1
  39. package/dist/cdn/{2RYNWWMR.js → T6GHF2C6.js} +1 -1
  40. package/dist/cdn/{XUSJST2P.js → U3MXAIIV.js} +1 -1
  41. package/dist/cdn/{RA5SRNJJ.js → UGZMQPKL.js} +1 -1
  42. package/dist/cdn/{3QZFSJJZ.js → UONIIMIO.js} +1 -1
  43. package/dist/cdn/{7QUUVOSA.js → WH6A6PWO.js} +1 -1
  44. package/dist/cdn/{TWR7AJTM.js → WO4RKS5X.js} +1 -1
  45. package/dist/cdn/{JXODHIWF.js → WSJLW4KK.js} +1 -1
  46. package/dist/cdn/{EQ4D5HAS.js → XR33HMFY.js} +1 -1
  47. package/dist/cdn/XUUOPL4Q.js +2 -0
  48. package/dist/cdn/{7AM3AAIM.js → YIXQRLNL.js} +1 -1
  49. package/dist/cdn/YPRBAWD7.js +2 -0
  50. package/dist/cdn/{GE5OI5A7.js → ZTJ5RKET.js} +1 -1
  51. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/sketch/t9n/messages.en.json +1 -1
  53. package/dist/cdn/assets/time-bar/t9n/messages.ar.json +1 -1
  54. package/dist/cdn/assets/time-bar/t9n/messages.bg.json +1 -1
  55. package/dist/cdn/assets/time-bar/t9n/messages.bs.json +1 -1
  56. package/dist/cdn/assets/time-bar/t9n/messages.ca.json +1 -1
  57. package/dist/cdn/assets/time-bar/t9n/messages.cs.json +1 -1
  58. package/dist/cdn/assets/time-bar/t9n/messages.da.json +1 -1
  59. package/dist/cdn/assets/time-bar/t9n/messages.de.json +1 -1
  60. package/dist/cdn/assets/time-bar/t9n/messages.el.json +1 -1
  61. package/dist/cdn/assets/time-bar/t9n/messages.es.json +1 -1
  62. package/dist/cdn/assets/time-bar/t9n/messages.et.json +1 -1
  63. package/dist/cdn/assets/time-bar/t9n/messages.fi.json +1 -1
  64. package/dist/cdn/assets/time-bar/t9n/messages.fr.json +1 -1
  65. package/dist/cdn/assets/time-bar/t9n/messages.he.json +1 -1
  66. package/dist/cdn/assets/time-bar/t9n/messages.hr.json +1 -1
  67. package/dist/cdn/assets/time-bar/t9n/messages.hu.json +1 -1
  68. package/dist/cdn/assets/time-bar/t9n/messages.id.json +1 -1
  69. package/dist/cdn/assets/time-bar/t9n/messages.it.json +1 -1
  70. package/dist/cdn/assets/time-bar/t9n/messages.ja.json +1 -1
  71. package/dist/cdn/assets/time-bar/t9n/messages.ko.json +1 -1
  72. package/dist/cdn/assets/time-bar/t9n/messages.lt.json +1 -1
  73. package/dist/cdn/assets/time-bar/t9n/messages.lv.json +1 -1
  74. package/dist/cdn/assets/time-bar/t9n/messages.nl.json +1 -1
  75. package/dist/cdn/assets/time-bar/t9n/messages.no.json +1 -1
  76. package/dist/cdn/assets/time-bar/t9n/messages.pl.json +1 -1
  77. package/dist/cdn/assets/time-bar/t9n/messages.pt-BR.json +1 -1
  78. package/dist/cdn/assets/time-bar/t9n/messages.pt-PT.json +1 -1
  79. package/dist/cdn/assets/time-bar/t9n/messages.ro.json +1 -1
  80. package/dist/cdn/assets/time-bar/t9n/messages.ru.json +1 -1
  81. package/dist/cdn/assets/time-bar/t9n/messages.sk.json +1 -1
  82. package/dist/cdn/assets/time-bar/t9n/messages.sl.json +1 -1
  83. package/dist/cdn/assets/time-bar/t9n/messages.sr.json +1 -1
  84. package/dist/cdn/assets/time-bar/t9n/messages.sv.json +1 -1
  85. package/dist/cdn/assets/time-bar/t9n/messages.th.json +1 -1
  86. package/dist/cdn/assets/time-bar/t9n/messages.tr.json +1 -1
  87. package/dist/cdn/assets/time-bar/t9n/messages.uk.json +1 -1
  88. package/dist/cdn/assets/time-bar/t9n/messages.vi.json +1 -1
  89. package/dist/cdn/assets/time-bar/t9n/messages.zh-CN.json +1 -1
  90. package/dist/cdn/assets/time-bar/t9n/messages.zh-HK.json +1 -1
  91. package/dist/cdn/assets/time-bar/t9n/messages.zh-TW.json +1 -1
  92. package/dist/cdn/index.js +1 -1
  93. package/dist/chunks/measurementUtils.js +35 -27
  94. package/dist/chunks/svgUtils.js +1 -1
  95. package/dist/chunks/univariateUtils.js +1 -1
  96. package/dist/chunks/utils.js +75 -7
  97. package/dist/chunks/utils2.js +50 -74
  98. package/dist/chunks/utils3.js +13 -50
  99. package/dist/chunks/utils4.js +45 -13
  100. package/dist/chunks/utils5.js +48 -44
  101. package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +9 -1
  102. package/dist/components/arcgis-area-measurement-2d/customElement.js +18 -12
  103. package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +9 -1
  104. package/dist/components/arcgis-area-measurement-3d/customElement.js +18 -12
  105. package/dist/components/arcgis-basemap-layer-list-next/customElement.js +1 -1
  106. package/dist/components/arcgis-building-discipline-tree/customElement.js +79 -79
  107. package/dist/components/arcgis-building-explorer/customElement.js +22 -22
  108. package/dist/components/arcgis-building-level-item/customElement.js +9 -9
  109. package/dist/components/arcgis-building-level-picker/customElement.js +16 -16
  110. package/dist/components/arcgis-building-phase-picker/customElement.js +25 -22
  111. package/dist/components/arcgis-compass/customElement.js +1 -1
  112. package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +9 -1
  113. package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +15 -9
  114. package/dist/components/arcgis-directional-pad/DirectionalPadViewModel.d.ts +1 -0
  115. package/dist/components/arcgis-directional-pad/customElement.d.ts +2 -2
  116. package/dist/components/arcgis-directional-pad/customElement.js +190 -46
  117. package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +9 -1
  118. package/dist/components/arcgis-distance-measurement-2d/customElement.js +34 -28
  119. package/dist/components/arcgis-elevation-profile/customElement.d.ts +18 -0
  120. package/dist/components/arcgis-elevation-profile/customElement.js +27 -25
  121. package/dist/components/arcgis-layer-list-item-panel/customElement.js +1 -1
  122. package/dist/components/arcgis-layer-list-next/customElement.js +1 -1
  123. package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
  124. package/dist/components/arcgis-legend-card-color-ramp/customElement.js +1 -1
  125. package/dist/components/arcgis-legend-card-element/customElement.js +1 -1
  126. package/dist/components/arcgis-legend-card-size-ramp/customElement.js +1 -1
  127. package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +1 -1
  128. package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
  129. package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +1 -1
  130. package/dist/components/arcgis-legend-spike-ramp/customElement.js +1 -1
  131. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +1 -1
  132. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.js +1 -1
  133. package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
  134. package/dist/components/arcgis-print-export-button/customElement.js +1 -1
  135. package/dist/components/arcgis-print-format-select/customElement.js +1 -1
  136. package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
  137. package/dist/components/arcgis-print-template-select/customElement.js +1 -1
  138. package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
  139. package/dist/components/arcgis-search/customElement.js +1 -1
  140. package/dist/components/arcgis-selection-list/customElement.js +28 -28
  141. package/dist/components/arcgis-sketch/customElement.d.ts +0 -4
  142. package/dist/components/arcgis-volume-measurement/customElement.d.ts +48 -5
  143. package/dist/components/arcgis-volume-measurement/customElement.js +47 -46
  144. package/dist/docs/api.json +1 -1
  145. package/dist/docs/docs.json +1 -1
  146. package/dist/docs/vscode.html-custom-data.json +1 -1
  147. package/dist/docs/web-types.json +1 -1
  148. package/package.json +6 -6
  149. package/dist/cdn/35M4DQZK.js +0 -2
  150. package/dist/cdn/6PE3IB3H.js +0 -2
  151. package/dist/cdn/G5VPRDMX.js +0 -2
  152. package/dist/cdn/JF4LCL3J.js +0 -2
  153. package/dist/cdn/JNQEJQFS.js +0 -2
  154. package/dist/cdn/MRFX6GG4.js +0 -2
  155. package/dist/cdn/SLLE4XAR.js +0 -2
  156. package/dist/cdn/WQISNLF7.js +0 -2
  157. /package/dist/cdn/{7DI2ZSB3.js → 3ZXNGXHC.js} +0 -0
  158. /package/dist/cdn/{SKNX46RX.js → DL57EVZ4.js} +0 -0
  159. /package/dist/cdn/{FUQUIU52.js → E6IRF6JO.js} +0 -0
  160. /package/dist/cdn/{MDTNPISF.js → VDTRRLON.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as he,b as ce,c as me}from"./MDTNPISF.js";import c from"./3WTBTYMS.js";import b from"./XJJQGFWN.js";import a from"./QZ5LJH35.js";import"./VJVKFKSG.js";import{a as se}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{N as H,O as U,P as ie,W as oe,a as ee,b as O,p as te}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,pe,Z,W,Le,X,{createSphere:Re},Fe,Ne,$e,{b:I,c:ae,d:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Re(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function Je(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=Je(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Ae({components:[y],vertexAttributes:new Le({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},J=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},q=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Pe({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new J({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},qe=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&qe(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Fe({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new q(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Extent","geometry/Mesh","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","layers/ImageryTileLayer","symbols/Font","symbols/TextSymbol",a,b,c)
2
+ import{a as he,b as ce,c as me}from"./VDTRRLON.js";import c from"./3WTBTYMS.js";import b from"./XJJQGFWN.js";import a from"./QZ5LJH35.js";import"./VJVKFKSG.js";import{a as se}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{N as H,O as U,P as ie,W as oe,a as ee,b as O,p as te}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,pe,Z,W,Le,X,{createSphere:Re},Fe,Ne,$e,{b:I,c:ae,d:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Re(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function Je(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=Je(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Ae({components:[y],vertexAttributes:new Le({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},J=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},q=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Pe({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new J({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},qe=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&qe(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Fe({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new q(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Extent","geometry/Mesh","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","layers/ImageryTileLayer","symbols/Font","symbols/TextSymbol",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./ZNFXHSNB.js";import b from"./SKNX46RX.js";import a from"./YU5BTZEI.js";import{P as u,R as n,S as e,W as $,a as w,b as i}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,{a:x,b:d,d:p,e:z,g:v,h:o,i:E}])=>{var H=w`.layer-body{display:table}.layer-row{display:table-row}.layer-cell{display:table-cell;padding:var(--calcite-space-2xs) 0;min-width:100px;vertical-align:middle;word-break:break-word}.layer-cell-info{padding-right:var(--calcite-space-sm);padding-left:var(--calcite-space-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.symbol{display:flex;justify-content:center}.ramps{margin-left:var(--calcite-space-md)}:dir(rtl) .ramps{margin-right:var(--calcite-space-md);margin-left:auto}.ramp-labels{display:flex;flex-flow:column nowrap;justify-content:space-between}.ramp-label{position:relative;padding:0 var(--calcite-space-sm);line-height:1em;white-space:nowrap;font-size:var(--calcite-font-size-sm)}.ramp-label:before{display:block;position:absolute;top:.25em;right:100%;border-width:3px 4px 3px 0;border-style:solid;border-color:transparent var(--calcite-color-text-1) transparent transparent;width:0;height:0;content:""}.ramp-label:first-child{margin-top:calc(var(--calcite-font-size-sm) / 3 * -1)}.ramp-label:last-child{bottom:calc(var(--calcite-font-size-sm) * .25 * -1)}:dir(rtl) .ramp-label:before{right:auto;left:100%;border-width:3px 0 3px 4px;border-color:transparent transparent transparent var(--calcite-color-text-1)}.univariate-above-below-label{position:relative;margin-left:7px;line-height:1em;white-space:nowrap;font-size:var(--calcite-font-size-sm)}.univariate-above-below-label:before{display:block;position:absolute;top:.45em;left:-19px;border-width:1px 0 0;border-style:solid;width:14px;height:0;content:""}.univariate-above-below-label:first-child{top:calc(var(--calcite-font-size-sm) / 2.2 * -1)}.univariate-above-below-label:last-child{bottom:calc(var(--calcite-font-size-sm) / 2.2 * -1)}:dir(rtl) .univariate-above-below-label{margin-right:var(--calcite-space-sm);margin-left:auto}:dir(rtl) .univariate-above-below-label:before{right:-19px;left:auto}.univariate-above-below-symbol{display:flex;align-items:center;justify-content:center}`,m=class extends u{constructor(){super(...arguments),this.legendElement=null,this.opacity=1}static{this.properties={cssEffectFilter:1,legendElement:0,opacity:9,messages:0}}static{this.styles=H}render(){let{legendElement:A,opacity:c}=this,{sizeRampElement:t,colorRampElement:b}=z(A,this.messages,c);if(!t)return null;let f=this.messages.previewColorRampAriaLabel,h=p(t,"above",!0),y=p(t,"below",!0),g=12,s=d(b,{width:g,height:h,rampAlignment:"vertical",opacity:c,type:"above",cssEffectFilter:this.cssEffectFilter,ariaLabel:f}),k=d(b,{width:g,height:y,rampAlignment:"vertical",opacity:c,type:"below",cssEffectFilter:this.cssEffectFilter,ariaLabel:f}),F=x(t),r=t.infos.map(a=>a.label),L=r.map((a,l)=>l===0?i`<div class=${n(a?s?"univariate-above-below-label":"ramp-label":void 0)}>${a}</div>`:l===2?i`<div></div>`:null),R=r.length-1,j=Math.floor(r.length/2),C=r.map((a,l)=>l===j||l===R?i`<div class=${n(a?s?"univariate-above-below-label":"ramp-label":void 0)}>${a}</div>`:null),M={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${F}px`},S={height:`${h}px`},U={height:`${y}px`};return i`<div style=${e(E)}><div class="layer-body">${t.infos.map((a,l)=>i`<div class="layer-row"><div class="symbol" style=${e(M)}>${a.preview}</div>${!s&&l%2===0?i`<div class="layer-cell layer-cell-info">${r[l]}</div>`:null}</div>`)}</div>${s?i`<div style=${e(B)}><div style=${e(v)}><div style=${e(o)}><div class="ramps">${s}</div></div><div style=${e(o)}><div class="ramp-labels" style=${e(S)}>${L}</div></div></div><div style=${e(v)}><div style=${e(o)}><div class="ramps">${k}</div></div><div style=${e(o)}><div class="ramp-labels" style=${e(U)}>${C}</div></div></div></div>`:null}</div>`}};$("arcgis-legend-classic-univariate-above-and-below-ramp",m);return m},a,b,c)
2
+ import c from"./4XLFPSJA.js";import b from"./DL57EVZ4.js";import a from"./YU5BTZEI.js";import{P as u,R as n,S as e,W as $,a as w,b as i}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,{a:x,b:d,d:p,e:z,g:v,h:o,i:E}])=>{var H=w`.layer-body{display:table}.layer-row{display:table-row}.layer-cell{display:table-cell;padding:var(--calcite-space-2xs) 0;min-width:100px;vertical-align:middle;word-break:break-word}.layer-cell-info{padding-right:var(--calcite-space-sm);padding-left:var(--calcite-space-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.symbol{display:flex;justify-content:center}.ramps{margin-left:var(--calcite-space-md)}:dir(rtl) .ramps{margin-right:var(--calcite-space-md);margin-left:auto}.ramp-labels{display:flex;flex-flow:column nowrap;justify-content:space-between}.ramp-label{position:relative;padding:0 var(--calcite-space-sm);line-height:1em;white-space:nowrap;font-size:var(--calcite-font-size-sm)}.ramp-label:before{display:block;position:absolute;top:.25em;right:100%;border-width:3px 4px 3px 0;border-style:solid;border-color:transparent var(--calcite-color-text-1) transparent transparent;width:0;height:0;content:""}.ramp-label:first-child{margin-top:calc(var(--calcite-font-size-sm) / 3 * -1)}.ramp-label:last-child{bottom:calc(var(--calcite-font-size-sm) * .25 * -1)}:dir(rtl) .ramp-label:before{right:auto;left:100%;border-width:3px 0 3px 4px;border-color:transparent transparent transparent var(--calcite-color-text-1)}.univariate-above-below-label{position:relative;margin-left:7px;line-height:1em;white-space:nowrap;font-size:var(--calcite-font-size-sm)}.univariate-above-below-label:before{display:block;position:absolute;top:.45em;left:-19px;border-width:1px 0 0;border-style:solid;width:14px;height:0;content:""}.univariate-above-below-label:first-child{top:calc(var(--calcite-font-size-sm) / 2.2 * -1)}.univariate-above-below-label:last-child{bottom:calc(var(--calcite-font-size-sm) / 2.2 * -1)}:dir(rtl) .univariate-above-below-label{margin-right:var(--calcite-space-sm);margin-left:auto}:dir(rtl) .univariate-above-below-label:before{right:-19px;left:auto}.univariate-above-below-symbol{display:flex;align-items:center;justify-content:center}`,m=class extends u{constructor(){super(...arguments),this.legendElement=null,this.opacity=1}static{this.properties={cssEffectFilter:1,legendElement:0,opacity:9,messages:0}}static{this.styles=H}render(){let{legendElement:A,opacity:c}=this,{sizeRampElement:t,colorRampElement:b}=z(A,this.messages,c);if(!t)return null;let f=this.messages.previewColorRampAriaLabel,h=p(t,"above",!0),y=p(t,"below",!0),g=12,s=d(b,{width:g,height:h,rampAlignment:"vertical",opacity:c,type:"above",cssEffectFilter:this.cssEffectFilter,ariaLabel:f}),k=d(b,{width:g,height:y,rampAlignment:"vertical",opacity:c,type:"below",cssEffectFilter:this.cssEffectFilter,ariaLabel:f}),F=x(t),r=t.infos.map(a=>a.label),L=r.map((a,l)=>l===0?i`<div class=${n(a?s?"univariate-above-below-label":"ramp-label":void 0)}>${a}</div>`:l===2?i`<div></div>`:null),R=r.length-1,j=Math.floor(r.length/2),C=r.map((a,l)=>l===j||l===R?i`<div class=${n(a?s?"univariate-above-below-label":"ramp-label":void 0)}>${a}</div>`:null),M={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${F}px`},S={height:`${h}px`},U={height:`${y}px`};return i`<div style=${e(E)}><div class="layer-body">${t.infos.map((a,l)=>i`<div class="layer-row"><div class="symbol" style=${e(M)}>${a.preview}</div>${!s&&l%2===0?i`<div class="layer-cell layer-cell-info">${r[l]}</div>`:null}</div>`)}</div>${s?i`<div style=${e(B)}><div style=${e(v)}><div style=${e(o)}><div class="ramps">${s}</div></div><div style=${e(o)}><div class="ramp-labels" style=${e(S)}>${L}</div></div></div><div style=${e(v)}><div style=${e(o)}><div class="ramps">${k}</div></div><div style=${e(o)}><div class="ramp-labels" style=${e(U)}>${C}</div></div></div></div>`:null}</div>`}};$("arcgis-legend-classic-univariate-above-and-below-ramp",m);return m},a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./SSNCB7LI.js";import{i as n}from"./G5VPRDMX.js";import{a as l}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{P as r,W as c,a as i,b as a,x as o}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";var h=i`:host{width:100%}.root{--calcite-label-margin-bottom: 0;width:100%}calcite-radio-button-group{padding:var(--calcite-spacing-sm)}`,e=class extends r{constructor(){super(...arguments),this.messages=l({}),this.options=[],this.scale="m",this.layout="block",this.arcgisUnitSelectChange=o()}static{this.properties={options:[1,{type:Array}],scale:1,name:1,value:0,messageOverrides:0,label:1,layout:1}}static{this.styles=h}async destroy(){await this.manager.destroy()}render(){let{messages:s,options:u=[],name:p,value:d,arcgisUnitSelectChange:g}=this;return a`<calcite-radio-button-group layout=vertical .name=${p} @calciteRadioButtonGroupChange=${t=>{g.emit(t.target.selectedItem?.value)}} .scale=${this.scale}>${u.map(t=>a`<calcite-label layout=inline .scale=${this.scale}>${m(t,a`<calcite-radio-button .checked=${t===d} .scale=${this.scale} .value=${t}></calcite-radio-button>`)}${n(t)?s.systems?.[t]:s.units?.[t]}</calcite-label>`)}</calcite-radio-button-group>`}};c("arcgis-unit-radio-button-group",e);export{e as ArcgisUnitRadioButtonGroup};
2
+ import{a as m}from"./SSNCB7LI.js";import{i as n}from"./BAOWXZTE.js";import{a as l}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{P as r,W as c,a as i,b as a,x as o}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";var h=i`:host{width:100%}.root{--calcite-label-margin-bottom: 0;width:100%}calcite-radio-button-group{padding:var(--calcite-spacing-sm)}`,e=class extends r{constructor(){super(...arguments),this.messages=l({}),this.options=[],this.scale="m",this.layout="block",this.arcgisUnitSelectChange=o()}static{this.properties={options:[1,{type:Array}],scale:1,name:1,value:0,messageOverrides:0,label:1,layout:1}}static{this.styles=h}async destroy(){await this.manager.destroy()}render(){let{messages:s,options:u=[],name:p,value:d,arcgisUnitSelectChange:g}=this;return a`<calcite-radio-button-group layout=vertical .name=${p} @calciteRadioButtonGroupChange=${t=>{g.emit(t.target.selectedItem?.value)}} .scale=${this.scale}>${u.map(t=>a`<calcite-label layout=inline .scale=${this.scale}>${m(t,a`<calcite-radio-button .checked=${t===d} .scale=${this.scale} .value=${t}></calcite-radio-button>`)}${n(t)?s.systems?.[t]:s.units?.[t]}</calcite-label>`)}</calcite-radio-button-group>`}};c("arcgis-unit-radio-button-group",e);export{e as ArcgisUnitRadioButtonGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import j from"./KS2KPSVW.js";import{a as $,b as S,d as h,g as l,j as U,k as V}from"./G5VPRDMX.js";import{a as u}from"./POKO37D3.js";import i from"./QZ5LJH35.js";import"./VJVKFKSG.js";import e from"./CBB2T3RI.js";import{a as D}from"./OHCCNZCY.js";import{a as p}from"./JD74LG7K.js";import d from"./75OH7AOP.js";import c from"./CODEI67F.js";import{h as k}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import a from"./7XCYURYF.js";import"./QUZTFUWM.js";import{b as y}from"./4TV72DOP.js";import"./XURWCCLX.js";import{P as f,R as v,T as b,W as x,a as _,b as g,x as w}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{isAboveGeodesicDistanceThreshold:C},{property:c,subclass:E},{watch:P},,,,M,{e:z},O])=>{var A=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:var(--arcgis-internal-panel-width, 300px)}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}`,B=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(t,e,r,o)=>{for(var i=o>1?void 0:o?T(e,r):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(i=(o?d(e,r,i):d(i))||i);return o&&i&&B(e,r,i),i},a=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(P(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:t,unit:e})=>{e&&(t.unit=e)},{sync:!0,initial:!0}))}get state(){let{analysis:t,disabled:e,operationState:r,ready:o,supported:i}=this,{valid:n}=t;return $({supported:i,disabled:e,ready:o,operationState:r,valid:n})}get displayState(){return S(this.state,!!this.analysis.startPoint)}get measurement(){let t=this.analysisView?.result,e=t?.mode??"euclidean";if(!this.analysis.valid)return{mode:e,directDistance:l(void 0),horizontalDistance:l(void 0),verticalDistance:l(void 0)};let r=t?.directDistance,o=r!=null&&C(r);return{mode:e,directDistance:l(o?void 0:r),horizontalDistance:l(t?.horizontalDistance),verticalDistance:l(t?.verticalDistance)}}get unitOptions(){return U(this._userUnitOptions,h,h)}set unitOptions(t){this._userUnitOptions=t}get unit(){return V(this._userUnit,this.analysis.unit,this.unitOptions,this.defaultMeasurementSystem)}set unit(t){this._userUnit=t}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new j}};s([c({readOnly:!0})],a.prototype,"state",1);s([c({readOnly:!0})],a.prototype,"displayState",1);s([c({readOnly:!0})],a.prototype,"measurement",1);s([c()],a.prototype,"unitOptions",1);s([c()],a.prototype,"_userUnitOptions",2);s([c()],a.prototype,"unit",1);s([c()],a.prototype,"_userUnit",2);a=s([E("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],a);var G=M(a),m=class extends f{constructor(){super(...arguments),this.viewModel=G(this),this.messages=D({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=A}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:e,unit:r,unitOptions:o,viewModel:i}=this,{measurement:n,state:d}=i;return g`<div aria-label=${e.componentLabel??b} class=${v(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${i.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.direct,measurement:n.directDistance},{title:e.horizontal,measurement:n.horizontalDistance},{title:e.vertical,measurement:n.verticalDistance}]}>${u({hidden:this.hideUnitSelect,children:g`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${r} @arcgisUnitSelectChange=${L=>{this.unit=L.detail}}></arcgis-unit-select>`})}${u({hidden:this.hideStartButton,children:g`<calcite-button slot=actions .disabled=${d==="disabled"||d==="unsupported"||this.interactionDisabled} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-direct-line-measurement-3d",m);return m},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,c,d,e,i,j)
2
+ import j from"./KS2KPSVW.js";import{a as U,b as $,d as h,g as l,j as S,k as V}from"./BAOWXZTE.js";import{a as u}from"./POKO37D3.js";import i from"./QZ5LJH35.js";import"./VJVKFKSG.js";import e from"./CBB2T3RI.js";import{a as D}from"./OHCCNZCY.js";import{a as p}from"./JD74LG7K.js";import d from"./75OH7AOP.js";import c from"./CODEI67F.js";import{h as k}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import a from"./7XCYURYF.js";import"./QUZTFUWM.js";import{b as y}from"./4TV72DOP.js";import"./XURWCCLX.js";import{P as f,R as v,T as b,W as x,a as _,b as g,x as w}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{isAboveGeodesicDistanceThreshold:C},{property:c,subclass:E},{watch:P},,,,M,{e:z},O])=>{var A=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:var(--arcgis-internal-panel-width, 300px)}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}`,B=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(t,e,r,o)=>{for(var i=o>1?void 0:o?T(e,r):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(i=(o?d(e,r,i):d(i))||i);return o&&i&&B(e,r,i),i},a=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(P(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:t,unit:e})=>{e&&(t.unit=e)},{sync:!0,initial:!0}))}get state(){let{analysis:t,disabled:e,operationState:r,ready:o,supported:i}=this,{valid:n}=t;return U({supported:i,disabled:e,ready:o,operationState:r,valid:n})}get displayState(){return $(this.state,!!this.analysis.startPoint)}get measurement(){let t=this.analysisView?.result,e=t?.mode??"euclidean";if(!this.analysis.valid)return{mode:e,directDistance:l(void 0),horizontalDistance:l(void 0),verticalDistance:l(void 0)};let r=t?.directDistance,o=r!=null&&C(r);return{mode:e,directDistance:l(o?void 0:r),horizontalDistance:l(t?.horizontalDistance),verticalDistance:l(t?.verticalDistance)}}get unitOptions(){return S(this._userUnitOptions,h,h)}set unitOptions(t){this._userUnitOptions=t}get unit(){return V({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set unit(t){this._userUnit=t}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new j}};s([c({readOnly:!0})],a.prototype,"state",1);s([c({readOnly:!0})],a.prototype,"displayState",1);s([c({readOnly:!0})],a.prototype,"measurement",1);s([c()],a.prototype,"unitOptions",1);s([c()],a.prototype,"_userUnitOptions",2);s([c()],a.prototype,"unit",1);s([c()],a.prototype,"_userUnit",2);a=s([E("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],a);var G=M(a),m=class extends f{constructor(){super(...arguments),this.viewModel=G(this),this.messages=D({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=A}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:e,unit:r,unitOptions:o,viewModel:i}=this,{measurement:n,state:d}=i;return g`<div aria-label=${e.componentLabel??b} class=${v(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${i.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.direct,measurement:n.directDistance},{title:e.horizontal,measurement:n.horizontalDistance},{title:e.vertical,measurement:n.verticalDistance}]}>${u({hidden:this.hideUnitSelect,children:g`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${r} @arcgisUnitSelectChange=${L=>{this.unit=L.detail}}></arcgis-unit-select>`})}${u({hidden:this.hideStartButton,children:g`<calcite-button slot=actions .disabled=${d==="disabled"||d==="unsupported"||this.interactionDisabled} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-direct-line-measurement-3d",m);return m},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,c,d,e,i,j)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as p,b as A,c as D,d as B,e as m,f as T,g as V,h as k}from"./5S4BCDOW.js";import{a as S}from"./4MJJOPAL.js";import{a as u}from"./SSNCB7LI.js";import i from"./CBB2T3RI.js";import{a as R}from"./OHCCNZCY.js";import{a as v}from"./JD74LG7K.js";import e from"./75OH7AOP.js";import d from"./CODEI67F.js";import{h as C}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import a from"./7XCYURYF.js";import"./QUZTFUWM.js";import{g as x}from"./4TV72DOP.js";import"./XURWCCLX.js";import{O as f,P as w,R as y,S as M,T as h,W as $,a as g,b as c,x as b}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:L},{EventedAccessor:O},{property:r,subclass:I},{i:E},,,P])=>{var N=Object.defineProperty,U=Object.getOwnPropertyDescriptor,a=(n,t,e,i)=>{for(var o=i>1?void 0:i?U(t,e):t,d=n.length-1,l;d>=0;d--)(l=n[d])&&(o=(i?l(t,e,o):l(o))||o);return i&&o&&N(t,e,o),o},s=class extends O{constructor(n){super(n),this._anyAngleMovementEnabled=!1,this._disabled=!1,this._moveOnceDuration=A,this.speed=1,this.beginFollowingPointer=(t,e)=>{if(this.disabled)return;this._widgetCenter=e;let i=this._pointerLocationToVector(t);if(i===void 0)return;let o=this._resolveClosestAngle(t,i);o!==void 0&&(this._emitMove(m(o)),this.angle=o,this._initialAngle=o,this._setMovementTimeout(()=>{this._widgetCenter===void 0&&this._stopMovement()}),document.addEventListener("pointermove",this._onPointerMove,{passive:!0}),document.addEventListener("pointerup",this._onPointerUp,{passive:!0,once:!0}))},this.moveOnce=t=>{this._emitMove(m(t)),this._setMovementTimeout(this._stopMovement)},this._pointerLocationToVector=t=>{if(this._widgetCenter===void 0)return;let{x:e,y:i}=T(this._widgetCenter,t);return{x:e,y:-i}},this._resolveClosestAngle=(t,e)=>{let i=t.target;if(i?.classList?.contains("compass"))return;let o=Number.parseInt(i?.getAttribute?.("data-angle")??"",10);return Number.isNaN(o)?B(e):o},this._onPointerMove=t=>{if(t.buttons===0){this._stopMovement();return}let e=this._pointerLocationToVector(t);if(e===void 0)return;this._setMovementTimeout(void 0);let i=this._resolveClosestAngle(t,e);if(i===void 0){this._emitStop();return}let o=m(i),d=this._initialAngle!=null&&this._initialAngle!==i;this._anyAngleMovementEnabled||=d;let l=this._anyAngleMovementEnabled?e:o;(l.x!==this._movementVector?.x||l.y!==this._movementVector?.y)&&(this.angle=i,this._emitMove(l))},this._onPointerUp=()=>{this._movementTimeout===void 0?this._stopMovement():this._widgetCenter=void 0},this._stopMovement=()=>{this._emitStop(),this._widgetCenter=void 0,this._initialAngle=void 0,this._anyAngleMovementEnabled=!1,document.removeEventListener("pointermove",this._onPointerMove),document.removeEventListener("pointerup",this._onPointerUp),this._setMovementTimeout(void 0)},this.on("move-start",()=>this._navigation?.begin()),this.on("move-direction-change",({vector:{x:t,y:e}})=>this._navigation?.continuousPanVector({x:t*this.speed,y:e*this.speed})),this.on("move-stop",()=>this._navigation?.stop())}destroy(){this._stopMovement()}get _navigation(){return this.view?.mapViewNavigation}get disabled(){return this.view?.ready===!1||this._disabled||!this.supported}set disabled(n){this._disabled=n}get rotation(){return this.view?.rotation??this._get("rotation")??0}set rotation(n){this.view?this.view.constraints.rotationEnabled&&S({target:{rotation:n},options:{animate:n===0?void 0:!1}},this.view):this._set("rotation",n)}get supported(){return this.view==null||this.view.type==="2d"}get state(){return this.disabled?"disabled":this.angle!=null?"moving":"ready"}_setMovementTimeout(n){if(clearTimeout(this._movementTimeout),n===void 0){this._movementTimeout=void 0;return}this._movementTimeout=setTimeout(()=>{this._movementTimeout=void 0,n()},this._moveOnceDuration)}_emitMove(n){this._movementVector==null&&this.emit("move-start",{type:"move-start",vector:n});let t=this._movementVector;this._movementVector=n,this.emit("move-direction-change",{type:"move-direction-change",vector:n,oldVector:t})}_emitStop(){this.angle=void 0,this._movementVector!==void 0&&(this.emit("move-stop",{type:"move-stop",oldVector:this._movementVector}),this._movementVector=void 0)}};a([r()],s.prototype,"_initialAngle",2);a([r()],s.prototype,"_movementVector",2);a([r()],s.prototype,"_widgetCenter",2);a([r()],s.prototype,"_anyAngleMovementEnabled",2);a([r()],s.prototype,"_movementTimeout",2);a([r()],s.prototype,"_disabled",2);a([r()],s.prototype,"_moveOnceDuration",2);a([r()],s.prototype,"disabled",1);a([r()],s.prototype,"angle",2);a([r()],s.prototype,"speed",2);a([r()],s.prototype,"rotation",1);a([r()],s.prototype,"supported",1);a([r({readOnly:!0})],s.prototype,"state",1);a([r()],s.prototype,"view",2);s=a([I("components.directional-pad.DirectionalPadViewModel")],s);var F=g`:host{outline:none;box-shadow:none!important;background-color:transparent!important;user-select:none;calcite-action-group{touch-action:none}calcite-action{aspect-ratio:1}}.root{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.buttons-container{--calcite-color-background: transparent;--calcite-action-group-gap: 0;calcite-action{--calcite-color-focus: var(--calcite-color-foreground-3)}calcite-action:not([active]){--calcite-action-background-color-press: var(--calcite-color-foreground-1)}calcite-action[active]{--calcite-action-background-color: var(--calcite-color-foreground-3)}calcite-icon{transform:var(--rotation, unset)}@media(hover:none){calcite-action{--calcite-action-background-color-hover: var(--calcite-color-foreground-1);--calcite-action-text-color-press: var(--calcite-color-text-3)}}}.rotation-container{display:block;width:100%;calcite-action{flex:.3}}.rotation-slider-container{display:flex;flex:1;align-items:center;calcite-slider{flex:1;padding-inline:var(--calcite-spacing-xxs)}}`,j=P(s),_=class extends w{constructor(){super(...arguments),this.messages=R({}),this._onContextMenu=t=>t.preventDefault(),this._buttons={},this.viewModel=j(this),this.angle=this.viewModel.angle,this.rotation=this.viewModel.rotation,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.disabled=this.viewModel.disabled,this.hideDirectionalButtons=!1,this.icon="move",this.showRotationResetButton=!1,this.showRotationSlider=!1,this.state=this.viewModel.state,this.visualScale="s",this.arcgisPropertyChange=C()("state"),this.arcgisReady=b()}static{this.properties={_rotationEnabled:16,angle:16,rotation:16,view:0,autoDestroyDisabled:5,disabled:5,hideDirectionalButtons:5,icon:1,label:1,messageOverrides:0,referenceElement:1,showRotationResetButton:5,showRotationSlider:5,state:32,visualScale:1}}static{this.styles=F}get _rotationEnabled(){return this.view?.ready?this.view.constraints.rotationEnabled??!1:!0}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[L(()=>this.viewModel.angle,()=>{this._buttonsContainer?.contains(document.activeElement)&&(this.viewModel.angle==null?E(this)?.focus():x(this._buttons[this.viewModel.angle]))})])}_rotateIcon(t){return{"--rotation":`rotate(${t}deg)`}}_setButtonContainerRef(t){t!==void 0?(this._buttonsContainer=t,queueMicrotask(()=>{this._buttons=Object.fromEntries(Array.from(t.children,e=>[Number.parseInt(e.getAttribute("data-angle")??""),e]))})):(this._buttonsContainer=void 0,this._buttons={})}_onButtonPointerDown(t){if(this._buttonsContainer===void 0)return;t.composedPath().find(i=>i.hasPointerCapture?.(t.pointerId))?.releasePointerCapture(t.pointerId);let e=V(this._buttonsContainer);this.viewModel.beginFollowingPointer(t,e)}_onSliderInput({currentTarget:t}){typeof t.value=="number"&&(this.viewModel.rotation=t.value)}_onRotationReset(){this.viewModel.rotation=0}_onClick(t){this.viewModel.moveOnce(t)}render(){let{label:t,disabled:e}=this,i=this.view==null||this.view.type==="2d";return c`<div .ariaLabel=${t??void 0} class=${y({root:!0,[v.widget]:!0,[v.disabled]:e})} tabindex=-1>${i?this._renderContent():this._renderUnsupportedMessage()}</div>`}_renderUnsupportedMessage(){return c`<section class="error"><p>${this.messages.unsupported}</p></section>`}_renderContent(){return[this.hideDirectionalButtons?void 0:this._renderDirectionalButtons(),this.showRotationSlider?this._renderRotation():void 0]}_renderDirectionalButtons(){return u("directional-buttons-container",c`<calcite-action-bar expand-toggle-disabled floating layout=grid .scale=${this.visualScale} overflow-mode=none><calcite-action-group class="buttons-container" dir=ltr @contextmenu=${{handleEvent:this._onContextMenu,capture:!0}} ${f(this._setButtonContainerRef)}>${p.slice(0,4).map(this._renderButton,this)}${this._renderCompass()}${p.slice(4).map(this._renderButton,this)}</calcite-action-group></calcite-action-bar>`)}_renderButton(t){let{label:e,iconName:i}=D[t],o=this.messages[e];return c`<calcite-action .active=${this.angle===t} alignment=center class="button" data-angle=${t??h} .disabled=${this.disabled} @click=${this._onClick.bind(this,t)} @pointerdown=${this._onButtonPointerDown} .text=${o??""} title=${o??h}><calcite-icon .icon=${i} .scale=${this.visualScale}></calcite-icon></calcite-action>`}_renderCompass(){let t=this.disabled||k(this.view)?"compass-needle":"arrow-up",e=this.rotation===0,i=this.messages.resetHeading;return c`<calcite-action alignment=center class="compass" .disabled=${this.disabled||!this._rotationEnabled||e} @click=${this._onRotationReset} style=${M(this._rotateIcon(this.rotation))} .text=${i??""} title=${i??h}>${!e&&c`<calcite-icon .icon=${t} .scale=${this.visualScale}></calcite-icon>`||""}</calcite-action>`}_renderRotation(){return u("slider-container",c`<calcite-action-bar expand-toggle-disabled floating layout=horizontal .scale=${this.visualScale}><calcite-action-group class="rotation-container">${this.showRotationResetButton?this._renderRotationResetButton():null}${this._renderRotationSlider()}</calcite-action-group></calcite-action-bar>`)}_renderRotationResetButton(){let t=this.messages.resetHeading;return c`<calcite-action alignment=center class="rotation-reset-button" .disabled=${this.disabled||!this._rotationEnabled} @click=${this._onRotationReset} .text=${t??""} title=${t??h}><calcite-icon flip-rtl icon=rotate .scale=${this.visualScale}></calcite-icon></calcite-action>`}_renderRotationSlider(){return c`<div class="rotation-slider-container"><calcite-slider .ariaLabel=${this.messages.heading} .disabled=${this.disabled||!this._rotationEnabled} label-handles max=360 min=0 required .scale=${this.visualScale} .value=${Math.round(this.rotation)} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div>`}};$("arcgis-directional-pad",_);return _},"core/reactiveUtils","core/Evented","core/accessorSupport/decorators",a,d,e,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./SKNX46RX.js";import b from"./YU5BTZEI.js";import"./QUZTFUWM.js";import{b as r}from"./4TV72DOP.js";import"./XURWCCLX.js";import{P as n,R as i,W as o,a as m,b as a}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{a:p},{e:c,f:d}])=>{var g=m`.size-ramp-container{display:table}.size-ramp-row{display:table-row}.size-ramp-row:not(:last-child) .size-ramp-cell,.size-ramp-row:not(:last-child) .size-ramp-label{padding-bottom:var(--calcite-space-xs)}.size-ramp-cell{min-width:100px;vertical-align:middle;word-break:break-word;display:table-cell}.size-ramp-label{padding-inline-start:var(--calcite-space-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.size-ramp-symbol-container{min-width:10px;text-align:center}.size-ramp-symbol{display:flex;justify-content:center}`,l=class extends n{constructor(){super(...arguments),this.legendElement=null}static{this.properties={legendElement:0,messages:0}}static{this.styles=g}render(){let e=this.legendElement.infos.map(s=>this._renderRow(s)).filter(Boolean);return e.length?this.legendElement.theme==="spike"?a`<arcgis-legend-spike-ramp .legendElement=${this.legendElement} .messages=${this.messages}></arcgis-legend-spike-ramp>`:a`<div class="size-ramp-container">${e}</div>`:null}_renderRow(e){let{preview:s}=e;if(!s)return null;let t=p(this.messages,e.label,!1);return d(s,c(this.messages,t)),a`<div class="size-ramp-row"><div class=${i(r("size-ramp-cell","size-ramp-symbol-container"))}><div class="size-ramp-symbol">${s}</div></div><div class=${i(r("size-ramp-cell","size-ramp-label"))}>${t}</div></div>`}};o("arcgis-legend-classic-size-ramp",l);return l},b,c)
2
+ import c from"./DL57EVZ4.js";import b from"./YU5BTZEI.js";import"./QUZTFUWM.js";import{b as r}from"./4TV72DOP.js";import"./XURWCCLX.js";import{P as n,R as i,W as o,a as m,b as a}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{a:p},{e:c,f:d}])=>{var g=m`.size-ramp-container{display:table}.size-ramp-row{display:table-row}.size-ramp-row:not(:last-child) .size-ramp-cell,.size-ramp-row:not(:last-child) .size-ramp-label{padding-bottom:var(--calcite-space-xs)}.size-ramp-cell{min-width:100px;vertical-align:middle;word-break:break-word;display:table-cell}.size-ramp-label{padding-inline-start:var(--calcite-space-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.size-ramp-symbol-container{min-width:10px;text-align:center}.size-ramp-symbol{display:flex;justify-content:center}`,l=class extends n{constructor(){super(...arguments),this.legendElement=null}static{this.properties={legendElement:0,messages:0}}static{this.styles=g}render(){let e=this.legendElement.infos.map(s=>this._renderRow(s)).filter(Boolean);return e.length?this.legendElement.theme==="spike"?a`<arcgis-legend-spike-ramp .legendElement=${this.legendElement} .messages=${this.messages}></arcgis-legend-spike-ramp>`:a`<div class="size-ramp-container">${e}</div>`:null}_renderRow(e){let{preview:s}=e;if(!s)return null;let t=p(this.messages,e.label,!1);return d(s,c(this.messages,t)),a`<div class="size-ramp-row"><div class=${i(r("size-ramp-cell","size-ramp-symbol-container"))}><div class="size-ramp-symbol">${s}</div></div><div class=${i(r("size-ramp-cell","size-ramp-label"))}>${t}</div></div>`}};o("arcgis-legend-classic-size-ramp",l);return l},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as h}from"./TXYWZMGM.js";import{i as m}from"./G5VPRDMX.js";import{a as n}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{P as o,W as r,a as l,b as e,x as c}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";var y=l`:host{width:100%}.root{--calcite-label-margin-bottom: 0;width:100%}.root[layout=inline-space-between] calcite-select{width:var(--arcgis-unit-select-inline-size, 180px)}`,s=class extends o{constructor(){super(...arguments),this.messages=n({}),this.options=[],this.scale="m",this.layout="block",this.arcgisUnitSelectChange=c()}static{this.properties={options:[1,{type:Array}],scale:1,selectLabel:1,value:0,messageOverrides:0,label:1,layout:1}}static{this.styles=y}async destroy(){await this.manager.destroy()}render(){let{messages:a,options:p=[],selectLabel:i,value:u,arcgisUnitSelectChange:g}=this;return e`<calcite-label class="root" .layout=${this.layout} .scale=${this.scale}>${i}<calcite-select .label=${i} @calciteSelectChange=${t=>{g.emit(t.target.value)}} .scale=${this.scale}>${h(p,t=>t,t=>e`<calcite-option .selected=${t===u} .value=${t}>${m(t)?a.systems?.[t]:a.units?.[t]}</calcite-option>`)}</calcite-select></calcite-label>`}};r("arcgis-unit-select",s);export{s as ArcgisUnitSelect};
2
+ import{a as h}from"./TXYWZMGM.js";import{i as m}from"./BAOWXZTE.js";import{a as n}from"./OHCCNZCY.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{P as o,W as r,a as l,b as e,x as c}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";var y=l`:host{width:100%}.root{--calcite-label-margin-bottom: 0;width:100%}.root[layout=inline-space-between] calcite-select{width:var(--arcgis-unit-select-inline-size, 180px)}`,s=class extends o{constructor(){super(...arguments),this.messages=n({}),this.options=[],this.scale="m",this.layout="block",this.arcgisUnitSelectChange=c()}static{this.properties={options:[1,{type:Array}],scale:1,selectLabel:1,value:0,messageOverrides:0,label:1,layout:1}}static{this.styles=y}async destroy(){await this.manager.destroy()}render(){let{messages:a,options:p=[],selectLabel:i,value:u,arcgisUnitSelectChange:g}=this;return e`<calcite-label class="root" .layout=${this.layout} .scale=${this.scale}>${i}<calcite-select .label=${i} @calciteSelectChange=${t=>{g.emit(t.target.value)}} .scale=${this.scale}>${h(p,t=>t,t=>e`<calcite-option .selected=${t===u} .value=${t}>${m(t)?a.systems?.[t]:a.units?.[t]}</calcite-option>`)}</calcite-select></calcite-label>`}};r("arcgis-unit-select",s);export{s as ArcgisUnitSelect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as o}from"./SSNCB7LI.js";import e from"./CBB2T3RI.js";import{a as x}from"./OHCCNZCY.js";import d from"./75OH7AOP.js";import c from"./CODEI67F.js";import{h as C}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import b from"./7XCYURYF.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{O as I,P as y,R as n,T as h,W as w,a as f,b as a,x as g}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var c={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),r=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!r)return;this.#t.add(l);let u=r.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:r.title}):s.preview;if(r.thumbnail){l.appendChild(r.thumbnail);return}r.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${n(c.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${n(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${n(c.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${n(c.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton?void 0:o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:r,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof r=="function"?r({item:e}):!!r} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${n(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{messages:t}=this,s=e.title||t.untitledFeature,i=!this.hideItemIcons&&this.displayMode!=="feature";return o(e.key,a`<calcite-list-item class=${n(i?c.listItemFeatureIcon:c.listItemFeature)} .closable=${!this.hideItemCloseActions} .label=${s} .unavailable=${this._isItemUnavailable(e)} .value=${s} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${l=>{l.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${l=>this._afterListItemSelect(e,l)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!this.hideItemIcons)return o("thumbnail-container",a`<div class=${n(c.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${n(c.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${n(c.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${n(c.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,c,d,e)
2
+ import{a as o}from"./SSNCB7LI.js";import i from"./CBB2T3RI.js";import{a as x}from"./OHCCNZCY.js";import e from"./75OH7AOP.js";import d from"./CODEI67F.js";import{h as C}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import b from"./7XCYURYF.js";import"./QUZTFUWM.js";import"./4TV72DOP.js";import"./XURWCCLX.js";import{O as I,P as y,R as c,T as h,W as w,a as f,b as a,x as g}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton?void 0:o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./SKNX46RX.js";import{S as O,T as e,b as U,c as s}from"./I2BIPOZQ.js";export default $arcgis.t(([{getBoundingBox:J,computeBBox:K,getTransformMatrix:Q},M,{c:N,d:F}])=>{var V=0;function X(){return V++}var Y=0;function Z(){return Y++}var _=0;function tt(){return _++}var R=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),et="http://www.w3.org/2000/svg",it=Math.PI;function ot(t){let{pattern:o,linearGradient:i}=t;if(o)return s`<pattern height=${o.height??e} id=${o.id??e} patternUnits=userSpaceOnUse width=${o.width??e} x=${o.x??0??e} y=${o.y??0??e}><image height=${o.image.height??e} href=${o.image.href??e} width=${o.image.width??e} x=${o.image.x??e} y=${o.image.y??e} /></pattern>`;if(i){let n=i.stops.map(r=>s`<stop offset=${r.offset??e} stop-color=${r.color??e} />`);return s`<linearGradient gradientUnits=userSpaceOnUse id=${i.id??e} x1=${i.x1??e} x2=${i.x2??e} y1=${i.y1??e} y2=${i.y2??e}>${n}</linearGradient>`}return null}function E(t){if(!t)return{fill:"none",pattern:null,linearGradient:null};if(!("type"in t))return{fill:new M(t).toString(),pattern:null,linearGradient:null};if(t.type==="pattern"){let i=`patternId-${X()}`;return{fill:`url(#${i})`,pattern:{id:i,x:t.x,y:t.y,width:t.width,height:t.height,image:{x:0,y:0,width:t.width,height:t.height,href:t.src}},linearGradient:null}}let o=`linearGradientId-${Z()}`;return{fill:`url(#${o})`,pattern:null,linearGradient:{id:o,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stops:t.colors.map(i=>({offset:i.offset,color:i.color&&new M(i.color).toString()}))}}}function D(t){let o={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};return t&&(t.width!=null&&(o.width=t.width),t.cap&&(o.cap=t.cap),t.join&&(o.join=t.join.toString()),t.color&&(o.color=new M(t.color).toString()),t.dashArray&&(o.dashArray=t.dashArray),t.dashoffset&&(o.dashOffset=t.dashoffset),t.style&&!t.dashArray&&(o.dashArray=nt(t).join(",")||"none")),o}function nt(t){if(!t?.style)return[];let{dashArray:o,style:i,width:n}=t;if(typeof o=="string"&&o!=="none")return o.split(",").map(l=>Number(l));let r=n??0,d=R.has(i)?R.get(i).map(l=>l*r):[];if(t.cap!=="butt")for(let[l,h]of d.entries())d[l]=l%2===1?h+r:Math.max(h-r,1);return d}function rt(t){return t.map(o=>`${o.command} ${o.values.join(" ")}`).join(" ").trim()}function j(t,o){if(t==null)throw new Error("value is None")}function I(t,o,i,n,r){if(t){if(t.type==="circle")return s`<circle cx=${t.cx??e} cy=${t.cy??e} fill=${o??e} fill-rule=evenodd r=${t.r??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-dashoffset=${i.dashOffset??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`;if(t.type==="ellipse")return s`<ellipse cx=${t.cx??e} cy=${t.cy??e} fill=${o??e} fill-rule=evenodd rx=${t.rx??e} ry=${t.ry??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`;if(t.type==="rect")return s`<rect fill=${o??e} fill-rule=evenodd height=${t.height??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} width=${t.width??e} x=${t.x??e} y=${t.y??e} />`;if(t.type==="image")return s`<image aria-label=${r??""??e} height=${t.height??e} href=${t.src??e} preserveAspectRatio=none width=${t.width??e} x=${t.x??e} y=${t.y??e} />`;if(t.type==="path"){let d=typeof t.path!="string"?rt(t.path):t.path;return s`<path d=${d??e} fill=${o??e} fill-rule=evenodd stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`}if(t.type==="text")return j(n),s`<text dominant-baseline=${(n.dominantBaseline==="inherit"||n.dominantBaseline==="alphabetic"||n.dominantBaseline==="auto"||n.dominantBaseline==="central"||n.dominantBaseline==="hanging"||n.dominantBaseline==="ideographic"||n.dominantBaseline==="mathematical"||n.dominantBaseline==="middle"||n.dominantBaseline==="text-bottom"||n.dominantBaseline==="text-top"?n.dominantBaseline:void 0)??e} fill=${o??e} fill-rule=evenodd font-family=${n.font.family??e} font-size=${n.font.size??e} font-style=${n.font.style??e} font-variant=${n.font.variant??e} font-weight=${n.font.weight??e} kerning=${n.kerning??e} rotate=${n.rotate??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} text-anchor=${(n.align==="inherit"||n.align==="middle"||n.align==="end"||n.align==="start"?n.align:void 0)??e} text-decoration=${(n.decoration==="inherit"||n.decoration==="none"||n.decoration==="blink"||n.decoration==="line-through"||n.decoration==="overline"||n.decoration==="underline"?n.decoration:void 0)??e} text-rendering=auto x=${t.x??e} y=${t.y??e}>${t.text}</text>`}return null}function at(t,o,i){let n=C(t);if(!n)return null;let{strength:r,radius:d}=n,l=r>0?d:0,h=5**(o/100)*(.4+o/100),u=(r+l*.5)*h,c=(r+l)*o,f=r*4+1;return s`<filter filterUnits=userSpaceOnUse height=300% .id=${`bloom${i}`} width=300% x=-100% y=-100%><feMorphology in=SourceGraphic operator=dilate radius=${u??e} result=dilate /><feGaussianBlur in=dilate result=blur stdDeviation=${c/25} /><feGaussianBlur in=blur result=intensityBlur stdDeviation=${c/50} /><feComponentTransfer in=SourceGraphic result=intensityBrightness><feFuncR slope=${f??e} type=linear /><feFuncG slope=${f??e} type=linear /><feFuncB slope=${f??e} type=linear /></feComponentTransfer><feMerge><feMergeNode in=intensityBlur /><feMergeNode in=intensityBrightness /><feGaussianBlur stdDeviation=${r/10} /></feMerge></filter>`}function x(t,o){let i=t*(it/180);return Math.abs(o*Math.sin(i))+Math.abs(o*Math.cos(i))}function T(t,o){let i={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(t){let n=t.alignBaseline,r=n==="baseline"?"auto":n==="top"?"text-top":n==="bottom"?"hanging":n;i.align=t.align,i.dominantBaseline=r,i.decoration=t.decoration,i.kerning=t.kerning?"auto":"0",i.rotate=t.rotated?"90":"0",j(o),i.font.style=o.style||"normal",i.font.variant=o.variant||"normal",i.font.weight=o.weight||"normal",i.font.size=o.size?.toString()||"10pt",i.font.family=o.family||"serif"}return i}function st(t,o){if(!t||t.length===0)return null;let i=[];for(let n of t){let{shape:r,fill:d,stroke:l,font:h}=n,u=E(d),c=D(l),f=r.type==="text"?T(r,h):null,a=I(r,u.fill,c,f);a&&i.push(a)}return s`<mask id=${o??e} maskUnits=userSpaceOnUse><g>${i}</g></mask>`}function C(t){let o=t?.match(/bloom\(\s*([^\s]+)\s+([^\s]+)\s+([^\s]+)\s*\)/iu);if(!o)return null;let[,i,n,r]=o;return{strength:Number(i),radius:N(F(n)),threshold:Number(r)}}function ut(t,o,i,n={}){let r=[],d=[],l=tt(),h=at(n.cssEffectFilter,o,l),u=null;if(h){let a=C(n.cssEffectFilter),$=n.clipBloomEffect||!a?.strength?0:(a.strength+a.radius/2)/3,p=o+o*$,m=i+i*$;u=[Math.max(p,10),Math.max(m,10)]}let c=o,f=i;if(n.useRotationSize)for(let a=0;a<t.length;a++){let $=n.rotations?.[a]??0;c=Math.max(x($,o),c),f=Math.max(x($,i),f)}for(let a=0;a<t.length;a++){let $=t[a],p=[],m=[],S=0,k=0,w=0;for(let y of $){let{shape:g,fill:P,stroke:A,font:W,offset:b}=y;!n.ignoreStrokeWidth&&g.type!=="text"&&(S+=A?.width||0);let z=E(P),q=D(A),H=g.type==="text"?T(g,W):null;r.push(ot(z)),p.push(I(g,z.fill,q,H,n.ariaLabel)),m.push(J(g)),b&&(k+=b[0],w+=b[1])}let v=n.rotations?.[a]??0;n.useRotationSize&&(k+=(c-x(v,o))/2,w+=(f-x(v,i))/2);let L=K(m),G=Q(L,o,i,S,n.scale??!1,v,n.useRotationSize??!1,[k,w],u),B=null;if(n.masking){let y=`mask-${a}`,g=n.masking[a];r.push(st(g,y)),B=`url(#${y})`}d.push(B?s`<g mask=${B??e}><g transform=${G??e}>${p}</g></g>`:s`<g transform=${G??e}>${p}</g>`)}return h&&(j(u),c=u[0],f=u[1]),U`<svg aria-label=${n.ariaLabel??e} height=${f??e} role=img style=${O("display: block;")} width=${c??e} xmlns=${et}>${s`${h}<defs>${r}</defs>${h?s`<g filter=${`url(#bloom${l})`}>${d}</g>`:d}`}</svg>`}return{a:ot,b:E,c:D,d:I,e:ut}},"applications/Components/svgUtils","Color",a)
2
+ import a from"./DL57EVZ4.js";import{S as O,T as e,b as U,c as s}from"./I2BIPOZQ.js";export default $arcgis.t(([{getBoundingBox:J,computeBBox:K,getTransformMatrix:Q},M,{c:N,d:F}])=>{var V=0;function X(){return V++}var Y=0;function Z(){return Y++}var _=0;function tt(){return _++}var R=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),et="http://www.w3.org/2000/svg",it=Math.PI;function ot(t){let{pattern:o,linearGradient:i}=t;if(o)return s`<pattern height=${o.height??e} id=${o.id??e} patternUnits=userSpaceOnUse width=${o.width??e} x=${o.x??0??e} y=${o.y??0??e}><image height=${o.image.height??e} href=${o.image.href??e} width=${o.image.width??e} x=${o.image.x??e} y=${o.image.y??e} /></pattern>`;if(i){let n=i.stops.map(r=>s`<stop offset=${r.offset??e} stop-color=${r.color??e} />`);return s`<linearGradient gradientUnits=userSpaceOnUse id=${i.id??e} x1=${i.x1??e} x2=${i.x2??e} y1=${i.y1??e} y2=${i.y2??e}>${n}</linearGradient>`}return null}function E(t){if(!t)return{fill:"none",pattern:null,linearGradient:null};if(!("type"in t))return{fill:new M(t).toString(),pattern:null,linearGradient:null};if(t.type==="pattern"){let i=`patternId-${X()}`;return{fill:`url(#${i})`,pattern:{id:i,x:t.x,y:t.y,width:t.width,height:t.height,image:{x:0,y:0,width:t.width,height:t.height,href:t.src}},linearGradient:null}}let o=`linearGradientId-${Z()}`;return{fill:`url(#${o})`,pattern:null,linearGradient:{id:o,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stops:t.colors.map(i=>({offset:i.offset,color:i.color&&new M(i.color).toString()}))}}}function D(t){let o={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};return t&&(t.width!=null&&(o.width=t.width),t.cap&&(o.cap=t.cap),t.join&&(o.join=t.join.toString()),t.color&&(o.color=new M(t.color).toString()),t.dashArray&&(o.dashArray=t.dashArray),t.dashoffset&&(o.dashOffset=t.dashoffset),t.style&&!t.dashArray&&(o.dashArray=nt(t).join(",")||"none")),o}function nt(t){if(!t?.style)return[];let{dashArray:o,style:i,width:n}=t;if(typeof o=="string"&&o!=="none")return o.split(",").map(l=>Number(l));let r=n??0,d=R.has(i)?R.get(i).map(l=>l*r):[];if(t.cap!=="butt")for(let[l,h]of d.entries())d[l]=l%2===1?h+r:Math.max(h-r,1);return d}function rt(t){return t.map(o=>`${o.command} ${o.values.join(" ")}`).join(" ").trim()}function j(t,o){if(t==null)throw new Error("value is None")}function I(t,o,i,n,r){if(t){if(t.type==="circle")return s`<circle cx=${t.cx??e} cy=${t.cy??e} fill=${o??e} fill-rule=evenodd r=${t.r??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-dashoffset=${i.dashOffset??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`;if(t.type==="ellipse")return s`<ellipse cx=${t.cx??e} cy=${t.cy??e} fill=${o??e} fill-rule=evenodd rx=${t.rx??e} ry=${t.ry??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`;if(t.type==="rect")return s`<rect fill=${o??e} fill-rule=evenodd height=${t.height??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} width=${t.width??e} x=${t.x??e} y=${t.y??e} />`;if(t.type==="image")return s`<image aria-label=${r??""??e} height=${t.height??e} href=${t.src??e} preserveAspectRatio=none width=${t.width??e} x=${t.x??e} y=${t.y??e} />`;if(t.type==="path"){let d=typeof t.path!="string"?rt(t.path):t.path;return s`<path d=${d??e} fill=${o??e} fill-rule=evenodd stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} />`}if(t.type==="text")return j(n),s`<text dominant-baseline=${(n.dominantBaseline==="inherit"||n.dominantBaseline==="alphabetic"||n.dominantBaseline==="auto"||n.dominantBaseline==="central"||n.dominantBaseline==="hanging"||n.dominantBaseline==="ideographic"||n.dominantBaseline==="mathematical"||n.dominantBaseline==="middle"||n.dominantBaseline==="text-bottom"||n.dominantBaseline==="text-top"?n.dominantBaseline:void 0)??e} fill=${o??e} fill-rule=evenodd font-family=${n.font.family??e} font-size=${n.font.size??e} font-style=${n.font.style??e} font-variant=${n.font.variant??e} font-weight=${n.font.weight??e} kerning=${n.kerning??e} rotate=${n.rotate??e} stroke=${i.color??e} stroke-dasharray=${i.dashArray??void 0??e} stroke-linecap=${i.cap??e} stroke-linejoin=${i.join??e} stroke-miterlimit=4 stroke-width=${i.width??e} text-anchor=${(n.align==="inherit"||n.align==="middle"||n.align==="end"||n.align==="start"?n.align:void 0)??e} text-decoration=${(n.decoration==="inherit"||n.decoration==="none"||n.decoration==="blink"||n.decoration==="line-through"||n.decoration==="overline"||n.decoration==="underline"?n.decoration:void 0)??e} text-rendering=auto x=${t.x??e} y=${t.y??e}>${t.text}</text>`}return null}function at(t,o,i){let n=C(t);if(!n)return null;let{strength:r,radius:d}=n,l=r>0?d:0,h=5**(o/100)*(.4+o/100),u=(r+l*.5)*h,c=(r+l)*o,f=r*4+1;return s`<filter filterUnits=userSpaceOnUse height=300% .id=${`bloom${i}`} width=300% x=-100% y=-100%><feMorphology in=SourceGraphic operator=dilate radius=${u??e} result=dilate /><feGaussianBlur in=dilate result=blur stdDeviation=${c/25} /><feGaussianBlur in=blur result=intensityBlur stdDeviation=${c/50} /><feComponentTransfer in=SourceGraphic result=intensityBrightness><feFuncR slope=${f??e} type=linear /><feFuncG slope=${f??e} type=linear /><feFuncB slope=${f??e} type=linear /></feComponentTransfer><feMerge><feMergeNode in=intensityBlur /><feMergeNode in=intensityBrightness /><feGaussianBlur stdDeviation=${r/10} /></feMerge></filter>`}function x(t,o){let i=t*(it/180);return Math.abs(o*Math.sin(i))+Math.abs(o*Math.cos(i))}function T(t,o){let i={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(t){let n=t.alignBaseline,r=n==="baseline"?"auto":n==="top"?"text-top":n==="bottom"?"hanging":n;i.align=t.align,i.dominantBaseline=r,i.decoration=t.decoration,i.kerning=t.kerning?"auto":"0",i.rotate=t.rotated?"90":"0",j(o),i.font.style=o.style||"normal",i.font.variant=o.variant||"normal",i.font.weight=o.weight||"normal",i.font.size=o.size?.toString()||"10pt",i.font.family=o.family||"serif"}return i}function st(t,o){if(!t||t.length===0)return null;let i=[];for(let n of t){let{shape:r,fill:d,stroke:l,font:h}=n,u=E(d),c=D(l),f=r.type==="text"?T(r,h):null,a=I(r,u.fill,c,f);a&&i.push(a)}return s`<mask id=${o??e} maskUnits=userSpaceOnUse><g>${i}</g></mask>`}function C(t){let o=t?.match(/bloom\(\s*([^\s]+)\s+([^\s]+)\s+([^\s]+)\s*\)/iu);if(!o)return null;let[,i,n,r]=o;return{strength:Number(i),radius:N(F(n)),threshold:Number(r)}}function ut(t,o,i,n={}){let r=[],d=[],l=tt(),h=at(n.cssEffectFilter,o,l),u=null;if(h){let a=C(n.cssEffectFilter),$=n.clipBloomEffect||!a?.strength?0:(a.strength+a.radius/2)/3,p=o+o*$,m=i+i*$;u=[Math.max(p,10),Math.max(m,10)]}let c=o,f=i;if(n.useRotationSize)for(let a=0;a<t.length;a++){let $=n.rotations?.[a]??0;c=Math.max(x($,o),c),f=Math.max(x($,i),f)}for(let a=0;a<t.length;a++){let $=t[a],p=[],m=[],S=0,k=0,w=0;for(let y of $){let{shape:g,fill:P,stroke:A,font:W,offset:b}=y;!n.ignoreStrokeWidth&&g.type!=="text"&&(S+=A?.width||0);let z=E(P),q=D(A),H=g.type==="text"?T(g,W):null;r.push(ot(z)),p.push(I(g,z.fill,q,H,n.ariaLabel)),m.push(J(g)),b&&(k+=b[0],w+=b[1])}let v=n.rotations?.[a]??0;n.useRotationSize&&(k+=(c-x(v,o))/2,w+=(f-x(v,i))/2);let L=K(m),G=Q(L,o,i,S,n.scale??!1,v,n.useRotationSize??!1,[k,w],u),B=null;if(n.masking){let y=`mask-${a}`,g=n.masking[a];r.push(st(g,y)),B=`url(#${y})`}d.push(B?s`<g mask=${B??e}><g transform=${G??e}>${p}</g></g>`:s`<g transform=${G??e}>${p}</g>`)}return h&&(j(u),c=u[0],f=u[1]),U`<svg aria-label=${n.ariaLabel??e} height=${f??e} role=img style=${O("display: block;")} width=${c??e} xmlns=${et}>${s`${h}<defs>${r}</defs>${h?s`<g filter=${`url(#bloom${l})`}>${d}</g>`:d}`}</svg>`}return{a:ot,b:E,c:D,d:I,e:ut}},"applications/Components/svgUtils","Color",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"./XHF3WRCS.js";import"./2X677DFU.js";import{a as Q}from"./JCRPP54Z.js";import s from"./VLDII7DK.js";import o from"./FUQUIU52.js";import n from"./CZPZHMHT.js";import{a as S,b as U,g as G,h as v,j as H,k as q,m as c,n as $}from"./FCNNRX3Q.js";import{a as N}from"./TXYWZMGM.js";import{a as m}from"./SSNCB7LI.js";import l from"./R26ZJOWO.js";import j from"./TMJX7DFH.js";import i from"./QZ5LJH35.js";import"./VJVKFKSG.js";import h from"./CBB2T3RI.js";import{a as O}from"./OHCCNZCY.js";import{a as L}from"./JD74LG7K.js";import{a as k}from"./2CLE72G4.js";import f from"./G37JKMBJ.js";import e from"./75OH7AOP.js";import b from"./CODEI67F.js";import{h as B}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import a from"./7XCYURYF.js";import"./QUZTFUWM.js";import{b as P}from"./4TV72DOP.js";import"./XURWCCLX.js";import{B as M,N as d,O as g,P as R,R as p,T as _,U as w,W as A,a as C,b as r,x as y}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([se,b,{on:ae,watch:le},,,,D,x,,,,,{k:j},,{a:z,b:J,c:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=C`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=x(se),F=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new b,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new b(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new b,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new b,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=y(),this.arcgisOpenedLayersChange=y(),this.arcgisPropertyChange=B()("state"),this.arcgisReady=y(),this.arcgisReferenceFilterChange=y(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[K,re,J]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){v(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),v(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:a}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this._createFlowList(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return w(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this._getTableListParams(e);return w(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[L.hidden]:this.state==="loading",[L.disabled]:this.state==="disabled"};return r`<div class=${p(P(L.widget,L.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return r`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return this.hideNoItemsNotice?null:r`<div class=${p(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return r`<div class=${p(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??_} type=text .value=${this.viewModel.basemapTitle??void 0} ${g(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${g(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??_}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${g(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${p(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}_renderPanelFlowItems(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${g(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??_} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${g(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${p(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??_} data-layer-type=${this._rootGroupUid??_} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${l=>this._handleCalciteListDragEnd(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${g(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this._renderItem(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${p(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layers/list/BasemapItemCollection","core/Collection","core/reactiveUtils",a,b,e,f,h,i,j,l,n,o,s,t)
2
+ import t from"./4IQGYUKD.js";import"./2X677DFU.js";import{a as Q}from"./JCRPP54Z.js";import s from"./QJWPUYT2.js";import o from"./E6IRF6JO.js";import n from"./CZPZHMHT.js";import{a as S,b as U,g as G,h as v,j as H,k as q,m as c,n as $}from"./FCNNRX3Q.js";import{a as N}from"./TXYWZMGM.js";import{a as m}from"./SSNCB7LI.js";import l from"./R26ZJOWO.js";import j from"./TMJX7DFH.js";import i from"./QZ5LJH35.js";import"./VJVKFKSG.js";import h from"./CBB2T3RI.js";import{a as O}from"./OHCCNZCY.js";import{a as L}from"./JD74LG7K.js";import{a as k}from"./2CLE72G4.js";import f from"./G37JKMBJ.js";import e from"./75OH7AOP.js";import b from"./CODEI67F.js";import{h as B}from"./R2XADTZ4.js";import"./FZBSTBH3.js";import a from"./7XCYURYF.js";import"./QUZTFUWM.js";import{b as P}from"./4TV72DOP.js";import"./XURWCCLX.js";import{B as M,N as d,O as g,P as R,R as p,T as _,U as w,W as A,a as C,b as r,x as y}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([se,b,{on:ae,watch:le},,,,D,x,,,,,{k:j},,{a:z,b:J,c:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=C`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=x(se),F=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new b,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new b(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new b,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new b,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=y(),this.arcgisOpenedLayersChange=y(),this.arcgisPropertyChange=B()("state"),this.arcgisReady=y(),this.arcgisReferenceFilterChange=y(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[K,re,J]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){v(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),v(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:a}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this._createFlowList(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return w(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this._getTableListParams(e);return w(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[L.hidden]:this.state==="loading",[L.disabled]:this.state==="disabled"};return r`<div class=${p(P(L.widget,L.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return r`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return this.hideNoItemsNotice?null:r`<div class=${p(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return r`<div class=${p(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??_} type=text .value=${this.viewModel.basemapTitle??void 0} ${g(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${g(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??_}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${g(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${p(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}_renderPanelFlowItems(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${g(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??_} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${g(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${p(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??_} data-layer-type=${this._rootGroupUid??_} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${l=>this._handleCalciteListDragEnd(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${g(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this._renderItem(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${p(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layers/list/BasemapItemCollection","core/Collection","core/reactiveUtils",a,b,e,f,h,i,j,l,n,o,s,t)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./7DI2ZSB3.js";import{P as c,W as r,a as o,b as s}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:p},{f:d}])=>{var h=o`:host{display:flex;flex-direction:column;flex-grow:1}calcite-tabs{flex-grow:1}calcite-tab{--calcite-tab-content-block-padding: 0}calcite-loader{margin-right:var(--calcite-spacing-xxs)}`,i=class extends c{constructor(){super(...arguments),this._prevLayoutTemplateId=null,this._selectedTab="layout",this._hasPendingExport=!1,this.hideAdvancedOptions=!1,this.autoPopulateAuthor=!1,this.hideFeatureAttributes=!1,this.hideIncludeTables=!1}static{this.properties={_selectedTab:16,_hasPendingExport:16,hideAdvancedOptions:5,autoPopulateAuthor:5,showSaveAs:5,arcgisSaveAs:0,viewModel:0,messages:0,showTemplateSelector:0,allowedFormatsForSaving:1,hideFeatureAttributes:5,hideIncludeTables:5}}static{this.styles=h}loaded(){this.manager.onLifecycle(()=>{let e=[],t=()=>{e.forEach(a=>a.remove()),e=[]},l=()=>{t(),e=this.viewModel.exportedLinks.toArray().map(a=>p(()=>a.state,()=>this.requestUpdate(),{initial:!0}))};l();let n=this.viewModel.exportedLinks.on("change",l);return()=>{n.remove(),t()}})}async _layoutTabChangeHandler(){let e=(this._prevLayoutTemplateId?this.viewModel.getLayoutTemplateById(this._prevLayoutTemplateId):null)??this.viewModel.defaultTemplate;await this.viewModel.applyTemplate(e),this._prevLayoutTemplateId=e?.id,this._selectedTab="layout"}async _mapOnlyTabChangeHandler(){this._updatePrevLayoutTemplateId(),await this.viewModel.applyTemplate("map-only"),this._selectedTab="map-only"}async _exportsTabChangeHandler(){this._updatePrevLayoutTemplateId(),this._selectedTab="exports"}_selectExportsTab(){this._updatePrevLayoutTemplateId(),this._selectedTab="exports"}_updatePrevLayoutTemplateId(){!d(this.viewModel.templateOptions.layout)&&this.viewModel.templateOptions.id&&(this._prevLayoutTemplateId=this.viewModel.templateOptions.id)}render(){let e=this.viewModel.exportedLinks.some(({state:t})=>t==="pending");return s`<calcite-tabs layout=center bordered><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${this._layoutTabChangeHandler} .selected=${this._selectedTab==="layout"}>${this.messages.layoutTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${this._mapOnlyTabChangeHandler} .selected=${this._selectedTab==="map-only"}>${this.messages.mapOnlyTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${this._exportsTabChangeHandler} .selected=${this._selectedTab==="exports"}>${e?s`<calcite-loader inline label=loading scale=s></calcite-loader>`:null}${this.messages.exportsTab}</calcite-tab-title></calcite-tab-nav><calcite-tab selected><arcgis-print-layout-panel .messages=${this.messages} .viewModel=${this.viewModel} .hideAdvancedOptions=${this.hideAdvancedOptions} .autoPopulateAuthor=${this.autoPopulateAuthor} .hideFeatureAttributes=${this.hideFeatureAttributes} .hideIncludeTables=${this.hideIncludeTables} .showTemplateSelector=${this.showTemplateSelector} .selectExportsTab=${this._selectExportsTab.bind(this)}></arcgis-print-layout-panel></calcite-tab><calcite-tab><arcgis-print-map-only-panel .messages=${this.messages} .viewModel=${this.viewModel} .hideAdvancedOptions=${this.hideAdvancedOptions} .selectExportsTab=${this._selectExportsTab.bind(this)}></arcgis-print-map-only-panel></calcite-tab><calcite-tab><arcgis-print-exports-panel .messages=${this.messages} .viewModel=${this.viewModel} .allowedFormatsForSaving=${this.allowedFormatsForSaving} .showSaveAs=${this.showSaveAs} .arcgisSaveAs=${this.arcgisSaveAs}></arcgis-print-exports-panel></calcite-tab></calcite-tabs>`}};r("arcgis-print-main-panel",i);return i},"core/reactiveUtils",a)
2
+ import a from"./3ZXNGXHC.js";import{P as c,W as r,a as o,b as s}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:p},{f:d}])=>{var h=o`:host{display:flex;flex-direction:column;flex-grow:1}calcite-tabs{flex-grow:1}calcite-tab{--calcite-tab-content-block-padding: 0}calcite-loader{margin-right:var(--calcite-spacing-xxs)}`,i=class extends c{constructor(){super(...arguments),this._prevLayoutTemplateId=null,this._selectedTab="layout",this._hasPendingExport=!1,this.hideAdvancedOptions=!1,this.autoPopulateAuthor=!1,this.hideFeatureAttributes=!1,this.hideIncludeTables=!1}static{this.properties={_selectedTab:16,_hasPendingExport:16,hideAdvancedOptions:5,autoPopulateAuthor:5,showSaveAs:5,arcgisSaveAs:0,viewModel:0,messages:0,showTemplateSelector:0,allowedFormatsForSaving:1,hideFeatureAttributes:5,hideIncludeTables:5}}static{this.styles=h}loaded(){this.manager.onLifecycle(()=>{let e=[],t=()=>{e.forEach(a=>a.remove()),e=[]},l=()=>{t(),e=this.viewModel.exportedLinks.toArray().map(a=>p(()=>a.state,()=>this.requestUpdate(),{initial:!0}))};l();let n=this.viewModel.exportedLinks.on("change",l);return()=>{n.remove(),t()}})}async _layoutTabChangeHandler(){let e=(this._prevLayoutTemplateId?this.viewModel.getLayoutTemplateById(this._prevLayoutTemplateId):null)??this.viewModel.defaultTemplate;await this.viewModel.applyTemplate(e),this._prevLayoutTemplateId=e?.id,this._selectedTab="layout"}async _mapOnlyTabChangeHandler(){this._updatePrevLayoutTemplateId(),await this.viewModel.applyTemplate("map-only"),this._selectedTab="map-only"}async _exportsTabChangeHandler(){this._updatePrevLayoutTemplateId(),this._selectedTab="exports"}_selectExportsTab(){this._updatePrevLayoutTemplateId(),this._selectedTab="exports"}_updatePrevLayoutTemplateId(){!d(this.viewModel.templateOptions.layout)&&this.viewModel.templateOptions.id&&(this._prevLayoutTemplateId=this.viewModel.templateOptions.id)}render(){let e=this.viewModel.exportedLinks.some(({state:t})=>t==="pending");return s`<calcite-tabs layout=center bordered><calcite-tab-nav slot=title-group><calcite-tab-title @calciteTabsActivate=${this._layoutTabChangeHandler} .selected=${this._selectedTab==="layout"}>${this.messages.layoutTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${this._mapOnlyTabChangeHandler} .selected=${this._selectedTab==="map-only"}>${this.messages.mapOnlyTab}</calcite-tab-title><calcite-tab-title @calciteTabsActivate=${this._exportsTabChangeHandler} .selected=${this._selectedTab==="exports"}>${e?s`<calcite-loader inline label=loading scale=s></calcite-loader>`:null}${this.messages.exportsTab}</calcite-tab-title></calcite-tab-nav><calcite-tab selected><arcgis-print-layout-panel .messages=${this.messages} .viewModel=${this.viewModel} .hideAdvancedOptions=${this.hideAdvancedOptions} .autoPopulateAuthor=${this.autoPopulateAuthor} .hideFeatureAttributes=${this.hideFeatureAttributes} .hideIncludeTables=${this.hideIncludeTables} .showTemplateSelector=${this.showTemplateSelector} .selectExportsTab=${this._selectExportsTab.bind(this)}></arcgis-print-layout-panel></calcite-tab><calcite-tab><arcgis-print-map-only-panel .messages=${this.messages} .viewModel=${this.viewModel} .hideAdvancedOptions=${this.hideAdvancedOptions} .selectExportsTab=${this._selectExportsTab.bind(this)}></arcgis-print-map-only-panel></calcite-tab><calcite-tab><arcgis-print-exports-panel .messages=${this.messages} .viewModel=${this.viewModel} .allowedFormatsForSaving=${this.allowedFormatsForSaving} .showSaveAs=${this.showSaveAs} .arcgisSaveAs=${this.arcgisSaveAs}></arcgis-print-exports-panel></calcite-tab></calcite-tabs>`}};r("arcgis-print-main-panel",i);return i},"core/reactiveUtils",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./7DI2ZSB3.js";import{P as o,W as h,b as m}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:d},{f:u}])=>{var n=class extends o{constructor(){super(...arguments),this._dpi=1}static{this.properties={_dpi:16,viewModel:0,messages:0}}loaded(){this.manager.onLifecycle(()=>[d(()=>this.viewModel.templateOptions.dpi,e=>this._dpi=e<=0?1:e,{initial:!0})])}_handleDPIChange(e){let i=this.viewModel.templateOptions,t=Number(e.target.value);if(Number.isNaN(t)||t<=0||!Number.isFinite(t)){e.target.value=`${this._dpi}`;return}if(u(i.layout)){let a=i.dpi>0?i.dpi:this._dpi,r=i.width,s=i.height;if(a>0&&typeof r=="number"&&typeof s=="number"&&Number.isFinite(r)&&Number.isFinite(s)&&t!==a){let p=t/a;i.width=Math.max(1,Math.round(r*p)),i.height=Math.max(1,Math.round(s*p))}}i.dpi=t}render(){return m`<div><calcite-label>${this.messages.dpi}<calcite-input-number data-input-name=dpi min=1 .value=${`${this._dpi}`} .max=${Number.MAX_SAFE_INTEGER} @calciteInputNumberChange=${this._handleDPIChange}></calcite-input-number></calcite-label></div>`}};h("arcgis-print-dpi-input",n);return n},"core/reactiveUtils",a)
2
+ import a from"./3ZXNGXHC.js";import{P as o,W as h,b as m}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:d},{f:u}])=>{var n=class extends o{constructor(){super(...arguments),this._dpi=1}static{this.properties={_dpi:16,viewModel:0,messages:0}}loaded(){this.manager.onLifecycle(()=>[d(()=>this.viewModel.templateOptions.dpi,e=>this._dpi=e<=0?1:e,{initial:!0})])}_handleDPIChange(e){let i=this.viewModel.templateOptions,t=Number(e.target.value);if(Number.isNaN(t)||t<=0||!Number.isFinite(t)){e.target.value=`${this._dpi}`;return}if(u(i.layout)){let a=i.dpi>0?i.dpi:this._dpi,r=i.width,s=i.height;if(a>0&&typeof r=="number"&&typeof s=="number"&&Number.isFinite(r)&&Number.isFinite(s)&&t!==a){let p=t/a;i.width=Math.max(1,Math.round(r*p)),i.height=Math.max(1,Math.round(s*p))}}i.dpi=t}render(){return m`<div><calcite-label>${this.messages.dpi}<calcite-input-number data-input-name=dpi min=1 .value=${`${this._dpi}`} .max=${Number.MAX_SAFE_INTEGER} @calciteInputNumberChange=${this._handleDPIChange}></calcite-input-number></calcite-label></div>`}};h("arcgis-print-dpi-input",n);return n},"core/reactiveUtils",a)