@arcgis/portal-components 5.2.0-next.124 → 5.2.0-next.125

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 (177) hide show
  1. package/dist/cdn/{XVXUI2NM.js → 2B2T3CO3.js} +1 -1
  2. package/dist/cdn/2EV6F7V6.js +2 -0
  3. package/dist/cdn/{PO7ZCHRK.js → 2U2SESKW.js} +69 -69
  4. package/dist/cdn/{ZRPU3E6I.js → 3TMF6URM.js} +1 -1
  5. package/dist/cdn/3YJUQ54F.js +2 -0
  6. package/dist/cdn/{X2YH4HME.js → 5B76NS25.js} +1 -1
  7. package/dist/cdn/5CFTWDD6.js +2 -0
  8. package/dist/cdn/5CQ3B6ZW.js +2 -0
  9. package/dist/cdn/5EFYJYWM.js +2 -0
  10. package/dist/cdn/5GLUIQ7R.js +2 -0
  11. package/dist/cdn/{P5T4PK6A.js → 5HP5TLLV.js} +1 -1
  12. package/dist/cdn/5ZSZI7KG.js +2 -0
  13. package/dist/cdn/{5SRRBZNT.js → 6JJUORUU.js} +1 -1
  14. package/dist/cdn/6PTPTTSS.js +2 -0
  15. package/dist/cdn/6XRVLKAZ.js +2 -0
  16. package/dist/cdn/{IE57HB42.js → 7QCQNOXB.js} +1 -1
  17. package/dist/cdn/{FXGAQXNR.js → 7UNUBFFC.js} +1 -1
  18. package/dist/cdn/{ZHJMS2LV.js → 7WFLPRTI.js} +1 -1
  19. package/dist/cdn/{YA32NOJY.js → ABIXHCPF.js} +1 -1
  20. package/dist/cdn/{HKJ5QP62.js → AYOR6D2Z.js} +1 -1
  21. package/dist/cdn/{6Z2AEG54.js → BPQ6ZBLE.js} +1 -1
  22. package/dist/cdn/{5R5O2X3M.js → BQKUF5EQ.js} +1 -1
  23. package/dist/cdn/BYYQOYJS.js +2 -0
  24. package/dist/cdn/{TD6BN5LE.js → CVUMYWBS.js} +1 -1
  25. package/dist/cdn/{JADQNA27.js → D4MCG57T.js} +1 -1
  26. package/dist/cdn/DIOGMUOB.js +2 -0
  27. package/dist/cdn/{52EHJXE4.js → DZWCWV3A.js} +1 -1
  28. package/dist/cdn/{35MI6GEH.js → E3XDGNPB.js} +1 -1
  29. package/dist/cdn/EPURPU4Q.js +2 -0
  30. package/dist/cdn/{JZID64Z6.js → EXPBHQ4I.js} +1 -1
  31. package/dist/cdn/{MTJN3KRM.js → FHXIGKK4.js} +1 -1
  32. package/dist/cdn/{X3WXFI25.js → FJ3PFFCN.js} +1 -1
  33. package/dist/cdn/{GXOORXRU.js → FKFSGSBA.js} +1 -1
  34. package/dist/cdn/FPKKNRZY.js +2 -0
  35. package/dist/cdn/{COXMHAJA.js → GCB5BYDM.js} +1 -1
  36. package/dist/cdn/{7EM25L56.js → GES5WKJA.js} +1 -1
  37. package/dist/cdn/{Z44L4BKR.js → GGG3IIFK.js} +1 -1
  38. package/dist/cdn/{QJCOQ6FY.js → GZU4XZUI.js} +1 -1
  39. package/dist/cdn/{JEOHKIHK.js → H3CCKTNL.js} +1 -1
  40. package/dist/cdn/{BZZQOEUP.js → H3PPP7A7.js} +1 -1
  41. package/dist/cdn/{BYV7M63H.js → HATTAFCL.js} +1 -1
  42. package/dist/cdn/{5HVUPXCG.js → HPDQHQVC.js} +1 -1
  43. package/dist/cdn/{L4YVQHX3.js → HWYJF6DJ.js} +1 -1
  44. package/dist/cdn/{OAVKM5RX.js → I5C4SV6N.js} +1 -1
  45. package/dist/cdn/{4RPD44KC.js → I64ZE3TR.js} +1 -1
  46. package/dist/cdn/{7EPXWK4L.js → ICUDZDC6.js} +1 -1
  47. package/dist/cdn/{625YOS7Q.js → IMIQY3MT.js} +1 -1
  48. package/dist/cdn/{GC7KNL7Y.js → IWARFJ4I.js} +1 -1
  49. package/dist/cdn/JB2P4KY4.js +2 -0
  50. package/dist/cdn/{YASUXORH.js → JGCCJ5PX.js} +1 -1
  51. package/dist/cdn/JIOUF6RV.js +2 -0
  52. package/dist/cdn/{6QTLQAJL.js → K25K7FCI.js} +1 -1
  53. package/dist/cdn/{37HLLREH.js → K4LXMVNH.js} +1 -1
  54. package/dist/cdn/{6H7CWMFE.js → K64QFEX2.js} +1 -1
  55. package/dist/cdn/{CFLKHGTI.js → KALKWPUR.js} +1 -1
  56. package/dist/cdn/KEM54FSC.js +2 -0
  57. package/dist/cdn/{RCL4QILW.js → KFGCJN3T.js} +1 -1
  58. package/dist/cdn/{3RGCV53N.js → L46EVYBC.js} +1 -1
  59. package/dist/cdn/{E3Y3LIHI.js → LFRTGSGI.js} +1 -1
  60. package/dist/cdn/MA7TVM56.js +2 -0
  61. package/dist/cdn/MBOTEUCN.js +2 -0
  62. package/dist/cdn/MC3V6J4M.js +2 -0
  63. package/dist/cdn/{JGH37RQB.js → MFKSJMJS.js} +1 -1
  64. package/dist/cdn/{EZIZLWHA.js → MXVFCMBR.js} +1 -1
  65. package/dist/cdn/{5H6OROJK.js → N4UNPHFQ.js} +1 -1
  66. package/dist/cdn/{XCFRL5XT.js → NBLJQFA7.js} +1 -1
  67. package/dist/cdn/{7ZCKR7TW.js → NBU2KMJP.js} +1 -1
  68. package/dist/cdn/NBX2RCQR.js +2 -0
  69. package/dist/cdn/NQMXSOYA.js +2 -0
  70. package/dist/cdn/{DKWAWI4G.js → NXJTHWZ6.js} +1 -1
  71. package/dist/cdn/{AUBBEYJL.js → OGAJ4WJ7.js} +1 -1
  72. package/dist/cdn/{M5VLXVNQ.js → OXKHPA3Q.js} +1 -1
  73. package/dist/cdn/{DWHJ45FR.js → PCFYL72V.js} +1 -1
  74. package/dist/cdn/{BKACWDST.js → PK7EJW27.js} +1 -1
  75. package/dist/cdn/{C5SWAPH7.js → PM3ZMOIJ.js} +1 -1
  76. package/dist/cdn/{H4TRF2G7.js → PWHUWOQ3.js} +1 -1
  77. package/dist/cdn/PZGMF6VO.js +2 -0
  78. package/dist/cdn/QNWDRDCX.js +2 -0
  79. package/dist/cdn/{BQLZPSWJ.js → QPYGIJHQ.js} +1 -1
  80. package/dist/cdn/{NDHD5H3P.js → QQMRZ2WI.js} +1 -1
  81. package/dist/cdn/{BV5TOHYG.js → QSWSIFAH.js} +1 -1
  82. package/dist/cdn/{6XW2ZF24.js → RII2VGVJ.js} +1 -1
  83. package/dist/cdn/{FQCG2EFI.js → RX7UZ7F5.js} +1 -1
  84. package/dist/cdn/S772GWA3.js +2 -0
  85. package/dist/cdn/SGI3WLNF.js +2 -0
  86. package/dist/cdn/SXQ2TVKW.js +2 -0
  87. package/dist/cdn/SXSWBX5T.js +2 -0
  88. package/dist/cdn/TEYNP76W.js +2 -0
  89. package/dist/cdn/TH6XSIAF.js +2 -0
  90. package/dist/cdn/{TF3F2YJ6.js → THNBXEBO.js} +1 -1
  91. package/dist/cdn/{AO7QKC5R.js → TMGE65IV.js} +1 -1
  92. package/dist/cdn/U6MJCS5P.js +2 -0
  93. package/dist/cdn/{6F74ZAGM.js → UI3WY3TF.js} +1 -1
  94. package/dist/cdn/{7NZ3RJFV.js → UXAGLEJM.js} +1 -1
  95. package/dist/cdn/{64NRJZKN.js → V2WAYK5G.js} +1 -1
  96. package/dist/cdn/{BLCWXWUR.js → V5BCQN5U.js} +1 -1
  97. package/dist/cdn/{CGX6YKBP.js → V75YULVA.js} +1 -1
  98. package/dist/cdn/{5UU2W2M6.js → VKS44KV4.js} +1 -1
  99. package/dist/cdn/{SHWP2FT2.js → VUBYPGZG.js} +1 -1
  100. package/dist/cdn/VYGJEX36.js +2 -0
  101. package/dist/cdn/{VU5VTC5L.js → WKQGRP5P.js} +1 -1
  102. package/dist/cdn/{FWRSYP3I.js → X4GCKBT2.js} +1 -1
  103. package/dist/cdn/{7T744GFJ.js → XATZUXUP.js} +1 -1
  104. package/dist/cdn/XDKRJYZ2.js +2 -0
  105. package/dist/cdn/YDA23ZS6.js +2 -0
  106. package/dist/cdn/{5IEUHTZ7.js → YFU47LWN.js} +1 -1
  107. package/dist/cdn/{GMLGEIYS.js → YXWMVZUC.js} +1 -1
  108. package/dist/cdn/YYHDUC6G.js +2 -0
  109. package/dist/cdn/Z7OHVQMR.js +2 -0
  110. package/dist/cdn/{6L5QFCR6.js → ZY5BJB25.js} +1 -1
  111. package/dist/cdn/{NF5AJJQU.js → ZZBKWWAW.js} +1 -1
  112. package/dist/cdn/assets/portal-delete-items/t9n/messages.en.json +1 -0
  113. package/dist/cdn/assets/portal-review-related-items/t9n/messages.en.json +1 -0
  114. package/dist/cdn/index.js +1 -1
  115. package/dist/cdn/main.css +1 -1
  116. package/dist/chunks/functional.js +9 -0
  117. package/dist/components/arcgis-portal-account-switcher/customElement.d.ts +1 -0
  118. package/dist/components/arcgis-portal-account-switcher/customElement.js +117 -116
  119. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +128 -0
  120. package/dist/components/arcgis-portal-delete-items/customElement.js +452 -0
  121. package/dist/components/arcgis-portal-delete-items/index.d.ts +1 -0
  122. package/dist/components/arcgis-portal-delete-items/index.js +13 -0
  123. package/dist/components/arcgis-portal-delete-items/services.d.ts +7 -0
  124. package/dist/components/arcgis-portal-extent-picker/customElement.js +285 -243
  125. package/dist/components/arcgis-portal-extent-picker/index.js +3 -0
  126. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +8 -8
  127. package/dist/components/arcgis-portal-navigation/customElement.js +35 -37
  128. package/dist/components/arcgis-portal-navigation/index.js +4 -4
  129. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +27 -0
  130. package/dist/components/arcgis-portal-review-related-items/customElement.js +42 -0
  131. package/dist/components/arcgis-portal-review-related-items/index.d.ts +1 -0
  132. package/dist/components/arcgis-portal-review-related-items/index.js +5 -0
  133. package/dist/docs/api.json +1 -1
  134. package/dist/docs/docs.json +1 -1
  135. package/dist/docs/vscode.html-custom-data.json +1 -1
  136. package/dist/docs/web-types.json +1 -1
  137. package/dist/index.d.ts +14 -0
  138. package/dist/loader.js +3 -1
  139. package/dist/types/lumina.d.ts +14 -1
  140. package/dist/types/preact.d.ts +16 -1
  141. package/dist/types/react.d.ts +18 -1
  142. package/dist/types/services.d.ts +9 -0
  143. package/dist/types/stencil.d.ts +14 -1
  144. package/package.json +7 -6
  145. package/dist/cdn/2HI6C3VG.js +0 -2
  146. package/dist/cdn/3R4I7T7Y.js +0 -2
  147. package/dist/cdn/465E43FF.js +0 -2
  148. package/dist/cdn/6PRXL6A7.js +0 -2
  149. package/dist/cdn/7LIVNXCJ.js +0 -2
  150. package/dist/cdn/A2OPVUV2.js +0 -2
  151. package/dist/cdn/BTGSJRJK.js +0 -2
  152. package/dist/cdn/C7FIYNJZ.js +0 -2
  153. package/dist/cdn/CK2D7FWY.js +0 -2
  154. package/dist/cdn/CQYLVRUF.js +0 -2
  155. package/dist/cdn/GXQMTKYF.js +0 -2
  156. package/dist/cdn/H2BBKRIY.js +0 -2
  157. package/dist/cdn/HGKH2F4Y.js +0 -2
  158. package/dist/cdn/KXSBIXYI.js +0 -2
  159. package/dist/cdn/L3UUTA7H.js +0 -2
  160. package/dist/cdn/LD2SO7MK.js +0 -2
  161. package/dist/cdn/LDY4QCZH.js +0 -2
  162. package/dist/cdn/LR6IOINV.js +0 -2
  163. package/dist/cdn/M3PJPM3Q.js +0 -2
  164. package/dist/cdn/ML2ETZQ5.js +0 -2
  165. package/dist/cdn/NMMQRFHX.js +0 -2
  166. package/dist/cdn/OO2IP4WZ.js +0 -2
  167. package/dist/cdn/PBWAZUZ4.js +0 -2
  168. package/dist/cdn/QTDRRCS2.js +0 -2
  169. package/dist/cdn/SXE3WUK6.js +0 -2
  170. package/dist/cdn/UFEBKEX7.js +0 -2
  171. package/dist/cdn/VLLPYVQB.js +0 -2
  172. package/dist/cdn/W47ZH7KA.js +0 -2
  173. package/dist/cdn/WFTFIAEX.js +0 -2
  174. package/dist/cdn/WIU3MYUE.js +0 -2
  175. package/dist/cdn/WKFQOWXJ.js +0 -2
  176. /package/dist/cdn/{DG6DAKQ2.js → ASDS73QU.js} +0 -0
  177. /package/dist/cdn/{N5KMTTYL.js → OTMC7MVD.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as o}from"./N5KMTTYL.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
