@esri/solutions-components 5.1.5 → 5.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{MFAEDW75.js → 2EAVGPQQ.js} +1 -1
- package/dist/cdn/{R4DDGIC2.js → 2I5UY6RD.js} +1 -1
- package/dist/cdn/{GCDVJH5S.js → 3HGR6VXB.js} +1 -1
- package/dist/cdn/{K2EL2UZ6.js → 4CEQFURO.js} +1 -1
- package/dist/cdn/{NG3F6PTV.js → 4CMB2JIF.js} +1 -1
- package/dist/cdn/{S2WAKXLP.js → 4WGHP4H5.js} +1 -1
- package/dist/cdn/{4FT4GFHD.js → 537YPVAM.js} +1 -1
- package/dist/cdn/{57K3VUDO.js → 55UXOGN6.js} +1 -1
- package/dist/cdn/{C7NYB4E3.js → 573G4DTV.js} +1 -1
- package/dist/cdn/{VO5GTLFZ.js → 5Y6BC5WH.js} +1 -1
- package/dist/cdn/{CQO3LS4F.js → 6DPRWKJW.js} +1 -1
- package/dist/cdn/{Z25PSY3U.js → 6HMLPLLU.js} +1 -1
- package/dist/cdn/{SVSOXKWN.js → 6OWR4WDF.js} +1 -1
- package/dist/cdn/{UVVHDNLG.js → 73WHDMBB.js} +1 -1
- package/dist/cdn/{PS3JQUTJ.js → 74ZQDJYN.js} +1 -1
- package/dist/cdn/{LJSV3N24.js → 7BFE3VVJ.js} +1 -1
- package/dist/cdn/{BRO7CVUL.js → 7ERUNOYN.js} +1 -1
- package/dist/cdn/{66G3UOA2.js → 7P5SMQEP.js} +1 -1
- package/dist/cdn/{PSEXPNM3.js → 7QFRUIR3.js} +1 -1
- package/dist/cdn/{YYX3TPSP.js → 7RDUGCTS.js} +1 -1
- package/dist/cdn/{D5KRZ7AK.js → A6JQTHN7.js} +1 -1
- package/dist/cdn/{J7DVVXDE.js → ABRY4E4C.js} +1 -1
- package/dist/cdn/{JIQTQNV2.js → ACS56O66.js} +1 -1
- package/dist/cdn/{JUYUL4XS.js → AGBRB3QN.js} +1 -1
- package/dist/cdn/{72W4TG3N.js → AZOG6L3Y.js} +1 -1
- package/dist/cdn/{GLMXH46Y.js → BDTAVWLX.js} +1 -1
- package/dist/cdn/{D4HLNASK.js → BQQVJ6KB.js} +1 -1
- package/dist/cdn/{PS72QAM2.js → BWKTLBKM.js} +1 -1
- package/dist/cdn/{R4HQIY3D.js → C2GDUVT5.js} +1 -1
- package/dist/cdn/{HW2PNVBR.js → CJUVMFRG.js} +1 -1
- package/dist/cdn/{C7PGMJUI.js → CLJLD5PX.js} +1 -1
- package/dist/cdn/{LC3EY5AV.js → CNMS4F5Q.js} +1 -1
- package/dist/cdn/{WV6SP7G6.js → COQ7K4OA.js} +1 -1
- package/dist/cdn/{IVNAWTJU.js → DCFZQJRO.js} +1 -1
- package/dist/cdn/{EP5UH274.js → DQBV3WFN.js} +1 -1
- package/dist/cdn/{SSCZIVLF.js → DTR7YAZI.js} +1 -1
- package/dist/cdn/{WUIPWLKY.js → EH3BNB4R.js} +1 -1
- package/dist/cdn/{IUNQVV4E.js → FCLUG3NJ.js} +1 -1
- package/dist/cdn/{BFWIGZO7.js → FFI7CZZE.js} +1 -1
- package/dist/cdn/{DHCQHZGS.js → FJNJ7VV3.js} +1 -1
- package/dist/cdn/{ZO6UNZTG.js → FO27KNLW.js} +1 -1
- package/dist/cdn/{3TC2XGQ5.js → FSXHE5BN.js} +1 -1
- package/dist/cdn/{HPJTDALL.js → FSZQUSYT.js} +1 -1
- package/dist/cdn/{IUDZCTI5.js → FUDBT5SO.js} +1 -1
- package/dist/cdn/{47DJRQSO.js → GA4HPDIK.js} +1 -1
- package/dist/cdn/{TIYKWS6T.js → GTEFHPHV.js} +1 -1
- package/dist/cdn/{GJVOUQQH.js → HKQKXCKL.js} +1 -1
- package/dist/cdn/{4VBJISFZ.js → HN45AZDW.js} +1 -1
- package/dist/cdn/{LYGGTOTA.js → HQB33AR6.js} +1 -1
- package/dist/cdn/{XVC34MKM.js → HSYNLCS6.js} +1 -1
- package/dist/cdn/{XZMAMFEG.js → HU4SFLVQ.js} +1 -1
- package/dist/cdn/{TN3H35H5.js → HZEKMQOQ.js} +1 -1
- package/dist/cdn/{IXEH43JO.js → IFPPYYO5.js} +1 -1
- package/dist/cdn/{FXGBFLFM.js → IHZ3FODO.js} +1 -1
- package/dist/cdn/{PTTNVFTG.js → IN7KX2VO.js} +1 -1
- package/dist/cdn/{BM2YLVYU.js → INHF3PRS.js} +1 -1
- package/dist/cdn/{U4HGOXNJ.js → IPOPM3LM.js} +1 -1
- package/dist/cdn/{VCGIHOOS.js → IV3XLBK2.js} +1 -1
- package/dist/cdn/{2K2JHJHI.js → IVG423RV.js} +1 -1
- package/dist/cdn/{52UQZUF4.js → IVT5EH7V.js} +1 -1
- package/dist/cdn/{4ADGXO3L.js → IWLWX75G.js} +1 -1
- package/dist/cdn/{FAUIMAPE.js → J3R23IV3.js} +1 -1
- package/dist/cdn/{W75AYE63.js → JBTMA635.js} +1 -1
- package/dist/cdn/{IXSXSPVY.js → JGIUIMX6.js} +1 -1
- package/dist/cdn/{4T4PIFVM.js → JJQALSZS.js} +1 -1
- package/dist/cdn/{BQTGHHZB.js → K7E7L4OR.js} +1 -1
- package/dist/cdn/KLIO37YK.js +64 -0
- package/dist/cdn/{DFCRABYS.js → KLZILSM2.js} +1 -1
- package/dist/cdn/{X5OAASE3.js → KXHGNIZI.js} +1 -1
- package/dist/cdn/{EX3OQDJQ.js → KXV767EZ.js} +1 -1
- package/dist/cdn/{OIKSXWIN.js → L64ATDYJ.js} +1 -1
- package/dist/cdn/{6VBM5CYH.js → LOBQXN5U.js} +1 -1
- package/dist/cdn/LWJ74OVE.js +2 -0
- package/dist/cdn/{POGUZ34D.js → M7ADRTOD.js} +1 -1
- package/dist/cdn/{CGWXSQMR.js → MED4PP57.js} +1 -1
- package/dist/cdn/{KXMDUV5P.js → MKZEX7DE.js} +1 -1
- package/dist/cdn/{CPE5LQ77.js → ML7ONETQ.js} +1 -1
- package/dist/cdn/{FRTR7R27.js → MN7YVS4C.js} +1 -1
- package/dist/cdn/{DQVYSRKV.js → MUTMVCJH.js} +1 -1
- package/dist/cdn/{6M63XHZE.js → MWMHCOM7.js} +1 -1
- package/dist/cdn/{6SJAVXVB.js → N7JMNT7U.js} +1 -1
- package/dist/cdn/{7SROO3BB.js → NEEE2XFP.js} +1 -1
- package/dist/cdn/{J2R6S5NB.js → NFSBYFAN.js} +1 -1
- package/dist/cdn/{SHDZVK22.js → NGDIFB6C.js} +1 -1
- package/dist/cdn/{743CCX7N.js → NPRV26AN.js} +1 -1
- package/dist/cdn/{JUS454AQ.js → NSIWYZXA.js} +1 -1
- package/dist/cdn/{JP3PBXBQ.js → O3JLHPWX.js} +1 -1
- package/dist/cdn/{ZS54T3U7.js → O4PNLONH.js} +1 -1
- package/dist/cdn/{R4SSUAM5.js → O65GM2OS.js} +1 -1
- package/dist/cdn/{6GPU4R2K.js → OE2AIEJR.js} +1 -1
- package/dist/cdn/{2ANPUNLB.js → OKMR3RTG.js} +1 -1
- package/dist/cdn/{36A4OXYY.js → PCMKVOJE.js} +1 -1
- package/dist/cdn/{DW7BVW5R.js → PMRMQHSG.js} +1 -1
- package/dist/cdn/{FGRROW6V.js → PNS2HOLX.js} +1 -1
- package/dist/cdn/{XFQFC2MM.js → POPNTKTN.js} +1 -1
- package/dist/cdn/{PM6MGL6S.js → PSXWMNIM.js} +3 -3
- package/dist/cdn/{FCFYBIFG.js → PWV6AWEK.js} +1 -1
- package/dist/cdn/{GT3APK5P.js → Q3JLQFIR.js} +1 -1
- package/dist/cdn/{KJEGIFW3.js → QI7CGBRO.js} +1 -1
- package/dist/cdn/{MRYP6TKM.js → QJRZSXE3.js} +1 -1
- package/dist/cdn/{VQR63FZS.js → QKL3OUJN.js} +1 -1
- package/dist/cdn/{OKJQRXDF.js → RB6WXO2B.js} +1 -1
- package/dist/cdn/{LJ4YWFDV.js → RDDKOZ3K.js} +1 -1
- package/dist/cdn/{YY2HNKAV.js → RIUUYA2I.js} +1 -1
- package/dist/cdn/{HE4XVC7T.js → RK6QNHNL.js} +1 -1
- package/dist/cdn/{H6NFDCMH.js → RKAS46EN.js} +1 -1
- package/dist/cdn/{A6FQF2BM.js → RTGQJBPP.js} +1 -1
- package/dist/cdn/{LNEAPSZB.js → SGKOGGQZ.js} +1 -1
- package/dist/cdn/{KWKPWZBG.js → STFLL5DN.js} +1 -1
- package/dist/cdn/{42ZGLRJV.js → T4FTLA6B.js} +1 -1
- package/dist/cdn/{DBUXZOL2.js → TQWJ7RSO.js} +1 -1
- package/dist/cdn/{AVTCXUIQ.js → TVEHBAEM.js} +1 -1
- package/dist/cdn/{BEX2VQAI.js → U252BRLA.js} +1 -1
- package/dist/cdn/{2J5XFLVO.js → U2YCH7KY.js} +1 -1
- package/dist/cdn/{HZDK3K4L.js → UDF6XJC3.js} +1 -1
- package/dist/cdn/{IJ3HJGCR.js → UFQD5LVR.js} +1 -1
- package/dist/cdn/{WFZAADG6.js → UHEB6KZP.js} +1 -1
- package/dist/cdn/{QFIGUV2M.js → UIGM4I3S.js} +1 -1
- package/dist/cdn/{5BJ6II4F.js → UWTMQLSU.js} +1 -1
- package/dist/cdn/{3LOSUHD7.js → W2IZON5N.js} +1 -1
- package/dist/cdn/{DPGJWY5W.js → W552UHUR.js} +1 -1
- package/dist/cdn/{HK7AVDFS.js → WD54XDPZ.js} +1 -1
- package/dist/cdn/{7RAJU536.js → WWUOFMRE.js} +1 -1
- package/dist/cdn/{TV64L24Q.js → XR4LGSBC.js} +1 -1
- package/dist/cdn/{ATEM3GJU.js → XUVXLS2M.js} +113 -113
- package/dist/cdn/XW7WPRON.js +2 -0
- package/dist/cdn/{QTKE7MA4.js → YCHKFNP6.js} +1 -1
- package/dist/cdn/{FZY7OS66.js → YKY6I4I6.js} +1 -1
- package/dist/cdn/{QTVE3UQ6.js → Z5HWNFRD.js} +1 -1
- package/dist/cdn/{VMJ4RMTW.js → ZE2QFJQE.js} +1 -1
- package/dist/cdn/{AMCU6DVH.js → ZL3RLLE7.js} +1 -1
- package/dist/cdn/{QX4VD677.js → ZME6RLE5.js} +1 -1
- package/dist/cdn/{GGW5J7IJ.js → ZOGFJJWC.js} +1 -1
- package/dist/cdn/{7MGKE5QL.js → ZRNM2GI7.js} +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/transformQuery.js +56 -38
- package/dist/components/arcgis-solutions-assistant/customElement.js +7 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +4 -4
- package/package.json +1 -1
- package/dist/cdn/4ER7R6OS.js +0 -2
- package/dist/cdn/MFVXFKKM.js +0 -46
- package/dist/cdn/MHBADLXW.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./XOPNEAS5.js";import{a as f,b as v}from"./2B4SGB3I.js";import{b as r}from"./RLSY4VUQ.js";import{a as b}from"./
|
|
2
|
+
import a from"./XOPNEAS5.js";import{a as f,b as v}from"./2B4SGB3I.js";import{b as r}from"./RLSY4VUQ.js";import{a as b}from"./573G4DTV.js";import{b as g}from"./IPOPM3LM.js";import{F as s,G as l,H as p,K as u,h as d,i,j as h,q as o}from"./T3EPRHTT.js";export default $arcgis.t(([{s:m,t:x}])=>{var w=d`calcite-shell-panel{z-index:var(--calcite-z-index-1)}.display-flex{display:flex}.flex-1,.flex-grow{flex:1}.flex-shrink-0{flex:0 0 auto}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.text-center{text-align:center}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: var(--calcite-spacing-none);--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none);font-weight:var(--calcite-font-weight-medium)}.header-content-wrapper{padding-inline-start:var(--calcite-spacing-xxs)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.justify-content-start{justify-content:start}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-2{z-index:2}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.position-relative{position:relative;height:100%;overflow:hidden}.height-100{height:100%}.height-50{height:50px}.sign-in-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%}.sign-in-icon{transform:translate(-20px)}.height-150{height:150px}.width-150{width:150px}.padding-top-8{padding-top:8px}`,c=class extends p{constructor(){super(),this.solutionsCount=0,this.filterOpen=!0,this.isMobile=!1,this._translations=b({name:"solutions-deployed-shell",blocking:!0}),this._configContextConsumer=r({context:v,subscribe:!0}),this._isMobileContextConsumer=r({context:f,subscribe:!0,callback:e=>this.isMobile=e}),this._solutionsDeployedPanelRef=s(),this._mainPanelRef=s(),this._panelFixed=!1,this.filterRemoved=o(),this.tokenRefreshed=o(),this._handleSignIn=()=>{let e=window.location.pathname.endsWith("deployments")?"":"deployments";this._configContextConsumer.value?.authentication?.signIn(e)},this.listenOn(window,"deployedCardFetchFailed",e=>{let t=e.detail;x({kind:"danger",icon:"exclamation-mark-triangle",title:t.title,message:t.message,autoClose:!0})})}static{this.properties={solutionsCount:9,filterOpen:16,isMobile:16,_translations:16}}static{this.styles=w}willUpdate(e){e.has("isMobile")&&(this.filterOpen=!this.isMobile)}async searchSolutions(e){this._solutionsDeployedPanelRef.value?.setSearchOptions(e),("sortType"in e||"searchTerm"in e)&&this._solutionsDeployedPanelRef.value?.searchSolutions(e)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(n=>{if(n.type==="attributes"&&n.attributeName==="tabindex"){let a=n.target;a.classList.contains("content-wrapper")&&a.tabIndex===0&&(a.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){if(!this._configContextConsumer.value?.authentication?.IsSignedIn)return this._getSignInPrompt();let e=this.isMobile?"justify-content-start":"";return i`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${l(this._mainPanelRef)}><div class=${`display-flex align-items-center height-50 header-content-wrapper ${e}`} slot=header-content><calcite-label class="label-override flex-shrink-0 padding-top-8" layout=inline>${this._translations.numberOfDeployments?.replace("{{count}}",this.solutionsCount.toString())}</calcite-label></div>${this._getSolutionsDeployedPanel()}</calcite-panel></calcite-shell>`}_getSignInPrompt(){return i`<div class="sign-in-prompt">${this._getSignInIcon()}<div class="text-center leader-1 warning-text trailer-1">${this._translations.signInMessage}</div><calcite-button appearance=outline @click=${this._handleSignIn} @keydown=${e=>m(e,()=>this._handleSignIn())} scale=l>${this._translations.signIn}</calcite-button></div>`}_getSolutionsDeployedPanel(){let e=this.isMobile&&this.filterOpen?{display:"none"}:"";return i`<div><solutions-deployed-panel @deployedCardsFetched=${this._updateSolutionCount} style=${u(e)} ${l(this._solutionsDeployedPanelRef)}></solutions-deployed-panel></div>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_getSignInIcon(){return i`<div class="sign-in-icon"><svg aria-hidden=true viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg>${h`<path d="M56.9 4.1V60h-.8V4.9H23.3l25.6 7.47v39.26l-28.8 8.4V35h.8v23.97l27.2-7.94V12.97L20.9 5.03V30h-.8V4.1h36.8zM30.735 41.7l.565.566 9.766-9.766-9.766-9.766-.565.567 8.799 8.799H5v.8h34.534l-8.8 8.8z" fill=var(--calcite-color-text-3) />`}</svg></div>`}};g("solutions-deployed-shell",c);return c},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./SHQFXQEI.js";import{c as C,e as k}from"./C5KDPY7R.js";import{f as g}from"./YM4U4HSN.js";import{b as z,c as E,d as A}from"./IADXB53D.js";import d from"./QZ2ZMWIH.js";import c from"./CS5N3DOL.js";import{a as l}from"./YUWXPLTE.js";import{a as $}from"./
|
|
2
|
+
import e from"./SHQFXQEI.js";import{c as C,e as k}from"./C5KDPY7R.js";import{f as g}from"./YM4U4HSN.js";import{b as z,c as E,d as A}from"./IADXB53D.js";import d from"./QZ2ZMWIH.js";import c from"./CS5N3DOL.js";import{a as l}from"./YUWXPLTE.js";import{a as $}from"./73WHDMBB.js";import{b as w}from"./55UXOGN6.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as x,J as s,L as b,h as u,i as a,q as h}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{a:r,b:c,c:T,d:m},{f:p}])=>{var I=u`:host{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-padding: 15px 10px}:host .esri-legend__layer-caption calcite-action{margin-left:20px}:host .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}:host .instant-apps-interactive-legend__layer-caption--compact{--instant-apps-interactive-legend-ui-padding: 5px}:host .instant-apps-interactive-legend__layer-caption--compact .instant-apps-interactive-legend__layer-caption-btn-container{display:flex;justify-content:flex-end;width:100%}:host .instant-apps-interactive-legend__layer-caption--compact .instant-apps-interactive-legend__layer-caption-btn-container .instant-apps-interactive-legend__show-all-btn{border:none;background-color:transparent;cursor:pointer;color:var(--calcite-color-brand);font-weight:var(--calcite-font-weight-medium);font-size:.75rem;padding-inline-start:20px}:host .instant-apps-interactive-legend__layer-caption--compact .instant-apps-interactive-legend__zoom-to-btn{--calcite-icon-color: var(--calcite-color-brand);--calcite-color-transparent-hover: transparent}:host .instant-apps-interactive-legend__layer-caption--compact .instant-apps-interactive-legend__legend-layer-caption-text{display:inline-block;font-size:.75rem;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-interactive-legend__legend-layer-caption-text{display:inline-block;margin-left:5px;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal}:host .instant-apps-interactive-legend__layer-caption-btn-container{display:flex;white-space:nowrap}:host .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}:host .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}:host .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}:host:dir(rtl) .esri-legend__layer-caption calcite-action{margin-left:unset;margin-right:20px}`,v={ZoomTo:"magnifying-glass-plus",ShowAll:"list-check-all"},o={layerCaption:"esri-legend__layer-caption",layerCaptionBtnContainer:"instant-apps-interactive-legend__layer-caption-btn-container",layerCaptionBtnContainerNoText:"instant-apps-interactive-legend__layer-caption-btn-container--no-text",layerCaptionText:"instant-apps-interactive-legend__legend-layer-caption-text",compact:"instant-apps-interactive-legend__layer-caption--compact",showAll:"instant-apps-interactive-legend__show-all-btn",zoomTo:"instant-apps-interactive-legend__zoom-to-btn"},y=class extends x{constructor(){super(...arguments),this._messages=$({name:"instant-apps-interactive-legend",blocking:!0}),this.expanded=!0,this.legendLayerExpandUpdated=h(),this.showAllSelected=h()}static{this.properties={legendvm:0,activeLayerInfo:0,layer:0,titleText:1,legendElementIndex:9,zoomTo:5,isInteractive:5,legendElement:0,expanded:5}}static{this.styles=I}toggleExpanded(){return()=>{this.expanded=!this.expanded,this.legendLayerExpandUpdated.emit(),(this.activeLayerInfo?.legendElements?.filter(e=>g(e))).length>0&&c.set("relationshipRampExpandStates",{...r.relationshipRampExpandStates,[this.activeLayerInfo.layer.id]:this.expanded})}}handleZoomTo(){return()=>{let e=T(this.layer),t=p(e,this.legendElement);A(e,this.legendvm.view,t)}}handleShowAll(){return()=>{let e=()=>{let i=E(n,this.legendElement.title);m({intLegendLayerData:i,layerId:this.layer.id})},t=()=>{let i=z(n);m({intLegendLayerData:i,layerId:this.layer.id})},n=r.data?.[this.layer?.id];if(p(n,this.legendElement)){e();return}t(),this.showAllSelected.emit()}}shouldDisplayShowAll(){let e=r.data?.[this.layer?.id],t=p(e,this.legendElement);return(e?.categories?.size??0)>1||Array.isArray(t?.nestedInfos)&&t.nestedInfos.length>1}render(){let e=C(this.activeLayerInfo),t=k(this.activeLayerInfo)&&(g(this.legendElement)||!this.legendElement?.type?.includes("-ramp")),{expanded:n}=this,i=c.get("compact"),d=i?` ${o.compact}`:"";if(e&&!this.titleText)return null;let _=this.titleText?a`<span class=${s(o.layerCaptionText)} title=${this.titleText??b}>${this.titleText}</span>`:null,f=this.isInteractive||t?this.renderLegendElementCaptionControls():"";return a`<div class=${`${o.layerCaption}${d}`}><calcite-action @click=${this.toggleExpanded()} .icon=${n?"chevron-down":"chevron-up"} appearance=transparent .text=${n?this._messages.collapse:this._messages.expand} .label=${n?this._messages.collapse:this._messages.expand} scale=s></calcite-action>${i?[_,f]:[f,_]}</div>`}renderLegendElementCaptionControls(){let e=this.titleText?"":` ${o.layerCaptionBtnContainerNoText}`;return l("layer-caption-btn-container",a`<div class=${`${o.layerCaptionBtnContainer}${e}`}>${this.renderShowAllZoomToButtons()}</div>`)}renderShowAllZoomToButtons(){return c.get("compact")?this.renderCompactButtonUI():this.renderButtonUI()}renderCompactButtonUI(){let e=this.shouldDisplayShowAll(),t="zoomToCompact",n=this.zoomTo&&[a`<calcite-action id=${t} class=${s(o.zoomTo)} @click=${this.handleZoomTo()} .icon=${v.ZoomTo} appearance=transparent scale=s .text=${this._messages.zoomTo}></calcite-action>`,a`<calcite-tooltip .referenceElement=${t} placement=top .label=${this._messages.zoomTo}>${this._messages.zoomTo}</calcite-tooltip>`]||"",i=e?a`<button @click=${this.handleShowAll()} class=${s(o.showAll)}>${this._messages.showAll}</button>`:null;return[n,i]}renderButtonUI(){let e=this.shouldDisplayShowAll(),t="showAll",n="zoomTo",i=e&&[l("show-all-button",a`<calcite-button id=${t} .label=${this._messages.showAll} @click=${this.handleShowAll()} .iconStart=${v.ShowAll} appearance=outline round></calcite-button>`),a`<calcite-tooltip .referenceElement=${t} placement=top .label=${this._messages.showAll}>${this._messages.showAll}</calcite-tooltip>`]||"",d=this.zoomTo&&[l("zoom-to-button",a`<calcite-button id=${n} .label=${this._messages.zoomTo} @click=${this.handleZoomTo()} .iconStart=${v.ZoomTo} appearance=outline round></calcite-button>`),a`<calcite-tooltip .referenceElement=${n} placement=top .label=${this._messages.zoomTo}>${this._messages.zoomTo}</calcite-tooltip>`]||"";return[i,d]}};w("instant-apps-interactive-legend-legend-element-caption",y);return y},c,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import c from"./DQ47P6ES.js";import a from"./CS5N3DOL.js";import{b as $}from"./
|
|
2
|
+
import c from"./DQ47P6ES.js";import a from"./CS5N3DOL.js";import{b as $}from"./55UXOGN6.js";import"./Y2AUIXNK.js";import{F as S,G as L,H as b,J as o,L as _,h as m,i as n,q as I,u as f}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{f:l,h:v}])=>{var y=m`@layer{:host{display:block;position:relative}:host .instant-apps-language-translator-search__input{width:235.5px}:host .instant-apps-language-translator-search__suggestion-list{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}:host .instant-apps-language-translator-search__suggestion-list-item:first-child{border:none}:host .instant-apps-language-translator-search__suggestion-list-item{margin-top:0;padding:.8em 1em;border-top:solid 1px rgba(110,110,110,.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}:host .instant-apps-language-translator-search__suggestion-list-item:hover{background-color:var(--calcite-color-foreground-2)}}`,h="instant-apps-language-translator-search",p={input:`${h}__input`,suggestionList:`${h}__suggestion-list`,suggestionListItem:`${h}__suggestion-list-item`},d=class extends b{constructor(){super(...arguments),this.searchInput=S(),this.results=[],this.suggestionSelected=I()}static{this.properties={results:16,t9nPlaceholder:1}}static{this.styles=y}static{this.shadowRootOptions=f}handleSearch(t){let e=t.target.value?.toLowerCase()?.trim(),s=l.get("uiData"),u=v(),a=l.get("portalItemResourceT9n"),r=l.get("currentLanguage"),g=a?.[r]??{},c=this.getSettingDataItems(u).filter(this.matchedResultsCallback(s,g,e,r));this.results=[...c.map(i=>({fieldName:i,...s.get(i)}))]}matchedResultsCallback(t,e,s,u){return a=>{let r=t.get(a),{label:g}=r.userLocaleData,{value:c}=r.userLocaleData,i=t.get("translatedLanguageLabels")?.[u]?.[a],w=e?.[a],x=this.testUserInput(g,s),k=this.testUserInput(c,s),D=this.testUserInput(i,s),R=this.testUserInput(w,s);return x||k||D||R}}getSettingDataItems(t){return t.filter(e=>e!=="locales"&&e!=="translatedLanguageLabels")}testUserInput(t,e){return!!t?.trim()&&!!e?.trim()&&t?.toLowerCase()?.search(e)!==-1}selectSuggestion(t){let e=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(e),this.resetSearchInput()}resetSearchInput(){this.searchInput.value&&(this.searchInput.value.value=""),this.results=[]}render(){return n`${this.renderSearchInput()}${this.renderSuggestions()}`}renderSearchInput(){return n`<calcite-input class=${o(p.input)} @calciteInputInput=${this.handleSearch} type=search .placeholder=${this.t9nPlaceholder} icon=search ${L(this.searchInput)}></calcite-input>`}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n`<ul class=${o(p.suggestionList)}>${this.results.map(t=>this.renderSuggestionListItem(t))}</ul>`}renderSuggestionListItem(t){return n`<li @click=${this.selectSuggestion} class=${o(p.suggestionListItem)} data-field-name=${t.fieldName??_}>${t.userLocaleData.label}</li>`}};$("instant-apps-language-translator-search",d);return d},a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as r,b as p}from"./
|
|
2
|
+
import{a as r,b as p}from"./GA4HPDIK.js";import{b as n}from"./IPOPM3LM.js";import{H as o,L as t,h as e,i as s}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var y=e`.item-type-icon{@apply block h-4 pointer-events-none;margin-top:.15em!important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{@apply m-inline-end-1.5;}`,i=class extends o{constructor(){super(...arguments),this.isPortal=!1,this.type="",this.typeKeywords=[],this.designType=""}static{this.properties={isPortal:5,type:1,typeKeywords:0,designType:1}}static{this.styles=y}render(){let a=this.designType?r(this.designType):p(this.type,this.typeKeywords),m=this.designType||this.type;return s`<div title=${m??t}><img alt aria-hidden=true class="item-type-icon item-type-icon-margin" height=16 src=${a??t} width=16></div>`}};n("solution-item-icon",i);export{i as SolutionItemIcon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as G}from"./BM666UZR.js";import{b as E}from"./RLSY4VUQ.js";import c from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./C7NYB4E3.js";import{b as k}from"./U4HGOXNJ.js";import{F as S,G as _,H as v,J as I,h as b,i as h,q as u,u as g}from"./T3EPRHTT.js";export default $arcgis.t(([V,A,{d:$},{c:m,h:x,i:D}])=>{var O=b`@layer{:host{display:block}.div-not-visible{display:none!important}.border{outline:1px solid var(--calcite-color-border-input)}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:Avenir Next,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-surface-2)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}.esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:700}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom: 0}.padding-start-1-2{padding-inline-start:.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends v{constructor(){super(),this.enabledLayerIds=[],this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.searchDistanceEnabled=!1,this.selectionSets=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.geometries=[],this.drawnGraphicsArr=[],this._translations=L({name:"refine-selection",blocking:!0}),this._selectionMode="ADD",this._addEnabled=!0,this._drawTools=S(),this._enabledLayerIds=[],this._layerPicker=S(),this._featuresCollection={},this._pnContextConsumer=E({context:G,subscribe:!0}),this._bufferTools=S(),this._undoGraphicsArr=[],this.selectionLoadingChange=u(),this.selectionSetsChanged=u(),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={addresseeLayer:0,enabledLayerIds:0,enableSearchDistance:5,enableSearchDistanceOnLoad:5,mapView:0,searchDistanceEnabled:5,selectionSets:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,defaultBufferUnit:1,bufferColor:1,bufferOutlineColor:1,defaultBufferDistance:9,geometries:0,drawnGraphicsArr:0,_translations:16,_selectionMode:16,_refineLayer:16}}static{this.styles=O}static{this.shadowRootOptions=g}willUpdate(e){e.has("defaultBufferUnit")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.unit=this.defaultBufferUnit),e.has("defaultBufferDistance")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.distance=this.defaultBufferDistance)}async distanceChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.distance=e.detail.newValue)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.unit=e.detail.newValue)}async load(){this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0]),this._undoGraphicsArr=this._refineSelectionSet?.undoGraphicsArr}async loaded(){await this._init()}render(){let e=this._enabledLayerIds.length>1?"display-block":"display-none";return h`<div class=${`${e} padding-top-sides-1`}><div class="display-flex"><calcite-label class="font-bold width-full label-margin-0"><div class="display-flex">${this._translations.inputLayer}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=refine-input-layer scale=s></calcite-icon></div><map-layer-picker .enabledLayerIds=${this._enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this._refineLayer?[this._refineLayer.layer.id]:[]} ${_(this._layerPicker)}></map-layer-picker></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=refine-input-layer><span class="tooltip-message">${this._translations.inputLayerTip}</span></calcite-popover></div></div><div class="padding-1"><div class="padding-bottom-1"><calcite-segmented-control class="w-100" width=full><calcite-segmented-control-item .checked=${this._addEnabled} class="w-50 word-wrap-anywhere" .iconStart=${this._selectionMode==="ADD"?"check":void 0} @click=${()=>this._setSelectionMode("ADD")} value=ADD><span class="font-weight-500">${this._translations.add}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${!this._addEnabled} class="w-50 word-wrap-anywhere" .iconStart=${this._selectionMode==="REMOVE"?"check":void 0} @click=${()=>this._setSelectionMode("REMOVE")} value=REMOVE><span class="font-weight-500">${this._translations.remove}</span></calcite-segmented-control-item></calcite-segmented-control></div><div><map-draw-tools active draw-mode=REFINE .mapView=${this.mapView} @drawRedo=${()=>this._redo()} @drawUndo=${()=>this._undo()} @sketchGraphicsChange=${this._sketchGraphicsChanged} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} .redoEnabled=${this._refineSelectionSet?.redoStack&&this._refineSelectionSet.redoStack.length>0} .undoEnabled=${this._refineSelectionSet?.undoStack&&this._refineSelectionSet.undoStack.length>0} ${_(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}<br>${h`<calcite-list class="list-border" label>${this._getRefineSelectionSetList()}</calcite-list>`}</div>`}async _init(){this._initGraphicsLayer()}_initGraphicsLayer(){let e=this._translations.bufferLayer;if(this.mapView){let t=this.mapView.map.layers.findIndex(i=>i.title===e);if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else if(this._bufferGraphicsLayer=new A({title:e,listMode:"hide"}),this._bufferGraphicsLayer){let i=this.mapView.map.layers.findIndex(s=>s.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}_layerSelectionChange(e){let t=e.detail[0];this._setRefineSet(t)}_setSelectionMode(e){this._selectionMode=e}async _sketchGraphicsChanged(e){let t=e.detail?.graphics[0],i=t.geometry;this.geometries=[i];let s=await this._selectFeatures(i);if(this._sketchGraphic=t,this._refineSelectionSet?.distance===0&&s.length>0){let a={drawnGraphic:t,bufferGraphic:void 0};this.drawnGraphicsArr.push(a)}}_getEnabledLayerIds(){return this.selectionSets.reduce((e,t)=>{let i=t?.layerView?.layer.id;return i&&e.indexOf(i)<0?e.push(i):t.workflowType==="REFINE"&&Object.keys(t.refineInfos).forEach(s=>{e.indexOf(s)<0&&e.push(s)}),e},[])}async _setRefineSet(e){this.selectionSets.some(t=>t.workflowType==="REFINE"?(this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(e)>-1):!1)||await this._initRefineSet(e,this._refineSelectionSet),this._refineSelectionSet&&(this._refineLayer=this._refineSelectionSet.refineInfos[e].layerView)}async _initRefineSet(e,t){let i={};i[e]={addIds:[],removeIds:[],layerView:this.mapView&&await m(this.mapView,e)},t?t.refineInfos={...t.refineInfos,...i}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:this.defaultBufferDistance||0,download:!0,unit:this.defaultBufferUnit||"feet",label:"Refine",selectedIds:[],layerView:this.mapView&&await m(this.mapView,e),geometries:[],graphics:[],selectLayers:[],workflowType:"REFINE",searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:i,redoStack:[],undoStack:[],sketchGraphic:void 0,undoGraphicsArr:[]},this.selectionSets.push(this._refineSelectionSet))}_undo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.undoStack&&this._refineSelectionSet.undoStack.pop();if(e){if(this.drawnGraphicsArr.length>0){let t=this.drawnGraphicsArr.pop();t&&this._refineSelectionSet.undoGraphicsArr?.push(t),this._undoGraphicsArr.push(t)}this._refineSelectionSet.redoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.redoStack,e.layerView)}}}_redo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.redoStack&&this._refineSelectionSet.redoStack.pop();if(e){if(this._undoGraphicsArr.length>0){let t=this._undoGraphicsArr.pop();this._refineSelectionSet.undoGraphicsArr?.pop(),t&&this.drawnGraphicsArr.push(t)}this._refineSelectionSet.undoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.undoStack,e.layerView)}}}_getBufferOptions(){this.enableSearchDistanceOnLoad&&this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=!0,this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this._refineSelectionSet?.searchDistanceEnabled?"search-distance":"div-not-visible";return h`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this._refineSelectionSet?.searchDistanceEnabled} @calciteSwitchChange=${()=>{this.searchDistanceEnabled=!this.searchDistanceEnabled,this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=this.searchDistanceEnabled)}}></calcite-switch></div><div class=${I(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${this._refineSelectionSet?.distance} .geometries=${this.geometries} @bufferComplete=${t=>{this._bufferComplete(t)}} .unit=${this._refineSelectionSet?.unit} ${_(this._bufferTools)}></buffer-tools></div></div>`}async _bufferComplete(e){if(this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail,this._bufferGeometry){let t={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},i=new V({geometry:this._bufferGeometry,symbol:t});if(this._bufferGraphicsLayer&&i&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),(await this._selectFeatures(this._bufferGeometry)).length>0)){let s={drawnGraphic:this._sketchGraphic,bufferGraphic:i};this.drawnGraphicsArr.push(s)}}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll()}_getRefineSelectionSetList(){let e=this._getTotal(this.selectionSets),t;this.selectionSets.some(o=>o.workflowType==="REFINE"?(t=o,!0):!1);let i=0,s=0;t?.refineInfos&&Object.keys(t.refineInfos).forEach(o=>{i+=t.refineInfos[o].addIds.length,s+=t.refineInfos[o].removeIds.length});let a=this._translations.featuresAdded,f=this._translations.featuresRemoved,c=this._translations.totalSelected;return[h`<calcite-list-item .label=${a.replace("{{n}}",i.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${f.replace("{{n}}",s.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${c.replace("{{n}}",e.toString())}></calcite-list-item>`]}_getTotal(e){let t=D(e);return Object.keys(t).reduce((i,s)=>{let a=t[s];return i+=a.ids.length,i},0)}async _selectFeatures(e){this.selectionLoadingChange.emit(!0);let t=[];if(this._refineLayer){this._featuresCollection[this._refineLayer?.layer.id]=[];let i=await $(0,this._refineLayer?.layer,e,this._featuresCollection);this.selectionLoadingChange.emit(!1);let s=[];Object.keys(i).forEach(a=>{a===this._refineLayer?.layer.id&&(s=s.concat(i[a]))}),t=Array.isArray(s)?s.map(a=>a.attributes[a?.layer?.objectIdField]):[],this._refineSelectionSet?.undoStack&&await this._updateIds(t,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._bufferGraphicsLayer&&this._refineSelectionSet&&this._refineSelectionSet.distance>0&&(await new Promise(a=>setTimeout(a,1e3)),this._bufferGraphicsLayer.removeAll()),this.geometries=[],this._drawTools.value&&this._drawTools.value.clear()}return t}async _highlightFeatures(){let e=this._pnContextConsumer.value;e.removeHandles(),e.highlightHandles=await x(this.selectionSets)}async _updateIds(e,t,i,s){let a=!1,f=this._refineSelectionSet?.refineInfos,c=s.layer.id,o={};o[c]={addIds:[],removeIds:[],layerView:s};let n=f&&Object.keys(f).indexOf(c)>-1?f[c]:o[c];if(t==="ADD")n.addIds=[...new Set([...e,...n.addIds])],n.addIds.length>0&&i.push({ids:e,mode:t,layerView:s}),n.removeIds.length>0&&(n.removeIds=n.removeIds.filter(p=>e.indexOf(p)<0));else{let p=this.selectionSets.reduce((l,r)=>(e.forEach(d=>{r.workflowType!=="REFINE"?r.selectedIds.indexOf(d)>-1&&l.push(d):Object.keys(r.refineInfos).some(C=>{let w=r.refineInfos[C];return w.layerView.layer.id===s.layer.id&&w.addIds.indexOf(d)>-1?(l.push(d),!0):!1})}),l),[]);n.removeIds=[...new Set([...p,...n.removeIds])],n.addIds=n.addIds.filter(l=>p.indexOf(l)<0),n.removeIds.length>0&&i.push({ids:p,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce((l,r)=>(r.workflowType!=="REFINE"&&r.layerView.layer.id===s.layer.id?(r.selectedIds=r.selectedIds.filter(d=>n.removeIds.indexOf(d)<0),r.selectedIds.length>0?l.push(r):a=!0):l.push(r),l),[])}this._refineSelectionSet&&(this._refineSelectionSet.refineInfos[c]=n),this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}};k("refine-selection",y);return y},"Graphic","layers/GraphicsLayer",a,c)
|
|
2
|
+
import{a as G}from"./BM666UZR.js";import{b as E}from"./RLSY4VUQ.js";import c from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./573G4DTV.js";import{b as k}from"./IPOPM3LM.js";import{F as S,G as _,H as v,J as I,h as b,i as h,q as u,u as g}from"./T3EPRHTT.js";export default $arcgis.t(([V,A,{d:$},{c:m,h:x,i:D}])=>{var O=b`@layer{:host{display:block}.div-not-visible{display:none!important}.border{outline:1px solid var(--calcite-color-border-input)}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:Avenir Next,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-surface-2)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}.esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:700}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom: 0}.padding-start-1-2{padding-inline-start:.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends v{constructor(){super(),this.enabledLayerIds=[],this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.searchDistanceEnabled=!1,this.selectionSets=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.geometries=[],this.drawnGraphicsArr=[],this._translations=L({name:"refine-selection",blocking:!0}),this._selectionMode="ADD",this._addEnabled=!0,this._drawTools=S(),this._enabledLayerIds=[],this._layerPicker=S(),this._featuresCollection={},this._pnContextConsumer=E({context:G,subscribe:!0}),this._bufferTools=S(),this._undoGraphicsArr=[],this.selectionLoadingChange=u(),this.selectionSetsChanged=u(),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={addresseeLayer:0,enabledLayerIds:0,enableSearchDistance:5,enableSearchDistanceOnLoad:5,mapView:0,searchDistanceEnabled:5,selectionSets:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,defaultBufferUnit:1,bufferColor:1,bufferOutlineColor:1,defaultBufferDistance:9,geometries:0,drawnGraphicsArr:0,_translations:16,_selectionMode:16,_refineLayer:16}}static{this.styles=O}static{this.shadowRootOptions=g}willUpdate(e){e.has("defaultBufferUnit")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.unit=this.defaultBufferUnit),e.has("defaultBufferDistance")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.distance=this.defaultBufferDistance)}async distanceChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.distance=e.detail.newValue)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.unit=e.detail.newValue)}async load(){this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0]),this._undoGraphicsArr=this._refineSelectionSet?.undoGraphicsArr}async loaded(){await this._init()}render(){let e=this._enabledLayerIds.length>1?"display-block":"display-none";return h`<div class=${`${e} padding-top-sides-1`}><div class="display-flex"><calcite-label class="font-bold width-full label-margin-0"><div class="display-flex">${this._translations.inputLayer}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=refine-input-layer scale=s></calcite-icon></div><map-layer-picker .enabledLayerIds=${this._enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this._refineLayer?[this._refineLayer.layer.id]:[]} ${_(this._layerPicker)}></map-layer-picker></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=refine-input-layer><span class="tooltip-message">${this._translations.inputLayerTip}</span></calcite-popover></div></div><div class="padding-1"><div class="padding-bottom-1"><calcite-segmented-control class="w-100" width=full><calcite-segmented-control-item .checked=${this._addEnabled} class="w-50 word-wrap-anywhere" .iconStart=${this._selectionMode==="ADD"?"check":void 0} @click=${()=>this._setSelectionMode("ADD")} value=ADD><span class="font-weight-500">${this._translations.add}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${!this._addEnabled} class="w-50 word-wrap-anywhere" .iconStart=${this._selectionMode==="REMOVE"?"check":void 0} @click=${()=>this._setSelectionMode("REMOVE")} value=REMOVE><span class="font-weight-500">${this._translations.remove}</span></calcite-segmented-control-item></calcite-segmented-control></div><div><map-draw-tools active draw-mode=REFINE .mapView=${this.mapView} @drawRedo=${()=>this._redo()} @drawUndo=${()=>this._undo()} @sketchGraphicsChange=${this._sketchGraphicsChanged} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} .redoEnabled=${this._refineSelectionSet?.redoStack&&this._refineSelectionSet.redoStack.length>0} .undoEnabled=${this._refineSelectionSet?.undoStack&&this._refineSelectionSet.undoStack.length>0} ${_(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}<br>${h`<calcite-list class="list-border" label>${this._getRefineSelectionSetList()}</calcite-list>`}</div>`}async _init(){this._initGraphicsLayer()}_initGraphicsLayer(){let e=this._translations.bufferLayer;if(this.mapView){let t=this.mapView.map.layers.findIndex(i=>i.title===e);if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else if(this._bufferGraphicsLayer=new A({title:e,listMode:"hide"}),this._bufferGraphicsLayer){let i=this.mapView.map.layers.findIndex(s=>s.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}_layerSelectionChange(e){let t=e.detail[0];this._setRefineSet(t)}_setSelectionMode(e){this._selectionMode=e}async _sketchGraphicsChanged(e){let t=e.detail?.graphics[0],i=t.geometry;this.geometries=[i];let s=await this._selectFeatures(i);if(this._sketchGraphic=t,this._refineSelectionSet?.distance===0&&s.length>0){let a={drawnGraphic:t,bufferGraphic:void 0};this.drawnGraphicsArr.push(a)}}_getEnabledLayerIds(){return this.selectionSets.reduce((e,t)=>{let i=t?.layerView?.layer.id;return i&&e.indexOf(i)<0?e.push(i):t.workflowType==="REFINE"&&Object.keys(t.refineInfos).forEach(s=>{e.indexOf(s)<0&&e.push(s)}),e},[])}async _setRefineSet(e){this.selectionSets.some(t=>t.workflowType==="REFINE"?(this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(e)>-1):!1)||await this._initRefineSet(e,this._refineSelectionSet),this._refineSelectionSet&&(this._refineLayer=this._refineSelectionSet.refineInfos[e].layerView)}async _initRefineSet(e,t){let i={};i[e]={addIds:[],removeIds:[],layerView:this.mapView&&await m(this.mapView,e)},t?t.refineInfos={...t.refineInfos,...i}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:this.defaultBufferDistance||0,download:!0,unit:this.defaultBufferUnit||"feet",label:"Refine",selectedIds:[],layerView:this.mapView&&await m(this.mapView,e),geometries:[],graphics:[],selectLayers:[],workflowType:"REFINE",searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:i,redoStack:[],undoStack:[],sketchGraphic:void 0,undoGraphicsArr:[]},this.selectionSets.push(this._refineSelectionSet))}_undo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.undoStack&&this._refineSelectionSet.undoStack.pop();if(e){if(this.drawnGraphicsArr.length>0){let t=this.drawnGraphicsArr.pop();t&&this._refineSelectionSet.undoGraphicsArr?.push(t),this._undoGraphicsArr.push(t)}this._refineSelectionSet.redoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.redoStack,e.layerView)}}}_redo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.redoStack&&this._refineSelectionSet.redoStack.pop();if(e){if(this._undoGraphicsArr.length>0){let t=this._undoGraphicsArr.pop();this._refineSelectionSet.undoGraphicsArr?.pop(),t&&this.drawnGraphicsArr.push(t)}this._refineSelectionSet.undoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.undoStack,e.layerView)}}}_getBufferOptions(){this.enableSearchDistanceOnLoad&&this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=!0,this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this._refineSelectionSet?.searchDistanceEnabled?"search-distance":"div-not-visible";return h`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this._refineSelectionSet?.searchDistanceEnabled} @calciteSwitchChange=${()=>{this.searchDistanceEnabled=!this.searchDistanceEnabled,this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=this.searchDistanceEnabled)}}></calcite-switch></div><div class=${I(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${this._refineSelectionSet?.distance} .geometries=${this.geometries} @bufferComplete=${t=>{this._bufferComplete(t)}} .unit=${this._refineSelectionSet?.unit} ${_(this._bufferTools)}></buffer-tools></div></div>`}async _bufferComplete(e){if(this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail,this._bufferGeometry){let t={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},i=new V({geometry:this._bufferGeometry,symbol:t});if(this._bufferGraphicsLayer&&i&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),(await this._selectFeatures(this._bufferGeometry)).length>0)){let s={drawnGraphic:this._sketchGraphic,bufferGraphic:i};this.drawnGraphicsArr.push(s)}}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll()}_getRefineSelectionSetList(){let e=this._getTotal(this.selectionSets),t;this.selectionSets.some(o=>o.workflowType==="REFINE"?(t=o,!0):!1);let i=0,s=0;t?.refineInfos&&Object.keys(t.refineInfos).forEach(o=>{i+=t.refineInfos[o].addIds.length,s+=t.refineInfos[o].removeIds.length});let a=this._translations.featuresAdded,f=this._translations.featuresRemoved,c=this._translations.totalSelected;return[h`<calcite-list-item .label=${a.replace("{{n}}",i.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${f.replace("{{n}}",s.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${c.replace("{{n}}",e.toString())}></calcite-list-item>`]}_getTotal(e){let t=D(e);return Object.keys(t).reduce((i,s)=>{let a=t[s];return i+=a.ids.length,i},0)}async _selectFeatures(e){this.selectionLoadingChange.emit(!0);let t=[];if(this._refineLayer){this._featuresCollection[this._refineLayer?.layer.id]=[];let i=await $(0,this._refineLayer?.layer,e,this._featuresCollection);this.selectionLoadingChange.emit(!1);let s=[];Object.keys(i).forEach(a=>{a===this._refineLayer?.layer.id&&(s=s.concat(i[a]))}),t=Array.isArray(s)?s.map(a=>a.attributes[a?.layer?.objectIdField]):[],this._refineSelectionSet?.undoStack&&await this._updateIds(t,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._bufferGraphicsLayer&&this._refineSelectionSet&&this._refineSelectionSet.distance>0&&(await new Promise(a=>setTimeout(a,1e3)),this._bufferGraphicsLayer.removeAll()),this.geometries=[],this._drawTools.value&&this._drawTools.value.clear()}return t}async _highlightFeatures(){let e=this._pnContextConsumer.value;e.removeHandles(),e.highlightHandles=await x(this.selectionSets)}async _updateIds(e,t,i,s){let a=!1,f=this._refineSelectionSet?.refineInfos,c=s.layer.id,o={};o[c]={addIds:[],removeIds:[],layerView:s};let n=f&&Object.keys(f).indexOf(c)>-1?f[c]:o[c];if(t==="ADD")n.addIds=[...new Set([...e,...n.addIds])],n.addIds.length>0&&i.push({ids:e,mode:t,layerView:s}),n.removeIds.length>0&&(n.removeIds=n.removeIds.filter(p=>e.indexOf(p)<0));else{let p=this.selectionSets.reduce((l,r)=>(e.forEach(d=>{r.workflowType!=="REFINE"?r.selectedIds.indexOf(d)>-1&&l.push(d):Object.keys(r.refineInfos).some(C=>{let w=r.refineInfos[C];return w.layerView.layer.id===s.layer.id&&w.addIds.indexOf(d)>-1?(l.push(d),!0):!1})}),l),[]);n.removeIds=[...new Set([...p,...n.removeIds])],n.addIds=n.addIds.filter(l=>p.indexOf(l)<0),n.removeIds.length>0&&i.push({ids:p,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce((l,r)=>(r.workflowType!=="REFINE"&&r.layerView.layer.id===s.layer.id?(r.selectedIds=r.selectedIds.filter(d=>n.removeIds.indexOf(d)<0),r.selectedIds.length>0?l.push(r):a=!0):l.push(r),l),[])}this._refineSelectionSet&&(this._refineSelectionSet.refineInfos[c]=n),this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}};k("refine-selection",y);return y},"Graphic","layers/GraphicsLayer",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import h from"./3TC2XGQ5.js";import e from"./XL66TA6C.js";import c from"./XSJOQTEM.js";import b from"./W75AYE63.js";import a from"./XOPNEAS5.js";import{b as C}from"./2B4SGB3I.js";import{b as v}from"./RLSY4VUQ.js";import"./AO7XKW2U.js";import{a as w}from"./C7NYB4E3.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as f}from"./U4HGOXNJ.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,q as n}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([{p:x,t:T},{n:c,r:l,s:b},,h,S])=>{var $=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@container (max-width: 1280px){solution-deployed-card{width:calc(25% - .75rem)}}@container (max-width: 1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@container (max-width: 740px){solution-deployed-card{width:calc(50% - .75rem)}}@container (max-width: 440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,F=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=v({context:C,subscribe:!0,callback:async t=>{t&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=n(),this.searchTermSet=n(),this.sortTypeSet=n(),this.listenOn(window,"solutionDeleted",t=>{this._modifiedCheckTry=F,this.reload(t.detail.showAlert,t.detail.refreshSolutionsTimeout,t.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",t=>{t.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",t=>{this._modifiedCheckTry=F,this._refreshAfterDeploy(t.detail)}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Sort",dimensions:[x(t.detail.sortType)]}),this.searchSolutions(t.detail))}),this.listenOn(window,"searchChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(t.detail.logSearchTelemetry&&t.detail.option?.searchTerm?this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Search",dimensions:[t.detail.option.searchTerm]}):this.searchSolutions(t.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=$}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(t=!0,e=!0,s){if(this._initCardsFetchers(),t){let i=s||this._translations.solution;T({kind:"success",icon:"check-circle",title:this._translations.deleteComplete.replace("{{solutionName}}",i),message:"",autoClose:!0,autoCloseDuration:"fast"})}e?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(t){if(t){if("searchTerm"in t&&this._setSearchTerm(t.searchTerm||""),"sortType"in t&&this._setSortOptions(t),Object.keys(t).indexOf("type")>-1){let e=t;this._owner=e.value,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Filter",dimensions:[e.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(t).indexOf("filter")>-1){let e=t;this._owner=e.filter===b.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(t){t&&("searchTerm"in t&&(this._setSearchTerm(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"deployments"})),"sortType"in t&&(this._setSortOptions(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let t=this._mainPanelRef.value;t.componentOnReady?.().then(()=>{if(t.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&(e.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(e=>{e.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let t=this._mainPanelRef.value;if(t?.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&this._panelObserver.observe(e,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let t=this._configContextConsumer.value;this._cardsFetcher=new h(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new h(t.locale,t.orgUrl,t.portalURL)}}_renderCards(){return this._refs={},this._cards.map(t=>r`<solution-deployed-card .card=${t} .deployedDate=${t.created} .description=${t.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${t.title} id=${t.id??y} .itemId=${t.id} .owner=${this._owner==="My solutions"?"":t.owner} .thumbnail=${t.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(t){t&&(this._refs[t.id]=t)}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication;if(t.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let e=await S(t,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===e?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=e?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(e){e.message!=="redundant request"&&console.warn(e)}}}_getSolutionsBriefcase(){return r`<div><svg aria-hidden=true viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_setSortOptions(t){let e=t.sortType;e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):(e==="updated"||e==="created")&&(this._sortOrder="desc",this._sortField=e),this.sortType=e}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(t){if(t){this._newId=t;let e=10,s=500;for(let a=0;a<e&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===t));a++)a<e-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,O=100;for(let a=0;a<i;a++){if(this._refs[t]){let o=this._cards.find(D=>D.id===t);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[t]}})),this._newId="";return}await new Promise(o=>setTimeout(o,O)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${t}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:t}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c,e,h)
|
|
2
|
+
import h from"./FSXHE5BN.js";import e from"./XL66TA6C.js";import c from"./XSJOQTEM.js";import b from"./JBTMA635.js";import a from"./XOPNEAS5.js";import{b as C}from"./2B4SGB3I.js";import{b as v}from"./RLSY4VUQ.js";import"./AO7XKW2U.js";import{a as w}from"./573G4DTV.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as f}from"./IPOPM3LM.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,q as n}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([{p:x,t:T},{n:c,r:l,s:b},,h,S])=>{var $=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@container (max-width: 1280px){solution-deployed-card{width:calc(25% - .75rem)}}@container (max-width: 1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@container (max-width: 740px){solution-deployed-card{width:calc(50% - .75rem)}}@container (max-width: 440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,F=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=v({context:C,subscribe:!0,callback:async t=>{t&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=n(),this.searchTermSet=n(),this.sortTypeSet=n(),this.listenOn(window,"solutionDeleted",t=>{this._modifiedCheckTry=F,this.reload(t.detail.showAlert,t.detail.refreshSolutionsTimeout,t.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",t=>{t.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",t=>{this._modifiedCheckTry=F,this._refreshAfterDeploy(t.detail)}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Sort",dimensions:[x(t.detail.sortType)]}),this.searchSolutions(t.detail))}),this.listenOn(window,"searchChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(t.detail.logSearchTelemetry&&t.detail.option?.searchTerm?this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Search",dimensions:[t.detail.option.searchTerm]}):this.searchSolutions(t.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=$}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(t=!0,e=!0,s){if(this._initCardsFetchers(),t){let i=s||this._translations.solution;T({kind:"success",icon:"check-circle",title:this._translations.deleteComplete.replace("{{solutionName}}",i),message:"",autoClose:!0,autoCloseDuration:"fast"})}e?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(t){if(t){if("searchTerm"in t&&this._setSearchTerm(t.searchTerm||""),"sortType"in t&&this._setSortOptions(t),Object.keys(t).indexOf("type")>-1){let e=t;this._owner=e.value,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Filter",dimensions:[e.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(t).indexOf("filter")>-1){let e=t;this._owner=e.filter===b.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(t){t&&("searchTerm"in t&&(this._setSearchTerm(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"deployments"})),"sortType"in t&&(this._setSortOptions(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let t=this._mainPanelRef.value;t.componentOnReady?.().then(()=>{if(t.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&(e.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(e=>{e.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let t=this._mainPanelRef.value;if(t?.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&this._panelObserver.observe(e,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let t=this._configContextConsumer.value;this._cardsFetcher=new h(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new h(t.locale,t.orgUrl,t.portalURL)}}_renderCards(){return this._refs={},this._cards.map(t=>r`<solution-deployed-card .card=${t} .deployedDate=${t.created} .description=${t.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${t.title} id=${t.id??y} .itemId=${t.id} .owner=${this._owner==="My solutions"?"":t.owner} .thumbnail=${t.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(t){t&&(this._refs[t.id]=t)}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication;if(t.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let e=await S(t,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===e?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=e?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(e){e.message!=="redundant request"&&console.warn(e)}}}_getSolutionsBriefcase(){return r`<div><svg aria-hidden=true viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_setSortOptions(t){let e=t.sortType;e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):(e==="updated"||e==="created")&&(this._sortOrder="desc",this._sortField=e),this.sortType=e}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(t){if(t){this._newId=t;let e=10,s=500;for(let a=0;a<e&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===t));a++)a<e-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,O=100;for(let a=0;a<i;a++){if(this._refs[t]){let o=this._cards.find(D=>D.id===t);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[t]}})),this._newId="";return}await new Promise(o=>setTimeout(o,O)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${t}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:t}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c,e,h)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{d as xr,e as ro,f as Di,g as Fi,h as ji}from"./NQH7ZZWD.js";import{a as Li}from"./MHMM4RFR.js";import{a as ac,b as lc,c as cc,f as os,g as ss,j as uc}from"./JNQB7T54.js";import b from"./
|
|
2
|
+
import{d as xr,e as ro,f as Di,g as Fi,h as ji}from"./NQH7ZZWD.js";import{a as Li}from"./MHMM4RFR.js";import{a as ac,b as lc,c as cc,f as os,g as ss,j as uc}from"./JNQB7T54.js";import b from"./JBTMA635.js";import a from"./XOPNEAS5.js";import{b as Dl,c as Fl}from"./2B4SGB3I.js";import{b as Ti}from"./RLSY4VUQ.js";import"./AO7XKW2U.js";import{a as Ll}from"./573G4DTV.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{$ as Hl,Aa as nc,Ba as es,Ca as ts,Da as oc,Db as rs,Ea as sc,Eb as ns,Fa as Ar,Fb as ge,Ga as I,Ha as L,Ia as $i,J as ql,Ja as Ni,K as Te,L as Bl,M as Wo,N as Ci,O as ki,P as Ho,Q as Xn,R as K,S as Ei,T as U,Ta as O,U as ct,V as ut,W as Vo,X as Kl,Y as Wl,Z as Oi,_ as Go,a as he,aa as Vl,b as W,ba as eo,ca as Jo,da as Gl,ea as Jl,fa as Zl,g as Ul,ga as Zo,ha as Ql,ia as Rt,j as We,ja as Pi,k as Mt,ka as Qo,la as N,ma as v,mb as ic,na as $t,oa as dt,pa as Yl,qa as Yo,ra as Xl,s as Bo,sa as ec,ta as Xo,ua as Mi,va as br,wa as Ri,xa as tc,y as Ko,ya as rc,zb as to}from"./XUVXLS2M.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import{l as jl,v as Si}from"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as Nl}from"./IPOPM3LM.js";import{F as Ml,G as Rl,H as $l,L as Ii,h as Sl,i as lt,k as Cl,l as xi,q as vi,t as kl,w as El,x as Ol,y as Pl}from"./T3EPRHTT.js";import{c as Tl}from"./EXBEKVP5.js";export default $arcgis.t(([fl,V2,J2,Xd,Ug,qg,Xg,tW,nW,pJ,vA,_p,gr,Ja,Tp,,wp,ny,{addressToLocations:oy},sy,iy,Sp,{createRenderer:ay},{getSchemesByTag:ly,getSchemes:cy},{getBackgroundColorTheme:bp},{createAgeRenderer:uy,createContinuousRenderer:dy},{getSchemesByTag:sl},{createContinuousRenderer:py},{createRenderer:my},{getSchemesByTag:fy},{createRenderer:hy},{getSchemesByTag:gy},{createRenderer:yy},{getSchemesByTag:_y},{createRenderer:wy},{getSchemesByTag:by},{createAgeRenderer:Ay,createContinuousRenderer:xy},{createRenderer:vy},{getSchemesByTag:Iy},Ty,Cp,kp,{formatDateOnly:Sy,convertDateFormatToIntlOptions:Ys,formatTimeOnly:Cy,formatDate:Ap},ky,Ey,Oy,Py,My,Ep,,{fetchKnowledgeGraph:xp,executeQueryStreaming:Ry,executeSearchStreaming:$y},Ny,{getBindParametersFromCypherQuery:Ly},,,,,,,,,,,,,,,,,,,,,,,,,mG,hG,,,,,,,,,,,,,FA,jA,{r:zl},{r:Yn}])=>{var no=class extends Pl{constructor(e){if(super(e),this.it=xi,e.type!==El.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===xi||e==null)return this._t=void 0,this.it=e;if(e===Cl)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};no.directiveName="unsafeHTML",no.resultType=1;var dc=Ol(no);var d=I;async function zi(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
|
|
3
3
|
|
|
4
4
|
If you continue to see this error, please import from "@langchain/core/callbacks/dispatch/web"`,"and explicitly pass in a config parameter.",`
|
|
5
5
|
|
|
@@ -74,7 +74,7 @@ Title: {title}
|
|
|
74
74
|
Description: {description}`,pp=`Name: {name}
|
|
75
75
|
Alias: {alias}
|
|
76
76
|
Description: {description}`,mp=I.object({schemaVersion:I.literal(lp),modified:I.number().int().nonnegative(),embeddings:I.object({modelProvider:I.literal(cp),model:I.literal(up),dimensions:I.literal(qn),templates:I.object({layer:I.string().default(dp),field:I.string().default(pp)})}),layers:I.array(I.object({id:I.string().min(1),name:I.string().min(1),title:I.string().catch(""),description:I.string().catch(""),vector:I.array(I.number()).length(qn,{message:`Layer vector must be exactly ${qn} dimensions`}),fields:I.array(I.object({name:I.string().min(1),alias:I.string().catch(""),description:I.string().catch(""),vector:I.array(I.number()).length(qn,{message:`Field vector must be exactly ${qn} dimensions`})}))})).default([])});var fp=(t,e)=>{let r=oc.fromTemplate(t);return sc.fromMessages([r,...e])},Qg=async t=>{let{promptText:e,modelTier:r,temperature:n,messages:o,config:s}=t,i=fp(e,o??[]),a=await Ga({modelTier:r,temperature:n,config:s});return i.pipe(a)},Qs=async t=>{let{promptText:e,modelTier:r="default",temperature:n=0,messages:o,inputVariables:s,config:i}=t,a=await(await Qg({promptText:e,modelTier:r,temperature:n,messages:o,config:i})).invoke(s??{},i);if(typeof a=="string")return a;let c=a.content;return typeof c=="string"?c:JSON.stringify(c)},$o=async t=>{let{promptText:e,modelTier:r="default",temperature:n=0,messages:o,inputVariables:s,schema:i,config:a}=t,c=fp(e,o??[]),l=(await Ga({modelTier:r,temperature:n,config:a})).withStructuredOutput(i);return await c.pipe(l).invoke(s??{},a)};var Yg=d.object({name:d.string(),description:d.string(),valueType:d.string(),alias:d.string()}),z2=d.object({fields:d.array(Yg)});var U2=d.object({title:d.string(),description:d.string(),name:d.string().nullable()});var hp=async t=>{try{return await(await ap()).embedDocuments(t)}catch(e){throw console.error("Failed to generate embeddings:",e),e}};var yp=t=>Array.isArray(t)&&t.every(Xn),ey=t=>typeof t=="object"&&t!=null&&"messages"in t&&yp(t.messages),ty=t=>typeof t=="object"&&t!=null&&"lg_tool_call"in t,st=class extends ic{tools;handleToolErrors=!0;trace=!1;constructor(t,e){let{name:r,tags:n,handleToolErrors:o}=e??{};super({name:r,tags:n,func:(s,i)=>this.run(s,i)}),this.tools=t,this.handleToolErrors=o??this.handleToolErrors}async runTool(t,e,r){let n=this.tools.find(o=>o.name===t.name);try{if(n===void 0)throw new Error(`Tool "${t.name}" not found.`);let o={...t,type:"tool_call"},s={...e,state:r,toolCallId:t.id??"",config:e,context:e.context,store:e.store??null,writer:e.writer??e.configurable?.writer??null},i=await n.invoke(o,s);return Xn(i)&&i.getType()==="tool"||Mt(i)?i:new K({status:"success",name:n.name,content:typeof i=="string"?i:JSON.stringify(i),tool_call_id:t.id})}catch(o){if(!this.handleToolErrors||Ko(o))throw o;return new K({status:"error",content:`Error: ${o.message}
|
|
77
|
-
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(ty(t)){let{lg_tool_call:s,...i}=t;r=[await this.runTool(s,e,i)]}else{let s;if(yp(t))s=t;else if(ey(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let i=new Set(s.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),a;for(let c=s.length-1;c>=0;c-=1){let l=s[c];if(ct(l)){a=l;break}}if(a==null||!ct(a))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(a.tool_calls?.filter(c=>c.id==null||!i.has(c.id)).map(c=>this.runTool(c,e,t))??[])}if(!r.some(Mt))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)Mt(s)?s.graph===We.PARENT&&Array.isArray(s.goto)&&s.goto.every(i=>Ul(i))?o?o.goto.push(...s.goto):o=new We({graph:We.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var zW=O.Root({llmInputMessages:O({reducer:(t,e)=>to([],e),default:()=>[]})});var No=(t,e)=>e??t,Dy=O.Root({...Va(),intent:O({reducer:No}),vectorSearchLayerResults:O({reducer:No,default:()=>[]}),vectorSearchFieldResults:O({reducer:No}),navigationInternalState:O({reducer:No,default:()=>({toolCallMessage:void 0})})});async function Fy(t,e){let r=gr.getDefault().helperServices,n=r.geocode.find(u=>u.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Ja.assetsPath?.endsWith("/")?Ja.assetsPath:`${Ja.assetsPath}/`}esri/images/search/search-symbol-32.png`,i=(await oy(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!i?.extent||!i.location)throw new Error(`Could not find location for: ${t}`);let a=new sy({url:s,width:24,height:24}),c=new ny({geometry:i.location,symbol:a});e.graphics.removeAll(),e.graphics.add(c),await e.goTo(i.extent);let l={address:i.address??"",location:i.location?i.location.toJSON():null,extent:i.extent?i.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var jy=["mapView"];function Be(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=jy.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function zy({address:t},e){let{mapView:r}=Be(e);return await Fy(t,r)}var Uy=d.object({address:d.string().describe("The full address or place name to locate.")}),qy=L(zy,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Uy});async function By(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function Ky({bookmarkName:t},e){let{mapView:r}=Be(e);return await Promise.resolve(By(t,r))}var Wy=I.object({bookmarkName:I.string().describe("The name of the bookmark to navigate to.")}),Hy=L(Ky,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:Wy});async function Vy(t,e,r){let n=r.map?.allLayers.find(i=>i.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:i,count:a}=await n.queryExtent(s);if(a===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(i)await r.goTo(i);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let c={layerId:t,layerTitle:n.title??t,where:o,count:a};return{text:`Successfully zoomed to ${a} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(i){return console.error("Error in goToFeatures:",i),{text:`Error: ${i instanceof Error?i.message:"Unknown error"}`,where:o}}}async function Gy({layerId:t,where:e},r){let{mapView:n}=Be(r);return await Vy(t,e,n)}var Jy=I.object({layerId:I.string().describe("The layerId of the layer to zoom to."),where:I.string().describe("
|
|
77
|
+
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(ty(t)){let{lg_tool_call:s,...i}=t;r=[await this.runTool(s,e,i)]}else{let s;if(yp(t))s=t;else if(ey(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let i=new Set(s.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),a;for(let c=s.length-1;c>=0;c-=1){let l=s[c];if(ct(l)){a=l;break}}if(a==null||!ct(a))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(a.tool_calls?.filter(c=>c.id==null||!i.has(c.id)).map(c=>this.runTool(c,e,t))??[])}if(!r.some(Mt))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)Mt(s)?s.graph===We.PARENT&&Array.isArray(s.goto)&&s.goto.every(i=>Ul(i))?o?o.goto.push(...s.goto):o=new We({graph:We.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var zW=O.Root({llmInputMessages:O({reducer:(t,e)=>to([],e),default:()=>[]})});var No=(t,e)=>e??t,Dy=O.Root({...Va(),intent:O({reducer:No}),vectorSearchLayerResults:O({reducer:No,default:()=>[]}),vectorSearchFieldResults:O({reducer:No}),navigationInternalState:O({reducer:No,default:()=>({toolCallMessage:void 0})})});async function Fy(t,e){let r=gr.getDefault().helperServices,n=r.geocode.find(u=>u.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Ja.assetsPath?.endsWith("/")?Ja.assetsPath:`${Ja.assetsPath}/`}esri/images/search/search-symbol-32.png`,i=(await oy(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!i?.extent||!i.location)throw new Error(`Could not find location for: ${t}`);let a=new sy({url:s,width:24,height:24}),c=new ny({geometry:i.location,symbol:a});e.graphics.removeAll(),e.graphics.add(c),await e.goTo(i.extent);let l={address:i.address??"",location:i.location?i.location.toJSON():null,extent:i.extent?i.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var jy=["mapView"];function Be(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=jy.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function zy({address:t},e){let{mapView:r}=Be(e);return await Fy(t,r)}var Uy=d.object({address:d.string().describe("The full address or place name to locate.")}),qy=L(zy,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Uy});async function By(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function Ky({bookmarkName:t},e){let{mapView:r}=Be(e);return await Promise.resolve(By(t,r))}var Wy=I.object({bookmarkName:I.string().describe("The name of the bookmark to navigate to.")}),Hy=L(Ky,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:Wy});async function Vy(t,e,r){let n=r.map?.allLayers.find(i=>i.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:i,count:a}=await n.queryExtent(s);if(a===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(i)await r.goTo(i);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let c={layerId:t,layerTitle:n.title??t,where:o,count:a};return{text:`Successfully zoomed to ${a} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(i){return console.error("Error in goToFeatures:",i),{text:`Error: ${i instanceof Error?i.message:"Unknown error"}`,where:o}}}async function Gy({layerId:t,where:e},r){let{mapView:n}=Be(r);return await Vy(t,e,n)}var Jy=I.object({layerId:I.string().describe("The layerId of the layer to zoom to."),where:I.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Use only fields from that layer and return a boolean filter expression (for example comparisons, LIKE, IN, BETWEEN, IS NULL, AND/OR/NOT). Do NOT include subqueries/nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),Zy=L(Gy,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:Jy});async function Qy(t){let e=new iy({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function Yy(t,e){let{mapView:r}=Be(e);return await Qy(r)}var Xy=I.object({}),e_=L(Yy,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Xy});async function t_(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function r_(t,e){let{mapView:r}=Be(e);return await t_(r)}var n_=d.object({}),o_=L(r_,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:n_});async function s_(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function i_({layerId:t},e){let{mapView:r}=Be(e);return await s_(t,r)}var a_=I.object({layerId:I.string().describe("The id of the layer to navigate to")}),l_=L(i_,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:a_});async function c_(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function u_({scale:t},e){let{mapView:r}=Be(e);return await c_(t,r)}var d_=d.object({scale:d.number().describe("The map scale of the view to go to.")}),p_=L(u_,{name:"goToScale",description:"Go to the specified view scale.",schema:d_});async function m_(t,e,r){let n={target:new Sp({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function f_({center:t,zoom:e,scale:r},n){let{mapView:o}=Be(n);return await m_(t,o,{zoom:e,scale:r})}var h_=d.object({center:d.object({longitude:d.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:d.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:d.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:d.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),g_=L(f_,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:h_});async function y_(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function __({zoom:t},e){let{mapView:r}=Be(e);return await y_(t,r)}var w_=d.object({zoom:d.number().min(1).max(20).describe("The zoom level of the view to go to.")}),b_=L(__,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:w_}),vp=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./O4VO5GNH.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./U5FCUMGO.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_cypher_query_prompt.md":()=>import("./6ND2JXTN.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./MV7GEGP5.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./A2LPB576.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./EL3OIP52.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./TLIIJ2QC.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./PLXHBQBF.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./YPDXQEUA.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./U76GHEKJ.js").then(t=>t.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./54TJQLYJ.js").then(t=>t.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./6WPQPRJ5.js").then(t=>t.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./VDZT4UXB.js").then(t=>t.default)});async function it(t){let e=Object.entries(vp).find(([r])=>r.endsWith(`/${t}.md`));if(!e)throw new Error(`Prompt not found: ${t}
|
|
78
78
|
Available prompts:
|
|
79
79
|
${Object.keys(vp).join(`
|
|
80
80
|
`)}`);return await e[1]()}var Hn=(t,e)=>{let r=t?.configurable?.services?.[e];if(r==null)throw new Error(`${e} missing in config.configurable.services`);return r};async function A_(t){let{fields:e,layer:r,view:n,styleName:o,colorSchemeTags:s}=t,i;return s?i=ly({basemapTheme:await bp(n),geometryType:r.geometryType,includedTags:s,numColors:Math.min(e.length,8)})[0]:i=cy({basemapTheme:await bp(n),geometryType:r.geometryType,numColors:Math.min(e.length,8)}).primaryScheme,{layer:r,view:n,attributes:e.map(a=>({field:a,label:r.fields.find(c=>c.name===a)?.alias??""})).slice(0,8),outlineOptimizationEnabled:!0,sizeOptimizationEnabled:!0,includeSizeVariable:o.includes("Size"),pieChartScheme:i}}async function x_(t){return await ay(t)}async function v_({arcgisMap:t,arcgisMapView:e,layerId:r,fields:n,colorSchemes:o,includeSize:s}){let i=e,a=t?.allLayers.find(l=>l.id===r);if(!a)return`Could not find layer for id: ${r}`;let c={styleName:s?"chart-size":"chart",fields:n,layer:a,view:i,colorSchemeTags:o};try{let l=await A_(c),u=await x_(l);return a.renderer=u.renderer,a.visible=!0,`Chart renderer applied to layer: ${a.title??a.id} using fields ${n.join(", ")}`}catch(l){return`Error applying chart renderer: ${l instanceof Error?l.message:String(l)}`}}var I_=["mapView"];function Re(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("LayerStylingAgent context missing");let r=I_.filter(n=>!(n in e));if(r.length)throw new Error(`LayerStylingAgent context missing: ${r.join(", ")}`);return e}async function T_({layerId:t,fields:e,colorSchemes:r,includeSize:n},o){let{mapView:s}=Re(o);return await ye({type:"show-legend",data:{layerIds:[t]}},o),await v_({arcgisMap:s.map,arcgisMapView:s,layerId:t,fields:e,colorSchemes:r,includeSize:n})}var S_=d.object({layerId:d.string().describe("The id of the layer to apply the chart renderer to"),fields:d.array(d.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),colorSchemes:d.array(d.string()).optional().describe("Optional color scheme tags to use"),includeSize:d.boolean().optional().describe("Whether to vary the chart size (chart-size)")}),C_=L(T_,{name:"chart",description:`Label: Charts
|
|
@@ -338,7 +338,7 @@ _example: "What is the average age of all people who work for Esri?"_`;var IA=(t
|
|
|
338
338
|
`)}var Uo=(function(t){TA(e,t);function e(r,n,o,s,i){var a=this.constructor,c=t.call(this,Kp(r,{name:n,index:o,operation:s,tree:i}))||this;return c.name=n,c.index=o,c.operation=s,c.tree=i,Object.setPrototypeOf(c,a.prototype),c.message=Kp(r,{name:n,index:o,operation:s,tree:i}),c}return e})(Error);var G=Uo,CA=ce,Zn={add:function(t,e,r){return t[e]=this.value,{newDocument:r}},remove:function(t,e,r){var n=t[e];return delete t[e],{newDocument:r,removed:n}},replace:function(t,e,r){var n=t[e];return t[e]=this.value,{newDocument:r,removed:n}},move:function(t,e,r){var n=mi(r,this.path);n&&(n=ce(n));var o=yr(r,{op:"remove",path:this.from}).removed;return yr(r,{op:"add",path:this.path,value:o}),{newDocument:r,removed:n}},copy:function(t,e,r){var n=mi(r,this.from);return yr(r,{op:"add",path:this.path,value:ce(n)}),{newDocument:r}},test:function(t,e,r){return{newDocument:r,test:qo(t[e],this.value)}},_get:function(t,e,r){return this.value=t[e],{newDocument:r}}},kA={add:function(t,e,r){return pi(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:r,index:e}},remove:function(t,e,r){var n=t.splice(e,1);return{newDocument:r,removed:n[0]}},replace:function(t,e,r){var n=t[e];return t[e]=this.value,{newDocument:r,removed:n}},move:Zn.move,copy:Zn.copy,test:Zn.test,_get:Zn._get};function mi(t,e){if(e=="")return t;var r={op:"_get",path:e};return yr(t,r),r.value}function yr(t,e,r,n,o,s){if(r===void 0&&(r=!1),n===void 0&&(n=!0),o===void 0&&(o=!0),s===void 0&&(s=0),r&&(typeof r=="function"?r(e,0,t,e.path):fi(e,0)),e.path===""){var i={newDocument:t};if(e.op==="add")return i.newDocument=e.value,i;if(e.op==="replace")return i.newDocument=e.value,i.removed=t,i;if(e.op==="move"||e.op==="copy")return i.newDocument=mi(t,e.from),e.op==="move"&&(i.removed=t),i;if(e.op==="test"){if(i.test=qo(t,e.value),i.test===!1)throw new G("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return i.newDocument=t,i}else{if(e.op==="remove")return i.removed=t,i.newDocument=null,i;if(e.op==="_get")return e.value=t,i;if(r)throw new G("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return i}}else{n||(t=ce(t));var a=e.path||"",c=a.split("/"),l=t,u=1,p=c.length,f=void 0,_=void 0,b=void 0;for(typeof r=="function"?b=r:b=fi;;){if(_=c[u],_&&_.indexOf("~")!=-1&&(_=zo(_)),o&&(_=="__proto__"||_=="prototype"&&u>0&&c[u-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&f===void 0&&(l[_]===void 0?f=c.slice(0,u).join("/"):u==p-1&&(f=e.path),f!==void 0&&b(e,0,t,f)),u++,Array.isArray(l)){if(_==="-")_=l.length;else{if(r&&!pi(_))throw new G("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);pi(_)&&(_=~~_)}if(u>=p){if(r&&e.op==="add"&&_>l.length)throw new G("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);var i=kA[e.op].call(e,l,_,t);if(i.test===!1)throw new G("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return i}}else if(u>=p){var i=Zn[e.op].call(e,l,_,t);if(i.test===!1)throw new G("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return i}if(l=l[_],r&&u<p&&(!l||typeof l!="object"))throw new G("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}}function Qn(t,e,r,n,o){if(n===void 0&&(n=!0),o===void 0&&(o=!0),r&&!Array.isArray(e))throw new G("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(t=ce(t));for(var s=new Array(e.length),i=0,a=e.length;i<a;i++)s[i]=yr(t,e[i],r,!0,o,i),t=s[i].newDocument;return s.newDocument=t,s}function EA(t,e,r){var n=yr(t,e);if(n.test===!1)throw new G("Test operation failed","TEST_OPERATION_FAILED",r,e,t);return n.newDocument}function fi(t,e,r,n){if(typeof t!="object"||t===null||Array.isArray(t))throw new G("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,r);if(Zn[t.op]){if(typeof t.path!="string")throw new G("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,r);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new G('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,r);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new G("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new G("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&ci(t.value))throw new G("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,r);if(r){if(t.op=="add"){var o=t.path.split("/").length,s=n.split("/").length;if(o!==s+1&&o!==s)throw new G("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,r)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==n)throw new G("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,r)}else if(t.op==="move"||t.op==="copy"){var i={op:"_get",path:t.from,value:void 0},a=Wp([i],r);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new G("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,r)}}}else throw new G("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,r)}function Wp(t,e,r){try{if(!Array.isArray(t))throw new G("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)Qn(ce(e),ce(t),r||!0);else{r=r||fi;for(var n=0;n<t.length;n++)r(t[n],n,e,void 0)}}catch(o){if(o instanceof G)return o;throw o}}function qo(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var r=Array.isArray(t),n=Array.isArray(e),o,s,i;if(r&&n){if(s=t.length,s!=e.length)return!1;for(o=s;o--!==0;)if(!qo(t[o],e[o]))return!1;return!0}if(r!=n)return!1;var a=Object.keys(t);if(s=a.length,s!==Object.keys(e).length)return!1;for(o=s;o--!==0;)if(!e.hasOwnProperty(a[o]))return!1;for(o=s;o--!==0;)if(i=a[o],!qo(t[i],e[i]))return!1;return!0}return t!==t&&e!==e}var ml={};Tl(ml,{compare:()=>DA,generate:()=>ul,observe:()=>LA,unobserve:()=>NA});var dl=new WeakMap,OA=(function(){function t(e){this.observers=new Map,this.obj=e}return t})(),PA=(function(){function t(e,r){this.callback=e,this.observer=r}return t})();function MA(t){return dl.get(t)}function RA(t,e){return t.observers.get(e)}function $A(t,e){t.observers.delete(e.callback)}function NA(t,e){e.unobserve()}function LA(t,e){var r=[],n,o=MA(t);if(!o)o=new OA(t),dl.set(t,o);else{var s=RA(o,e);n=s&&s.observer}if(n)return n;if(n={},o.value=ce(t),e){n.callback=e,n.next=null;var i=function(){ul(n)},a=function(){clearTimeout(n.next),n.next=setTimeout(i)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return n.patches=r,n.object=t,n.unobserve=function(){ul(n),clearTimeout(n.next),$A(o,n),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},o.observers.set(e,new PA(e,n)),n}function ul(t,e){e===void 0&&(e=!1);var r=dl.get(t.object);pl(r.value,t.object,t.patches,"",e),t.patches.length&&Qn(r.value,t.patches);var n=t.patches;return n.length>0&&(t.patches=[],t.callback&&t.callback(n)),n}function pl(t,e,r,n,o){if(e!==t){typeof e.toJSON=="function"&&(e=e.toJSON());for(var s=di(e),i=di(t),a=!1,c=!1,l=i.length-1;l>=0;l--){var u=i[l],p=t[u];if(ui(e,u)&&!(e[u]===void 0&&p!==void 0&&Array.isArray(e)===!1)){var f=e[u];typeof p=="object"&&p!=null&&typeof f=="object"&&f!=null&&Array.isArray(p)===Array.isArray(f)?pl(p,f,r,n+"/"+Ke(u),o):p!==f&&(a=!0,o&&r.push({op:"test",path:n+"/"+Ke(u),value:ce(p)}),r.push({op:"replace",path:n+"/"+Ke(u),value:ce(f)}))}else Array.isArray(t)===Array.isArray(e)?(o&&r.push({op:"test",path:n+"/"+Ke(u),value:ce(p)}),r.push({op:"remove",path:n+"/"+Ke(u)}),c=!0):(o&&r.push({op:"test",path:n,value:t}),r.push({op:"replace",path:n,value:e}),a=!0)}if(!(!c&&s.length==i.length))for(var l=0;l<s.length;l++){var u=s[l];!ui(t,u)&&e[u]!==void 0&&r.push({op:"add",path:n+"/"+Ke(u),value:ce(e[u])})}}}function DA(t,e,r){r===void 0&&(r=!1);var n=[];return pl(t,e,n,"",r),n}var IJ=Object.assign({},cl,ml,{JsonPatchError:Uo,deepClone:ce,escapePathComponent:Ke,unescapePathComponent:zo});var zA=Sl`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-space-2xl)}@media(resolution:1.25dppx),(resolution:1.75dppx){.chat-panel{margin-top:.5px}}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`;async function Ie(t,e){let r=Object.entries(t).find(([n])=>n.endsWith(`/${e}.md`));if(!r)throw new Error(`Prompt not found: ${e}
|
|
339
339
|
Available prompts:
|
|
340
340
|
${Object.keys(t).join(`
|
|
341
|
-
`)}`);return await r[1]()}function wi(t){return t?.configurable?.context?.translations}function Gp(t){if(typeof window>"u"||t.length<=1)return;let e=t.map(n=>n.solution.id),r=t.map(n=>n.solution.title);window.dispatchEvent(new CustomEvent("searchTermSet",{detail:{scope:"all-solutions",searchTerm:""}})),window.dispatchEvent(new CustomEvent("solutionMatchesFromAssistant",{detail:{solutionIds:e,solutionTitles:r},bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent("navTabSelected",{detail:{tabType:"all-solutions"}}))}function Jp(t){if(typeof window>"u"||!t)return;let e=new CustomEvent("solutionIDFromAssistant",{detail:t,bubbles:!0,composed:!0});window.dispatchEvent(e)}var UA=I.object({needsContext:I.boolean().describe("True when the explorer query requires added context from prior turns."),rewrittenQuery:I.string().min(1).describe("The final query to send to doc AI. Keep original query if no context is needed.")}),Hp=t=>t?.signal?.aborted??!1,Zp=Object.assign({"./prompts/solutions_explorer_description.md":()=>import("./AS6VINEU.js").then(t=>t.default),"./prompts/transformQuery.md":()=>import("./MFVXFKKM.js").then(t=>t.default)});function qA(t){return t.replace(/<sup>\[\[(\d+)\]\]\(([^)]+)\)<\/sup>/g,'<sup><a href="$2">[$1]</a></sup>')}function BA(t){return t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,r,n)=>`<img src="${n}" alt="${r}" style="width: 100%;">`)}function Qp(t){let e=(t??"").trim();if(!e)return"en";let r=e.split(/[-_]/)[0]?.toLowerCase();return r?r.slice(0,2):"en"}function KA(t,e){let r=[];return(e?.configurable?.context?.configContext.allCards??[]).forEach(n=>{let o=n.title;if(!o)return;let s=new RegExp(`(?<![\\p{L}\\p{N}])${o}(?![\\p{L}\\p{N}])`,"giu"),i=!1;t=t.replace(s,(a,c,l)=>{let u=l.slice(0,c);return/<img[^>]*alt\s*=\s*["'][^"']*$/i.test(u)?a:(i=!0,`<a href="" target="solutionId:${n.deployCommonId}">${o}</a>`)}),i&&r.push({solution:{title:n.title,id:n.deployCommonId,snippet:n.snippet,description:n.description},score:100})}),{source:t,allMatches:r}}function WA(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat`:null}function Yp(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat`:null}async function gl(t,e,r){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(t)});if(!n.ok)throw new Error(`HTTP ${n.status} calling ${e}`);return n.json()}var HA=t=>new Promise(e=>setTimeout(e,t));async function VA(t,e){let r=t.agentExecutionContext.userRequest,n=e?.configurable?.context?.lastTurnAgent,o=t.agentExecutionContext.messages??[];if(!n||o.length<=1||n==="explorer")return r;try{let s=await Ie(Zp,"transformQuery"),i=await at({promptText:s,modelTier:"advanced",temperature:0,schema:UA,messages:o.slice(-11),inputVariables:{query:r,lastTurnAgent:n}});if(i.needsContext&&i.rewrittenQuery.trim())return console.debug(`Rephrased query from "${r}" to "${i.rewrittenQuery.trim()}"`),i.rewrittenQuery.trim()}catch{}return r}var GA=O.Root({...li(),solutionResponse:O({reducer:(t,e)=>e??null,default:()=>null}),documentSkillUrl:O({reducer:(t,e)=>e??null,default:()=>null}),conversationId:O({reducer:(t,e)=>e??t,default:()=>null})}),JA=()=>new ge(GA).addNode("initializeAgent",QA).addNode("askSolutionsQuestions",ZA).addEdge(he,"initializeAgent").addEdge("initializeAgent","askSolutionsQuestions").addEdge("askSolutionsQuestions",W),Xp=async(t,e,r,n)=>{if(!t)return;let o=Yp(t);if(!o)return;let s={context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:Qp(r),use_llm:!1}}}}};n&&(s.conversationId=n),gl(s,o,e??"")},ZA=async(t,e)=>{if(Hp(e))return{};let r=wi(e),n=t.documentSkillUrl,o=[],s=await VA(t,e);await $e({text:r.agentProgress.explorerAgentSearching},e);let i=await gl({message:s,conversationId:e?.configurable?.context?.convoId??void 0,context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:Qp(e?.configurable?.context?.configContext.locale),use_llm:!1}}}}},n,e?.configurable?.context?.token??"");i.conversationId&&e?.configurable?.context?.setConversationId&&e.configurable.context.setConversationId(i.conversationId);let a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},c="",l=async u=>{let p=u.context?.results?.[0]?.reply??"";if(p!==""){let _=qA(p),b=BA(_),A=KA(b,e);c=A.source,o=[...o,...A.allMatches.filter(y=>!o.some(h=>h.solution.id===y.solution.id))]}let f=u.context?.results?.[0]?.status?.currentStatusStep;if(f){let _="";f===1?_=r.agentProgress.explorerAgentReading:f===2?_=r.agentProgress.explorerAgentReviewing:f===3&&(_=r.agentProgress.explorerAgentPreparing),await $e({text:_},e)}};for(await l(i);a.hasMore;){if(Hp(e))return{};await HA(500),i=await gl({conversationId:a.conversationId,ackSequenceNumber:a.ackSequenceNumber,inquiryId:a.inquiryId},n,e?.configurable?.context?.token??""),a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},await l(i)}return Yp(e?.configurable?.context.portal)&&Xp(e?.configurable?.context.portal,e?.configurable?.context.token??"",e?.configurable?.context.configContext.locale??"en",a.conversationId),o.length&&(o.length===1?Jp(o[0].solution.id):Gp(o)),{outputMessage:c,summary:c,status:"success",solutionResponse:a,conversationId:a.conversationId}},QA=async(t,e)=>{let r=null;return t.documentSkillUrl===null&&e?.configurable?.context?.portal&&(r=WA(e.configurable.context.portal)),{documentSkillUrl:r}};await Ie(Zp,"solutions_explorer_description");var em=t=>{if(t&&Array.isArray(t.id)&&t.id.length>0)return t.id[t.id.length-1].replace("Message","").toLowerCase();if(t&&typeof t._getType=="function")try{return t._getType()}catch{return"human"}return"human"},YA=t=>{let e=em(t);if(t&&t.kwargs)return{role:e,...t.kwargs};if(t&&typeof t=="object"){let r={role:e,content:typeof t.content=="string"?t.content:String(t.content||"")};return t.id&&(r.id=t.id),t.name&&(r.name=t.name),t.additional_kwargs&&(r.additional_kwargs=t.additional_kwargs),t.response_metadata&&(r.response_metadata=t.response_metadata),r}return{role:"human",content:String(t)}},XA=t=>em(t)==="human",ex=(t,e=3)=>t.filter(r=>XA(r)).slice(-e).map(YA),tx=(t,e=" ")=>ex(t).map(r=>r.content).join(e).trim(),rx={understandingRequest:"Understanding your request...",selectTemplatePrompt:"This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.",searchingExistingSolutions:"Searching for existing solutions...",existingSolutionMatch:"I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?",continueBuildingYes:"Yes, I want to build a new solution",continueBuildingNo:"No, I\u2019ll review existing solutions",continueBuildingDeclined:"Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.",creatingDesign:"Generating solution design...",updatingDesign:"Updating solution design...",applyChangeFailed:"I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.",createDesignFailed:"I wasn't able to create a solution design from that request. Please try rephrasing and try again.",discardMessage:"Are you sure you want to discard your solution?",discardForNewSolution:"I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?"},nx={builderMessages:rx},_i=class t{constructor(e,r,n=!0){this.isValid=!0,this.issues=[],this.fieldNameRegistry=null,this.response=e,this.template=r,this.newDesign=n,this.validate()}static{this.INVALID_NAME_CHARS=/[><~`$^+=|]/gu}static{this.NAME_MAX_LENGTH=250}static{this.DESCRIPTION_MAX_LENGTH=2048}static{this.FIELD_NAME_MAX_LENGTH=31}static{this.ALLOWED_FIELD_TYPES=new Set(["string","integer","double","date","guid"])}validate(){this.compareModels(),this.validateResponse()}compareModels(){this._compareStrings(),this._compareItems(),this._compareFeatureLayers()}validateResponse(){this._validateSolutionProps(),this._validateItems(),this._validateFeatureLayer()}_compareStrings(){let e=new Set(this.response.solution.strings.map(n=>n.key)),r=new Map(this.template.solution.strings.map(n=>[n.key,n]));[...r.keys()].every(n=>e.has(n))||(this.newDesign?this._reconcileStringKeys():this._logIssue("String keys in llm response do not match the template."));for(let n of this.response.solution.strings){if(n.value)continue;let o=r.get(n.key)?.value;this.newDesign&&o?(n.value=o,this._logAutoFix(`String key '${n.key}' had no value. Auto-fixed by restoring the template value.`)):this._logIssue(`String key '${n.key}' has no value in the design. It must be populated.`)}}_reconcileStringKeys(){let e=new Set(this.response.solution.strings.map(r=>r.key));for(let r of this.template.solution.strings)e.has(r.key)||(this.response.solution.strings.push({...r}),this._logAutoFix(`String key '${r.key}' was missing from the design. Auto-fixed by re-adding it from the template.`))}_compareItems(){let e=new Set(this.template.items.map(n=>n.id)),r=new Set(this.response.items.map(n=>n.id));e.size===r.size&&[...e].every(n=>r.has(n))||(this.newDesign?this._reconcileItems():this._logIssue("Item IDs in design do not match the template."))}_reconcileItems(){let e=new Set(this.template.items.map(i=>i.id)),r=new Set(this.response.items.map(i=>i.id)),n=[...r].filter(i=>!e.has(i)),o=[...e].filter(i=>!r.has(i));if(e.size===r.size&&n.length===1&&o.length===1){let i=n[0],a=o[0],c=this.response.items.find(l=>l.id===i);if(c){c.id=a,this._logAutoFix(`Item id '${i}' did not match the template id '${a}'. Auto-fixed in place.`);return}}n.length&&(this.response.items=this.response.items.filter(i=>e.has(i.id)),this._logAutoFix(`Removed items not present in the template: ${n.join(", ")}.`));let s=this.template.items.filter(i=>!r.has(i.id));if(s.length){this.response.items=[...s.map(i=>({...i})),...this.response.items];for(let i of s)this._logAutoFix(`Item '${i.id}' was missing from the design. Auto-fixed by adding it from the template.`)}}_compareFeatureLayers(){let e=this.template.featureLayer,r=this.response.featureLayer;if(e.itemId!==r.itemId){let n=r.itemId;r.itemId=e.itemId,this._logAutoFix(`Feature Layer itemId '${n}' did not match the template. Auto-fixed to '${e.itemId}'.`)}if(!e.addLayers){let n=new Set(e.layers.map(s=>s.id)),o=new Set(r.layers.map(s=>s.id));if(!(n.size===o.size&&[...n].every(s=>o.has(s))))this._logIssue(`Feature Layer '${e.itemId}' had its layer ids altered.`);else for(let s of e.layers){if(s.type){let a=r.layers.find(c=>c.id===s.id);if(a&&a.type!==s.type)if(this.newDesign){let c=a.type;a.type=s.type,this._logAutoFix(`Layer '${s.id}' type '${c}' is immutable. Auto-fixed back to template type '${s.type}'.`)}else this._logIssue(`Layer '${s.id}' type '${a.type}' does not match template type '${s.type}'. This layer type is immutable.`)}let i=r.layers.find(a=>a.id===s.id);i&&this._validateRequiredFields(i,s)}}}_validateRequiredFields(e,r){let n=new Map(e.requiredFields.map(o=>[o.name.toLowerCase(),o]));for(let o of r.requiredFields){let s=n.get(o.name.toLowerCase());if(!s){this.newDesign?(e.requiredFields.push({...o}),this._logAutoFix(`Layer '${e.name}' was missing required field '${o.name}'. Auto-fixed by re-adding it from the template.`)):this._logIssue(`Layer '${e.name}' is missing required field '${o.name}'.`);continue}this._enforceRequiredFieldImmutability(e,s,o)}}_enforceRequiredFieldImmutability(e,r,n){let o=[];if(r.type!==n.type&&o.push("type"),(r.length??null)!==(n.length??null)&&o.push("length"),this._choiceListsEqual(r.choiceList,n.choiceList)||o.push("choiceList"),!o.length)return;let s=o.length===1?"property":"properties";this.newDesign?(r.type=n.type,r.length=n.length,r.choiceList=Array.isArray(n.choiceList)?[...n.choiceList]:n.choiceList??null,this._logAutoFix(`Layer '${e.name}' required field '${n.name}' changed immutable ${s} (${o.join(", ")}). Auto-fixed by reverting to the template.`)):this._logIssue(`Layer '${e.name}' required field '${n.name}' changed immutable ${s} (${o.join(", ")}). These cannot be modified.`)}_choiceListsEqual(e,r){let n=Array.isArray(e)?e:null,o=Array.isArray(r)?r:null;if(n===null&&o===null)return!0;if(n===null||o===null)return!1;let s=new Set(n),i=new Set(o);return s.size===i.size&&[...s].every(a=>i.has(a))}_validateSolutionProps(){let e=this.response.solution.title??"",r=this.response.solution.description,n=/[/\\]/u.test(e),o=this.newDesign?e.replace(/[/\\]/gu,""):e;this.newDesign&&o!==e?(this.response.solution.title=o,this._logAutoFix("Solution title contained forward or back slashes. Auto-fixed by removing them.")):!this.newDesign&&n&&this._logIssue("Solution title contains forbidden forward or back slashes.");let s=os(o);if(s.isValid||this._tryFixName(s.errorType,o,i=>{this.response.solution.title=i},"Solution title","Solution Title")||this._logIssue(`Solution title is invalid (${s.errorType}).`),r){let i=ss(r,t.DESCRIPTION_MAX_LENGTH,!0);i.isValid||this._tryFixDescription(r,a=>{this.response.solution.description=a},"Solution description")||this._logIssue(`Solution description is invalid (${i.errorType}).`)}}_validateItems(){for(let e of this.response.items){let r=os(e.title??"");if(r.isValid||this._tryFixName(r.errorType,e.title??"",n=>{e.title=n},`Item '${e.id}' title`,"Item Title")||this._logIssue(`Item '${e.id}' title is invalid (${r.errorType}).`),e.description){let n=ss(e.description,t.DESCRIPTION_MAX_LENGTH,!0);n.isValid||this._tryFixDescription(e.description,o=>{e.description=o},`Item '${e.id}' description`)||this._logIssue(`Item '${e.id}' description is invalid (${n.errorType}).`)}}}_validateFeatureLayer(){this.response.featureLayer.layers.length||this._logIssue("Feature layer item must contain at least one layer.");let e=this.response.featureLayer.layers.map(r=>r.name.toLowerCase());e.length!==new Set(e).size&&(this.newDesign?this._dedupeLayerNames(this.response.featureLayer.layers):this._logIssue(`Layer names must be unique (case-insensitive). Layer names in design: ${e}.`));for(let r of this.response.featureLayer.layers)this._validateLayer(r,this.response.featureLayer.addLayers)}_dedupeLayerNames(e){let r=new Set;for(let n of e){let o=(n.name??"").toLowerCase();if(r.has(o)){let s=n.name;n.name=this._makeUniqueName(n.name??"Layer",r),this._logAutoFix(`Duplicate layer name '${s}'. Auto-fixed to '${n.name}'.`)}r.add(n.name.toLowerCase())}}_validateLayer(e,r){!r&&e.typeMutable===!0&&e.type==="Table"&&(this.newDesign?(e.type="Point",this._logAutoFix(`Layer '${e.name}' cannot be a Table. Auto-fixed to 'Point'.`)):this._logIssue(`Layer '${e.name}' cannot be a Table. It may be a Point, Line, or Polygon.`));let n=os(e.name??"");if(n.isValid||this._tryFixName(n.errorType,e.name??"",o=>{e.name=o},`Layer '${e.name}' name`,"Layer Title")||this._logIssue(`Layer '${e.name}' name is invalid (${n.errorType}).`),e.description){let o=ss(e.description,t.DESCRIPTION_MAX_LENGTH,!0);o.isValid||this._tryFixDescription(e.description,s=>{e.description=s},`Layer '${e.name}' description`)||this._logIssue(`Layer '${e.name}' description is invalid (${o.errorType}).`)}this._validateLayerFields(e)}_validateLayerFields(e){let r=e.systemFields??[];this.fieldNameRegistry=new Set([...e.customFields,...e.requiredFields,...r].map(s=>s.name.toLowerCase()));for(let s of[...e.customFields,...e.requiredFields])this._validateField(s);this.fieldNameRegistry=null;let n=new Set(e.requiredFields.map(s=>s.name.toLowerCase())),o=new Set(n);for(let s of e.customFields){let i=s.name.toLowerCase();if(o.has(i)){let a=n.has(i)?"a required field name":"another field with the same name";if(this.newDesign){let c=s.name;s.name=this._makeUniqueName(s.name,o),this._logAutoFix(`Layer '${e.name}' field '${c}' collided with ${a}. Auto-fixed to '${s.name}'.`)}else this._logIssue(`Layer '${e.name}' field '${s.name}' collides with ${a}.`)}o.add(s.name.toLowerCase())}}_validateField(e){let r=/^\p{L}/u,n=/^.[\p{L}\p{M}\p{N}_]*$/u;e.alias?.trim()||(this.newDesign?(e.alias=e.name,this._logAutoFix(`Field '${e.name}' had no display name (alias). Auto-fixed to '${e.alias}'.`)):this._logIssue(`Field '${e.name}' has no display name (alias).`));let o=r.test(e.name),s=n.test(e.name);if(!o||!s)if(this.newDesign){let c=e.name;e.name=this._makeUniqueName(this._sanitizeFieldName(e.name),this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' had an invalid name. Auto-fixed to '${e.name}'.`)}else o||this._logIssue(`Field '${e.name}' does not start with a letter.`),s||this._logIssue(`Field '${e.name}' contains invalid characters (only letters from any writing system, numbers, and underscores are allowed; emojis and punctuation are not allowed).`);if(e.name.length>t.FIELD_NAME_MAX_LENGTH)if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(e.name,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' exceeds ${t.FIELD_NAME_MAX_LENGTH} characters. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' exceeds ${t.FIELD_NAME_MAX_LENGTH} characters.`);if(ac.has(e.name.toLowerCase()))if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(c,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' is a SQL reserved keyword. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' is a SQL reserved keyword.`);if(lc.has(e.name.toLowerCase()))if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(c,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' is a reserved system field name. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' is a reserved system field name.`);let i=e.type??"",a=i.toLowerCase();if(i!==a&&(e.type=a),!t.ALLOWED_FIELD_TYPES.has(a))if(this.newDesign){let c=e.type;a==="globalid"?e.type="guid":a==="oid"?e.type="integer":e.type="string",this._logAutoFix(`Field '${e.name}' had unsupported type '${c}'. Auto-fixed to '${e.type}'.`)}else this._logIssue(`Field '${e.name}' has unsupported type '${e.type}'. Allowed types are: string, integer, double, date.`);if(Array.isArray(e.choiceList)&&e.type!=="string"&&(this.newDesign?e.choiceList.length?(e.type="string",this._logAutoFix(`Field '${e.name}' had a domain but was not of type 'string'. Auto-fixed by setting the type to 'string'.`)):(e.choiceList=null,this._logAutoFix(`Field '${e.name}' had an empty domain but is not of type 'string'. Auto-fixed by removing the domain.`)):this._logIssue(`Field '${e.name}' must be of type 'string' to have a domain.`)),e.type==="string"&&this._validateStringFieldLength(e),Array.isArray(e.choiceList)&&(this.newDesign?this._autoFixChoiceList(e):this._logChoiceListIssues(e)),Array.isArray(e.choiceList)&&e.length!=null){let c=Math.max(...e.choiceList.map(l=>l.length));c>e.length&&(this.newDesign?(this._logAutoFix(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${c} characters. Auto-fixing to ${c}.`),e.length=c):this._logIssue(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${c} characters.`))}}_autoFixChoiceList(e){let r=e.choiceList,n=r.filter(s=>s?.trim());n.length!==r.length&&(this._logAutoFix(`Field '${e.name}' had blank domain values. Auto-fixed by removing them.`),r=n,e.choiceList=r);let o=[...new Set(r)];o.length!==r.length&&(this._logAutoFix(`Field '${e.name}' had duplicate domain values. Auto-fixed by removing duplicates.`),r=o,e.choiceList=r),r.length||(this._logAutoFix(`Field '${e.name}' had an empty domain. Auto-fixed by removing the domain.`),e.choiceList=null)}_logChoiceListIssues(e){if(Array.isArray(e.choiceList)){if(!e.choiceList.length){this._logIssue(`Field '${e.name}' has an empty domain. At least one value is required.`);return}e.choiceList.some(r=>!r?.trim())&&this._logIssue(`A blank domain value was added to Field '${e.name}'.`),e.choiceList.length!==new Set(e.choiceList).size&&this._logIssue(`Field '${e.name}' has duplicate domain values.`)}}_validateStringFieldLength(e){if(this.newDesign&&e.length===255&&(e.length=256),typeof e.length!="number"||Number.isNaN(e.length)){this._handleInvalidStringFieldLength(e,256);return}let r=e.length;if(!uc(r).isValid){let n=r>4e3?4e3:256;this._handleInvalidStringFieldLength(e,n)}}_handleInvalidStringFieldLength(e,r){this.newDesign?(this._logAutoFix(`Field '${e.name}' has an invalid length. Auto-fixing to ${r}.`),e.length=r):this._logIssue(`Field '${e.name}' length is invalid (must be a number between 1 and 4000).`)}_makeUniqueName(e,r){let n=e,o=1;for(;r.has(n.toLowerCase());)n=`${e}_${o}`,o+=1;return n}_getUniqueTruncatedFieldName(e,r){let n=t.FIELD_NAME_MAX_LENGTH,o=e.slice(0,n),s=o,i=1;for(;r.has(s.toLowerCase());){let a=`_${i}`,c=Math.max(1,n-a.length);s=`${o.slice(0,c)}${a}`,i+=1}return s}_sanitizeItemName(e,r=t.NAME_MAX_LENGTH){let n=(e??"").replace(new RegExp(cc.source,"gu"),"").replace(t.INVALID_NAME_CHARS,"").replace(/\s+/gu," ").trim();return n.length>r&&(n=n.slice(0,r).trim()),n}_sanitizeDescription(e,r=t.DESCRIPTION_MAX_LENGTH){let n=(e??"").replace(/[<>]/gu,"");return n.length>r&&(n=n.slice(0,r)),n}_sanitizeFieldName(e){let r=(e??"").replace(/[^\p{L}\p{M}\p{N}_]/gu,"");return r.length===0?r="field":/^\p{L}/u.test(r)||(r=`f_${r}`),r}_tryFixName(e,r,n,o,s){if(!this.newDesign)return!1;if(e==="empty")return n(s),this._logAutoFix(`${o} was empty. Auto-fixed to '${s}'.`),!0;let i=this._sanitizeItemName(r)||s;return n(i),this._logAutoFix(`${o} was invalid (${e}). Auto-fixed to '${i}'.`),!0}_tryFixDescription(e,r,n){if(!this.newDesign)return!1;let o=this._sanitizeDescription(e);return r(o),this._logAutoFix(`${n} was invalid. Auto-fixed to a sanitized value.`),!0}_logAutoFix(e){console.debug(e)}_logIssue(e){console.debug(e),this.issues.push(e),this.isValid=!1}},ox=d.object({key:d.string().describe("Stable key identifier for the string."),value:d.string().describe("Display value for the string."),description:d.string().describe("Explanation of where/how the string is used.")}),sx=d.object({id:d.string().describe("ArcGIS item id (32 hex characters)."),title:d.string().describe("Item title."),description:d.string().describe("Item description."),type:d.enum(["Feature Layer (hosted)","Feature Layer (hosted, view)","Web Map","Instant App","Dashboard","Web Experience","Form","Table (hosted)","Table (hosted, view)","Hub Site Application","Hub Page","CSV","Data Pipeline","Desktop Application Template","Group","Notebook","QuickCapture Project"]).describe("ArcGIS item type.")}),Vp=d.object({name:d.string().describe("Field name."),type:d.enum(["string","integer","double","date","oid","guid","globalid"]).describe("Field data type."),alias:d.string().describe("Field alias for display."),description:d.string().describe("Field description."),choiceList:d.array(d.string()).nullable().describe("List of allowed values for string fields with a controlled vocabulary. Null if unrestricted or not applicable."),length:d.number().int().nullable().describe("Maximum string length for string fields. Null for non-string fields.")}),ix=d.object({id:d.number().int().describe("Layer/table id within the feature service."),type:d.enum(["Point","Polyline","Polygon","Table"]).describe("Layer type."),typeMutable:d.boolean().describe("Indicates whether the layer type can be changed."),name:d.string().describe("Layer/table name."),description:d.string().describe("Layer/table description."),customFields:d.array(Vp).describe("User/business fields specific to the solution."),requiredFields:d.array(Vp).describe("Fields required for solution functionality (e.g., relationship keys).")}),ax=d.object({itemId:d.string().describe("ArcGIS item id for the feature layer."),addLayers:d.boolean().describe("Indicates whether new layers can be added during solution design."),layers:d.array(ix)}),_l=d.object({response:d.string().describe("Conversational response to the user's query."),solution:d.object({itemId:d.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),title:d.string().describe("Title of the solution."),description:d.string().describe("Description of the solution."),tags:d.array(d.string()).describe("Keywords/tags associated with the solution."),strings:d.array(ox).describe("Localized strings/labels used by apps (dashboards, forms, etc.).")}),items:d.array(sx).describe("ArcGIS items that belong to the solution (apps, maps, layers, etc.)."),featureLayer:ax.describe("Primary feature layer item and its schema/layers/tables details.")}),lx=d.object({op:d.enum(["add","remove","replace","move","copy"]).describe("RFC 6902 operation type."),path:d.string().describe("RFC 6901 JSON Pointer to the target location."),value:d.string().nullable().describe(`JSON-encoded value to apply (required for add and replace). Must be null \u2014 not an empty string \u2014 for remove, move, and copy operations. Serialize as a JSON string, e.g. '\\"text\\"' for a string, '[\\"a\\",\\"b\\"]' for an array, or '{\\"name\\":\\"x\\"}' for an object.`),from:d.string().nullable().describe("RFC 6901 JSON Pointer to the source location (required for move and copy). Must be null \u2014 not an empty string \u2014 for all other operations.")}),cx=d.object({response:d.string().describe("Conversational response describing the accepted design changes."),patches:d.array(lx).describe("Minimal RFC 6902 patch operations needed to update the current design.")}),ux=d.object({response:d.string().describe("Short, user-friendly explanation of why the requested update was not applied.")}),dx=d.object({assistantResponse:d.string().describe("Natural-language response for the user."),isValidUpdate:d.boolean().describe("True only when the request is in scope for supported design updates.")}),px=d.object({matchedTitles:d.array(d.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")}),mx=d.object({templateId:d.string().min(1).describe("Template id from the available template list."),confidence:d.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),templateDescription:d.string().min(1).describe("Short action\u2011oriented description of the template in the user's use case/workflow, starting with a verb.")}),fx=d.object({assistantResponse:d.string().nullable().describe("Natural-language response for the user."),isValidUseCase:d.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),matchedTemplates:d.array(mx).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")}),hx=t=>t.length?t.map((e,r)=>`${r+1}. ${e}`).join(`
|
|
341
|
+
`)}`);return await r[1]()}function wi(t){return t?.configurable?.context?.translations}function Gp(t){if(typeof window>"u"||t.length<=1)return;let e=t.map(n=>n.solution.id),r=t.map(n=>n.solution.title);window.dispatchEvent(new CustomEvent("searchTermSet",{detail:{scope:"all-solutions",searchTerm:""}})),window.dispatchEvent(new CustomEvent("solutionMatchesFromAssistant",{detail:{solutionIds:e,solutionTitles:r},bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent("navTabSelected",{detail:{tabType:"all-solutions"}}))}function Jp(t){if(typeof window>"u"||!t)return;let e=new CustomEvent("solutionIDFromAssistant",{detail:t,bubbles:!0,composed:!0});window.dispatchEvent(e)}var UA=I.object({needsContext:I.boolean().describe("True when the explorer query requires added context from prior turns."),rewrittenQuery:I.string().min(1).describe("The final query to send to doc AI. Keep original query if no context is needed.")}),Hp=t=>t?.signal?.aborted??!1,Zp=Object.assign({"./prompts/solutions_explorer_description.md":()=>import("./AS6VINEU.js").then(t=>t.default),"./prompts/transformQuery.md":()=>import("./KLIO37YK.js").then(t=>t.default)});function qA(t){return t.replace(/<sup>\[\[(\d+)\]\]\(([^)]+)\)<\/sup>/g,'<sup><a href="$2">[$1]</a></sup>')}function BA(t){return t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,r,n)=>`<img src="${n}" alt="${r}" style="width: 100%;">`)}function Qp(t){let e=(t??"").trim();if(!e)return"en";let r=e.split(/[-_]/)[0]?.toLowerCase();return r?r.slice(0,2):"en"}function KA(t,e){let r=[];return(e?.configurable?.context?.configContext.allCards??[]).forEach(n=>{let o=n.title;if(!o)return;let s=new RegExp(`(?<![\\p{L}\\p{N}])${o}(?![\\p{L}\\p{N}])`,"giu"),i=!1;t=t.replace(s,(a,c,l)=>{let u=l.slice(0,c);return/<img[^>]*alt\s*=\s*["'][^"']*$/i.test(u)?a:(i=!0,`<a href="" target="solutionId:${n.deployCommonId}">${o}</a>`)}),i&&r.push({solution:{title:n.title,id:n.deployCommonId,snippet:n.snippet,description:n.description},score:100})}),{source:t,allMatches:r}}function WA(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat`:null}function Yp(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat`:null}async function gl(t,e,r){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(t)});if(!n.ok)throw new Error(`HTTP ${n.status} calling ${e}`);return n.json()}var HA=t=>new Promise(e=>setTimeout(e,t));async function VA(t,e){let r=t.agentExecutionContext.userRequest,n=e?.configurable?.context?.lastTurnAgent,o=t.agentExecutionContext.messages??[];if(!n||o.length<=1)return r;try{let s=await Ie(Zp,"transformQuery"),i=await at({promptText:s,modelTier:"advanced",temperature:0,schema:UA,messages:o.slice(-11),inputVariables:{query:r,lastTurnAgent:n}});if(i.needsContext&&i.rewrittenQuery.trim())return i.rewrittenQuery.trim()}catch{}return r}var GA=O.Root({...li(),solutionResponse:O({reducer:(t,e)=>e??null,default:()=>null}),documentSkillUrl:O({reducer:(t,e)=>e??null,default:()=>null}),conversationId:O({reducer:(t,e)=>e??t,default:()=>null})}),JA=()=>new ge(GA).addNode("initializeAgent",QA).addNode("askSolutionsQuestions",ZA).addEdge(he,"initializeAgent").addEdge("initializeAgent","askSolutionsQuestions").addEdge("askSolutionsQuestions",W),Xp=async(t,e,r,n)=>{if(!t)return;let o=Yp(t);if(!o)return;let s={context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:Qp(r),use_llm:!1}}}}};n&&(s.conversationId=n),gl(s,o,e??"")},ZA=async(t,e)=>{if(Hp(e))return{};let r=wi(e),n=t.documentSkillUrl,o=[],s=await VA(t,e);await $e({text:r.agentProgress.explorerAgentSearching},e);let i=await gl({message:s,conversationId:e?.configurable?.context?.convoId??void 0,context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:Qp(e?.configurable?.context?.configContext.locale),use_llm:!1},rephrase_query:{allow:!1},conversation_title:{allow:!1},follow_up:{allow:!1},distill_query:{allow:!1}}}}},n,e?.configurable?.context?.token??"");i.conversationId&&e?.configurable?.context?.setConversationId&&e.configurable.context.setConversationId(i.conversationId);let a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},c="",l=async u=>{let p=u.context?.results?.[0]?.reply??"";if(p!==""){let _=qA(p),b=BA(_),A=KA(b,e);c=A.source,o=[...o,...A.allMatches.filter(y=>!o.some(h=>h.solution.id===y.solution.id))]}let f=u.context?.results?.[0]?.status?.currentStatusStep;if(f){let _="";f===1?_=r.agentProgress.explorerAgentReading:f===2?_=r.agentProgress.explorerAgentReviewing:f===3&&(_=r.agentProgress.explorerAgentPreparing),await $e({text:_},e)}};for(await l(i);a.hasMore;){if(Hp(e))return{};await HA(500),i=await gl({conversationId:a.conversationId,ackSequenceNumber:a.ackSequenceNumber,inquiryId:a.inquiryId},n,e?.configurable?.context?.token??""),a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},await l(i)}return Yp(e?.configurable?.context.portal)&&Xp(e?.configurable?.context.portal,e?.configurable?.context.token??"",e?.configurable?.context.configContext.locale??"en",a.conversationId),o.length&&(o.length===1?Jp(o[0].solution.id):Gp(o)),{outputMessage:c,summary:c,status:"success",solutionResponse:a,conversationId:a.conversationId}},QA=async(t,e)=>{let r=null;return t.documentSkillUrl===null&&e?.configurable?.context?.portal&&(r=WA(e.configurable.context.portal)),{documentSkillUrl:r}};await Ie(Zp,"solutions_explorer_description");var em=t=>{if(t&&Array.isArray(t.id)&&t.id.length>0)return t.id[t.id.length-1].replace("Message","").toLowerCase();if(t&&typeof t._getType=="function")try{return t._getType()}catch{return"human"}return"human"},YA=t=>{let e=em(t);if(t&&t.kwargs)return{role:e,...t.kwargs};if(t&&typeof t=="object"){let r={role:e,content:typeof t.content=="string"?t.content:String(t.content||"")};return t.id&&(r.id=t.id),t.name&&(r.name=t.name),t.additional_kwargs&&(r.additional_kwargs=t.additional_kwargs),t.response_metadata&&(r.response_metadata=t.response_metadata),r}return{role:"human",content:String(t)}},XA=t=>em(t)==="human",ex=(t,e=3)=>t.filter(r=>XA(r)).slice(-e).map(YA),tx=(t,e=" ")=>ex(t).map(r=>r.content).join(e).trim(),rx={understandingRequest:"Understanding your request...",selectTemplatePrompt:"This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.",searchingExistingSolutions:"Searching for existing solutions...",existingSolutionMatch:"I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?",continueBuildingYes:"Yes, I want to build a new solution",continueBuildingNo:"No, I\u2019ll review existing solutions",continueBuildingDeclined:"Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.",creatingDesign:"Generating solution design...",updatingDesign:"Updating solution design...",applyChangeFailed:"I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.",createDesignFailed:"I wasn't able to create a solution design from that request. Please try rephrasing and try again.",discardMessage:"Are you sure you want to discard your solution?",discardForNewSolution:"I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?"},nx={builderMessages:rx},_i=class t{constructor(e,r,n=!0){this.isValid=!0,this.issues=[],this.fieldNameRegistry=null,this.response=e,this.template=r,this.newDesign=n,this.validate()}static{this.INVALID_NAME_CHARS=/[><~`$^+=|]/gu}static{this.NAME_MAX_LENGTH=250}static{this.DESCRIPTION_MAX_LENGTH=2048}static{this.FIELD_NAME_MAX_LENGTH=31}static{this.ALLOWED_FIELD_TYPES=new Set(["string","integer","double","date","guid"])}validate(){this.compareModels(),this.validateResponse()}compareModels(){this._compareStrings(),this._compareItems(),this._compareFeatureLayers()}validateResponse(){this._validateSolutionProps(),this._validateItems(),this._validateFeatureLayer()}_compareStrings(){let e=new Set(this.response.solution.strings.map(n=>n.key)),r=new Map(this.template.solution.strings.map(n=>[n.key,n]));[...r.keys()].every(n=>e.has(n))||(this.newDesign?this._reconcileStringKeys():this._logIssue("String keys in llm response do not match the template."));for(let n of this.response.solution.strings){if(n.value)continue;let o=r.get(n.key)?.value;this.newDesign&&o?(n.value=o,this._logAutoFix(`String key '${n.key}' had no value. Auto-fixed by restoring the template value.`)):this._logIssue(`String key '${n.key}' has no value in the design. It must be populated.`)}}_reconcileStringKeys(){let e=new Set(this.response.solution.strings.map(r=>r.key));for(let r of this.template.solution.strings)e.has(r.key)||(this.response.solution.strings.push({...r}),this._logAutoFix(`String key '${r.key}' was missing from the design. Auto-fixed by re-adding it from the template.`))}_compareItems(){let e=new Set(this.template.items.map(n=>n.id)),r=new Set(this.response.items.map(n=>n.id));e.size===r.size&&[...e].every(n=>r.has(n))||(this.newDesign?this._reconcileItems():this._logIssue("Item IDs in design do not match the template."))}_reconcileItems(){let e=new Set(this.template.items.map(i=>i.id)),r=new Set(this.response.items.map(i=>i.id)),n=[...r].filter(i=>!e.has(i)),o=[...e].filter(i=>!r.has(i));if(e.size===r.size&&n.length===1&&o.length===1){let i=n[0],a=o[0],c=this.response.items.find(l=>l.id===i);if(c){c.id=a,this._logAutoFix(`Item id '${i}' did not match the template id '${a}'. Auto-fixed in place.`);return}}n.length&&(this.response.items=this.response.items.filter(i=>e.has(i.id)),this._logAutoFix(`Removed items not present in the template: ${n.join(", ")}.`));let s=this.template.items.filter(i=>!r.has(i.id));if(s.length){this.response.items=[...s.map(i=>({...i})),...this.response.items];for(let i of s)this._logAutoFix(`Item '${i.id}' was missing from the design. Auto-fixed by adding it from the template.`)}}_compareFeatureLayers(){let e=this.template.featureLayer,r=this.response.featureLayer;if(e.itemId!==r.itemId){let n=r.itemId;r.itemId=e.itemId,this._logAutoFix(`Feature Layer itemId '${n}' did not match the template. Auto-fixed to '${e.itemId}'.`)}if(!e.addLayers){let n=new Set(e.layers.map(s=>s.id)),o=new Set(r.layers.map(s=>s.id));if(!(n.size===o.size&&[...n].every(s=>o.has(s))))this._logIssue(`Feature Layer '${e.itemId}' had its layer ids altered.`);else for(let s of e.layers){if(s.type){let a=r.layers.find(c=>c.id===s.id);if(a&&a.type!==s.type)if(this.newDesign){let c=a.type;a.type=s.type,this._logAutoFix(`Layer '${s.id}' type '${c}' is immutable. Auto-fixed back to template type '${s.type}'.`)}else this._logIssue(`Layer '${s.id}' type '${a.type}' does not match template type '${s.type}'. This layer type is immutable.`)}let i=r.layers.find(a=>a.id===s.id);i&&this._validateRequiredFields(i,s)}}}_validateRequiredFields(e,r){let n=new Map(e.requiredFields.map(o=>[o.name.toLowerCase(),o]));for(let o of r.requiredFields){let s=n.get(o.name.toLowerCase());if(!s){this.newDesign?(e.requiredFields.push({...o}),this._logAutoFix(`Layer '${e.name}' was missing required field '${o.name}'. Auto-fixed by re-adding it from the template.`)):this._logIssue(`Layer '${e.name}' is missing required field '${o.name}'.`);continue}this._enforceRequiredFieldImmutability(e,s,o)}}_enforceRequiredFieldImmutability(e,r,n){let o=[];if(r.type!==n.type&&o.push("type"),(r.length??null)!==(n.length??null)&&o.push("length"),this._choiceListsEqual(r.choiceList,n.choiceList)||o.push("choiceList"),!o.length)return;let s=o.length===1?"property":"properties";this.newDesign?(r.type=n.type,r.length=n.length,r.choiceList=Array.isArray(n.choiceList)?[...n.choiceList]:n.choiceList??null,this._logAutoFix(`Layer '${e.name}' required field '${n.name}' changed immutable ${s} (${o.join(", ")}). Auto-fixed by reverting to the template.`)):this._logIssue(`Layer '${e.name}' required field '${n.name}' changed immutable ${s} (${o.join(", ")}). These cannot be modified.`)}_choiceListsEqual(e,r){let n=Array.isArray(e)?e:null,o=Array.isArray(r)?r:null;if(n===null&&o===null)return!0;if(n===null||o===null)return!1;let s=new Set(n),i=new Set(o);return s.size===i.size&&[...s].every(a=>i.has(a))}_validateSolutionProps(){let e=this.response.solution.title??"",r=this.response.solution.description,n=/[/\\]/u.test(e),o=this.newDesign?e.replace(/[/\\]/gu,""):e;this.newDesign&&o!==e?(this.response.solution.title=o,this._logAutoFix("Solution title contained forward or back slashes. Auto-fixed by removing them.")):!this.newDesign&&n&&this._logIssue("Solution title contains forbidden forward or back slashes.");let s=os(o);if(s.isValid||this._tryFixName(s.errorType,o,i=>{this.response.solution.title=i},"Solution title","Solution Title")||this._logIssue(`Solution title is invalid (${s.errorType}).`),r){let i=ss(r,t.DESCRIPTION_MAX_LENGTH,!0);i.isValid||this._tryFixDescription(r,a=>{this.response.solution.description=a},"Solution description")||this._logIssue(`Solution description is invalid (${i.errorType}).`)}}_validateItems(){for(let e of this.response.items){let r=os(e.title??"");if(r.isValid||this._tryFixName(r.errorType,e.title??"",n=>{e.title=n},`Item '${e.id}' title`,"Item Title")||this._logIssue(`Item '${e.id}' title is invalid (${r.errorType}).`),e.description){let n=ss(e.description,t.DESCRIPTION_MAX_LENGTH,!0);n.isValid||this._tryFixDescription(e.description,o=>{e.description=o},`Item '${e.id}' description`)||this._logIssue(`Item '${e.id}' description is invalid (${n.errorType}).`)}}}_validateFeatureLayer(){this.response.featureLayer.layers.length||this._logIssue("Feature layer item must contain at least one layer.");let e=this.response.featureLayer.layers.map(r=>r.name.toLowerCase());e.length!==new Set(e).size&&(this.newDesign?this._dedupeLayerNames(this.response.featureLayer.layers):this._logIssue(`Layer names must be unique (case-insensitive). Layer names in design: ${e}.`));for(let r of this.response.featureLayer.layers)this._validateLayer(r,this.response.featureLayer.addLayers)}_dedupeLayerNames(e){let r=new Set;for(let n of e){let o=(n.name??"").toLowerCase();if(r.has(o)){let s=n.name;n.name=this._makeUniqueName(n.name??"Layer",r),this._logAutoFix(`Duplicate layer name '${s}'. Auto-fixed to '${n.name}'.`)}r.add(n.name.toLowerCase())}}_validateLayer(e,r){!r&&e.typeMutable===!0&&e.type==="Table"&&(this.newDesign?(e.type="Point",this._logAutoFix(`Layer '${e.name}' cannot be a Table. Auto-fixed to 'Point'.`)):this._logIssue(`Layer '${e.name}' cannot be a Table. It may be a Point, Line, or Polygon.`));let n=os(e.name??"");if(n.isValid||this._tryFixName(n.errorType,e.name??"",o=>{e.name=o},`Layer '${e.name}' name`,"Layer Title")||this._logIssue(`Layer '${e.name}' name is invalid (${n.errorType}).`),e.description){let o=ss(e.description,t.DESCRIPTION_MAX_LENGTH,!0);o.isValid||this._tryFixDescription(e.description,s=>{e.description=s},`Layer '${e.name}' description`)||this._logIssue(`Layer '${e.name}' description is invalid (${o.errorType}).`)}this._validateLayerFields(e)}_validateLayerFields(e){let r=e.systemFields??[];this.fieldNameRegistry=new Set([...e.customFields,...e.requiredFields,...r].map(s=>s.name.toLowerCase()));for(let s of[...e.customFields,...e.requiredFields])this._validateField(s);this.fieldNameRegistry=null;let n=new Set(e.requiredFields.map(s=>s.name.toLowerCase())),o=new Set(n);for(let s of e.customFields){let i=s.name.toLowerCase();if(o.has(i)){let a=n.has(i)?"a required field name":"another field with the same name";if(this.newDesign){let c=s.name;s.name=this._makeUniqueName(s.name,o),this._logAutoFix(`Layer '${e.name}' field '${c}' collided with ${a}. Auto-fixed to '${s.name}'.`)}else this._logIssue(`Layer '${e.name}' field '${s.name}' collides with ${a}.`)}o.add(s.name.toLowerCase())}}_validateField(e){let r=/^\p{L}/u,n=/^.[\p{L}\p{M}\p{N}_]*$/u;e.alias?.trim()||(this.newDesign?(e.alias=e.name,this._logAutoFix(`Field '${e.name}' had no display name (alias). Auto-fixed to '${e.alias}'.`)):this._logIssue(`Field '${e.name}' has no display name (alias).`));let o=r.test(e.name),s=n.test(e.name);if(!o||!s)if(this.newDesign){let c=e.name;e.name=this._makeUniqueName(this._sanitizeFieldName(e.name),this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' had an invalid name. Auto-fixed to '${e.name}'.`)}else o||this._logIssue(`Field '${e.name}' does not start with a letter.`),s||this._logIssue(`Field '${e.name}' contains invalid characters (only letters from any writing system, numbers, and underscores are allowed; emojis and punctuation are not allowed).`);if(e.name.length>t.FIELD_NAME_MAX_LENGTH)if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(e.name,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' exceeds ${t.FIELD_NAME_MAX_LENGTH} characters. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' exceeds ${t.FIELD_NAME_MAX_LENGTH} characters.`);if(ac.has(e.name.toLowerCase()))if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(c,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' is a SQL reserved keyword. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' is a SQL reserved keyword.`);if(lc.has(e.name.toLowerCase()))if(this.newDesign){let c=e.name;e.name=this._getUniqueTruncatedFieldName(c,this.fieldNameRegistry),this.fieldNameRegistry.add(e.name.toLowerCase()),this._logAutoFix(`Field '${c}' is a reserved system field name. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' is a reserved system field name.`);let i=e.type??"",a=i.toLowerCase();if(i!==a&&(e.type=a),!t.ALLOWED_FIELD_TYPES.has(a))if(this.newDesign){let c=e.type;a==="globalid"?e.type="guid":a==="oid"?e.type="integer":e.type="string",this._logAutoFix(`Field '${e.name}' had unsupported type '${c}'. Auto-fixed to '${e.type}'.`)}else this._logIssue(`Field '${e.name}' has unsupported type '${e.type}'. Allowed types are: string, integer, double, date.`);if(Array.isArray(e.choiceList)&&e.type!=="string"&&(this.newDesign?e.choiceList.length?(e.type="string",this._logAutoFix(`Field '${e.name}' had a domain but was not of type 'string'. Auto-fixed by setting the type to 'string'.`)):(e.choiceList=null,this._logAutoFix(`Field '${e.name}' had an empty domain but is not of type 'string'. Auto-fixed by removing the domain.`)):this._logIssue(`Field '${e.name}' must be of type 'string' to have a domain.`)),e.type==="string"&&this._validateStringFieldLength(e),Array.isArray(e.choiceList)&&(this.newDesign?this._autoFixChoiceList(e):this._logChoiceListIssues(e)),Array.isArray(e.choiceList)&&e.length!=null){let c=Math.max(...e.choiceList.map(l=>l.length));c>e.length&&(this.newDesign?(this._logAutoFix(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${c} characters. Auto-fixing to ${c}.`),e.length=c):this._logIssue(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${c} characters.`))}}_autoFixChoiceList(e){let r=e.choiceList,n=r.filter(s=>s?.trim());n.length!==r.length&&(this._logAutoFix(`Field '${e.name}' had blank domain values. Auto-fixed by removing them.`),r=n,e.choiceList=r);let o=[...new Set(r)];o.length!==r.length&&(this._logAutoFix(`Field '${e.name}' had duplicate domain values. Auto-fixed by removing duplicates.`),r=o,e.choiceList=r),r.length||(this._logAutoFix(`Field '${e.name}' had an empty domain. Auto-fixed by removing the domain.`),e.choiceList=null)}_logChoiceListIssues(e){if(Array.isArray(e.choiceList)){if(!e.choiceList.length){this._logIssue(`Field '${e.name}' has an empty domain. At least one value is required.`);return}e.choiceList.some(r=>!r?.trim())&&this._logIssue(`A blank domain value was added to Field '${e.name}'.`),e.choiceList.length!==new Set(e.choiceList).size&&this._logIssue(`Field '${e.name}' has duplicate domain values.`)}}_validateStringFieldLength(e){if(this.newDesign&&e.length===255&&(e.length=256),typeof e.length!="number"||Number.isNaN(e.length)){this._handleInvalidStringFieldLength(e,256);return}let r=e.length;if(!uc(r).isValid){let n=r>4e3?4e3:256;this._handleInvalidStringFieldLength(e,n)}}_handleInvalidStringFieldLength(e,r){this.newDesign?(this._logAutoFix(`Field '${e.name}' has an invalid length. Auto-fixing to ${r}.`),e.length=r):this._logIssue(`Field '${e.name}' length is invalid (must be a number between 1 and 4000).`)}_makeUniqueName(e,r){let n=e,o=1;for(;r.has(n.toLowerCase());)n=`${e}_${o}`,o+=1;return n}_getUniqueTruncatedFieldName(e,r){let n=t.FIELD_NAME_MAX_LENGTH,o=e.slice(0,n),s=o,i=1;for(;r.has(s.toLowerCase());){let a=`_${i}`,c=Math.max(1,n-a.length);s=`${o.slice(0,c)}${a}`,i+=1}return s}_sanitizeItemName(e,r=t.NAME_MAX_LENGTH){let n=(e??"").replace(new RegExp(cc.source,"gu"),"").replace(t.INVALID_NAME_CHARS,"").replace(/\s+/gu," ").trim();return n.length>r&&(n=n.slice(0,r).trim()),n}_sanitizeDescription(e,r=t.DESCRIPTION_MAX_LENGTH){let n=(e??"").replace(/[<>]/gu,"");return n.length>r&&(n=n.slice(0,r)),n}_sanitizeFieldName(e){let r=(e??"").replace(/[^\p{L}\p{M}\p{N}_]/gu,"");return r.length===0?r="field":/^\p{L}/u.test(r)||(r=`f_${r}`),r}_tryFixName(e,r,n,o,s){if(!this.newDesign)return!1;if(e==="empty")return n(s),this._logAutoFix(`${o} was empty. Auto-fixed to '${s}'.`),!0;let i=this._sanitizeItemName(r)||s;return n(i),this._logAutoFix(`${o} was invalid (${e}). Auto-fixed to '${i}'.`),!0}_tryFixDescription(e,r,n){if(!this.newDesign)return!1;let o=this._sanitizeDescription(e);return r(o),this._logAutoFix(`${n} was invalid. Auto-fixed to a sanitized value.`),!0}_logAutoFix(e){console.debug(e)}_logIssue(e){console.debug(e),this.issues.push(e),this.isValid=!1}},ox=d.object({key:d.string().describe("Stable key identifier for the string."),value:d.string().describe("Display value for the string."),description:d.string().describe("Explanation of where/how the string is used.")}),sx=d.object({id:d.string().describe("ArcGIS item id (32 hex characters)."),title:d.string().describe("Item title."),description:d.string().describe("Item description."),type:d.enum(["Feature Layer (hosted)","Feature Layer (hosted, view)","Web Map","Instant App","Dashboard","Web Experience","Form","Table (hosted)","Table (hosted, view)","Hub Site Application","Hub Page","CSV","Data Pipeline","Desktop Application Template","Group","Notebook","QuickCapture Project"]).describe("ArcGIS item type.")}),Vp=d.object({name:d.string().describe("Field name."),type:d.enum(["string","integer","double","date","oid","guid","globalid"]).describe("Field data type."),alias:d.string().describe("Field alias for display."),description:d.string().describe("Field description."),choiceList:d.array(d.string()).nullable().describe("List of allowed values for string fields with a controlled vocabulary. Null if unrestricted or not applicable."),length:d.number().int().nullable().describe("Maximum string length for string fields. Null for non-string fields.")}),ix=d.object({id:d.number().int().describe("Layer/table id within the feature service."),type:d.enum(["Point","Polyline","Polygon","Table"]).describe("Layer type."),typeMutable:d.boolean().describe("Indicates whether the layer type can be changed."),name:d.string().describe("Layer/table name."),description:d.string().describe("Layer/table description."),customFields:d.array(Vp).describe("User/business fields specific to the solution."),requiredFields:d.array(Vp).describe("Fields required for solution functionality (e.g., relationship keys).")}),ax=d.object({itemId:d.string().describe("ArcGIS item id for the feature layer."),addLayers:d.boolean().describe("Indicates whether new layers can be added during solution design."),layers:d.array(ix)}),_l=d.object({response:d.string().describe("Conversational response to the user's query."),solution:d.object({itemId:d.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),title:d.string().describe("Title of the solution."),description:d.string().describe("Description of the solution."),tags:d.array(d.string()).describe("Keywords/tags associated with the solution."),strings:d.array(ox).describe("Localized strings/labels used by apps (dashboards, forms, etc.).")}),items:d.array(sx).describe("ArcGIS items that belong to the solution (apps, maps, layers, etc.)."),featureLayer:ax.describe("Primary feature layer item and its schema/layers/tables details.")}),lx=d.object({op:d.enum(["add","remove","replace","move","copy"]).describe("RFC 6902 operation type."),path:d.string().describe("RFC 6901 JSON Pointer to the target location."),value:d.string().nullable().describe(`JSON-encoded value to apply (required for add and replace). Must be null \u2014 not an empty string \u2014 for remove, move, and copy operations. Serialize as a JSON string, e.g. '\\"text\\"' for a string, '[\\"a\\",\\"b\\"]' for an array, or '{\\"name\\":\\"x\\"}' for an object.`),from:d.string().nullable().describe("RFC 6901 JSON Pointer to the source location (required for move and copy). Must be null \u2014 not an empty string \u2014 for all other operations.")}),cx=d.object({response:d.string().describe("Conversational response describing the accepted design changes."),patches:d.array(lx).describe("Minimal RFC 6902 patch operations needed to update the current design.")}),ux=d.object({response:d.string().describe("Short, user-friendly explanation of why the requested update was not applied.")}),dx=d.object({assistantResponse:d.string().describe("Natural-language response for the user."),isValidUpdate:d.boolean().describe("True only when the request is in scope for supported design updates.")}),px=d.object({matchedTitles:d.array(d.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")}),mx=d.object({templateId:d.string().min(1).describe("Template id from the available template list."),confidence:d.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),templateDescription:d.string().min(1).describe("Short action\u2011oriented description of the template in the user's use case/workflow, starting with a verb.")}),fx=d.object({assistantResponse:d.string().nullable().describe("Natural-language response for the user."),isValidUseCase:d.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),matchedTemplates:d.array(mx).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")}),hx=t=>t.length?t.map((e,r)=>`${r+1}. ${e}`).join(`
|
|
342
342
|
`):"No validation errors were provided.",gx=async t=>{let{query:e,validationIssues:r,recentMessages:n,fallbackMessage:o,promptModules:s}=t;try{return(await at({promptText:await Ie(s,"explainValidationFailure"),modelTier:"fast",temperature:0,schema:ux,messages:n,inputVariables:{query:e,validationIssueCount:String(r.length),validationIssues:hx(r)}})).response?.trim()||o}catch(i){return console.warn("Natural language response failed:",{error:i}),o}},wl=t=>t in xr,yx=5,_x=.8,wx=.5,bx="Web Mapping Application",Ax="Embeddings",hi=null,hl=null,gi=null,yi=null,xx="Build",_r=Object.assign({"./prompts/assessBuildRequest.md":()=>import("./S26SZJC7.js").then(t=>t.default),"./prompts/assessUpdateRequest.md":()=>import("./7X2SPNNK.js").then(t=>t.default),"./prompts/description.md":()=>import("./E25ZWVBK.js").then(t=>t.default),"./prompts/designSolution.md":()=>import("./SNA7NRRQ.js").then(t=>t.default),"./prompts/explainValidationFailure.md":()=>import("./I5E3PM26.js").then(t=>t.default),"./prompts/findExistingSolution.md":()=>import("./LPFG5XTA.js").then(t=>t.default),"./prompts/updateDesign.md":()=>import("./MBT2S4J5.js").then(t=>t.default)}),vx=nx.builderMessages,J=t=>t?.signal?.aborted??!1,ne=(t,e,r)=>wi(e)?.builderMessages?.[t]??vx[t],tm=t=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("arcgis-solution-design-update",{detail:t}))},Ix=async(t,e,r)=>{if(!t)return null;let n=`type:"${bx}" AND typekeywords:${Ax} AND group:${t}`;return(await Si({q:n,params:e?{token:e}:void 0,portal:r,num:1}))?.results?.[0]??null};async function Tx(t,e,r,n){try{let o=await Ix(t,e,r);if(!o||J(n))return null;let s=new jA({id:o.id});return await s.load(),J(n)?null:await s.fetchData("json")}catch{return null}}var Sx=async(t,e,r)=>{if(!t)return[];let n=`type:Solution AND typekeywords:${xx} AND group:${t}`;return(await Si({q:n,params:e?{token:e}:void 0,portal:r,num:100}))?.results??[]},Cx=async(t,e,r)=>{try{let n=await jl(t,{params:e?{token:e}:void 0,portal:r}),o=n?.buildSolution;if(!o)return null;let s=n?.params,i=s&&typeof s=="object"&&!Array.isArray(s)?s:null;return{buildSolution:o,params:i}}catch{return null}},wr=(t,e={})=>{let r=t;return"itemId"in e&&(r={...r,solution:{...r.solution,itemId:e.itemId??null}}),e.sourceBuildSolution!=null&&(r={...r,sourceBuildSolution:e.sourceBuildSolution}),"params"in e&&(r={...r,params:e.params??null}),"templateId"in e&&(r={...r,templateId:e.templateId??null}),r},rm=(t,e)=>{if(t==null||e==null)return{ok:!1,error:"design or sourceBuildSolution is null/undefined"};try{let r=structuredClone(e);return new Li({buildSolution:r}).applyLlmTemplate(t),{ok:!0}}catch(r){return{ok:!1,error:r instanceof Error?r.stack??r.message:String(r)}}},bl=async t=>{if(hl){Object.entries(hl).forEach(([i,a])=>{xr[i]&&(xr[i].initialTemplate=a)});return}let e=t?.configurable?.context?.token,r=om(t),n=sm(t);if(!r){console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");return}let o=await Sx(r,e,n),s={};J(t)||(await Promise.all(o.map(async i=>{let a=i.properties?.templateInfo;if(!a||typeof a!="object")return;let c=a.id;if(typeof c!="string"||s[c])return;let l=await Cx(i.id,e,n);if(!l||J(t))return;let{buildSolution:u,params:p}=l;if(typeof u=="object"&&u!==null&&"solution"in u){let _=u.solution;_.thumbnailUrl=i.thumbnail?`${n??"https://www.arcgis.com/sharing/rest"}/content/items/${i.id}/info/${i.thumbnail}`:void 0,_.item=i}let f={...a,buildSolution:u};s[c]=wr(new Li(f).dumpToLlmTemplate(),{itemId:i.id,sourceBuildSolution:structuredClone(u),params:p?structuredClone(p):null}),xr[c]={...a,initialTemplate:s[c]}})),hl=s)},nm=t=>{let e=t?.configurable?.context?.token;return typeof e!="string"||!e.trim()?null:e},om=t=>{let e=t?.configurable?.context?.configContext?.primarySolutionsGroupId;return typeof e!="string"||!e.trim()?null:e},sm=t=>{let e=t?.configurable?.context?.configContext?.portalURL;if(!(typeof e!="string"||!e.trim()))return`${e.replace(/\/+$/,"")}/sharing/rest`},kx=async t=>{await Promise.all([am(t),bl(t)])},im=async t=>{let e=nm(t);(!gi||e&&e!==yi)&&(yi=e??yi,gi=kx(t).catch(r=>{throw gi=null,yi=null,r})),await gi};async function am(t){if(hi)return hi;let e=om(t);if(!e)return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."),null;let r=sm(t),n=t?.configurable?.context?.configContext?.portalURL;if(await new FA(n?{url:n}:void 0).load(),J(t))return null;let o=nm(t)??void 0,s=await Tx(e,o,r,t);return J(t)?null:s?(hi=s.items,hi):null}var Ex=()=>Object.entries(xr).map(([t,e])=>`ID: ${t}
|
|
343
343
|
Label: ${e.label}
|
|
344
344
|
Description: ${e.description}`).join(`
|