2
+ import{i as o}from"./OTMC7MVD.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import e from"./LFRTGSGI.js";import"./6TO2BYXU.js";import d from"./OEMNHYK6.js";import"./6KVA4AKM.js";import"./ILDTKRON.js";import"./CFBSBZSS.js";import"./OBBYT2AV.js";import"./DFTUMKSN.js";import c from"./RBGARTND.js";import b from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,{b:r}])=>{return r},a,b,c,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./NDHD5H3P.js";import{M as m,Q as l,T as u,h as p,j as s,w as d}from"./N5KMTTYL.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
2
+ import{a as g}from"./QQMRZ2WI.js";import{M as m,Q as l,T as u,h as p,j as s,w as d}from"./OTMC7MVD.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as s}from"./S2BGAMSA.js";import{a as i}from"./FWRSYP3I.js";import{Ic as o}from"./DG6DAKQ2.js";var n=async t=>{t.map?.allLayers.filter(e=>e.type==="feature")?.forEach(e=>{let r=e;r.featureEffect&&(r.featureEffect=null)});let a=t.map.initialViewProperties?.viewpoint?.targetGeometry;return a?(await t.goTo(a),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},l=async(t,a)=>{let{mapView:e}=s(a,["mapView"]);return await n(e)},c=o(l,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:i.object({})});export{c as a};
2
+ import{a as s}from"./S2BGAMSA.js";import{a as i}from"./X4GCKBT2.js";import{Ic as o}from"./ASDS73QU.js";var n=async t=>{t.map?.allLayers.filter(e=>e.type==="feature")?.forEach(e=>{let r=e;r.featureEffect&&(r.featureEffect=null)});let a=t.map.initialViewProperties?.viewpoint?.targetGeometry;return a?(await t.goTo(a),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},l=async(t,a)=>{let{mapView:e}=s(a,["mapView"]);return await n(e)},c=o(l,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:i.object({})});export{c as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as p}from"./CFBSBZSS.js";import{a as m}from"./QQMRZ2WI.js";import{M as c,Q as n,T as o,h as r,j as i}from"./OTMC7MVD.js";export default $arcgis.t(([{substitute:_}])=>{var u=r`:host{display:block}.item{display:block;color:var(--calcite-color-text-1);text-decoration:none}.item-link{text-decoration:none}.item__content{display:flex;flex-direction:column;min-width:0;margin-inline-start:var(--calcite-spacing-unit);overflow-wrap:anywhere}.item__title{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);text-decoration:underline}.item__details{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2)}.item__details-owner{display:inline-block;text-decoration:none}.item__type{font-weight:var(--calcite-font-weight-medium)}.item-card__access{display:flex;align-items:center;color:var(--calcite-color-text-2);font-size:.75rem}.item-card__detail__icon{margin-inline-end:.375rem}.items-directly-using{display:block;padding-block-end:.75rem}`,s=class extends c{constructor(){super(...arguments),this.messages=m({blocking:!0}),this.sourceItem=null,this.relatedItems=[]}static{this.properties={sourceItem:0,relatedItems:0,portal:0,user:0}}static{this.styles=u}getAccessInfoIcon(e){return{public:"globe",private:"lock",org:"organization",shared:"group"}[e]}render(){return this.relatedItems.length?i`<span class="items-directly-using" .innerHTML=${_(this.messages.itemsDirectlyUsing,{itemTitle:this.sourceItem?.title??"",count:this.relatedItems.length})??""}></span><calcite-list label="Related items">${this.relatedItems.map(e=>{let t=e.itemPageUrl??void 0,a=e.title??"",d=this.getAccessInfoIcon(e.access),l=i`<calcite-list-item .label=${a} @calciteListItemSelect=${()=>{t&&window.open(t,"_blank","noopener,noreferrer")}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type></span><div slot=content class="item"><div class="item__content"><span class="item__title">${a}</span><div class="item__details"><span class="item__type"><arcgis-portal-item-type .item=${e} .user=${this.user} .portal=${this.portal} scale=s hide-icon></arcgis-portal-item-type></span>|<span class="item__details-owner">${p(this.user,this.messages._lang)??e.owner}</span></div></div></div><span slot=content-end class="item-card__access"><calcite-icon .icon=${d} scale=s class="item-card__detail__icon"></calcite-icon></span></calcite-list-item>`;return t?i`<a href=${t??n} rel="noopener noreferrer" target=_blank tabindex=-1 class="item-link" @click=${g=>g.preventDefault()}>${l}</a>`:l})}</calcite-list>`:null}};o("arcgis-portal-review-related-items",s);return s},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./625YOS7Q.js";import{b as p}from"./2GBRZSEC.js";import{a as c}from"./NDHD5H3P.js";import{K as r,L as n,M as o,O as m,T as g,h as s,j as e,w as i}from"./N5KMTTYL.js";export default $arcgis.t(([{c:h}])=>{var f=s`.wrapper{container-type:inline-size;container-name:browser-pagination;padding:2rem .5rem}.pagination{width:100%;justify-content:center;transform:scale(.9);transform-origin:center}.hide{display:none}@container browser-pagination (min-width: 641px){.pagination{transform:none}}`,a=class extends o{constructor(){super(...arguments),this.paginationRef=r(),this._messages=c({name:"portal-browser",blocking:!0}),this.total=0,this.start=1,this.num=60,this.store=h(),this.arcgisBrowserPage=i()}static{this.properties={total:9,start:9,num:9,store:0}}static{this.styles=f}async nextPage(){this.paginationRef.value?.nextPage(),await p(10);let t=this.paginationRef.value;t&&this.arcgisBrowserPage.emit({start:t.startItem,total:t.totalItems,num:t.pageSize})}emitPage(t){this.arcgisBrowserPage.emit({start:t.startItem,total:t.totalItems,num:t.pageSize})}render(){return e`<div class="wrapper"><calcite-pagination class=${m({hide:!this.total||this.total<this.num,pagination:!0})} @calcitePaginationChange=${t=>{let l=t.target;this.emitPage(l)}} .startItem=${this.start} .totalItems=${Math.min(this.total,1e4-this.num)} .pageSize=${this.num} scale=m .messageOverrides=${{next:this._messages.pagination.next,previous:this._messages.pagination.prev}} ${n(this.paginationRef)}></calcite-pagination></div>`}};g("arcgis-portal-browser-pagination",a);return a},a)
2
+ import a from"./IMIQY3MT.js";import{b as p}from"./2GBRZSEC.js";import{a as c}from"./QQMRZ2WI.js";import{K as r,L as n,M as o,O as m,T as g,h as s,j as e,w as i}from"./OTMC7MVD.js";export default $arcgis.t(([{c:h}])=>{var f=s`.wrapper{container-type:inline-size;container-name:browser-pagination;padding:2rem .5rem}.pagination{width:100%;justify-content:center;transform:scale(.9);transform-origin:center}.hide{display:none}@container browser-pagination (min-width: 641px){.pagination{transform:none}}`,a=class extends o{constructor(){super(...arguments),this.paginationRef=r(),this._messages=c({name:"portal-browser",blocking:!0}),this.total=0,this.start=1,this.num=60,this.store=h(),this.arcgisBrowserPage=i()}static{this.properties={total:9,start:9,num:9,store:0}}static{this.styles=f}async nextPage(){this.paginationRef.value?.nextPage(),await p(10);let t=this.paginationRef.value;t&&this.arcgisBrowserPage.emit({start:t.startItem,total:t.totalItems,num:t.pageSize})}emitPage(t){this.arcgisBrowserPage.emit({start:t.startItem,total:t.totalItems,num:t.pageSize})}render(){return e`<div class="wrapper"><calcite-pagination class=${m({hide:!this.total||this.total<this.num,pagination:!0})} @calcitePaginationChange=${t=>{let l=t.target;this.emitPage(l)}} .startItem=${this.start} .totalItems=${Math.min(this.total,1e4-this.num)} .pageSize=${this.num} scale=m .messageOverrides=${{next:this._messages.pagination.next,previous:this._messages.pagination.prev}} ${n(this.paginationRef)}></calcite-pagination></div>`}};g("arcgis-portal-browser-pagination",a);return a},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./625YOS7Q.js";import{a as g}from"./NDHD5H3P.js";import{J as d,K as p,L as u,M as m,O as o,Q as s,T as b,h,j as r,w as n}from"./N5KMTTYL.js";export default $arcgis.t(([{c:w}])=>{var f=h`:host{position:relative;display:block}.search{position:absolute;z-index:10;margin-top:1rem;color:var(--calcite-color-text-1);pointer-events:none;inset-inline-start:1.5rem}.search--panel{inset-inline-start:.75rem}.x{position:absolute;z-index:10;top:0;margin-top:.5rem;margin-inline:.25rem;padding:.25rem;border:none;cursor:pointer;color:var(--calcite-color-text-1);outline:none;inset-inline-end:.25rem;background:transparent}.x--icon{display:block}.input{display:block;width:100%;box-sizing:border-box;padding-block:1rem;padding-inline-start:3rem;height:3rem;border:none;position:relative;z-index:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);background-color:transparent;border-bottom:2px solid transparent;font-family:inherit}.input::-webkit-search-cancel-button{display:none}.input::-ms-clear{display:none}.input:focus{outline:none;border-bottom-color:var(--calcite-color-brand)}.input--panel{padding-inline-start:2.5rem;padding-inline-end:1rem}.input--with-clear{padding-inline-end:3rem}.alert:not([calcite-hydrated]){display:none}`,c=class extends m{constructor(){super(...arguments),this.searchInput=p(),this._messages=g({name:"portal-browser",blocking:!0}),this.showClear=!1,this.containsWildcard=!1,this.term="",this.placeholder="",this.allowClear=!0,this.store=w(),this.arcgisBrowserSearch=n(),this.arcgisBrowserSearchInput=n()}static{this.properties={showClear:16,containsWildcard:16,term:1,placeholder:1,allowClear:5,store:0}}static{this.styles=f}async setFocus(){this.searchInput.value?.focus()}connectedCallback(){super.connectedCallback(),this.showClear=!!this.term,this.containsWildcard=this.term.includes("*")}willUpdate(e){e.get("term")!==void 0&&((this.searchInput.value?.value??"")!==this.term&&(this.showClear=!!this.term,this.emitUpdate(this.term)),this.containsWildcard=this.term.includes("*"))}disconnectedCallback(){this.debounceId&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),super.disconnectedCallback()}emitUpdate(e){this.store.searchTerm=e,this.arcgisBrowserSearch.emit(e)}debouncedInput(e){this.debounceId&&window.clearTimeout(this.debounceId),this.debounceId=window.setTimeout(()=>{let t=e.includes("*");this.showClear=!!e,this.containsWildcard=t,t||this.emitUpdate(e)},400)}render(){let e=!!this.store.panel,t=this.placeholder||this._messages.search.search,l=this._messages.search.wildcard,v=this._messages.search.clear;return r`<div><calcite-icon icon=search scale=s class=${o({search:!0,"search--panel":e})}></calcite-icon><input class=${o({input:!0,"input--with-clear":this.allowClear&&this.showClear,"input--panel":e})} .value=${d(this.term??"")} placeholder=${t??s} aria-label=${t??s} @input=${i=>{let a=i.currentTarget.value;a.includes("*")||(this.containsWildcard=!1),this.arcgisBrowserSearchInput.emit(a),this.debouncedInput(a)}} ${u(this.searchInput)}><calcite-alert .open=${this.containsWildcard} scale=m kind=danger class="alert" icon=exclamation-mark-triangle .label=${l} @calciteAlertClose=${()=>{this.containsWildcard=!1}}><div slot=message>${l}</div></calcite-alert>${this.allowClear&&this.showClear&&r`<button class="x" aria-label=${v??s} @click=${()=>{this.arcgisBrowserSearchInput.emit(""),this.emitUpdate(""),this.showClear=!1,this.searchInput.value&&(this.searchInput.value.value="",this.searchInput.value.focus())}} @keydown=${i=>{i.key==="Enter"&&i.stopPropagation()}} tabindex=0><calcite-icon icon=x scale=m class="x--icon"></calcite-icon></button>`||""}</div>`}};b("arcgis-portal-browser-search",c);return c},a)
2
+ import a from"./IMIQY3MT.js";import{a as g}from"./QQMRZ2WI.js";import{J as d,K as p,L as u,M as m,O as o,Q as s,T as b,h,j as r,w as n}from"./OTMC7MVD.js";export default $arcgis.t(([{c:w}])=>{var f=h`:host{position:relative;display:block}.search{position:absolute;z-index:10;margin-top:1rem;color:var(--calcite-color-text-1);pointer-events:none;inset-inline-start:1.5rem}.search--panel{inset-inline-start:.75rem}.x{position:absolute;z-index:10;top:0;margin-top:.5rem;margin-inline:.25rem;padding:.25rem;border:none;cursor:pointer;color:var(--calcite-color-text-1);outline:none;inset-inline-end:.25rem;background:transparent}.x--icon{display:block}.input{display:block;width:100%;box-sizing:border-box;padding-block:1rem;padding-inline-start:3rem;height:3rem;border:none;position:relative;z-index:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);background-color:transparent;border-bottom:2px solid transparent;font-family:inherit}.input::-webkit-search-cancel-button{display:none}.input::-ms-clear{display:none}.input:focus{outline:none;border-bottom-color:var(--calcite-color-brand)}.input--panel{padding-inline-start:2.5rem;padding-inline-end:1rem}.input--with-clear{padding-inline-end:3rem}.alert:not([calcite-hydrated]){display:none}`,c=class extends m{constructor(){super(...arguments),this.searchInput=p(),this._messages=g({name:"portal-browser",blocking:!0}),this.showClear=!1,this.containsWildcard=!1,this.term="",this.placeholder="",this.allowClear=!0,this.store=w(),this.arcgisBrowserSearch=n(),this.arcgisBrowserSearchInput=n()}static{this.properties={showClear:16,containsWildcard:16,term:1,placeholder:1,allowClear:5,store:0}}static{this.styles=f}async setFocus(){this.searchInput.value?.focus()}connectedCallback(){super.connectedCallback(),this.showClear=!!this.term,this.containsWildcard=this.term.includes("*")}willUpdate(e){e.get("term")!==void 0&&((this.searchInput.value?.value??"")!==this.term&&(this.showClear=!!this.term,this.emitUpdate(this.term)),this.containsWildcard=this.term.includes("*"))}disconnectedCallback(){this.debounceId&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),super.disconnectedCallback()}emitUpdate(e){this.store.searchTerm=e,this.arcgisBrowserSearch.emit(e)}debouncedInput(e){this.debounceId&&window.clearTimeout(this.debounceId),this.debounceId=window.setTimeout(()=>{let t=e.includes("*");this.showClear=!!e,this.containsWildcard=t,t||this.emitUpdate(e)},400)}render(){let e=!!this.store.panel,t=this.placeholder||this._messages.search.search,l=this._messages.search.wildcard,v=this._messages.search.clear;return r`<div><calcite-icon icon=search scale=s class=${o({search:!0,"search--panel":e})}></calcite-icon><input class=${o({input:!0,"input--with-clear":this.allowClear&&this.showClear,"input--panel":e})} .value=${d(this.term??"")} placeholder=${t??s} aria-label=${t??s} @input=${i=>{let a=i.currentTarget.value;a.includes("*")||(this.containsWildcard=!1),this.arcgisBrowserSearchInput.emit(a),this.debouncedInput(a)}} ${u(this.searchInput)}><calcite-alert .open=${this.containsWildcard} scale=m kind=danger class="alert" icon=exclamation-mark-triangle .label=${l} @calciteAlertClose=${()=>{this.containsWildcard=!1}}><div slot=message>${l}</div></calcite-alert>${this.allowClear&&this.showClear&&r`<button class="x" aria-label=${v??s} @click=${()=>{this.arcgisBrowserSearchInput.emit(""),this.emitUpdate(""),this.showClear=!1,this.searchInput.value&&(this.searchInput.value.value="",this.searchInput.value.focus())}} @keydown=${i=>{i.key==="Enter"&&i.stopPropagation()}} tabindex=0><calcite-icon icon=x scale=m class="x--icon"></calcite-icon></button>`||""}</div>`}};b("arcgis-portal-browser-search",c);return c},a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as S}from"./5EFYJYWM.js";import e from"./TJYPEMON.js";import c from"./DIOGMUOB.js";import"./CFBSBZSS.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as $}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{M as k,Q as b,T as w,h as D,j as d,w as g}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([x,_,{substitute:C},{b:y},,{b:u}])=>{async function F(s,e,t=!1){try{let i=new Map;for(let n of s){let{id:a,owner:l}=n,c=i.get(l)??[];c.push(a),i.set(l,c)}let r=[];for(let[n,a]of i){let l=`${e.restUrl}/content/users/${encodeURIComponent(n)}/deleteItems`;for(let c of S(a,100)){let o=x(l,{method:"post",query:{f:"json",items:c.join(","),permanentDelete:t}});r.push(o.then(({data:m})=>m))}}return{result:(await Promise.all(r)).flatMap(({results:n})=>n)}}catch{return{error:{code:"unhandledError"}}}}async function B(s){let{item:e,portal:t,permanentlyDelete:i}=s,{id:r,owner:n}=e;if(!r||!n)return{error:{code:"unhandledError"}};let a=t.recycleBinEnabled&&!i?"/canRecycle":"/canDelete",l=`${t.restUrl}/content/users/${encodeURIComponent(n)}/items/${r}${a}`;try{return{result:(await x(l,{query:{f:"json"}})).data}}catch(c){let o=c.details?.raw;switch(o?.messageCode){case"CONT_00481":case"CONT_00483":case"CONT_00484":return{error:{code:"itemHasDependentItems"}};case"CONT_0048":return{error:{code:"itemDeleteProtected"}};default:return{error:{code:"unhandledError",message:o?.message}}}}}function R(s,e){return(s.relatedItems??[]).map(t=>U(t,e))}function U(s,e){return s instanceof _?s:new _({...s,portal:e})}async function p({itemId:s,portal:e,relationship:t,includeRecycleBin:i,nextkey:r}){let{relationshipType:n,direction:a}=t,l=`${e.restUrl}/content/items/${s}/relatedItems`;try{let c=await y({url:l,portal:e,params:{includeRecycleBin:i,f:"json",relationshipType:n?Array.isArray(n)?n.join(","):n:void 0,direction:a,nextkey:r}});return{success:!0,result:{...c,relatedItems:R(c,e)}}}catch(c){return{success:!1,error:c}}}async function P({itemId:s,portal:e,relationship:t,includeRecycleBin:i,num:r,nextkey:n}){let{relationshipRules:a,direction:l}=t,c=`${e.restUrl}/content/items/${s}/relatedItems`;try{let o=await y({url:c,portal:e,params:{includeRecycleBin:i,f:"json",...a?.length?{relationshipRules:a.join(",")}:{},includeSystemManaged:"true",excludedFlags:"legacy,exclude",num:r,direction:l,nextkey:n}});return{success:!0,result:{...o,relatedItems:R(o,e)}}}catch(o){return{success:!1,error:o}}}async function M(s,e){let{id:t,type:i,typeKeywords:r=[]}=s;if(!t)return null;let n=["Scene Service","Map Service","WFS","OGCFeatureServer","Vector Tile Service","3DTiles Service"].includes(i),a=["Map Service","Vector Tile Service"].includes(i),l=o=>o?.typeKeywords?.includes("View Service")??!1,c=()=>n?[{relationshipType:["Service2Service"],direction:"reverse"},{relationshipType:["Service2Data"],direction:"forward"}]:r.includes("Bulk Published Service")?{relationshipType:["DataStore2BPService"],direction:"reverse"}:i==="Geoprocessing Service"&&r.includes("Notebook Web Tool")?{relationshipType:["Notebook2WebTool"],direction:"reverse"}:r.includes("Route Layer")?{relationshipType:["Service2Route"],direction:"reverse"}:i==="Mobile Application"?{relationshipType:["MobileApp2Code"],direction:"reverse"}:i==="Map Package"?{relationshipType:["Area2Package"],direction:"reverse"}:i==="Feature Service"?{relationshipType:["Service2Layer"],direction:"reverse"}:r.includes("Document")?{relationshipType:["Item2Attachment"],direction:"reverse"}:i==="Application Configuration"?{relationshipType:["Map2AppConfig"],direction:"reverse"}:{relationshipType:["Service2Data"],direction:"forward"};try{let o=c();if(!o)return null;if(!Array.isArray(o))return{sourceData:(await p({itemId:t,portal:e,relationship:o})).result?.relatedItems?.[0]??null,relationship:o};if(n){let m={relationshipType:["Service2Service"],direction:"reverse"},v=await p({itemId:t,portal:e,relationship:m}),h=v.result?.total?v.result.relatedItems.shift()??null:null;if(a&&!l(h)||!h){m={relationshipType:["Service2Data"],direction:"forward"};let f=await p({itemId:t,portal:e,relationship:m});return{sourceData:f.result?.total?f.result.relatedItems.shift()??h:h,relationship:m}}return{sourceData:h,relationship:m}}return null}catch(o){return console.error(o),{sourceData:null,relationship:{direction:"forward"}}}}async function A(s,e){let{id:t,type:i,typeKeywords:r=[]}=s;try{let n=i==="Notebook"?{relationshipType:["Notebook2WebTool"],direction:"forward"}:r.includes("Has Related Route Layers")?{relationshipType:["Service2Route"],direction:"forward"}:r.includes("Hosted Service")||i==="Feature Service"?{relationshipType:["Service2Service"],direction:i==="Feed"?"reverse":"forward"}:i==="Data Store"||r.includes("ArcGIS Server")?{relationshipType:["DataStore2BPService"],direction:"forward"}:{relationshipType:["Service2Data"],direction:"reverse"},a=await p({itemId:t,portal:e,relationship:n});return{resultData:{items:a.result?.total?a.result.relatedItems:null,count:a.result?.total??0},relationship:n}}catch(n){return console.error(n),{resultData:{items:null,count:0},relationship:{direction:"forward"}}}}async function L(s,e){let{id:t}=s;try{return(await p({itemId:t,portal:e,relationship:{relationshipType:["ReplacementItem2Item"],direction:"forward"}})).result?.relatedItems??[]}catch(i){return console.error(i),[]}}async function N(s,e){let t=await P({itemId:s.id,portal:e,relationship:{direction:"forward"}}),i=await M(s,e),r=await A(s,e),n=await L(s,e),a={usedByItems:t.result?.relatedItems??[],sourceData:i?.sourceData??null,resultData:r.resultData.items,replacementItemFor:n.length?n:null},{result:l,error:c}=await B({item:s,portal:e,permanentlyDelete:!1});if(c)switch(c.code){case"itemHasDependentItems":return{item:s,...a,kind:"cannotDelete",reason:"hasDependentItems"};case"itemDeleteProtected":return{item:s,...a,kind:"cannotDelete",reason:"deleteProtected"};default:return{item:s,...a,kind:"cannotDelete",reason:"uncaught"}}if(!l?.success){let{result:o}=await B({item:s,portal:e,permanentlyDelete:!0});return o?.success?{item:s,...a,kind:"permanentlyDelete",reason:"notSupported"}:{item:s,...a,kind:"cannotDelete",reason:"uncaught"}}return{item:s,...a,kind:"recycle"}}var E=D`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.panel__checkbox{width:100%;padding-block:.75rem;padding-inline-start:.75rem;background-color:var(--calcite-color-foreground-1)}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}.discouraged-items-warning{margin-bottom:.75rem}`;function j({recycleItems:s,cannotDeleteItems:e,permanentlyDeleteItems:t}){return[...s,...e,...t]}function H(s){return s.map(({item:e,sourceData:t,resultData:i,replacementItemFor:r})=>({item:e,sourceData:t,resultData:i,replacementItemFor:r}))}function O(s,e,t){return!e&&!!t?.length&&!u(s)}function q({selectedItems:s}){let e=[];return e.push(...s.flatMap(({item:t,sourceData:i,resultData:r,replacementItemFor:n})=>{let a=O(t,i,r),l=!!(r?.some(c=>!c.inRecycleBin)&&!z(t,r)&&!W(t,r));return a&&l?[{item:t,reason:"dependent",offendingItems:r??void 0}]:n&&n?.length>0?[{item:t,reason:"replacement",offendingItems:n}]:[]})),e}function z(s,e){let t=e[0];return s.type==="Feed"&&u(s)&&e.length===1&&t?.type==="Feature Service"&&u(t)}function W(s,e){let t=e[0];return s.type==="Feature Service"&&u(s)&&e.length===1&&t?.type==="Feed"&&u(t)}function G(s,e,t,i){let r=["id","ja","ko","th","vi","zh-cn","zh-hk","zh-tw"],n=["en","ca","da","de","el","es","et","fi","hi","hu","it","nb","nl","pt-pt","sv","tr"],a=s??"en",l=e.unknown;return(t===1||r.includes(a))&&(l=e.single),t!==1&&n.includes(a)&&(l=e.multiple),C(l,{...i,number:t})}function T({id:s,linkText:e,label:t,placement:i,relatedItems:r,portal:n,user:a}){return d`<calcite-link id=${s??b}>${e}</calcite-link><calcite-popover .label=${t} .referenceElement=${s} .placement=${i}><arcgis-portal-review-related-items .relatedItems=${r} .portal=${n} .user=${a}></arcgis-portal-review-related-items></calcite-popover>`}var I=class extends k{constructor(){super(...arguments),this.deleteStatusRequestId=0,this.messages=$({blocking:!0}),this.isLoading=!0,this.hasReviewedImpactedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.reviewingDirectlyUsedByItems=!1,this.markedForDeprecation=[],this.active=!0,this.items=[],this.user=null,this.disableLinks=!1,this.arcgisCancel=g(),this.arcgisConfirm=g(),this.arcgisError=g()}static{this.properties={isLoading:16,hasReviewedImpactedItems:16,cannotDeleteItems:16,recycleItems:16,permanentlyDeleteItems:16,reviewingDirectlyUsedByItems:16,markedForDeprecation:16,active:5,items:0,portal:0,user:0,disableLinks:5}}static{this.styles=E}willUpdate(e){let t=e.has("items")||e.has("portal")||e.has("user")||e.has("active");this.active&&t&&(this.user??=this.portal?.user||null,this.resetState(),this.determineDeleteStatus(++this.deleteStatusRequestId))}async handleDelete(){let{result:e=[]}=await F(this.recycleItems.map(({item:t})=>t),{restUrl:this.portal.restUrl});this.active=!1,this.arcgisConfirm.emit({deletedItems:e,permanentlyDeletedItems:null,deletedItemsCount:e?.length??0,permanentlyDeletedItemsCount:0})}handleDialogClose(){this.active&&this.arcgisCancel.emit(),this.active=!1,this.resetState()}resetState(){this.isLoading=!0,this.hasReviewedImpactedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.reviewingDirectlyUsedByItems=!1,this.markedForDeprecation=[],++this.deleteStatusRequestId}async determineDeleteStatus(e){let t=await Promise.all(this.items.map(async i=>await N(i,this.portal)));e===this.deleteStatusRequestId&&(this.cannotDeleteItems=t.filter(i=>i.kind==="cannotDelete"),this.recycleItems=t.filter(i=>i.kind==="recycle"),this.permanentlyDeleteItems=t.filter(i=>i.kind==="permanentlyDelete"),this.isLoading=!1)}get recyclableItemsHaveImpactedItems(){return this.recycleItems.some(({usedByItems:e})=>e.length>0)}get itemsNeedReview(){return this.recycleItems.some(({usedByItems:e})=>e.length>0)}get deleteButtonEnabled(){return!this.isLoading&&(!this.itemsNeedReview||this.hasReviewedImpactedItems)}get deleteMode(){return this.markedForDeprecation.length>0?"deprecate":this.permanentlyDeleteItems.length>0?"permanentlyDelete":this.recycleItems.length>0&&this.cannotDeleteItems.length>0?"mixed":this.recycleItems.length>0?"delete":(this.cannotDeleteItems.length>0,"none")}getHeaderText(){return this.items.length===1?this.messages.deleteItem:this.messages.deleteItems}renderBucket({icon:e,label:t,description:i,link:r,bucket:n}){return d`<calcite-block scale=l expanded><div class="bucket__content"><calcite-icon class="bucket__icon" scale=l .icon=${e}></calcite-icon><div class="bucket__details"><div class="bucket__header"><span class="bucket__label">${t}</span><span>${this.renderBucketItems(n)}</span></div><span class="bucket__description">${i}</span>${r&&d`<div class="bucket__link"><calcite-link .href=${r.href} target=_blank icon-start=launch>${r.text??this.messages.moreInfo}</calcite-link></div>`||""}</div></div></calcite-block>`}renderBucketItems(e=[]){if(e.length===0)return null;if(e.length===1){let r=e[0].item,n=r.itemPageUrl??void 0;return d`<calcite-link .href=${n} target=_blank><arcgis-portal-item-type .item=${r} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type>${r.title}</calcite-link>`}let t=`delete-items-bucket-${e.map(({item:r})=>r.id).join("-")}`,i=e.map(({item:r})=>r);return T({id:t,linkText:e.length,label:this.messages.bucketItems.replace("{count}",String(e.length)),placement:"bottom-start",relatedItems:i,portal:this.portal,user:this.user})}renderRelatedItemsPopover(e){let t=e.flatMap(({usedByItems:i})=>i);return e.length>1||t.length===0?null:T({id:"delete-items-directly-used-by",linkText:G(this.messages._t9nLocale,this.messages.usedByOtherItems,t.length),label:this.messages.usedByPopover,placement:"auto",relatedItems:t,portal:this.portal,user:this.user})}renderDirectlyUsedByItems(){let e=j({recycleItems:this.recycleItems,cannotDeleteItems:this.cannotDeleteItems,permanentlyDeleteItems:this.permanentlyDeleteItems}),t=e.flatMap(({usedByItems:r})=>r),i=q({selectedItems:H(e)});return d`${this.items.length===1&&this.deleteMode==="delete"&&i.length>0?d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${this.messages.deleteDiscouraged}</div><calcite-link icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link></calcite-notice></div>`:null}<arcgis-portal-review-related-items .sourceItem=${this.items[0]??null} .relatedItems=${t} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>`}renderDirectlyUsedByItemsNotice(){let e=this.recycleItems.filter(({usedByItems:i})=>i.length>0).length,t=this.messages.reviewRelatedItems[this.items.length===1?"single":"multiple"].replace("{affectedCount}",String(e)).replace("{totalCount}",String(this.items.length));return d`<div class="panel__related-items-notice"><calcite-notice kind=warning icon open><div slot=message>${t}</div><calcite-button appearance=transparent slot=actions-end @click=${()=>this.reviewingDirectlyUsedByItems=!0}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`}renderSingleItemDelete(){return d`<calcite-panel>${this.renderRecycleBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.renderDirectlyUsedByItems()}${this.recyclableItemsHaveImpactedItems&&d`<div>${this.items.length>1?this.renderDirectlyUsedByItemsNotice():null}</div>`||""}</calcite-panel>`}renderRecycleBucket(){return!this.recycleItems||this.recycleItems.length===0?null:this.renderBucket({icon:"recycle-bin",label:this.messages.summary.willBeRecycled,description:this.messages.summary.canBeRecovered.single.replace("{days}","14"),bucket:this.recycleItems})}renderCannotDeleteBucket(){if(!this.cannotDeleteItems||this.cannotDeleteItems.length===0)return null;let e=this.cannotDeleteItems?.[0]?.reason;return this.renderBucket({icon:"security",label:this.messages.summary.cannotDelete,description:e==="hasDependentItems"?this.messages.summary.protectedGroup.hasDependentItemsDescription.singleOneDependentItem:this.messages.summary.protectedGroup.deleteProtectedDescription,bucket:this.cannotDeleteItems})}renderPermanentlyDeleteBucket(){return!this.permanentlyDeleteItems||this.permanentlyDeleteItems.length===0?null:this.renderBucket({icon:"trash",label:this.messages.summary.permanentlyDelete,description:this.messages.summary.permanentDelete.notSupported.single,bucket:this.permanentlyDeleteItems})}render(){let{items:e,portal:t,deleteMode:i}=this;if(!(!e||!t))return d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}><div class="panel__content">${this.isLoading?d`<calcite-scrim loading></calcite-scrim>`:this.renderSingleItemDelete()}</div>${this.itemsNeedReview&&d`<calcite-checkbox slot=content-bottom class="panel__checkbox" @calciteCheckboxChange=${r=>{this.hasReviewedImpactedItems=r.target.checked}} .labelText=${this.messages.reviewImpactedItems}></calcite-checkbox>`||""}<calcite-button slot=footer-end appearance=outline-fill @click=${()=>{this.active=!1,this.arcgisCancel.emit()}}>${this.messages.cancel}</calcite-button>${i!=="none"&&d`<calcite-button .disabled=${!this.deleteButtonEnabled} kind=danger slot=footer-end @click=${async()=>await this.handleDelete()}>${this.messages.delete}</calcite-button>`||""}</calcite-dialog>`}};w("arcgis-portal-delete-items",I);return I},"request","portal/PortalItem","intl",a,c,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{B as k,C as w,D as V,E as m,F as h,G as A,H as D,I as y,l as P}from"./N5KMTTYL.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
2
+ import{B as k,C as w,D as V,E as m,F as h,G as A,H as D,I as y,l as P}from"./OTMC7MVD.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as u}from"./S2BGAMSA.js";import{Fc as s,Ic as d}from"./DG6DAKQ2.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
2
+ import{a as u}from"./S2BGAMSA.js";import{Fc as s,Ic as d}from"./ASDS73QU.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as c}from"./S2BGAMSA.js";import{a as e}from"./FWRSYP3I.js";import{Ic as n}from"./DG6DAKQ2.js";export default $arcgis.t(([m])=>{async function r(t,a,o){let i={target:new m({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return o?.zoom!==void 0&&(i.zoom=o.zoom),o?.scale!==void 0&&(i.scale=o.scale),await a.goTo(i),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,o?.zoom!==void 0?`zoom ${o.zoom}`:"",o?.scale!==void 0?`scale 1:${o.scale}`:""].filter(Boolean).join(", ")}`}}async function s({center:t,zoom:a,scale:o},i){let{mapView:l}=c(i,["mapView"]);return await r(t,l,{zoom:a,scale:o})}var d=e.object({center:e.object({longitude:e.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:e.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:e.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:e.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),g=n(s,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:d});return g},"geometry/Point")
2
+ import{a as c}from"./S2BGAMSA.js";import{a as e}from"./X4GCKBT2.js";import{Ic as n}from"./ASDS73QU.js";export default $arcgis.t(([m])=>{async function r(t,a,o){let i={target:new m({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return o?.zoom!==void 0&&(i.zoom=o.zoom),o?.scale!==void 0&&(i.scale=o.scale),await a.goTo(i),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,o?.zoom!==void 0?`zoom ${o.zoom}`:"",o?.scale!==void 0?`scale 1:${o.scale}`:""].filter(Boolean).join(", ")}`}}async function s({center:t,zoom:a,scale:o},i){let{mapView:l}=c(i,["mapView"]);return await r(t,l,{zoom:a,scale:o})}var d=e.object({center:e.object({longitude:e.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:e.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:e.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:e.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),g=n(s,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:d});return g},"geometry/Point")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as k,b as D,c as _}from"./6TO2BYXU.js";import l from"./CVOWIH4J.js";import{a as A}from"./CFBSBZSS.js";import{a as C,c as U}from"./5H6OROJK.js";import"./ILDTKRON.js";import j from"./TJYPEMON.js";import{a as w}from"./NF5AJJQU.js";import i from"./RBGARTND.js";import e from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import{f as b}from"./VMQIDO4Z.js";import{b as f}from"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as v}from"./NDHD5H3P.js";import"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{K as d,L as I,M as u,Q as R,T as g,h as p,j as c,w as h}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([P,,,{a:$},{q:T},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=B/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await T(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?A(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
2
+ import{a as k,b as D,c as _}from"./6TO2BYXU.js";import l from"./CVOWIH4J.js";import{a as C,c as U}from"./N4UNPHFQ.js";import"./ILDTKRON.js";import j from"./TJYPEMON.js";import{a as T}from"./CFBSBZSS.js";import{a as w}from"./ZZBKWWAW.js";import i from"./RBGARTND.js";import e from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import{f as b}from"./VMQIDO4Z.js";import{b as f}from"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as v}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{K as d,L as I,M as u,Q as R,T as g,h as p,j as c,w as h}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([P,,,{a:$},{q:A},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=B/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await A(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?T(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a}from"./D4MCG57T.js";import"./S2BGAMSA.js";import"./X4GCKBT2.js";import"./ASDS73QU.js";import"./UZLQALHY.js";export{a as resetMapTool};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./4RPNBHB5.js";import{a as x,b as O}from"./PQ75545K.js";import a from"./37HLLREH.js";import{a as L}from"./S2BGAMSA.js";import{a as e}from"./FWRSYP3I.js";import{Ic as T}from"./DG6DAKQ2.js";export default $arcgis.t(([{a:p,b:g,c:b,d:v,e:R,f:j},{c:N}])=>{var w=25,k=i=>i.flatMap(r=>r.split(",")).map(r=>r.trim()).map(r=>r.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(r=>!!r),E=async(i,r,t,l)=>{let s=r.map?.allLayers.find(u=>u.id===i.layerId),d=await r.whenLayerView(s),f=s.title??i.layerId,h;if(t){let u=await v(t,r);if("error"in u){let o={error:u.error};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"Geometry lookup failed",details:o}}if(!u.geometry){let o={};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.error=`No features found matching: ${t.where}`,o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.error="Failed to create point geometry",o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"No features found for geometry filter",details:o}}h=u.geometry}else l&&(h=r.extent.clone());let C=[...new Set([...i.outFields,...k(i.orderByFields)])],F=x(d,C,l??!1),I=s.objectIdField,a=s.createQuery();a.where=O(s.definitionExpression,i.where||"1=1"),a.outFields=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,I])],a.orderByFields=i.orderByFields,h&&(a.geometry=h,a.spatialRelationship="intersects"),t?.distance&&(a.distance=t.distance),t?.units&&(a.units=t.units),a.outSpatialReference=r.spatialReference;let n,y;try{n=F?await d.queryFeatureCount(a):await s.queryFeatureCount(a),n>0&&n<=w&&(y=F?await d.queryFeatures(a):await s.queryFeatures(a))}catch(u){console.warn("Client-side query failed, falling back to server:",u),n=await s.queryFeatureCount(a),n>0&&n<=w&&(y=await s.queryFeatures(a))}let{objectIds:q,attributes:S}=y?N(s,y,r.timeZone):{objectIds:void 0,attributes:void 0};return{tool:"queryFeatures",layerName:f,summary:`${n} features found`,details:{totalCount:n,where:i.where,orderByFields:i.orderByFields,outFields:i.outFields,...q&&{objectIds:q,objectIdField:I},...S&&{attributes:S},...n>w&&{note:`${n} features found.`}}}};async function W({targetLayer:i,geometryFilter:r,useCurrentExtent:t},l){let{mapView:s}=L(l,["mapView"]),d=j(r,l.state?.agentExecutionContext?.sharedResources),f=await E(i,s,d,t);return JSON.stringify(f,null,2)}var B=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:p.optional().describe("The units for the distance buffer.")}),U=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:p.optional().describe("The units for the distance buffer.")}),D=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point or geometryFilter.sharedResourceId for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([B,U,R]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer).")}),H=T(W,{name:"queryFeatures",description:`Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if \u226425 features match.
2
+ import b from"./4RPNBHB5.js";import{a as x,b as O}from"./PQ75545K.js";import a from"./K4LXMVNH.js";import{a as L}from"./S2BGAMSA.js";import{a as e}from"./X4GCKBT2.js";import{Ic as T}from"./ASDS73QU.js";export default $arcgis.t(([{a:p,b:g,c:b,d:v,e:R,f:j},{c:N}])=>{var w=25,k=i=>i.flatMap(r=>r.split(",")).map(r=>r.trim()).map(r=>r.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(r=>!!r),E=async(i,r,t,l)=>{let s=r.map?.allLayers.find(u=>u.id===i.layerId),d=await r.whenLayerView(s),f=s.title??i.layerId,h;if(t){let u=await v(t,r);if("error"in u){let o={error:u.error};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"Geometry lookup failed",details:o}}if(!u.geometry){let o={};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.error=`No features found matching: ${t.where}`,o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.error="Failed to create point geometry",o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"No features found for geometry filter",details:o}}h=u.geometry}else l&&(h=r.extent.clone());let C=[...new Set([...i.outFields,...k(i.orderByFields)])],F=x(d,C,l??!1),I=s.objectIdField,a=s.createQuery();a.where=O(s.definitionExpression,i.where||"1=1"),a.outFields=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,I])],a.orderByFields=i.orderByFields,h&&(a.geometry=h,a.spatialRelationship="intersects"),t?.distance&&(a.distance=t.distance),t?.units&&(a.units=t.units),a.outSpatialReference=r.spatialReference;let n,y;try{n=F?await d.queryFeatureCount(a):await s.queryFeatureCount(a),n>0&&n<=w&&(y=F?await d.queryFeatures(a):await s.queryFeatures(a))}catch(u){console.warn("Client-side query failed, falling back to server:",u),n=await s.queryFeatureCount(a),n>0&&n<=w&&(y=await s.queryFeatures(a))}let{objectIds:q,attributes:S}=y?N(s,y,r.timeZone):{objectIds:void 0,attributes:void 0};return{tool:"queryFeatures",layerName:f,summary:`${n} features found`,details:{totalCount:n,where:i.where,orderByFields:i.orderByFields,outFields:i.outFields,...q&&{objectIds:q,objectIdField:I},...S&&{attributes:S},...n>w&&{note:`${n} features found.`}}}};async function W({targetLayer:i,geometryFilter:r,useCurrentExtent:t},l){let{mapView:s}=L(l,["mapView"]),d=j(r,l.state?.agentExecutionContext?.sharedResources),f=await E(i,s,d,t);return JSON.stringify(f,null,2)}var B=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:p.optional().describe("The units for the distance buffer.")}),U=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:p.optional().describe("The units for the distance buffer.")}),D=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point or geometryFilter.sharedResourceId for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([B,U,R]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer).")}),H=T(W,{name:"queryFeatures",description:`Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if \u226425 features match.
3
3
 
4
4
  USE THIS TOOL FOR:
5
5
  - "Show / display / list features where..." \u2014 finding and listing features
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./625YOS7Q.js";import a from"./7EPXWK4L.js";import"./7NZ3RJFV.js";import{M as o,T as s,j as e,w as r}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
2
+ import b from"./IMIQY3MT.js";import a from"./ICUDZDC6.js";import"./UXAGLEJM.js";import{M as o,T as s,j as e,w as r}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./JZID64Z6.js";import{a as f}from"./KYNL256E.js";import{a as m}from"./H4TRF2G7.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as d}from"./NDHD5H3P.js";import"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{M as h,T as p,j as n,w as a}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:o}])=>{var l=class extends h{constructor(){super(...arguments),this.messages=d({blocking:!0,name:"portal-account-switcher"}),this.tipReference=null,this.tooltipText="",this.linkedAccounts=[],this.interactive=!1,this.signedInUsers=[],this.accountAccess={},this.actions=[],this.arcgisAccountSwitch=a(),this.arcgisAccountUnlink=a()}static{this.properties={tipReference:16,tooltipText:16,portal:0,linkedAccounts:0,interactive:5,signedInUsers:0,accountAccess:0,actions:0}}static{this.styles=m}connectedCallback(){super.connectedCallback(),this.interactive&&this.actions.length===0?this.actions=["switch","unlink"]:this.interactive||(this.actions=[])}formatProvider(i){if(i.startsWith("oidc_"))return"OpenID";switch(i){case"arcgis":return"ArcGIS";case"enterprise":return"SAML";case"apple":return"Apple";case"facebook":return"Facebook";case"github":return"GitHub";case"google":return"Google";default:return"Unknown"}}formatProviderLabel(i){let{messages:e}=this;if(i.startsWith("oidc_"))return e.oidcProvider;switch(i){case"arcgis":return e.arcgisProvider;case"enterprise":return e.samlProvider;case"apple":return e.appleProvider;case"facebook":return e.facebookProvider;case"github":return e.githubProvider;case"google":return e.googleProvider;default:return"Account provider"}}formatSwitchToLabel(i,e,c=!0){let{messages:s}=this;return i.disabled?s.userDisabled:e[i.username]?.allowed??!0?c?i.orgName?o(s.switchToOrgUser,i):o(s.switchToPublicUser,i):s.switchTo:s.userNotAllowed}render(){let{linkedAccounts:i,messages:e,accountAccess:c,interactive:s,portal:$,actions:u}=this;return n`${g(i,t=>t.id??t.username,t=>n`<calcite-block .label=${t.orgName?`${t.username}, ${t.orgName}`:t.username} heading-level=4 .heading=${t.username} .description=${t.orgName?`${t.fullname}, ${t.orgName}`:t.fullname} class="linked-account"><calcite-avatar slot=content-start inert .fullName=${t.fullname} .username=${t.username} .userId=${t.id} .thumbnail=${f({fullName:t.fullname,...t},$)??void 0}></calcite-avatar><calcite-chip slot=content-end kind=neutral scale=s .label=${this.formatProviderLabel(t.provider)} class="provider-chip" @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatProviderLabel(t.provider)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}}>${this.formatProvider(t.provider)}</calcite-chip>${s&&n`${u.includes("unlink")&&n`<calcite-button appearance=transparent slot=actions-end kind=danger icon-start=unlink .label=${o(t.orgName?e.unlinkOrgUser:e.unlinkPublicUser,t)} .id=${`unlink-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountUnlink.emit({account:t})}}></calcite-button>`||""}${u.includes("switch")&&n`<calcite-button appearance=transparent slot=actions-end kind=neutral icon-start=sign-in .label=${this.formatSwitchToLabel(t,c)} .disabled=${t.disabled||!(c[t.username]?.allowed??!0)} .id=${`switch-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountSwitch.emit({account:t})}}></calcite-button>`||""}`||""}</calcite-block>`)}<calcite-tooltip .open=${!!this.tipReference} .referenceElement=${this.tipReference}>${this.tooltipText}</calcite-tooltip>`}};p("arcgis-portal-account-switcher-list",l);return l},"intl")
2
+ import{a as g}from"./EXPBHQ4I.js";import{a as f}from"./KYNL256E.js";import{a as m}from"./PWHUWOQ3.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as d}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{M as h,T as p,j as n,w as a}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:o}])=>{var l=class extends h{constructor(){super(...arguments),this.messages=d({blocking:!0,name:"portal-account-switcher"}),this.tipReference=null,this.tooltipText="",this.linkedAccounts=[],this.interactive=!1,this.signedInUsers=[],this.accountAccess={},this.actions=[],this.arcgisAccountSwitch=a(),this.arcgisAccountUnlink=a()}static{this.properties={tipReference:16,tooltipText:16,portal:0,linkedAccounts:0,interactive:5,signedInUsers:0,accountAccess:0,actions:0}}static{this.styles=m}connectedCallback(){super.connectedCallback(),this.interactive&&this.actions.length===0?this.actions=["switch","unlink"]:this.interactive||(this.actions=[])}formatProvider(i){if(i.startsWith("oidc_"))return"OpenID";switch(i){case"arcgis":return"ArcGIS";case"enterprise":return"SAML";case"apple":return"Apple";case"facebook":return"Facebook";case"github":return"GitHub";case"google":return"Google";default:return"Unknown"}}formatProviderLabel(i){let{messages:e}=this;if(i.startsWith("oidc_"))return e.oidcProvider;switch(i){case"arcgis":return e.arcgisProvider;case"enterprise":return e.samlProvider;case"apple":return e.appleProvider;case"facebook":return e.facebookProvider;case"github":return e.githubProvider;case"google":return e.googleProvider;default:return"Account provider"}}formatSwitchToLabel(i,e,c=!0){let{messages:s}=this;return i.disabled?s.userDisabled:e[i.username]?.allowed??!0?c?i.orgName?o(s.switchToOrgUser,i):o(s.switchToPublicUser,i):s.switchTo:s.userNotAllowed}render(){let{linkedAccounts:i,messages:e,accountAccess:c,interactive:s,portal:$,actions:u}=this;return n`${g(i,t=>t.id??t.username,t=>n`<calcite-block .label=${t.orgName?`${t.username}, ${t.orgName}`:t.username} heading-level=4 .heading=${t.username} .description=${t.orgName?`${t.fullname}, ${t.orgName}`:t.fullname} class="linked-account"><calcite-avatar slot=content-start inert .fullName=${t.fullname} .username=${t.username} .userId=${t.id} .thumbnail=${f({fullName:t.fullname,...t},$)??void 0}></calcite-avatar><calcite-chip slot=content-end kind=neutral scale=s .label=${this.formatProviderLabel(t.provider)} class="provider-chip" @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatProviderLabel(t.provider)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}}>${this.formatProvider(t.provider)}</calcite-chip>${s&&n`${u.includes("unlink")&&n`<calcite-button appearance=transparent slot=actions-end kind=danger icon-start=unlink .label=${o(t.orgName?e.unlinkOrgUser:e.unlinkPublicUser,t)} .id=${`unlink-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountUnlink.emit({account:t})}}></calcite-button>`||""}${u.includes("switch")&&n`<calcite-button appearance=transparent slot=actions-end kind=neutral icon-start=sign-in .label=${this.formatSwitchToLabel(t,c)} .disabled=${t.disabled||!(c[t.username]?.allowed??!0)} .id=${`switch-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountSwitch.emit({account:t})}}></calcite-button>`||""}`||""}</calcite-block>`)}<calcite-tooltip .open=${!!this.tipReference} .referenceElement=${this.tipReference}>${this.tooltipText}</calcite-tooltip>`}};p("arcgis-portal-account-switcher-list",l);return l},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./XVXUI2NM.js";import"./5R5O2X3M.js";import b from"./7EPXWK4L.js";import a from"./F3ODJVJC.js";import{a as f}from"./NDHD5H3P.js";import"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{M as n,P as c,T as l,h as e,j as s,q as o}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
2
+ import d from"./2B2T3CO3.js";import"./BQKUF5EQ.js";import b from"./ICUDZDC6.js";import a from"./F3ODJVJC.js";import{a as f}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{M as n,P as c,T as l,h as e,j as s,q as o}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./OEMNHYK6.js";import{c as B,d as L}from"./4QA4AYHJ.js";import{a as C}from"./CFBSBZSS.js";import{a as N}from"./NF5AJJQU.js";import{a as y}from"./OBBYT2AV.js";import"./DFTUMKSN.js";import d from"./RBGARTND.js";import c from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import{a as w}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as A}from"./NDHD5H3P.js";import"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{K as g,L as b,M as O,O as $,P,T as R,h as x,j as n,w as v}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:_,b:k},,{a:d},z])=>{var S=x`:host{display:flex}.button{display:flex;align-items:center;max-width:100%;cursor:pointer;white-space:normal;border-style:none;padding:0;font-size:.75rem;color:var(--calcite-color-text-2);outline:2px solid transparent;outline-offset:2px;transition-property:all;outline-color:transparent;background:transparent;font-family:inherit;line-height:1.5;&:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}}.button--outline{box-sizing:border-box;width:100%;padding:.5rem .75rem;transition-property:all;border:1px solid var(--calcite-color-border-3);&:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}}.name{overflow:hidden;white-space:nowrap;margin-inline-start:.5rem;text-overflow:ellipsis}.popover__wrapper{background-color:var(--calcite-color-foreground-1);width:min(32rem,80vw)}.popover__header{padding:1.25rem 1rem}.popover__avatar{max-width:100%}.popover__content{padding:.5rem 1rem 1.25rem}.popover__description{margin:0;overflow:auto;padding:0;padding-bottom:1rem;font-size:.875rem;color:var(--calcite-color-text-2);max-height:21.25rem}.popover__fade{position:relative;z-index:10;margin-bottom:.25rem;display:block;height:1rem;width:100%;background:linear-gradient(to bottom,transparent,var(--calcite-color-foreground-1) 100%);margin-top:-1rem}.popover__buttons{display:grid;grid-auto-flow:column;grid-gap:.5rem}.popover__buttons--no-description{padding-top:1rem}.popover__button{min-width:0px}.popover__loader{--calcite-loader-padding: 0}`,q=a=>a?.sourceJSON?.contentStatus==="public_authoritative";async function G(a,t,o,r){if(q(a)){let e=a.owner||"",i=await z(a,o,t,r);if(!i)return await d(e,t,r);let{description:s,name:l,thumbnail:u,url:p}=i;return{description:s?y(s):"",fullName:l,username:e,thumbnail:u,id:a.portal.id,url:p}}return await d(a.owner||"",t,r)}async function H(a,t,o){let r=o?"https://www.arcgis.com/sharing/rest/":w(t),e=o?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await _({requester:async()=>await k({url:`${r}community/groups`,portal:t,params:{q:`(owner:"${a}")`,num:100},options:e}),key:"userGroups",id:a})}async function J(a,t,o){let r=o?"https://www.arcgis.com/sharing/rest/":w(t),e=o?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await _({requester:async()=>(await k({url:`${r}search`,portal:t,params:{q:`(owner:"${a}") -typekeywords:"recyclebin"`,num:1},options:e})).total,key:"userItemsTotal",id:a})}function M({baseUrl:a,user:t,type:o}){let r=L(a),e=encodeURIComponent(t.username||"");return e?`${r}/${o}.html?user=${e}`:`${r}/${o}.html`}var U=class extends O{constructor(){super(...arguments),this.messages=A({blocking:!0}),this.buttonRef=g(),this.popoverRef=g(),this.isPopoverOpen=!1,this.scale="m",this.showAvatar=!0,this.showName=!0,this.showUsername=!1,this.appearance="transparent",this.arcgisUserPopupInternalUIAction=v(),this.arcgisUserPopupClose=v()}static{this.properties={itemUserInfo:16,groups:16,total:16,isPopoverOpen:16,user:0,username:1,fullName:1,item:0,scale:3,portal:0,baseUrl:1,underline:5,showAvatar:5,showName:5,showUsername:5,wrap:5,appearance:1,zIndex:9,avatarAriaHidden:5,checkOnline:5}}static{this.styles=S}async setFocus(){this.buttonRef.value?.focus()}async openPopup(){this.buttonRef.value?.click()}connectedCallback(){super.connectedCallback(),this.init()}updated(t){t.has("isPopoverOpen")&&this.isPopoverOpen&&this.setPopoverOpen(!0)}get resolvedBaseUrl(){return this.baseUrl||`${this.portal.url}/home`}async init(){let{item:t,username:o,portal:r,fullName:e,messages:i}=this;if(!(!i._lang||!r)){if(t){this.itemUserInfo=await G(t,r,i._lang,this.checkOnline);return}if(o){let s=await d(o,r,this.checkOnline);!s.fullName&&e&&(s.fullName=e),this.itemUserInfo=s}}}async fetchItemsAndGroups(){let{user:t,itemUserInfo:o,item:r,portal:e,username:i,checkOnline:s}=this,l=i||t?.username||r?.owner||o?.username;if(!(!l||!e)){if(!this.groups){let u=await H(l,e,s);this.groups=u}this.total=await J(l,e,s)}}setPopoverOpen(t){requestAnimationFrame(()=>{this.popoverRef.value&&(this.popoverRef.value.open=t)})}openLink(t,o){t.preventDefault(),window.open(o,"_blank")}renderOrgButtons(t){let{messages:o}=this,r=(t.url||this.resolvedBaseUrl).replace(/\/$/u,"");return n`<calcite-button appearance=outline-fill kind=neutral .href=${r} target=_blank @click=${e=>this.openLink(e,r)}>${o.homepage}</calcite-button><calcite-button appearance=outline-fill kind=neutral .href=${`${r}/gallery.html`} target=_blank @click=${e=>this.openLink(e,`${r}/gallery.html`)}>${o.gallery}</calcite-button>`}renderUserButtons(t){let{total:o,groups:r,messages:e}=this,i=t.username||"";if(typeof o!="number"||!r)return n`<calcite-loader .label=${e.loadingUserInformation} scale=s class="popover__loader"></calcite-loader>`;let s=M({baseUrl:this.resolvedBaseUrl,user:{username:i},type:"groups"}),l=M({baseUrl:this.resolvedBaseUrl,user:{username:i},type:"content"}),u=`${this.resolvedBaseUrl.replace(/\/$/u,"")}/user.html?user=${encodeURIComponent(i)}`;return n`${!!r.total&&n`<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${s} target=_blank @click=${p=>{this.openLink(p,s),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view all groups"})}}>${e.groups.replace("${number}",new Intl.NumberFormat(e._lang).format(r.total))}</calcite-button>`||""}${!!o&&n`<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${l} target=_blank @click=${p=>{this.openLink(p,l),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view all content"})}}>${e.items.replace("${number}",new Intl.NumberFormat(e._lang).format(o))}</calcite-button>`||""}<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${u} target=_blank @click=${p=>{this.openLink(p,u),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view profile"})}}>${e.profile}</calcite-button>`}render(){let{user:t,itemUserInfo:o,portal:r,item:e,appearance:i,scale:s,isPopoverOpen:l,showName:u,showUsername:p,messages:f}=this,c=t||o;if(!f._lang||!c)return n`<arcgis-portal-user-avatar scale=s show-name .checkOnline=${this.checkOnline}></arcgis-portal-user-avatar>`;let I=q(e),m=c.username||"",h=B(c.description||"")||"",T=C(c,f._lang),E=I?f.itemManagedBy.replace("${username}",m):m;return n`<button class=${$({button:!0,"button--outline":i==="outline"})} @click=${()=>{this.isPopoverOpen||(this.isPopoverOpen=!0),this.fetchItemsAndGroups()}} ${b(this.buttonRef)}><slot><arcgis-portal-user-avatar .user=${c} .scale=${s} .portal=${r} .showName=${u} .description=${p?m:""} .hideAvatar=${!this.showAvatar} .underline=${this.underline} .checkOnline=${this.checkOnline} .wrap=${this.wrap}></arcgis-portal-user-avatar></slot></button>${l&&this.buttonRef.value&&c&&n`<calcite-popover class="popover" .label=${T} pointer-disabled .referenceElement=${this.buttonRef.value} placement=auto .id=${`${m}-popover`} auto-close style=${P({"--calcite-popover-z-index":this.zIndex?.toString()||"12"})} @calcitePopoverOpen=${()=>{this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"open profile popup"})}} @calcitePopoverClose=${()=>{this.isPopoverOpen=!1,this.arcgisUserPopupClose.emit()}} @keydown=${F=>{F.key==="Escape"&&setTimeout(()=>{this.buttonRef.value?.focus()},200)}} ${b(this.popoverRef)}><div class="popover__wrapper"><div class="popover__header"><arcgis-portal-user-avatar class="popover__avatar" .user=${c} scale=l .portal=${r} show-name .description=${E} .checkOnline=${this.checkOnline}></arcgis-portal-user-avatar></div><div class="popover__content">${!!h&&n`<p class="popover__description">${N(y(h))}</p>`||""}${!!h&&n`<div class="popover__fade"></div>`||""}<div class=${$({popover__buttons:!0,"popover__buttons--no-description":!h})}>${I?this.renderOrgButtons(c):this.renderUserButtons(c)}</div></div></div></calcite-popover>`||""}`}};R("arcgis-portal-user-popup",U);return U},a,c,d,e)
2
+ import e from"./OEMNHYK6.js";import{c as L,d as C}from"./4QA4AYHJ.js";import{a as B}from"./CFBSBZSS.js";import{a as N}from"./ZZBKWWAW.js";import{a as y}from"./OBBYT2AV.js";import"./DFTUMKSN.js";import d from"./RBGARTND.js";import c from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import{a as w}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as A}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{K as g,L as b,M as O,O as $,P,T as R,h as x,j as n,w as v}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:_,b:k},,{a:d},z])=>{var S=x`:host{display:flex}.button{display:flex;align-items:center;max-width:100%;cursor:pointer;white-space:normal;border-style:none;padding:0;font-size:.75rem;color:var(--calcite-color-text-2);outline:2px solid transparent;outline-offset:2px;transition-property:all;outline-color:transparent;background:transparent;font-family:inherit;line-height:1.5;&:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}}.button--outline{box-sizing:border-box;width:100%;padding:.5rem .75rem;transition-property:all;border:1px solid var(--calcite-color-border-3);&:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}}.name{overflow:hidden;white-space:nowrap;margin-inline-start:.5rem;text-overflow:ellipsis}.popover__wrapper{background-color:var(--calcite-color-foreground-1);width:min(32rem,80vw)}.popover__header{padding:1.25rem 1rem}.popover__avatar{max-width:100%}.popover__content{padding:.5rem 1rem 1.25rem}.popover__description{margin:0;overflow:auto;padding:0;padding-bottom:1rem;font-size:.875rem;color:var(--calcite-color-text-2);max-height:21.25rem}.popover__fade{position:relative;z-index:10;margin-bottom:.25rem;display:block;height:1rem;width:100%;background:linear-gradient(to bottom,transparent,var(--calcite-color-foreground-1) 100%);margin-top:-1rem}.popover__buttons{display:grid;grid-auto-flow:column;grid-gap:.5rem}.popover__buttons--no-description{padding-top:1rem}.popover__button{min-width:0px}.popover__loader{--calcite-loader-padding: 0}`,q=a=>a?.sourceJSON?.contentStatus==="public_authoritative";async function G(a,t,o,r){if(q(a)){let e=a.owner||"",i=await z(a,o,t,r);if(!i)return await d(e,t,r);let{description:s,name:l,thumbnail:u,url:p}=i;return{description:s?y(s):"",fullName:l,username:e,thumbnail:u,id:a.portal.id,url:p}}return await d(a.owner||"",t,r)}async function H(a,t,o){let r=o?"https://www.arcgis.com/sharing/rest/":w(t),e=o?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await _({requester:async()=>await k({url:`${r}community/groups`,portal:t,params:{q:`(owner:"${a}")`,num:100},options:e}),key:"userGroups",id:a})}async function J(a,t,o){let r=o?"https://www.arcgis.com/sharing/rest/":w(t),e=o?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await _({requester:async()=>(await k({url:`${r}search`,portal:t,params:{q:`(owner:"${a}") -typekeywords:"recyclebin"`,num:1},options:e})).total,key:"userItemsTotal",id:a})}function M({baseUrl:a,user:t,type:o}){let r=C(a),e=encodeURIComponent(t.username||"");return e?`${r}/${o}.html?user=${e}`:`${r}/${o}.html`}var U=class extends O{constructor(){super(...arguments),this.messages=A({blocking:!0}),this.buttonRef=g(),this.popoverRef=g(),this.isPopoverOpen=!1,this.scale="m",this.showAvatar=!0,this.showName=!0,this.showUsername=!1,this.appearance="transparent",this.arcgisUserPopupInternalUIAction=v(),this.arcgisUserPopupClose=v()}static{this.properties={itemUserInfo:16,groups:16,total:16,isPopoverOpen:16,user:0,username:1,fullName:1,item:0,scale:3,portal:0,baseUrl:1,underline:5,showAvatar:5,showName:5,showUsername:5,wrap:5,appearance:1,zIndex:9,avatarAriaHidden:5,checkOnline:5}}static{this.styles=S}async setFocus(){this.buttonRef.value?.focus()}async openPopup(){this.buttonRef.value?.click()}connectedCallback(){super.connectedCallback(),this.init()}updated(t){t.has("isPopoverOpen")&&this.isPopoverOpen&&this.setPopoverOpen(!0)}get resolvedBaseUrl(){return this.baseUrl||`${this.portal.url}/home`}async init(){let{item:t,username:o,portal:r,fullName:e,messages:i}=this;if(!(!i._lang||!r)){if(t){this.itemUserInfo=await G(t,r,i._lang,this.checkOnline);return}if(o){let s=await d(o,r,this.checkOnline);!s.fullName&&e&&(s.fullName=e),this.itemUserInfo=s}}}async fetchItemsAndGroups(){let{user:t,itemUserInfo:o,item:r,portal:e,username:i,checkOnline:s}=this,l=i||t?.username||r?.owner||o?.username;if(!(!l||!e)){if(!this.groups){let u=await H(l,e,s);this.groups=u}this.total=await J(l,e,s)}}setPopoverOpen(t){requestAnimationFrame(()=>{this.popoverRef.value&&(this.popoverRef.value.open=t)})}openLink(t,o){t.preventDefault(),window.open(o,"_blank")}renderOrgButtons(t){let{messages:o}=this,r=(t.url||this.resolvedBaseUrl).replace(/\/$/u,"");return n`<calcite-button appearance=outline-fill kind=neutral .href=${r} target=_blank @click=${e=>this.openLink(e,r)}>${o.homepage}</calcite-button><calcite-button appearance=outline-fill kind=neutral .href=${`${r}/gallery.html`} target=_blank @click=${e=>this.openLink(e,`${r}/gallery.html`)}>${o.gallery}</calcite-button>`}renderUserButtons(t){let{total:o,groups:r,messages:e}=this,i=t.username||"";if(typeof o!="number"||!r)return n`<calcite-loader .label=${e.loadingUserInformation} scale=s class="popover__loader"></calcite-loader>`;let s=M({baseUrl:this.resolvedBaseUrl,user:{username:i},type:"groups"}),l=M({baseUrl:this.resolvedBaseUrl,user:{username:i},type:"content"}),u=`${this.resolvedBaseUrl.replace(/\/$/u,"")}/user.html?user=${encodeURIComponent(i)}`;return n`${!!r.total&&n`<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${s} target=_blank @click=${p=>{this.openLink(p,s),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view all groups"})}}>${e.groups.replace("${number}",new Intl.NumberFormat(e._lang).format(r.total))}</calcite-button>`||""}${!!o&&n`<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${l} target=_blank @click=${p=>{this.openLink(p,l),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view all content"})}}>${e.items.replace("${number}",new Intl.NumberFormat(e._lang).format(o))}</calcite-button>`||""}<calcite-button class="popover__button" appearance=outline-fill kind=neutral .href=${u} target=_blank @click=${p=>{this.openLink(p,u),this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"view profile"})}}>${e.profile}</calcite-button>`}render(){let{user:t,itemUserInfo:o,portal:r,item:e,appearance:i,scale:s,isPopoverOpen:l,showName:u,showUsername:p,messages:f}=this,c=t||o;if(!f._lang||!c)return n`<arcgis-portal-user-avatar scale=s show-name .checkOnline=${this.checkOnline}></arcgis-portal-user-avatar>`;let I=q(e),m=c.username||"",h=L(c.description||"")||"",T=B(c,f._lang),E=I?f.itemManagedBy.replace("${username}",m):m;return n`<button class=${$({button:!0,"button--outline":i==="outline"})} @click=${()=>{this.isPopoverOpen||(this.isPopoverOpen=!0),this.fetchItemsAndGroups()}} ${b(this.buttonRef)}><slot><arcgis-portal-user-avatar .user=${c} .scale=${s} .portal=${r} .showName=${u} .description=${p?m:""} .hideAvatar=${!this.showAvatar} .underline=${this.underline} .checkOnline=${this.checkOnline} .wrap=${this.wrap}></arcgis-portal-user-avatar></slot></button>${l&&this.buttonRef.value&&c&&n`<calcite-popover class="popover" .label=${T} pointer-disabled .referenceElement=${this.buttonRef.value} placement=auto .id=${`${m}-popover`} auto-close style=${P({"--calcite-popover-z-index":this.zIndex?.toString()||"12"})} @calcitePopoverOpen=${()=>{this.arcgisUserPopupInternalUIAction.emit({category:"profile popup",action:"open profile popup"})}} @calcitePopoverClose=${()=>{this.isPopoverOpen=!1,this.arcgisUserPopupClose.emit()}} @keydown=${F=>{F.key==="Escape"&&setTimeout(()=>{this.buttonRef.value?.focus()},200)}} ${b(this.popoverRef)}><div class="popover__wrapper"><div class="popover__header"><arcgis-portal-user-avatar class="popover__avatar" .user=${c} scale=l .portal=${r} show-name .description=${E} .checkOnline=${this.checkOnline}></arcgis-portal-user-avatar></div><div class="popover__content">${!!h&&n`<p class="popover__description">${N(y(h))}</p>`||""}${!!h&&n`<div class="popover__fade"></div>`||""}<div class=${$({popover__buttons:!0,"popover__buttons--no-description":!h})}>${I?this.renderOrgButtons(c):this.renderUserButtons(c)}</div></div></div></calcite-popover>`||""}`}};R("arcgis-portal-user-popup",U);return U},a,c,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{c as f}from"./5H6OROJK.js";import{a as g}from"./ILDTKRON.js";import{b as _}from"./QS3GXAIH.js";import{K as d,L as n,M as w,O as p,Q as o,T as u,h as v,j as r,w as l}from"./N5KMTTYL.js";export default $arcgis.t(([{formatDate:y}])=>{var $=v`:host{display:block;min-width:0;container-type:inline-size}.preview-card{position:relative;display:flex;width:100%;height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-3);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.preview-card--loaded{opacity:1}.preview-card--hoverable{cursor:pointer}.preview-card--hoverable .preview-card__upper:hover{background-color:var(--calcite-color-background)}.preview-card__upper{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;padding:.75rem;background-color:var(--calcite-color-foreground-1)}.preview-card__upper--link{color:var(--calcite-color-text-1);text-decoration:none}.preview-card__top{display:flex;align-self:stretch;flex:0 0 auto}.preview-card__thumbnail{box-sizing:border-box;display:grid;place-items:center;width:4rem;height:100%;margin:0;margin-inline-start:.75rem;border-radius:2px;overflow:hidden;background-color:var(--calcite-color-foreground-2)}.preview-card__thumbnail-image{width:100%;height:100%;object-fit:cover}.preview-card__thumbnail--fallback{color:var(--calcite-color-text-3)}.preview-card__content{min-width:0;flex:1 1 auto}.preview-card__body{display:grid;min-width:0;gap:.25rem}.preview-card__title{margin:0;height:2rem;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.15;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.preview-card__title--padded{margin-bottom:.125rem}.preview-card__title-span{position:relative}.preview-card__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2);line-height:1.35;margin:0;overflow:hidden;text-overflow:ellipsis}.preview-card__details{align-items:center;display:flex;flex-wrap:wrap;gap:.25rem}.preview-card__detail,.preview-card__meta{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--2);margin:0}.preview-card__meta{color:var(--calcite-color-text-2)}.preview-card__status{--calcite-chip-background-color: var(--calcite-color-foreground-2);text-transform:capitalize}.preview-card__divider{align-items:center;display:flex;flex:0 0 auto}.preview-card__divider:before{content:"";height:1rem;width:1px;margin-inline-end:.5rem;background-color:var(--calcite-color-border-2)}.preview-card__details :first-child.preview-card__divider:before{display:none}.preview-card__footer{align-items:center;border-top:1px solid var(--calcite-color-border-2);display:flex;margin-top:auto;min-height:2.25rem;padding:.375rem .75rem}.preview-card__footer-start{align-items:center;display:flex;flex:1 1 auto;min-width:0}.preview-card__owner{min-width:0}@container (max-width: 480px){.preview-card__upper{padding:.625rem}.preview-card__thumbnail{width:3.5rem;margin-inline-start:.5rem}.preview-card__footer{padding:.25rem .625rem}}`,h=class extends w{constructor(){super(...arguments),this.sectionEl=d(),this.linkEl=d(),this.cachedOwner="",this.cachedStatus="",this.cachedTitle="-",this.cachedType="-",this.cachedSummary="",this.cachedUpdatedText="",this.cachedThumbnailUri=null,this.handleCardClick=()=>{let{link:e,item:t}=this;e||this.arcgisGroupBrowserPreviewCardSelect.emit(t)},this.isLoaded=!1,this.imageError=!1,this.newTab=!1,this.hideThumbnail=!1,this.hideOwner=!1,this.hideItemType=!1,this.showDateUpdated=!1,this.showSummary=!1,this.showBadges=!1,this.showOwnerPopup=!1,this.interactive=!1,this.arcgisGroupBrowserInternalUIAction=l(),this.arcgisGroupBrowserPreviewCardSelect=l()}static{this.properties={isLoaded:16,imageError:16,item:0,portal:0,user:0,baseUrl:1,link:1,newTab:5,hideThumbnail:5,hideOwner:5,hideItemType:5,showDateUpdated:5,showSummary:5,showBadges:5,showOwnerPopup:5,interactive:5}}static{this.styles=$}async restoreFocus(){if(this.link&&this.linkEl.value){this.linkEl.value.focus();return}this.sectionEl.value?.focus()}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this.isLoaded=!0})}willUpdate(e){(e.has("item")||e.has("portal")||e.has("showSummary")||e.has("showDateUpdated"))&&(this.imageError=!1,this.updateCachedItemData())}get resolvedBaseUrl(){if(!this.portal)return"";let e=_({portal:this.portal});return this.baseUrl||`${e}/home`}getItemThumbnailUri(e){return e.thumbnailUrl?e.thumbnailUrl:this.portal?f(this.portal,e):null}updateCachedItemData(){let{item:e,showSummary:t,showDateUpdated:s}=this,i=g(e),a=i.snippet?.trim()||"";this.cachedOwner=i.owner||"",this.cachedStatus=i.contentStatus||"",this.cachedTitle=i.title?.trim()||e.title?.trim()||"-",this.cachedType=i.type?.trim()||"-",this.cachedSummary=t?a.length>250?`${a.slice(0,250)}...`:a:"",this.cachedUpdatedText=s?y(i.modified??e.modified,{dateStyle:"medium"}):"",this.cachedThumbnailUri=this.getItemThumbnailUri(e)}renderStatusBadge(){let e=this.cachedStatus;return!this.showBadges||!e?null:r`<calcite-chip class="preview-card__status" scale=s .value=${e} .label=${e}>${e}</calcite-chip>`}renderThumbnail(){if(this.hideThumbnail)return null;let e=this.cachedThumbnailUri;return e&&!this.imageError?r`<figure class="preview-card__thumbnail"><img class="preview-card__thumbnail-image" src=${e??o} alt @error=${()=>{this.imageError=!0}}></figure>`:r`<figure class="preview-card__thumbnail preview-card__thumbnail--fallback" aria-hidden=true><calcite-icon icon=file scale=m></calcite-icon></figure>`}renderOwner(){let e=this.cachedOwner;return this.hideOwner||!e||!this.portal?null:this.showOwnerPopup?r`<arcgis-portal-user-popup underline .username=${e} .portal=${this.portal} .baseUrl=${this.resolvedBaseUrl} class="preview-card__owner" scale=s @arcgisUserPopupInternalUIAction=${t=>{t.stopPropagation(),this.arcgisGroupBrowserInternalUIAction.emit(t.detail)}}></arcgis-portal-user-popup>`:r`<arcgis-portal-user-avatar scale=s show-name hide-avatar .username=${e} .portal=${this.portal} class="preview-card__owner"></arcgis-portal-user-avatar>`}renderBody(e){let{showSummary:t,showDateUpdated:s}=this,i=!this.hideItemType,a=this.cachedTitle,b=this.cachedType,c=this.cachedSummary,m=this.cachedUpdatedText;return r`<div class="preview-card__body"><h3 class=${p({"preview-card__title":!0,"preview-card__title--padded":i||t&&!!c})}><span class="preview-card__title-span">${a}</span></h3>${t&&c?r`<p class="preview-card__summary">${c}</p>`:null}${i?r`<arcgis-portal-item-type scale=s .item=${e} .portal=${this.portal} .user=${this.user}></arcgis-portal-item-type>`:null}<div class="preview-card__details">${s&&m?r`<span class="preview-card__detail preview-card__divider">${m}</span>`:null}${this.renderStatusBadge()}${i?null:r`<p class="preview-card__meta">${b}</p>`}</div></div>`}render(){let{item:e,interactive:t,link:s,newTab:i}=this;return r`<section class=${p({"preview-card":!0,"preview-card--hoverable":t,"preview-card--loaded":this.isLoaded})} .part=${"card"} tabindex=${(t?0:void 0)??o} @click=${s?void 0:this.handleCardClick} ${n(this.sectionEl)}><slot name=content-top></slot>${s?r`<a class="preview-card__upper preview-card__upper--link" href=${s??o} target=${(i?"_blank":void 0)??o} rel=${(i?"noopener noreferrer":void 0)??o} ${n(this.linkEl)}>${r`<div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div>`}</a>`:r`<div class="preview-card__upper"><div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div></div>`}<div class="preview-card__footer" @click=${a=>{a.stopPropagation()}} @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&a.stopPropagation()}}><div class="preview-card__footer-start">${this.renderOwner()}</div><slot name=actions-end></slot></div></section>`}};u("arcgis-portal-group-browser-preview-card",h);return h},"intl")
2
+ import{c as f}from"./N4UNPHFQ.js";import{a as g}from"./ILDTKRON.js";import{b as _}from"./QS3GXAIH.js";import{K as d,L as n,M as w,O as p,Q as o,T as u,h as v,j as r,w as l}from"./OTMC7MVD.js";export default $arcgis.t(([{formatDate:y}])=>{var $=v`:host{display:block;min-width:0;container-type:inline-size}.preview-card{position:relative;display:flex;width:100%;height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-3);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.preview-card--loaded{opacity:1}.preview-card--hoverable{cursor:pointer}.preview-card--hoverable .preview-card__upper:hover{background-color:var(--calcite-color-background)}.preview-card__upper{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;padding:.75rem;background-color:var(--calcite-color-foreground-1)}.preview-card__upper--link{color:var(--calcite-color-text-1);text-decoration:none}.preview-card__top{display:flex;align-self:stretch;flex:0 0 auto}.preview-card__thumbnail{box-sizing:border-box;display:grid;place-items:center;width:4rem;height:100%;margin:0;margin-inline-start:.75rem;border-radius:2px;overflow:hidden;background-color:var(--calcite-color-foreground-2)}.preview-card__thumbnail-image{width:100%;height:100%;object-fit:cover}.preview-card__thumbnail--fallback{color:var(--calcite-color-text-3)}.preview-card__content{min-width:0;flex:1 1 auto}.preview-card__body{display:grid;min-width:0;gap:.25rem}.preview-card__title{margin:0;height:2rem;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.15;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.preview-card__title--padded{margin-bottom:.125rem}.preview-card__title-span{position:relative}.preview-card__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2);line-height:1.35;margin:0;overflow:hidden;text-overflow:ellipsis}.preview-card__details{align-items:center;display:flex;flex-wrap:wrap;gap:.25rem}.preview-card__detail,.preview-card__meta{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--2);margin:0}.preview-card__meta{color:var(--calcite-color-text-2)}.preview-card__status{--calcite-chip-background-color: var(--calcite-color-foreground-2);text-transform:capitalize}.preview-card__divider{align-items:center;display:flex;flex:0 0 auto}.preview-card__divider:before{content:"";height:1rem;width:1px;margin-inline-end:.5rem;background-color:var(--calcite-color-border-2)}.preview-card__details :first-child.preview-card__divider:before{display:none}.preview-card__footer{align-items:center;border-top:1px solid var(--calcite-color-border-2);display:flex;margin-top:auto;min-height:2.25rem;padding:.375rem .75rem}.preview-card__footer-start{align-items:center;display:flex;flex:1 1 auto;min-width:0}.preview-card__owner{min-width:0}@container (max-width: 480px){.preview-card__upper{padding:.625rem}.preview-card__thumbnail{width:3.5rem;margin-inline-start:.5rem}.preview-card__footer{padding:.25rem .625rem}}`,h=class extends w{constructor(){super(...arguments),this.sectionEl=d(),this.linkEl=d(),this.cachedOwner="",this.cachedStatus="",this.cachedTitle="-",this.cachedType="-",this.cachedSummary="",this.cachedUpdatedText="",this.cachedThumbnailUri=null,this.handleCardClick=()=>{let{link:e,item:t}=this;e||this.arcgisGroupBrowserPreviewCardSelect.emit(t)},this.isLoaded=!1,this.imageError=!1,this.newTab=!1,this.hideThumbnail=!1,this.hideOwner=!1,this.hideItemType=!1,this.showDateUpdated=!1,this.showSummary=!1,this.showBadges=!1,this.showOwnerPopup=!1,this.interactive=!1,this.arcgisGroupBrowserInternalUIAction=l(),this.arcgisGroupBrowserPreviewCardSelect=l()}static{this.properties={isLoaded:16,imageError:16,item:0,portal:0,user:0,baseUrl:1,link:1,newTab:5,hideThumbnail:5,hideOwner:5,hideItemType:5,showDateUpdated:5,showSummary:5,showBadges:5,showOwnerPopup:5,interactive:5}}static{this.styles=$}async restoreFocus(){if(this.link&&this.linkEl.value){this.linkEl.value.focus();return}this.sectionEl.value?.focus()}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this.isLoaded=!0})}willUpdate(e){(e.has("item")||e.has("portal")||e.has("showSummary")||e.has("showDateUpdated"))&&(this.imageError=!1,this.updateCachedItemData())}get resolvedBaseUrl(){if(!this.portal)return"";let e=_({portal:this.portal});return this.baseUrl||`${e}/home`}getItemThumbnailUri(e){return e.thumbnailUrl?e.thumbnailUrl:this.portal?f(this.portal,e):null}updateCachedItemData(){let{item:e,showSummary:t,showDateUpdated:s}=this,i=g(e),a=i.snippet?.trim()||"";this.cachedOwner=i.owner||"",this.cachedStatus=i.contentStatus||"",this.cachedTitle=i.title?.trim()||e.title?.trim()||"-",this.cachedType=i.type?.trim()||"-",this.cachedSummary=t?a.length>250?`${a.slice(0,250)}...`:a:"",this.cachedUpdatedText=s?y(i.modified??e.modified,{dateStyle:"medium"}):"",this.cachedThumbnailUri=this.getItemThumbnailUri(e)}renderStatusBadge(){let e=this.cachedStatus;return!this.showBadges||!e?null:r`<calcite-chip class="preview-card__status" scale=s .value=${e} .label=${e}>${e}</calcite-chip>`}renderThumbnail(){if(this.hideThumbnail)return null;let e=this.cachedThumbnailUri;return e&&!this.imageError?r`<figure class="preview-card__thumbnail"><img class="preview-card__thumbnail-image" src=${e??o} alt @error=${()=>{this.imageError=!0}}></figure>`:r`<figure class="preview-card__thumbnail preview-card__thumbnail--fallback" aria-hidden=true><calcite-icon icon=file scale=m></calcite-icon></figure>`}renderOwner(){let e=this.cachedOwner;return this.hideOwner||!e||!this.portal?null:this.showOwnerPopup?r`<arcgis-portal-user-popup underline .username=${e} .portal=${this.portal} .baseUrl=${this.resolvedBaseUrl} class="preview-card__owner" scale=s @arcgisUserPopupInternalUIAction=${t=>{t.stopPropagation(),this.arcgisGroupBrowserInternalUIAction.emit(t.detail)}}></arcgis-portal-user-popup>`:r`<arcgis-portal-user-avatar scale=s show-name hide-avatar .username=${e} .portal=${this.portal} class="preview-card__owner"></arcgis-portal-user-avatar>`}renderBody(e){let{showSummary:t,showDateUpdated:s}=this,i=!this.hideItemType,a=this.cachedTitle,b=this.cachedType,c=this.cachedSummary,m=this.cachedUpdatedText;return r`<div class="preview-card__body"><h3 class=${p({"preview-card__title":!0,"preview-card__title--padded":i||t&&!!c})}><span class="preview-card__title-span">${a}</span></h3>${t&&c?r`<p class="preview-card__summary">${c}</p>`:null}${i?r`<arcgis-portal-item-type scale=s .item=${e} .portal=${this.portal} .user=${this.user}></arcgis-portal-item-type>`:null}<div class="preview-card__details">${s&&m?r`<span class="preview-card__detail preview-card__divider">${m}</span>`:null}${this.renderStatusBadge()}${i?null:r`<p class="preview-card__meta">${b}</p>`}</div></div>`}render(){let{item:e,interactive:t,link:s,newTab:i}=this;return r`<section class=${p({"preview-card":!0,"preview-card--hoverable":t,"preview-card--loaded":this.isLoaded})} .part=${"card"} tabindex=${(t?0:void 0)??o} @click=${s?void 0:this.handleCardClick} ${n(this.sectionEl)}><slot name=content-top></slot>${s?r`<a class="preview-card__upper preview-card__upper--link" href=${s??o} target=${(i?"_blank":void 0)??o} rel=${(i?"noopener noreferrer":void 0)??o} ${n(this.linkEl)}>${r`<div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div>`}</a>`:r`<div class="preview-card__upper"><div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div></div>`}<div class="preview-card__footer" @click=${a=>{a.stopPropagation()}} @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&a.stopPropagation()}}><div class="preview-card__footer-start">${this.renderOwner()}</div><slot name=actions-end></slot></div></section>`}};u("arcgis-portal-group-browser-preview-card",h);return h},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./4RPNBHB5.js";import{a as B,b as S}from"./PQ75545K.js";import a from"./37HLLREH.js";import{a as g}from"./S2BGAMSA.js";import{a as e}from"./FWRSYP3I.js";import{Ic as h}from"./DG6DAKQ2.js";export default $arcgis.t(([k,j,{a:m,d:b,e:w,f:F},{c:T}])=>{var q=i=>i.flatMap(t=>t.split(",")).map(t=>t.trim()).map(t=>t.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(t=>!!t),R=async(i,t,n,a,d)=>{let s=n.map?.allLayers.find(o=>o.id===i.layerId),c=await n.whenLayerView(s),u=s.title??i.layerId,l;if(a){let o=await b(a,n);if("error"in o)return{tool:"getTopFeatures",layerName:u,summary:"Geometry lookup failed",details:{error:o.error}};if(!o.geometry)return{tool:"getTopFeatures",layerName:u,summary:"No features found for geometry filter",details:{error:`No features found matching: ${"where"in a?a.where:"unknown criteria"}`}};l=o.geometry}else d&&(l=n.extent.clone());let y=t.groupByFields&&t.groupByFields.length>0,f=s.objectIdField,p=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,f])];try{let o;if(y){let r=new k({where:i.where||"1=1",outFields:p,orderByFields:i.orderByFields,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,topFilter:new j({topCount:t.topCount,groupByFields:t.groupByFields,orderByFields:t.orderByFields})});o=await s.queryTopFeatures(r)}else{let r=s.createQuery();r.where=S(s.definitionExpression,i.where||"1=1"),r.outFields=p.length?p:["*"],r.orderByFields=t.orderByFields,r.returnGeometry=!1,r.num=t.topCount,l&&(r.geometry=l,r.spatialRelationship="intersects"),a?.distance&&(r.distance=a.distance),a?.units&&(r.units=a.units),r.outSpatialReference=n.spatialReference;let v=[...new Set([...i.outFields,...q(t.orderByFields)])],N=B(c,v,d??!1);try{o=N?await c.queryFeatures(r):await s.queryFeatures(r)}catch(x){console.warn("Client-side query failed, falling back to server:",x),o=await s.queryFeatures(r)}}let C=o.features.map(r=>r.attributes[f]),{attributes:I}=T(s,o,n.timeZone);return{tool:"getTopFeatures",layerName:u,summary:`Top ${t.topCount} features extracted`,details:{topCount:t.topCount,attributes:I,objectIds:C,objectIdField:f,where:i.where,orderByFields:t.orderByFields,...y&&{groupByFields:t.groupByFields}}}}catch(o){return{tool:"getTopFeatures",layerName:u,summary:"Query failed",details:{error:o instanceof Error?o.message:String(o)}}}},D=async({targetLayer:i,topFilter:t,geometryFilter:n,useCurrentExtent:a},d)=>{let{mapView:s}=g(d,["mapView"]),c=F(n,d.state?.agentExecutionContext?.sharedResources),u=await R(i,t,s,c,a);return JSON.stringify(u,null,2)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:m.optional().describe("The units for the distance buffer.")}),L=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:m.optional().describe("The units for the distance buffer.")}),U=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([E,L,w]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),topFilter:e.object({topCount:e.number().describe("Number of top features to return per group."),orderByFields:e.array(e.string().describe("Field(s) to rank by with ASC/DESC. Must be existing field names, not aggregate functions.")),groupByFields:e.array(e.string().describe("Field(s) to group results by. Returns top N per group."))}).required(),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer).")}),Y=h(D,{name:"getTopFeatures",description:'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',schema:U});return Y},"rest/support/TopFeaturesQuery","rest/support/TopFilter",a,b)
2
+ import b from"./4RPNBHB5.js";import{a as B,b as S}from"./PQ75545K.js";import a from"./K4LXMVNH.js";import{a as g}from"./S2BGAMSA.js";import{a as e}from"./X4GCKBT2.js";import{Ic as h}from"./ASDS73QU.js";export default $arcgis.t(([k,j,{a:m,d:b,e:w,f:F},{c:T}])=>{var q=i=>i.flatMap(t=>t.split(",")).map(t=>t.trim()).map(t=>t.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(t=>!!t),R=async(i,t,n,a,d)=>{let s=n.map?.allLayers.find(o=>o.id===i.layerId),c=await n.whenLayerView(s),u=s.title??i.layerId,l;if(a){let o=await b(a,n);if("error"in o)return{tool:"getTopFeatures",layerName:u,summary:"Geometry lookup failed",details:{error:o.error}};if(!o.geometry)return{tool:"getTopFeatures",layerName:u,summary:"No features found for geometry filter",details:{error:`No features found matching: ${"where"in a?a.where:"unknown criteria"}`}};l=o.geometry}else d&&(l=n.extent.clone());let y=t.groupByFields&&t.groupByFields.length>0,f=s.objectIdField,p=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,f])];try{let o;if(y){let r=new k({where:i.where||"1=1",outFields:p,orderByFields:i.orderByFields,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,topFilter:new j({topCount:t.topCount,groupByFields:t.groupByFields,orderByFields:t.orderByFields})});o=await s.queryTopFeatures(r)}else{let r=s.createQuery();r.where=S(s.definitionExpression,i.where||"1=1"),r.outFields=p.length?p:["*"],r.orderByFields=t.orderByFields,r.returnGeometry=!1,r.num=t.topCount,l&&(r.geometry=l,r.spatialRelationship="intersects"),a?.distance&&(r.distance=a.distance),a?.units&&(r.units=a.units),r.outSpatialReference=n.spatialReference;let v=[...new Set([...i.outFields,...q(t.orderByFields)])],N=B(c,v,d??!1);try{o=N?await c.queryFeatures(r):await s.queryFeatures(r)}catch(x){console.warn("Client-side query failed, falling back to server:",x),o=await s.queryFeatures(r)}}let C=o.features.map(r=>r.attributes[f]),{attributes:I}=T(s,o,n.timeZone);return{tool:"getTopFeatures",layerName:u,summary:`Top ${t.topCount} features extracted`,details:{topCount:t.topCount,attributes:I,objectIds:C,objectIdField:f,where:i.where,orderByFields:t.orderByFields,...y&&{groupByFields:t.groupByFields}}}}catch(o){return{tool:"getTopFeatures",layerName:u,summary:"Query failed",details:{error:o instanceof Error?o.message:String(o)}}}},D=async({targetLayer:i,topFilter:t,geometryFilter:n,useCurrentExtent:a},d)=>{let{mapView:s}=g(d,["mapView"]),c=F(n,d.state?.agentExecutionContext?.sharedResources),u=await R(i,t,s,c,a);return JSON.stringify(u,null,2)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:m.optional().describe("The units for the distance buffer.")}),L=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:m.optional().describe("The units for the distance buffer.")}),U=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([E,L,w]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),topFilter:e.object({topCount:e.number().describe("Number of top features to return per group."),orderByFields:e.array(e.string().describe("Field(s) to rank by with ASC/DESC. Must be existing field names, not aggregate functions.")),groupByFields:e.array(e.string().describe("Field(s) to group results by. Returns top N per group."))}).required(),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer).")}),Y=h(D,{name:"getTopFeatures",description:'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',schema:U});return Y},"rest/support/TopFeaturesQuery","rest/support/TopFilter",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as O}from"./XEK22IDA.js";import f from"./55FL7WQV.js";import e from"./AMBLICID.js";import c from"./RBGARTND.js";import{a as E}from"./6H7CWMFE.js";import b from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{c as L}from"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{K as M,L as g,M as S,O as v,T as k,h as A,j as d,w as u}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:x},,{b:P},{a:D},{a:R}])=>{var y=["@","#","$"],F=400;function q(n,t){let a=null;for(let l of t){let r=l.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),s=new RegExp(`${r}"([^"\\n]*)"?$`,"u"),e=n.match(s);if(e){let c=e[0],o=n.length-c.length,h=e[1]??"";(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}let i=new RegExp(`${r}[\\p{L}\\p{N}_-]+$`,"u"),m=n.match(i);if(m){let c=m[0],o=n.length-c.length,h=c.slice(l.length);(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}}return a}var U=n=>y.includes(n)?n:"@",N=L(n=>{let t=[],a=async s=>await x({requester:async()=>await D(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await R(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),r=O(async(s,e)=>{n.isFetchingEntities=!0;let i=s.toLowerCase();switch(U(e)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:t.filter(h=>h.username?.toLowerCase().includes(i)||h.fullName?.toLowerCase().includes(i)).slice(0,m)};break;case"#":let{result:c}=await a(i);n.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:o}=await l(i);n.filteredItemsInfo={type:"group",items:o};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},F);return{fetchUsers:async()=>{try{let{users:s}=await P(n.portal);t=s??[]}catch(s){t=[],console.error("error fetching org users:",s)}},filterItems:r,getItemText:(s,e)=>{let i="";switch(U(e)){case"@":i=s.username;break;case"#":i=s.title??"";break;case"$":i=s.title??"";break}return i.trim()}}}),$=({id:n,label:t,selected:a,description:l,contentStart:r,onSelect:s})=>E(n,d`<calcite-list-item class=${v({selected:a})} .label=${t} .description=${l} .selected=${a} @pointerdown=${async e=>{e.preventDefault(),e.stopPropagation(),await s()}} ${g(e=>{a&&e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${r}</calcite-list-item>`),K=A`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends S{constructor(){super(...arguments),this.calciteTextAreaRef=M(),this.mentionableEntityController=N(this),this.handleInput=t=>{let{bubbleNewValueChange:a,checkForMention:l}=this,r=t.target.value;this._value=r,a(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(r,s)},this.handleKeyDown=t=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(t),this.arcgisMentionableTextAreaKeyDown.emit(t);return}switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":t.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":t.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":t.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=t=>{this.arcgisUserMentionableTextAreaChange.emit(t),this.arcgisMentionableTextAreaChange.emit(t)},this.checkForMention=(t,a)=>{let l=t.substring(0,a),r=q(l,this.starters??y);if(r){let{starter:s}=r;this.currentStarter=s,this.filterMentionItems(r),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=t=>{let{mentionText:a,query:l,starter:r,startIndex:s}=t;this.currentMentionQuery=a,this.mentionStartPosition=s;let e=l.toLowerCase();this.mentionableEntityController.filterItems(e,r),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=y,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=u(),this.arcgisMentionableTextAreaChange=u(),this.arcgisMentionableTextAreaKeyDown=u(),this.arcgisUserMentionableTextAreaChange=u(),this.arcgisUserMentionableTextAreaKeyDown=u(),this.renderItemInfo=()=>{let{filteredItemsInfo:t,selectedItemIndex:a,portal:l}=this;if(!t)return null;let{items:r,type:s}=t;switch(s){case"user":return r.map((e,i)=>$({id:e.id,label:`@${e.username}`,description:e.fullName,selected:i===a,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${e} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(e)}));case"item":return r.map((e,i)=>$({id:e.id??`item-${i}`,label:`#${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return r.map((e,i)=>$({id:e.id??`group-${i}`,label:`${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=K}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(t){let{currentStarter:a,_value:l,mentionStartPosition:r,currentMentionQuery:s,handleClosePopover:e,calciteTextAreaRef:i,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!t||!a)return;let o=this.mentionableEntityController.getItemText(t,a).replaceAll('"',"").trim(),h=/\s/u.test(o)?`${a}"${o}"`:`${a}${o}`,f=(l??"").substring(0,r),p=(l??"").substring(r+s.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=r+h.length+1;e(),await this.updateComplete,i.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(t){t.has("value")&&(this._value=this.value??""),t.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let t=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");t&&(this.nativeTextAreaRef=t)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:t,scale:a,_value:l,maxLength:r,rows:s,placeholder:e,readOnly:i,popoverOpen:m,closePopover:c,handleInput:o,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:C}=this,T=this.calciteTextAreaRef.value,_=I?.items??[];return d`<calcite-text-area .placeholder=${e} .value=${l} .maxLength=${r} .rows=${s} .scale=${a} .readOnly=${i} .disabled=${f} @blur=${c} @calciteTextAreaInput=${o} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${T&&d`<calcite-popover .open=${m} .placement=${t} class="mention-popover" .label=${C} .referenceElement=${T} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&d`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&d`<calcite-list .label=${C}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b,c,e,f)
2
+ import{a as O}from"./XEK22IDA.js";import f from"./55FL7WQV.js";import e from"./AMBLICID.js";import c from"./RBGARTND.js";import{a as E}from"./K64QFEX2.js";import b from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{c as L}from"./YFU47LWN.js";import"./UXAGLEJM.js";import{K as M,L as g,M as S,O as v,T as k,h as A,j as d,w as u}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:x},,{b:P},{a:D},{a:R}])=>{var y=["@","#","$"],F=400;function q(n,t){let a=null;for(let l of t){let r=l.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),s=new RegExp(`${r}"([^"\\n]*)"?$`,"u"),e=n.match(s);if(e){let c=e[0],o=n.length-c.length,h=e[1]??"";(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}let i=new RegExp(`${r}[\\p{L}\\p{N}_-]+$`,"u"),m=n.match(i);if(m){let c=m[0],o=n.length-c.length,h=c.slice(l.length);(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}}return a}var U=n=>y.includes(n)?n:"@",N=L(n=>{let t=[],a=async s=>await x({requester:async()=>await D(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await R(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),r=O(async(s,e)=>{n.isFetchingEntities=!0;let i=s.toLowerCase();switch(U(e)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:t.filter(h=>h.username?.toLowerCase().includes(i)||h.fullName?.toLowerCase().includes(i)).slice(0,m)};break;case"#":let{result:c}=await a(i);n.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:o}=await l(i);n.filteredItemsInfo={type:"group",items:o};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},F);return{fetchUsers:async()=>{try{let{users:s}=await P(n.portal);t=s??[]}catch(s){t=[],console.error("error fetching org users:",s)}},filterItems:r,getItemText:(s,e)=>{let i="";switch(U(e)){case"@":i=s.username;break;case"#":i=s.title??"";break;case"$":i=s.title??"";break}return i.trim()}}}),$=({id:n,label:t,selected:a,description:l,contentStart:r,onSelect:s})=>E(n,d`<calcite-list-item class=${v({selected:a})} .label=${t} .description=${l} .selected=${a} @pointerdown=${async e=>{e.preventDefault(),e.stopPropagation(),await s()}} ${g(e=>{a&&e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${r}</calcite-list-item>`),K=A`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends S{constructor(){super(...arguments),this.calciteTextAreaRef=M(),this.mentionableEntityController=N(this),this.handleInput=t=>{let{bubbleNewValueChange:a,checkForMention:l}=this,r=t.target.value;this._value=r,a(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(r,s)},this.handleKeyDown=t=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(t),this.arcgisMentionableTextAreaKeyDown.emit(t);return}switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":t.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":t.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":t.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=t=>{this.arcgisUserMentionableTextAreaChange.emit(t),this.arcgisMentionableTextAreaChange.emit(t)},this.checkForMention=(t,a)=>{let l=t.substring(0,a),r=q(l,this.starters??y);if(r){let{starter:s}=r;this.currentStarter=s,this.filterMentionItems(r),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=t=>{let{mentionText:a,query:l,starter:r,startIndex:s}=t;this.currentMentionQuery=a,this.mentionStartPosition=s;let e=l.toLowerCase();this.mentionableEntityController.filterItems(e,r),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=y,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=u(),this.arcgisMentionableTextAreaChange=u(),this.arcgisMentionableTextAreaKeyDown=u(),this.arcgisUserMentionableTextAreaChange=u(),this.arcgisUserMentionableTextAreaKeyDown=u(),this.renderItemInfo=()=>{let{filteredItemsInfo:t,selectedItemIndex:a,portal:l}=this;if(!t)return null;let{items:r,type:s}=t;switch(s){case"user":return r.map((e,i)=>$({id:e.id,label:`@${e.username}`,description:e.fullName,selected:i===a,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${e} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(e)}));case"item":return r.map((e,i)=>$({id:e.id??`item-${i}`,label:`#${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return r.map((e,i)=>$({id:e.id??`group-${i}`,label:`${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=K}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(t){let{currentStarter:a,_value:l,mentionStartPosition:r,currentMentionQuery:s,handleClosePopover:e,calciteTextAreaRef:i,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!t||!a)return;let o=this.mentionableEntityController.getItemText(t,a).replaceAll('"',"").trim(),h=/\s/u.test(o)?`${a}"${o}"`:`${a}${o}`,f=(l??"").substring(0,r),p=(l??"").substring(r+s.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=r+h.length+1;e(),await this.updateComplete,i.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(t){t.has("value")&&(this._value=this.value??""),t.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let t=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");t&&(this.nativeTextAreaRef=t)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:t,scale:a,_value:l,maxLength:r,rows:s,placeholder:e,readOnly:i,popoverOpen:m,closePopover:c,handleInput:o,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:C}=this,T=this.calciteTextAreaRef.value,_=I?.items??[];return d`<calcite-text-area .placeholder=${e} .value=${l} .maxLength=${r} .rows=${s} .scale=${a} .readOnly=${i} .disabled=${f} @blur=${c} @calciteTextAreaInput=${o} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${T&&d`<calcite-popover .open=${m} .placement=${t} class="mention-popover" .label=${C} .referenceElement=${T} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&d`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&d`<calcite-list .label=${C}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b,c,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as r}from"./H4TRF2G7.js";import{a as n}from"./NDHD5H3P.js";import"./5IEUHTZ7.js";import"./7NZ3RJFV.js";import{K as s,L as c,M as o,T as l,j as a,w as e}from"./N5KMTTYL.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:p}])=>{var i=class extends o{constructor(){super(...arguments),this.messages=n({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=s(),this.accounts=[],this.arcgisLinkAll=e(),this.arcgisCloseDialog=e()}static{this.properties={portal:0,targetUser:1,accounts:0}}static{this.styles=r}render(){let{messages:t,portal:g,accounts:u,targetUser:m}=this;return a`<calcite-dialog open modal width=s .heading=${t.linkTitle} heading-level=2 outside-close-disabled @calciteDialogClose=${()=>this.arcgisCloseDialog.emit()} ${c(this.dialogRef)}><calcite-block .heading=${p(t.linkWarning,{targetUser:m})} expanded class="linked-accounts-block"><arcgis-portal-account-switcher-list .portal=${g} .linkedAccounts=${u}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer-end appearance=outline @click=${()=>{this.dialogRef.value.open=!1}}>${t.cancel}</calcite-button><calcite-button slot=footer-end kind=brand @click=${()=>{this.arcgisLinkAll.emit(),this.dialogRef.value.open=!1}}>${t.linkAll}</calcite-button></calcite-dialog>`}};l("arcgis-portal-account-switcher-accounts",i);return i},"intl")
2
+ import{a as r}from"./PWHUWOQ3.js";import{a as n}from"./QQMRZ2WI.js";import"./YFU47LWN.js";import"./UXAGLEJM.js";import{K as s,L as c,M as o,T as l,j as a,w as e}from"./OTMC7MVD.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:p}])=>{var i=class extends o{constructor(){super(...arguments),this.messages=n({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=s(),this.accounts=[],this.arcgisLinkAll=e(),this.arcgisCloseDialog=e()}static{this.properties={portal:0,targetUser:1,accounts:0}}static{this.styles=r}render(){let{messages:t,portal:g,accounts:u,targetUser:m}=this;return a`<calcite-dialog open modal width=s .heading=${t.linkTitle} heading-level=2 outside-close-disabled @calciteDialogClose=${()=>this.arcgisCloseDialog.emit()} ${c(this.dialogRef)}><calcite-block .heading=${p(t.linkWarning,{targetUser:m})} expanded class="linked-accounts-block"><arcgis-portal-account-switcher-list .portal=${g} .linkedAccounts=${u}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer-end appearance=outline @click=${()=>{this.dialogRef.value.open=!1}}>${t.cancel}</calcite-button><calcite-button slot=footer-end kind=brand @click=${()=>{this.arcgisLinkAll.emit(),this.dialogRef.value.open=!1}}>${t.linkAll}</calcite-button></calcite-dialog>`}};l("arcgis-portal-account-switcher-accounts",i);return i},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i}from"./S2BGAMSA.js";import{Fc as r,Ic as n}from"./DG6DAKQ2.js";async function s(a,t){await t.when();let e=t.map?.allLayers.find(l=>l.id===a);if(!e)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${a}`),{text:`Could not find layer for: ${a}`};let o;return(e.type==="link-chart"||e.type==="knowledge-graph-sublayer")&&t.map?.activeLinkChartLayer?o=t.map.diagramNodesExtent:o=e.fullExtent,o?(await t.goTo(o),e.visible=!0,{text:`Successfully zoomed to: ${e.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function m({layerId:a},t){let{mapView:e}=i(t,["mapView"]);return await s(a,e)}var c=r.object({layerId:r.string().describe("The id of the layer to navigate to")}),p=n(m,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:c});export{p as a};
2
+ import{a as i}from"./S2BGAMSA.js";import{Fc as r,Ic as n}from"./ASDS73QU.js";async function s(a,t){await t.when();let e=t.map?.allLayers.find(l=>l.id===a);if(!e)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${a}`),{text:`Could not find layer for: ${a}`};let o;return(e.type==="link-chart"||e.type==="knowledge-graph-sublayer")&&t.map?.activeLinkChartLayer?o=t.map.diagramNodesExtent:o=e.fullExtent,o?(await t.goTo(o),e.visible=!0,{text:`Successfully zoomed to: ${e.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function m({layerId:a},t){let{mapView:e}=i(t,["mapView"]);return await s(a,e)}var c=r.object({layerId:r.string().describe("The id of the layer to navigate to")}),p=n(m,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:c});export{p as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./37HLLREH.js";import{a as h}from"./S2BGAMSA.js";import{a as e}from"./FWRSYP3I.js";import{Ic as p}from"./DG6DAKQ2.js";export default $arcgis.t(([w,I,{a:u,d:m,e:b,f:y}])=>{var x=async(t,o,f,n,r,c)=>{let a=t.map?.allLayers.find(s=>s.id===o);if(!a)return{success:!1,error:`Layer '${o}' not found.`};let i=a.createQuery();i.where=f??"1=1",n&&(i.geometry=n,i.spatialRelationship="intersects",r&&(i.distance=r),c&&(i.units=c));try{let{extent:s,count:l}=await a.queryExtent(i);return!s||l===0?{success:!1,error:`No features found for filter (where: ${i.where}${n?", spatial filter used":""})`}:(await t.goTo(s),{success:!0})}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}},v=async(t,o,f,n,r,c)=>{let a=o.map?.allLayers.find(d=>d.id===t.layerId);if(!a)return`Could not find target layer with ID: ${t.layerId}`;let i;if(r){let d=await m(r,o);if("error"in d)return d.error;i=d.geometry}if(a.featureEffect=null,a.featureEffect=new w({filter:new I({...t.objectIds?.length?{objectIds:t.objectIds}:{where:t.where},geometry:i,spatialRelationship:"intersects",distance:r?.distance,units:r?.units}),includedEffect:f,excludedEffect:n}),a.visible=!0,c)return`Applied feature effects to "${a.title??t.layerId}" within current map extent.`;let s=t.objectIds?.length?`${a.objectIdField} IN (${t.objectIds.join(",")})`:t.where,l=await x(o,t.layerId,s,i,r?.distance,r?.units),g=a.title??t.layerId;return l.success?`Applied feature effects to target layer "${a.title??t.layerId}"${r&&"layerId"in r?` using geometry from layer "${r.layerId}"`:""}.`:`Applied filter to "${g}" but no features matched. ${l.error}`},j=async({targetLayer:t,geometryFilter:o,useCurrentExtent:f,includedEffect:n="drop-shadow(2px, 2px, 2px, gray)",excludedEffect:r="grayscale(100%) opacity(60%) blur(2px)"},c)=>{let{mapView:a}=h(c,["mapView"]),i=y(o,c.state?.agentExecutionContext?.sharedResources);return await v(t,a,n,r,i,f)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:u.optional().describe("The units for the distance buffer.")}),T=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:u.optional().describe("The units for the distance buffer.")}),$=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer on which to set a feature effect."),where:e.string().describe("The SQL-92 where clause representing the features to emphasize."),objectIds:e.array(e.number()).optional().describe("Array of objectIds from a previous query result. Use this instead of a where clause when the query returned objectIds (e.g. top N results). If provided, takes precedence over where clause.")}),geometryFilter:e.union([E,T,b]).optional().describe("Optional spatial filter. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location."),useCurrentExtent:e.boolean().optional().describe("Set to true when the previous query used the current map extent as a spatial filter. This ensures the feature effect applies only to features visible in the current view. Default is false."),includedEffect:e.string().default("drop-shadow(2px, 2px, 2px, gray)").describe("The effect applied to features that meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."),excludedEffect:e.string().default("grayscale(100%) opacity(60%) blur(2px)").describe("The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified.")}),A=p(j,{name:"setFeatureEffect",description:"Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",schema:$});return A},"layers/support/FeatureEffect","layers/support/FeatureFilter",a)
2
+ import a from"./K4LXMVNH.js";import{a as h}from"./S2BGAMSA.js";import{a as e}from"./X4GCKBT2.js";import{Ic as p}from"./ASDS73QU.js";export default $arcgis.t(([w,I,{a:u,d:m,e:b,f:y}])=>{var x=async(t,o,f,n,r,c)=>{let a=t.map?.allLayers.find(s=>s.id===o);if(!a)return{success:!1,error:`Layer '${o}' not found.`};let i=a.createQuery();i.where=f??"1=1",n&&(i.geometry=n,i.spatialRelationship="intersects",r&&(i.distance=r),c&&(i.units=c));try{let{extent:s,count:l}=await a.queryExtent(i);return!s||l===0?{success:!1,error:`No features found for filter (where: ${i.where}${n?", spatial filter used":""})`}:(await t.goTo(s),{success:!0})}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}},v=async(t,o,f,n,r,c)=>{let a=o.map?.allLayers.find(d=>d.id===t.layerId);if(!a)return`Could not find target layer with ID: ${t.layerId}`;let i;if(r){let d=await m(r,o);if("error"in d)return d.error;i=d.geometry}if(a.featureEffect=null,a.featureEffect=new w({filter:new I({...t.objectIds?.length?{objectIds:t.objectIds}:{where:t.where},geometry:i,spatialRelationship:"intersects",distance:r?.distance,units:r?.units}),includedEffect:f,excludedEffect:n}),a.visible=!0,c)return`Applied feature effects to "${a.title??t.layerId}" within current map extent.`;let s=t.objectIds?.length?`${a.objectIdField} IN (${t.objectIds.join(",")})`:t.where,l=await x(o,t.layerId,s,i,r?.distance,r?.units),g=a.title??t.layerId;return l.success?`Applied feature effects to target layer "${a.title??t.layerId}"${r&&"layerId"in r?` using geometry from layer "${r.layerId}"`:""}.`:`Applied filter to "${g}" but no features matched. ${l.error}`},j=async({targetLayer:t,geometryFilter:o,useCurrentExtent:f,includedEffect:n="drop-shadow(2px, 2px, 2px, gray)",excludedEffect:r="grayscale(100%) opacity(60%) blur(2px)"},c)=>{let{mapView:a}=h(c,["mapView"]),i=y(o,c.state?.agentExecutionContext?.sharedResources);return await v(t,a,n,r,i,f)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:u.optional().describe("The units for the distance buffer.")}),T=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:u.optional().describe("The units for the distance buffer.")}),$=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer on which to set a feature effect."),where:e.string().describe("The SQL-92 where clause representing the features to emphasize."),objectIds:e.array(e.number()).optional().describe("Array of objectIds from a previous query result. Use this instead of a where clause when the query returned objectIds (e.g. top N results). If provided, takes precedence over where clause.")}),geometryFilter:e.union([E,T,b]).optional().describe("Optional spatial filter. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location."),useCurrentExtent:e.boolean().optional().describe("Set to true when the previous query used the current map extent as a spatial filter. This ensures the feature effect applies only to features visible in the current view. Default is false."),includedEffect:e.string().default("drop-shadow(2px, 2px, 2px, gray)").describe("The effect applied to features that meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."),excludedEffect:e.string().default("grayscale(100%) opacity(60%) blur(2px)").describe("The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified.")}),A=p(j,{name:"setFeatureEffect",description:"Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",schema:$});return A},"layers/support/FeatureEffect","layers/support/FeatureFilter",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as v}from"./7NZ3RJFV.js";import{t as y,u as m,y as h}from"./N5KMTTYL.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
2
+ import{a as v}from"./UXAGLEJM.js";import{t as y,u as m,y as h}from"./OTMC7MVD.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./7EPXWK4L.js";export default $arcgis.t(([{watch:s},{b:r}])=>{var t=r;var f=["folder","group","contentType"],l=e=>e.type==="item-browser",o={filters:{},hiddenFilters:[],preview:null},w=(e=o)=>t({...o,...e});function y(e,a){let c=s(()=>e.preview,a);return()=>c.remove()}return{a:f,b:l,c:w,d:y}},"core/reactiveUtils",a)
2
+ import a from"./ICUDZDC6.js";export default $arcgis.t(([{watch:s},{b:r}])=>{var t=r;var f=["folder","group","contentType"],l=e=>e.type==="item-browser",o={filters:{},hiddenFilters:[],preview:null},w=(e=o)=>t({...o,...e});function y(e,a){let c=s(()=>e.preview,a);return()=>c.remove()}return{a:f,b:l,c:w,d:y}},"core/reactiveUtils",a)