@esri/solutions-components 5.1.0-next.143 → 5.1.0-next.145
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/{LEK4P4OY.js → 25NZZKXC.js} +1 -1
- package/dist/cdn/2BIUOM64.js +2 -0
- package/dist/cdn/{S5AQVTR2.js → 2PUK3PST.js} +1 -1
- package/dist/cdn/{KUGXNF5Y.js → 2UMMLVCR.js} +1 -1
- package/dist/cdn/{LYAXTCCM.js → 34CZ4EWR.js} +4 -3
- package/dist/cdn/{SOLCNPHW.js → 3DCFUYKP.js} +1 -1
- package/dist/cdn/{P67K4TAX.js → 3JQ2RXVJ.js} +1 -1
- package/dist/cdn/3V2UWENT.js +2 -0
- package/dist/cdn/{7WD3GNG4.js → 4JVDUPVW.js} +1 -1
- package/dist/cdn/{BNRFT546.js → 5DEYOM7D.js} +1 -1
- package/dist/cdn/{WLM4HMMF.js → 5LF6C3S5.js} +1 -1
- package/dist/cdn/{4JGB6WLL.js → 5NQNJZTE.js} +1 -1
- package/dist/cdn/{4MAZNAHZ.js → 5OFQVDNK.js} +1 -1
- package/dist/cdn/{NV2DLQDN.js → 6MOTC6CE.js} +1 -1
- package/dist/cdn/{PUCDO65D.js → 6T35OGRG.js} +1 -1
- package/dist/cdn/{FVOCVCEE.js → 72X4E4QW.js} +1 -1
- package/dist/cdn/{Y77RX7KL.js → 7ADKNWWI.js} +1 -1
- package/dist/cdn/{DKEYOEI7.js → 7CLM77HQ.js} +1 -1
- package/dist/cdn/{IFONVCBL.js → A27DLHRU.js} +1 -1
- package/dist/cdn/{3UKDJZ2D.js → AE5HNAOV.js} +1 -1
- package/dist/cdn/{YQWQG523.js → AOWNMC3W.js} +1 -1
- package/dist/cdn/{U4RHWD57.js → AZN2E5DL.js} +1 -1
- package/dist/cdn/BMMIXOTR.js +2 -0
- package/dist/cdn/{6Z3DXRF6.js → BQE6IVEF.js} +1 -1
- package/dist/cdn/{EDZIFJZR.js → C5ZH23YO.js} +1 -1
- package/dist/cdn/{7GXMCAWQ.js → CVRBLJ5O.js} +1 -1
- package/dist/cdn/{ENG5BCAV.js → DXQQQNOF.js} +1 -1
- package/dist/cdn/{BGLTC5SO.js → F26SXWZ5.js} +1 -1
- package/dist/cdn/{4RLG6MXK.js → G3F52QRW.js} +1 -1
- package/dist/cdn/{IEOFEUZI.js → G3FTF6WH.js} +1 -1
- package/dist/cdn/{AHB7W7RI.js → GJD7AOUI.js} +1 -1
- package/dist/cdn/{RRD4QUQS.js → HLKEBN2O.js} +1 -1
- package/dist/cdn/{J3HJC4SO.js → HPWNNMVU.js} +2 -2
- package/dist/cdn/{ZCSF2MJ5.js → I7XBRB6B.js} +1 -1
- package/dist/cdn/{SGQBWAPU.js → IDEOFV22.js} +1 -1
- package/dist/cdn/{FW2HWQC7.js → IEC46RE7.js} +1 -1
- package/dist/cdn/{ULFPP7PF.js → IEN3TA4W.js} +1 -1
- package/dist/cdn/{LKZFKOG4.js → KDNGZ47C.js} +1 -1
- package/dist/cdn/{7FJTZ7VA.js → L3UI7EZZ.js} +1 -1
- package/dist/cdn/{MC5ARLKZ.js → L6P26BYB.js} +1 -1
- package/dist/cdn/{U3CNAJQZ.js → LCV5GKUD.js} +3 -3
- package/dist/cdn/{X6JL6SAH.js → LJY6BB64.js} +1 -1
- package/dist/cdn/{MT5J66WR.js → LL647FJR.js} +1 -1
- package/dist/cdn/{KSQHSNTW.js → M4II4TSX.js} +1 -1
- package/dist/cdn/{E5E6J57F.js → MEZL3ZHS.js} +28 -27
- package/dist/cdn/MHVLVLRA.js +2 -0
- package/dist/cdn/{UOGZGAJD.js → MIH5YMTN.js} +1 -1
- package/dist/cdn/{K4TDKKPB.js → MPCJZCL5.js} +1 -1
- package/dist/cdn/MZ73EAAV.js +29 -0
- package/dist/cdn/{C4OXBZJK.js → NIYB3TEW.js} +1 -1
- package/dist/cdn/{TX3LBQ6V.js → NOXANMDF.js} +1 -1
- package/dist/cdn/{QHDEVLC3.js → P4XNRWG7.js} +1 -1
- package/dist/cdn/{EPOIEXNS.js → PBGG3TGN.js} +1 -1
- package/dist/cdn/{H2UL463J.js → PBMTIFFX.js} +1 -1
- package/dist/cdn/{VBJSVR6T.js → PECGJO2P.js} +1 -1
- package/dist/cdn/{FILMKUOU.js → PNESECPO.js} +1 -1
- package/dist/cdn/{Z23BVIGQ.js → QFZK4TD4.js} +1 -1
- package/dist/cdn/QGCF64WY.js +2 -0
- package/dist/cdn/{5LIR6BQY.js → QKJJHBMB.js} +1 -1
- package/dist/cdn/{ZCPVOS4Q.js → QQXQAU33.js} +1 -1
- package/dist/cdn/{56XVVIG7.js → RIHOGDUV.js} +1 -1
- package/dist/cdn/{AGB374BK.js → RUQ4RO4T.js} +1 -1
- package/dist/cdn/{MVF7I3RU.js → UKQPYE7U.js} +1 -1
- package/dist/cdn/{BVSSQNES.js → ULUJKWT5.js} +1 -1
- package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
- package/dist/cdn/VO53567V.js +2 -0
- package/dist/cdn/WKS3TKDC.js +2 -0
- package/dist/cdn/WUKFT5AY.js +4 -0
- package/dist/cdn/{QQEYWBVV.js → XGWDWPRK.js} +1 -1
- package/dist/cdn/{XXGM7HGO.js → XGYNSCTA.js} +1 -1
- package/dist/cdn/{DNPN62O5.js → Y4KGXRSD.js} +1 -1
- package/dist/cdn/{SSIUWTQX.js → Y6QJCLML.js} +1 -1
- package/dist/cdn/{WGS5W6W5.js → YVIEKHQQ.js} +1 -1
- package/dist/cdn/{I22C4HE4.js → ZHXREM2D.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/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converter.js +633 -367
- package/dist/chunks/deployFlowController.js +46 -0
- package/dist/chunks/designSolution.js +4 -3
- package/dist/chunks/explainValidationFailure.js +32 -0
- package/dist/chunks/solution-builder-assistant.js +163 -78
- package/dist/chunks/updateDesign.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +396 -318
- package/dist/components/arcgis-solutions-assistant/index.js +1 -1
- package/dist/components/solution-builder-assistant/customElement.js +3 -2
- package/dist/components/solution-deploying-dialog/customElement.js +12 -12
- package/dist/components/solution-details-panel/customElement.js +112 -102
- 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 +6 -6
- package/package.json +1 -1
- package/dist/cdn/5MPYPIR2.js +0 -2
- package/dist/cdn/FYT4Q5GJ.js +0 -2
- package/dist/cdn/GLQZHYJP.js +0 -4
- package/dist/cdn/ILLTWR2W.js +0 -2
- package/dist/cdn/RUF6QBY7.js +0 -2
- package/dist/cdn/S6U6SXMD.js +0 -2
- package/dist/cdn/SYZEWVHU.js +0 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as Ce } from "../../chunks/runtime.js";
|
|
3
3
|
import { u as _e } from "../../chunks/useT9n.js";
|
|
4
|
-
import { LitElement as ke, createEvent as X, nothing as
|
|
5
|
-
import { css as Te, html as
|
|
4
|
+
import { LitElement as ke, createEvent as X, nothing as Z } from "@arcgis/lumina";
|
|
5
|
+
import { css as Te, html as k } from "lit";
|
|
6
6
|
import { unsafeHTML as Ee } from "lit/directives/unsafe-html.js";
|
|
7
|
-
import { useContextConsumer as
|
|
8
|
-
import { c as Ae, b as
|
|
9
|
-
import { T as
|
|
10
|
-
import { l as
|
|
11
|
-
import
|
|
12
|
-
import { createRef as $e, ref as
|
|
13
|
-
import { Annotation as b, StateGraph as z, START as j, END as
|
|
14
|
-
import { createAgentRuntimeState as J, sendTraceMessage as
|
|
15
|
-
import r, { z as
|
|
7
|
+
import { useContextConsumer as ee } from "@arcgis/lumina/context";
|
|
8
|
+
import { c as Ae, b as Le } from "../../chunks/deployAppContexts.js";
|
|
9
|
+
import { T as De } from "../../chunks/interfaces.js";
|
|
10
|
+
import { l as Fe } from "../../chunks/helpers.js";
|
|
11
|
+
import te from "@arcgis/core/config.js";
|
|
12
|
+
import { createRef as $e, ref as Re } from "lit-html/directives/ref.js";
|
|
13
|
+
import { Annotation as b, StateGraph as z, START as j, END as x, NodeInterrupt as ne } from "@langchain/langgraph/web";
|
|
14
|
+
import { createAgentRuntimeState as J, sendTraceMessage as v, invokeStructuredPrompt as E, getEmbeddings as Me, cosineSimilarity as Ne, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
|
|
15
|
+
import r, { z as L } from "zod";
|
|
16
16
|
import * as G from "@esri/arcgis-rest-portal";
|
|
17
|
-
import { applyPatch as
|
|
17
|
+
import { applyPatch as Be } from "fast-json-patch";
|
|
18
18
|
import "@langchain/core/messages";
|
|
19
|
-
import { C as
|
|
20
|
-
import { g as
|
|
19
|
+
import { C as ie } from "../../chunks/converter.js";
|
|
20
|
+
import { g as N, t as oe, r as ae, c as qe, d as D } from "../../chunks/templates.js";
|
|
21
21
|
import Ue from "@arcgis/core/portal/Portal.js";
|
|
22
22
|
import Oe from "@arcgis/core/portal/PortalItem.js";
|
|
23
23
|
const ze = Te`: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)}.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)}`;
|
|
@@ -34,10 +34,10 @@ ${Object.keys(t).join(`
|
|
|
34
34
|
);
|
|
35
35
|
return await s[1]();
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function B(t) {
|
|
38
38
|
return t?.configurable?.context?.translations;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function re(t) {
|
|
41
41
|
if (typeof window > "u" || t.length <= 1)
|
|
42
42
|
return;
|
|
43
43
|
const e = t.map((n) => n.solution.id), s = t.map((n) => n.solution.title);
|
|
@@ -59,7 +59,7 @@ function le(t) {
|
|
|
59
59
|
}
|
|
60
60
|
}));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function le(t) {
|
|
63
63
|
if (typeof window > "u" || !t)
|
|
64
64
|
return;
|
|
65
65
|
const e = new CustomEvent("solutionIDFromAssistant", {
|
|
@@ -93,10 +93,10 @@ function Ge(t, e) {
|
|
|
93
93
|
}
|
|
94
94
|
}), { source: t, allMatches: s };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Ve(t) {
|
|
97
97
|
return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat` : null;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function ce(t) {
|
|
100
100
|
return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat` : null;
|
|
101
101
|
}
|
|
102
102
|
async function O(t, e, s) {
|
|
@@ -112,7 +112,7 @@ async function O(t, e, s) {
|
|
|
112
112
|
throw new Error(`HTTP ${n.status} calling ${e}`);
|
|
113
113
|
return n.json();
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
|
|
116
116
|
// Provides agentExecutionContext, outputMessage, summary, and status
|
|
117
117
|
// channels with the orchestrator's standard reducers/defaults so the
|
|
118
118
|
// sub-agent reports back through the same shape the orchestrator
|
|
@@ -133,9 +133,9 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
|
|
|
133
133
|
reducer: (t, e) => e ?? t,
|
|
134
134
|
default: () => null
|
|
135
135
|
})
|
|
136
|
-
}),
|
|
136
|
+
}), Ke = () => new z(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(j, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), de = async (t, e, s, n) => {
|
|
137
137
|
if (!t) return;
|
|
138
|
-
const i =
|
|
138
|
+
const i = ce(t);
|
|
139
139
|
if (!i) return;
|
|
140
140
|
const a = { context: {
|
|
141
141
|
kind: "DocAIAssistantRequest",
|
|
@@ -148,10 +148,10 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
|
|
|
148
148
|
}
|
|
149
149
|
} };
|
|
150
150
|
n && (a.conversationId = n), O(a, i, e ?? "");
|
|
151
|
-
},
|
|
152
|
-
const s =
|
|
151
|
+
}, Qe = async (t, e) => {
|
|
152
|
+
const s = B(e), n = t.documentSkillUrl;
|
|
153
153
|
let i = [];
|
|
154
|
-
await
|
|
154
|
+
await v(
|
|
155
155
|
{ text: s.agentProgress.explorerAgentSearching },
|
|
156
156
|
e
|
|
157
157
|
);
|
|
@@ -180,27 +180,26 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
|
|
|
180
180
|
hasMore: o.hasMore,
|
|
181
181
|
ackSequenceNumber: o.sequenceNumber,
|
|
182
182
|
inquiryId: o.inquiryId
|
|
183
|
-
}, l = ""
|
|
183
|
+
}, l = "";
|
|
184
184
|
const u = async (m) => {
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
l =
|
|
185
|
+
const h = m.context?.results?.[0]?.reply ?? "";
|
|
186
|
+
if (h !== "") {
|
|
187
|
+
const g = Je(h), A = Ge(g, e);
|
|
188
|
+
l = A.source, i = [
|
|
189
189
|
...i,
|
|
190
|
-
...
|
|
191
|
-
(
|
|
190
|
+
...A.allMatches.filter(
|
|
191
|
+
(C) => !i.some((_) => _.solution.id === C.solution.id)
|
|
192
192
|
)
|
|
193
193
|
];
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
g === 1 ? x = s.agentProgress.explorerAgentReading : g === 2 ? x = s.agentProgress.explorerAgentReviewing : g === 3 && (x = s.agentProgress.explorerAgentPreparing), await w({ text: x }, e);
|
|
195
|
+
const d = m.context?.results?.[0]?.status?.currentStatusStep;
|
|
196
|
+
if (d) {
|
|
197
|
+
let g = "";
|
|
198
|
+
d === 1 ? g = s.agentProgress.explorerAgentReading : d === 2 ? g = s.agentProgress.explorerAgentReviewing : d === 3 && (g = s.agentProgress.explorerAgentPreparing), await v({ text: g }, e);
|
|
200
199
|
}
|
|
201
200
|
};
|
|
202
201
|
for (await u(o); a.hasMore; )
|
|
203
|
-
await
|
|
202
|
+
await He(500), o = await O(
|
|
204
203
|
{
|
|
205
204
|
conversationId: a.conversationId,
|
|
206
205
|
ackSequenceNumber: a.ackSequenceNumber,
|
|
@@ -215,16 +214,12 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
|
|
|
215
214
|
ackSequenceNumber: o.sequenceNumber,
|
|
216
215
|
inquiryId: o.inquiryId
|
|
217
216
|
}, await u(o);
|
|
218
|
-
|
|
219
|
-
const m = e.configurable.context.updateSuggestedPrompts, c = d;
|
|
220
|
-
setTimeout(() => m(c), 0);
|
|
221
|
-
}
|
|
222
|
-
return de(e?.configurable?.context.portal) && ue(
|
|
217
|
+
return ce(e?.configurable?.context.portal) && de(
|
|
223
218
|
e?.configurable?.context.portal,
|
|
224
219
|
e?.configurable?.context.token ?? "",
|
|
225
220
|
e?.configurable?.context.configContext.locale ?? "en",
|
|
226
221
|
a.conversationId
|
|
227
|
-
), i.length && (i.length === 1 ?
|
|
222
|
+
), i.length && (i.length === 1 ? le(i[0].solution.id) : re(i)), {
|
|
228
223
|
outputMessage: l,
|
|
229
224
|
summary: l,
|
|
230
225
|
status: "success",
|
|
@@ -233,12 +228,12 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
|
|
|
233
228
|
};
|
|
234
229
|
}, Ye = async (t, e) => {
|
|
235
230
|
let s = null;
|
|
236
|
-
return t.documentSkillUrl === null && e?.configurable?.context?.portal && (s =
|
|
231
|
+
return t.documentSkillUrl === null && e?.configurable?.context?.portal && (s = Ve(e.configurable.context.portal)), {
|
|
237
232
|
documentSkillUrl: s
|
|
238
233
|
};
|
|
239
234
|
};
|
|
240
235
|
await y(je, "solutions_explorer_description");
|
|
241
|
-
const
|
|
236
|
+
const ue = (t) => {
|
|
242
237
|
if (t && Array.isArray(t.id) && t.id.length > 0)
|
|
243
238
|
return t.id[t.id.length - 1].replace("Message", "").toLowerCase();
|
|
244
239
|
if (t && typeof t._getType == "function")
|
|
@@ -248,8 +243,8 @@ const pe = (t) => {
|
|
|
248
243
|
return "human";
|
|
249
244
|
}
|
|
250
245
|
return "human";
|
|
251
|
-
},
|
|
252
|
-
const e =
|
|
246
|
+
}, Xe = (t) => {
|
|
247
|
+
const e = ue(t);
|
|
253
248
|
if (t && t.kwargs)
|
|
254
249
|
return {
|
|
255
250
|
role: e,
|
|
@@ -264,7 +259,7 @@ const pe = (t) => {
|
|
|
264
259
|
return t.id && (s.id = t.id), t.name && (s.name = t.name), t.additional_kwargs && (s.additional_kwargs = t.additional_kwargs), t.response_metadata && (s.response_metadata = t.response_metadata), s;
|
|
265
260
|
}
|
|
266
261
|
return { role: "human", content: String(t) };
|
|
267
|
-
},
|
|
262
|
+
}, Ze = (t) => ue(t) === "human", et = (t, e = 3) => t.filter((s) => Ze(s)).slice(-e).map(Xe), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { 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’ll 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?" }, nt = {
|
|
268
263
|
builderMessages: st
|
|
269
264
|
}, it = /* @__PURE__ */ new Set([
|
|
270
265
|
"add",
|
|
@@ -319,6 +314,8 @@ const pe = (t) => {
|
|
|
319
314
|
"rownum",
|
|
320
315
|
"select",
|
|
321
316
|
"set",
|
|
317
|
+
"shape",
|
|
318
|
+
"subtype",
|
|
322
319
|
"table",
|
|
323
320
|
"top",
|
|
324
321
|
"truncate",
|
|
@@ -329,9 +326,9 @@ const pe = (t) => {
|
|
|
329
326
|
"view",
|
|
330
327
|
"where"
|
|
331
328
|
]);
|
|
332
|
-
class
|
|
329
|
+
class pe {
|
|
333
330
|
constructor(e, s, n = !0) {
|
|
334
|
-
this.isValid = !0, this.issues = [], this.response = e, this.template = s, this.newDesign = n, this.validate();
|
|
331
|
+
this.isValid = !0, this.issues = [], this.fieldNameRegistry = null, this.response = e, this.template = s, this.newDesign = n, this.validate();
|
|
335
332
|
}
|
|
336
333
|
validate() {
|
|
337
334
|
this.compareModels(), this.validateResponse();
|
|
@@ -343,11 +340,11 @@ class me {
|
|
|
343
340
|
const e = new Set(this.template.solution.strings.map((n) => n.key)), s = new Set(this.response.solution.strings.map((n) => n.key));
|
|
344
341
|
e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("String keys in llm response do not match the template.");
|
|
345
342
|
for (const n of this.response.solution.strings)
|
|
346
|
-
n.value || this.logIssue(`String key '${n.key}' has no value.`);
|
|
343
|
+
n.value || this.logIssue(`String key '${n.key}' has no value in the design. It must be populated.`);
|
|
347
344
|
}
|
|
348
345
|
compareItems() {
|
|
349
346
|
const e = new Set(this.template.items.map((n) => n.id)), s = new Set(this.response.items.map((n) => n.id));
|
|
350
|
-
e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("Item
|
|
347
|
+
e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("Item IDs in design do not match the template.");
|
|
351
348
|
}
|
|
352
349
|
compareFeatureLayers() {
|
|
353
350
|
const e = this.template.featureLayer, s = this.response.featureLayer;
|
|
@@ -368,14 +365,20 @@ class me {
|
|
|
368
365
|
}
|
|
369
366
|
}
|
|
370
367
|
validateResponse() {
|
|
371
|
-
const e =
|
|
368
|
+
const e = /* @__PURE__ */ new Set([
|
|
369
|
+
"Feature Layer (hosted)",
|
|
370
|
+
"Feature Layer (hosted, view)"
|
|
371
|
+
]);
|
|
372
|
+
for (const i of this.response.items)
|
|
373
|
+
e.has(i.type) && i.title.length > 100 && this.logIssue(`Service name '${i.title}' exceeds 100 characters.`);
|
|
374
|
+
const s = this.template.featureLayer.layers;
|
|
372
375
|
this.response.featureLayer.layers.length || this.logIssue("Feature layer item must contain at least one layer.");
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
for (const
|
|
376
|
-
this.validateLayer(
|
|
377
|
-
const
|
|
378
|
-
|
|
376
|
+
const n = this.response.featureLayer.layers.map((i) => i.name.toLowerCase());
|
|
377
|
+
n.length !== new Set(n).size && this.logIssue(`Layer names must be unique (case-insensitive). Layer names in design: ${n}.`);
|
|
378
|
+
for (const i of this.response.featureLayer.layers) {
|
|
379
|
+
this.validateLayer(i, this.response.featureLayer.addLayers);
|
|
380
|
+
const o = s.find((a) => a.id === i.id);
|
|
381
|
+
o && this.validateRequiredFields(i, o);
|
|
379
382
|
}
|
|
380
383
|
}
|
|
381
384
|
validateRequiredFields(e, s) {
|
|
@@ -383,7 +386,12 @@ class me {
|
|
|
383
386
|
for (const i of s.requiredFields)
|
|
384
387
|
n.has(i.name) || this.logIssue(`Layer '${e.name}' is missing required field '${i.name}'.`);
|
|
385
388
|
}
|
|
386
|
-
validateLayer(e) {
|
|
389
|
+
validateLayer(e, s) {
|
|
390
|
+
!s && e.typeMutable === !0 && e.type === "Table" && this.logIssue(
|
|
391
|
+
`Layer '${e.name}' cannot be a Table. It may be a Point, Line, or Polygon.`
|
|
392
|
+
), this.validateLayerFields(e);
|
|
393
|
+
}
|
|
394
|
+
validateLayerFields(e) {
|
|
387
395
|
const s = /* @__PURE__ */ new Set([
|
|
388
396
|
"objectid",
|
|
389
397
|
"globalid",
|
|
@@ -391,26 +399,57 @@ class me {
|
|
|
391
399
|
"created_user",
|
|
392
400
|
"last_edited_date",
|
|
393
401
|
"last_edited_user"
|
|
394
|
-
]), n = e.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
402
|
+
]), n = e.customFields.map((c) => c.name), i = new Set(e.requiredFields.map((c) => c.name)), o = [...new Set(
|
|
403
|
+
n.filter((c) => s.has(c))
|
|
404
|
+
)];
|
|
405
|
+
for (const c of o)
|
|
406
|
+
this.logIssue(`Layer '${e.name}' field '${c}' collides with a reserved system field name.`);
|
|
407
|
+
const a = [...new Set(
|
|
408
|
+
n.filter((c) => i.has(c))
|
|
409
|
+
)];
|
|
410
|
+
for (const c of a)
|
|
411
|
+
this.logIssue(`Layer '${e.name}' field '${c}' collides with a required field name.`);
|
|
412
|
+
if (!o.length && !a.length) {
|
|
413
|
+
const c = e.systemFields ?? [], m = [
|
|
414
|
+
...e.customFields,
|
|
415
|
+
...e.requiredFields,
|
|
416
|
+
...c
|
|
417
|
+
].map((h) => h.name);
|
|
418
|
+
m.length !== new Set(m).size && this.logIssue(`Layer '${e.name}' has duplicate fields: ${JSON.stringify(m)}.`);
|
|
400
419
|
}
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
420
|
+
const l = e.systemFields ?? [], u = [...e.customFields, ...e.requiredFields, ...l].map((c) => c.name.toLowerCase());
|
|
421
|
+
this.fieldNameRegistry = new Set(u);
|
|
422
|
+
for (const c of [...e.customFields, ...e.requiredFields])
|
|
423
|
+
this.validateField(c);
|
|
424
|
+
this.fieldNameRegistry = null;
|
|
425
|
+
}
|
|
426
|
+
getUniqueTruncatedFieldName(e) {
|
|
427
|
+
const n = this.fieldNameRegistry;
|
|
428
|
+
if (!n)
|
|
429
|
+
return e.slice(0, 31);
|
|
430
|
+
const i = e.toLowerCase();
|
|
431
|
+
n.delete(i);
|
|
432
|
+
const o = e.slice(0, 31);
|
|
433
|
+
let a = o, l = 1;
|
|
434
|
+
for (; n.has(a.toLowerCase()); ) {
|
|
435
|
+
const u = `_${l}`, c = Math.max(1, 31 - u.length);
|
|
436
|
+
a = `${o.slice(0, c)}${u}`, l += 1;
|
|
437
|
+
}
|
|
438
|
+
return n.add(a.toLowerCase()), a;
|
|
409
439
|
}
|
|
410
440
|
validateField(e) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
441
|
+
const s = /^\p{L}/u, n = /^.[\p{L}\p{M}\p{N}_]*$/u;
|
|
442
|
+
if (e.alias || this.logIssue(`Field '${e.name}' has no display name (alias).`), s.test(e.name) || this.logIssue(`Field '${e.name}' does not start with a letter.`), n.test(e.name) || this.logIssue(
|
|
443
|
+
`Field '${e.name}' contains invalid characters (only letters from any writing system, numbers, and underscores are allowed; emojis and punctuation are not allowed).`
|
|
444
|
+
), e.name.length > 31)
|
|
445
|
+
if (this.newDesign) {
|
|
446
|
+
const i = e.name;
|
|
447
|
+
e.name = this.getUniqueTruncatedFieldName(e.name), console.debug(`Field '${i}' exceeds 31 characters. Auto-fixing to '${e.name}'.`);
|
|
448
|
+
} else
|
|
449
|
+
this.logIssue(`Field '${e.name}' exceeds 31 characters.`);
|
|
450
|
+
if (it.has(e.name.toLowerCase()) && this.logIssue(`Field '${e.name}' is a SQL reserved keyword.`), e.choiceList && (e.type !== "string" && this.logIssue(`Field '${e.name}' must be of type 'string' to have a domain.`), e.choiceList.some((i) => !i) && this.logIssue(`Field '${e.name}' has empty domain values.`), e.choiceList.length !== new Set(e.choiceList).size && this.logIssue(`Field '${e.name}' has duplicate domain values.`), e.length != null)) {
|
|
451
|
+
const i = Math.max(...e.choiceList.map((o) => o.length));
|
|
452
|
+
i > e.length && (this.newDesign ? (console.debug(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${i}. Auto-fixing to ${i}.`), e.length = i) : this.logIssue(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${i}.`));
|
|
414
453
|
}
|
|
415
454
|
}
|
|
416
455
|
logIssue(e) {
|
|
@@ -444,7 +483,7 @@ const ot = r.object({
|
|
|
444
483
|
"Notebook",
|
|
445
484
|
"QuickCapture Project"
|
|
446
485
|
]).describe("ArcGIS item type.")
|
|
447
|
-
}),
|
|
486
|
+
}), se = r.object({
|
|
448
487
|
name: r.string().describe("Field name."),
|
|
449
488
|
type: r.enum(["string", "integer", "double", "date", "oid", "guid", "globalid"]).describe("Field data type."),
|
|
450
489
|
alias: r.string().describe("Field alias for display."),
|
|
@@ -459,13 +498,13 @@ const ot = r.object({
|
|
|
459
498
|
typeMutable: r.boolean().describe("Indicates whether the layer type can be changed."),
|
|
460
499
|
name: r.string().describe("Layer/table name."),
|
|
461
500
|
description: r.string().describe("Layer/table description."),
|
|
462
|
-
customFields: r.array(
|
|
463
|
-
requiredFields: r.array(
|
|
501
|
+
customFields: r.array(se).describe("User/business fields specific to the solution."),
|
|
502
|
+
requiredFields: r.array(se).describe("Fields required for solution functionality (e.g., relationship keys).")
|
|
464
503
|
}), lt = r.object({
|
|
465
504
|
itemId: r.string().describe("ArcGIS item id for the feature layer."),
|
|
466
505
|
addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
|
|
467
506
|
layers: r.array(rt)
|
|
468
|
-
}),
|
|
507
|
+
}), V = r.object({
|
|
469
508
|
response: r.string().describe("Conversational response to the user's query."),
|
|
470
509
|
solution: r.object({
|
|
471
510
|
itemId: r.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),
|
|
@@ -485,30 +524,61 @@ const ot = r.object({
|
|
|
485
524
|
response: r.string().describe("Conversational response describing the accepted design changes."),
|
|
486
525
|
patches: r.array(ct).describe("Minimal RFC 6902 patch operations needed to update the current design.")
|
|
487
526
|
}), ut = r.object({
|
|
488
|
-
|
|
527
|
+
response: r.string().describe("Short, user-friendly explanation of why the requested update was not applied.")
|
|
489
528
|
}), pt = r.object({
|
|
529
|
+
matchedTitles: r.array(r.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")
|
|
530
|
+
}), mt = r.object({
|
|
490
531
|
templateId: r.string().min(1).describe("Template id from the available template list."),
|
|
491
532
|
confidence: r.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),
|
|
492
533
|
templateDescription: r.string().min(1).describe("Short description this template in the user's use case/workflow.")
|
|
493
|
-
}),
|
|
534
|
+
}), gt = r.object({
|
|
494
535
|
assistantResponse: r.string().describe("Natural-language response for the user."),
|
|
495
536
|
isValidUseCase: r.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),
|
|
496
|
-
matchedTemplates: r.array(
|
|
497
|
-
}),
|
|
498
|
-
|
|
499
|
-
const
|
|
537
|
+
matchedTemplates: r.array(mt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
|
|
538
|
+
}), ht = (t) => t.length ? t.map((e, s) => `${s + 1}. ${e}`).join(`
|
|
539
|
+
`) : "No validation errors were provided.", ft = async (t) => {
|
|
540
|
+
const {
|
|
541
|
+
query: e,
|
|
542
|
+
validationIssues: s,
|
|
543
|
+
recentMessages: n,
|
|
544
|
+
fallbackMessage: i,
|
|
545
|
+
promptModules: o
|
|
546
|
+
} = t;
|
|
547
|
+
try {
|
|
548
|
+
return (await E({
|
|
549
|
+
promptText: await y(o, "explainValidationFailure"),
|
|
550
|
+
modelTier: "fast",
|
|
551
|
+
temperature: 0,
|
|
552
|
+
schema: ut,
|
|
553
|
+
messages: n,
|
|
554
|
+
inputVariables: {
|
|
555
|
+
query: e,
|
|
556
|
+
validationIssueCount: String(s.length),
|
|
557
|
+
validationIssues: ht(s)
|
|
558
|
+
}
|
|
559
|
+
})).response?.trim() || i;
|
|
560
|
+
} catch (a) {
|
|
561
|
+
return console.warn(
|
|
562
|
+
"Natural language response failed:",
|
|
563
|
+
{ error: a }
|
|
564
|
+
), i;
|
|
565
|
+
}
|
|
566
|
+
}, H = (t) => t in D, bt = 5, yt = 0.8, xt = 0.15, vt = "Web Mapping Application", wt = "Embeddings";
|
|
567
|
+
let $ = null, U = null, R = null, M = null;
|
|
568
|
+
const St = "Build", T = /* @__PURE__ */ Object.assign({
|
|
500
569
|
"./prompts/description.md": () => import("../../chunks/description2.js").then((t) => t.default),
|
|
501
570
|
"./prompts/designSolution.md": () => import("../../chunks/designSolution.js").then((t) => t.default),
|
|
571
|
+
"./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
|
|
502
572
|
"./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
|
|
503
573
|
"./prompts/initialAssessment.md": () => import("../../chunks/initialAssessment.js").then((t) => t.default),
|
|
504
574
|
"./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
|
|
505
|
-
}),
|
|
575
|
+
}), It = nt.builderMessages, f = (t, e, s) => B(e)?.builderMessages?.[t] ?? It[t], me = (t) => {
|
|
506
576
|
typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
|
|
507
577
|
detail: t
|
|
508
578
|
}));
|
|
509
|
-
},
|
|
579
|
+
}, Ct = async (t, e, s) => {
|
|
510
580
|
if (!t) return null;
|
|
511
|
-
const n = `type:"${
|
|
581
|
+
const n = `type:"${vt}" AND typekeywords:${wt} AND group:${t}`;
|
|
512
582
|
return (await G.searchItems({
|
|
513
583
|
q: n,
|
|
514
584
|
params: e ? { token: e } : void 0,
|
|
@@ -516,9 +586,9 @@ const xt = "Build", L = /* @__PURE__ */ Object.assign({
|
|
|
516
586
|
num: 1
|
|
517
587
|
}))?.results?.[0] ?? null;
|
|
518
588
|
};
|
|
519
|
-
async function
|
|
589
|
+
async function _t(t, e, s) {
|
|
520
590
|
try {
|
|
521
|
-
const n = await
|
|
591
|
+
const n = await Ct(t, e, s);
|
|
522
592
|
if (!n) return null;
|
|
523
593
|
const i = new Oe({ id: n.id });
|
|
524
594
|
return await i.load(), await i.fetchData("json");
|
|
@@ -526,16 +596,16 @@ async function St(t, e, s) {
|
|
|
526
596
|
return null;
|
|
527
597
|
}
|
|
528
598
|
}
|
|
529
|
-
const
|
|
599
|
+
const kt = async (t, e, s) => {
|
|
530
600
|
if (!t) return [];
|
|
531
|
-
const n = `type:Solution AND typekeywords:${
|
|
601
|
+
const n = `type:Solution AND typekeywords:${St} AND group:${t}`;
|
|
532
602
|
return (await G.searchItems({
|
|
533
603
|
q: n,
|
|
534
604
|
params: e ? { token: e } : void 0,
|
|
535
605
|
portal: s,
|
|
536
606
|
num: 100
|
|
537
607
|
}))?.results ?? [];
|
|
538
|
-
},
|
|
608
|
+
}, Tt = async (t, e, s) => {
|
|
539
609
|
try {
|
|
540
610
|
const n = await G.getItemData(t, {
|
|
541
611
|
params: e ? { token: e } : void 0,
|
|
@@ -547,7 +617,7 @@ const It = async (t, e, s) => {
|
|
|
547
617
|
} catch {
|
|
548
618
|
return null;
|
|
549
619
|
}
|
|
550
|
-
},
|
|
620
|
+
}, I = (t, e = {}) => {
|
|
551
621
|
let s = t;
|
|
552
622
|
return "itemId" in e && (s = {
|
|
553
623
|
...s,
|
|
@@ -565,118 +635,118 @@ const It = async (t, e, s) => {
|
|
|
565
635
|
...s,
|
|
566
636
|
templateId: e.templateId ?? null
|
|
567
637
|
}), s;
|
|
568
|
-
},
|
|
638
|
+
}, ge = (t, e) => {
|
|
569
639
|
if (t == null || e == null)
|
|
570
640
|
return { ok: !1, error: "design or sourceBuildSolution is null/undefined" };
|
|
571
641
|
try {
|
|
572
642
|
const s = structuredClone(e);
|
|
573
|
-
return new
|
|
643
|
+
return new ie({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
|
|
574
644
|
} catch (s) {
|
|
575
645
|
return {
|
|
576
646
|
ok: !1,
|
|
577
647
|
error: s instanceof Error ? s.stack ?? s.message : String(s)
|
|
578
648
|
};
|
|
579
649
|
}
|
|
580
|
-
},
|
|
650
|
+
}, W = async (t) => {
|
|
581
651
|
if (U) {
|
|
582
652
|
Object.entries(U).forEach(([a, l]) => {
|
|
583
|
-
|
|
653
|
+
D[a] && (D[a].initialTemplate = l);
|
|
584
654
|
});
|
|
585
655
|
return;
|
|
586
656
|
}
|
|
587
|
-
const e = t?.configurable?.context?.token, s =
|
|
657
|
+
const e = t?.configurable?.context?.token, s = fe(t), n = be(t);
|
|
588
658
|
if (!s) {
|
|
589
659
|
console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");
|
|
590
660
|
return;
|
|
591
661
|
}
|
|
592
|
-
const i = await
|
|
662
|
+
const i = await kt(s, e, n), o = {};
|
|
593
663
|
await Promise.all(i.map(async (a) => {
|
|
594
664
|
const l = a.properties?.templateInfo;
|
|
595
665
|
if (!l || typeof l != "object") return;
|
|
596
|
-
const
|
|
597
|
-
if (typeof
|
|
598
|
-
const
|
|
599
|
-
if (!
|
|
600
|
-
const { buildSolution:
|
|
601
|
-
if (typeof
|
|
602
|
-
const g =
|
|
666
|
+
const u = l.id;
|
|
667
|
+
if (typeof u != "string" || o[u]) return;
|
|
668
|
+
const c = await Tt(a.id, e, n);
|
|
669
|
+
if (!c) return;
|
|
670
|
+
const { buildSolution: m, params: h } = c;
|
|
671
|
+
if (typeof m == "object" && m !== null && "solution" in m) {
|
|
672
|
+
const g = m.solution;
|
|
603
673
|
g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, g.item = a;
|
|
604
674
|
}
|
|
605
|
-
const
|
|
675
|
+
const d = {
|
|
606
676
|
...l,
|
|
607
|
-
buildSolution:
|
|
677
|
+
buildSolution: m
|
|
608
678
|
};
|
|
609
|
-
o[
|
|
610
|
-
new
|
|
679
|
+
o[u] = I(
|
|
680
|
+
new ie(d).dumpToLlmTemplate(),
|
|
611
681
|
{
|
|
612
682
|
itemId: a.id,
|
|
613
|
-
sourceBuildSolution: structuredClone(
|
|
614
|
-
params:
|
|
683
|
+
sourceBuildSolution: structuredClone(m),
|
|
684
|
+
params: h ? structuredClone(h) : null
|
|
615
685
|
}
|
|
616
|
-
),
|
|
686
|
+
), D[u] = {
|
|
617
687
|
...l,
|
|
618
|
-
initialTemplate: o[
|
|
688
|
+
initialTemplate: o[u]
|
|
619
689
|
};
|
|
620
690
|
})), U = o;
|
|
621
|
-
},
|
|
691
|
+
}, he = (t) => {
|
|
622
692
|
const e = t?.configurable?.context?.token;
|
|
623
693
|
return typeof e != "string" || !e.trim() ? null : e;
|
|
624
|
-
},
|
|
694
|
+
}, fe = (t) => {
|
|
625
695
|
const e = t?.configurable?.context?.configContext?.primarySolutionsGroupId;
|
|
626
696
|
return typeof e != "string" || !e.trim() ? null : e;
|
|
627
|
-
},
|
|
697
|
+
}, be = (t) => {
|
|
628
698
|
const e = t?.configurable?.context?.configContext?.portalURL;
|
|
629
699
|
if (!(typeof e != "string" || !e.trim()))
|
|
630
700
|
return `${e.replace(/\/+$/, "")}/sharing/rest`;
|
|
631
|
-
},
|
|
701
|
+
}, Et = async (t) => {
|
|
632
702
|
await Promise.all([
|
|
633
|
-
|
|
634
|
-
|
|
703
|
+
xe(t),
|
|
704
|
+
W(t)
|
|
635
705
|
]);
|
|
636
|
-
},
|
|
637
|
-
const e =
|
|
638
|
-
(!
|
|
639
|
-
throw
|
|
640
|
-
})), await
|
|
706
|
+
}, ye = async (t) => {
|
|
707
|
+
const e = he(t);
|
|
708
|
+
(!R || e && e !== M) && (M = e ?? M, R = Et(t).catch((n) => {
|
|
709
|
+
throw R = null, M = null, n;
|
|
710
|
+
})), await R;
|
|
641
711
|
};
|
|
642
|
-
async function
|
|
712
|
+
async function xe(t) {
|
|
643
713
|
if ($) return $;
|
|
644
|
-
const e =
|
|
714
|
+
const e = fe(t);
|
|
645
715
|
if (!e)
|
|
646
716
|
return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
|
|
647
|
-
const s =
|
|
717
|
+
const s = be(t), n = t?.configurable?.context?.configContext?.portalURL;
|
|
648
718
|
await new Ue(n ? { url: n } : void 0).load();
|
|
649
|
-
const o =
|
|
719
|
+
const o = he(t) ?? void 0, a = await _t(e, o, s);
|
|
650
720
|
return a ? ($ = a.items, $) : null;
|
|
651
721
|
}
|
|
652
|
-
const
|
|
722
|
+
const At = () => Object.entries(D).map(([t, e]) => `ID: ${t}
|
|
653
723
|
Label: ${e.label}
|
|
654
724
|
Description: ${e.description}`).join(`
|
|
655
725
|
|
|
656
|
-
`),
|
|
726
|
+
`), Lt = (t) => {
|
|
657
727
|
const e = t?.configurable?.context?.solutionDesignJson;
|
|
658
728
|
if (typeof e != "string" || !e.trim())
|
|
659
729
|
return null;
|
|
660
730
|
try {
|
|
661
|
-
const s = JSON.parse(e), n =
|
|
731
|
+
const s = JSON.parse(e), n = I(
|
|
662
732
|
{ response: "", ...s },
|
|
663
733
|
{ itemId: s?.solution?.itemId ?? null }
|
|
664
|
-
), i =
|
|
734
|
+
), i = V.safeParse(n);
|
|
665
735
|
if (!i.success)
|
|
666
736
|
return null;
|
|
667
|
-
const { response: o, ...a } = i.data, l = s.templateId,
|
|
668
|
-
return
|
|
737
|
+
const { response: o, ...a } = i.data, l = s.templateId, u = typeof l == "string" && H(l) ? l : null;
|
|
738
|
+
return I(
|
|
669
739
|
a,
|
|
670
740
|
{
|
|
671
741
|
sourceBuildSolution: s.sourceBuildSolution,
|
|
672
|
-
templateId:
|
|
742
|
+
templateId: u,
|
|
673
743
|
params: s.params ?? null
|
|
674
744
|
}
|
|
675
745
|
);
|
|
676
746
|
} catch {
|
|
677
747
|
return null;
|
|
678
748
|
}
|
|
679
|
-
},
|
|
749
|
+
}, Dt = b.Root({
|
|
680
750
|
...J(),
|
|
681
751
|
/** Optional human-readable template description retained for UI use. */
|
|
682
752
|
templateDescription: b({
|
|
@@ -708,145 +778,145 @@ Description: ${e.description}`).join(`
|
|
|
708
778
|
reducer: (t = null, e) => e === void 0 ? t : e ?? null,
|
|
709
779
|
default: () => null
|
|
710
780
|
})
|
|
711
|
-
}),
|
|
712
|
-
const s =
|
|
781
|
+
}), Ft = (t, e) => {
|
|
782
|
+
const s = Lt(e), n = s?.templateId ?? null, i = {};
|
|
713
783
|
return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
|
|
714
|
-
},
|
|
715
|
-
await
|
|
716
|
-
const s = t.agentExecutionContext.userRequest, n =
|
|
717
|
-
promptText: await y(
|
|
784
|
+
}, $t = async (t, e) => {
|
|
785
|
+
await v({ text: f("understandingRequest", e) }, e), await ye(e);
|
|
786
|
+
const s = t.agentExecutionContext.userRequest, n = At(), i = t.agentExecutionContext.messages.slice(-11), o = await E({
|
|
787
|
+
promptText: await y(T, "initialAssessment"),
|
|
718
788
|
modelTier: "advanced",
|
|
719
789
|
temperature: 0,
|
|
720
|
-
schema:
|
|
790
|
+
schema: gt,
|
|
721
791
|
messages: i,
|
|
722
792
|
inputVariables: { query: s, availableTemplates: n }
|
|
723
793
|
}), a = o.matchedTemplates.filter(
|
|
724
|
-
(
|
|
794
|
+
(d) => H(d.templateId)
|
|
725
795
|
), l = {
|
|
726
796
|
...o,
|
|
727
797
|
matchedTemplates: a
|
|
728
|
-
}, [
|
|
798
|
+
}, [u, c] = a, h = !!u && u.confidence >= yt && (c === void 0 || u.confidence - c.confidence >= xt) ? u.templateId : null;
|
|
729
799
|
return {
|
|
730
800
|
assessment: l,
|
|
731
|
-
selectedTemplate:
|
|
801
|
+
selectedTemplate: h,
|
|
732
802
|
existingMatches: [],
|
|
733
803
|
continueBuilding: null
|
|
734
804
|
};
|
|
735
|
-
},
|
|
805
|
+
}, Rt = (t) => {
|
|
736
806
|
const e = t.assessment?.assistantResponse ?? "";
|
|
737
807
|
return {
|
|
738
808
|
outputMessage: e,
|
|
739
809
|
summary: e,
|
|
740
810
|
status: "success"
|
|
741
811
|
};
|
|
742
|
-
},
|
|
812
|
+
}, Mt = (t, e) => {
|
|
743
813
|
const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
|
|
744
|
-
(
|
|
745
|
-
) ?? [], o = i.map((
|
|
814
|
+
(c) => H(c.templateId)
|
|
815
|
+
) ?? [], o = i.map((c) => `${c.templateDescription}`);
|
|
746
816
|
if (s?.agentId !== "solutionBuilder" || s.id !== n) {
|
|
747
|
-
const
|
|
817
|
+
const c = {
|
|
748
818
|
agentId: "solutionBuilder",
|
|
749
819
|
id: n,
|
|
750
820
|
kind: "singleSelection",
|
|
751
821
|
message: f("selectTemplatePrompt", e),
|
|
752
822
|
metadata: [...o]
|
|
753
823
|
};
|
|
754
|
-
throw new
|
|
824
|
+
throw new ne(c);
|
|
755
825
|
}
|
|
756
|
-
const a = String(s.payload ?? ""), l = o.findIndex((
|
|
826
|
+
const a = String(s.payload ?? ""), l = o.findIndex((c) => c === a);
|
|
757
827
|
return {
|
|
758
828
|
selectedTemplate: (l >= 0 ? i[l] : void 0)?.templateId ?? i[0]?.templateId ?? null
|
|
759
829
|
};
|
|
760
|
-
},
|
|
761
|
-
await
|
|
762
|
-
const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await
|
|
830
|
+
}, Nt = async (t, e) => {
|
|
831
|
+
await v({ text: f("searchingExistingSolutions", e) }, e);
|
|
832
|
+
const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await xe(e);
|
|
763
833
|
if (!i)
|
|
764
834
|
return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
|
|
765
835
|
if (!i.length)
|
|
766
836
|
return { existingMatches: [] };
|
|
767
|
-
const [o] = await
|
|
768
|
-
solution:
|
|
769
|
-
score:
|
|
837
|
+
const [o] = await Me([n]), a = i.map((d) => ({
|
|
838
|
+
solution: d,
|
|
839
|
+
score: Ne(o, d.embedding)
|
|
770
840
|
}));
|
|
771
|
-
a.sort((
|
|
772
|
-
const l = a.slice(0,
|
|
841
|
+
a.sort((d, g) => g.score - d.score);
|
|
842
|
+
const l = a.slice(0, bt);
|
|
773
843
|
if (!l.length)
|
|
774
844
|
return { existingMatches: [] };
|
|
775
|
-
const
|
|
776
|
-
Snippet: ${
|
|
777
|
-
Description: ${
|
|
845
|
+
const u = l.map(({ solution: d }) => `${d.title}
|
|
846
|
+
Snippet: ${d.snippet}
|
|
847
|
+
Description: ${d.description}`).join(`
|
|
778
848
|
|
|
779
|
-
`),
|
|
780
|
-
return { existingMatches: (await
|
|
781
|
-
promptText: await y(
|
|
849
|
+
`), c = t.agentExecutionContext.messages.slice(-11);
|
|
850
|
+
return { existingMatches: (await E({
|
|
851
|
+
promptText: await y(T, "findExistingSolution"),
|
|
782
852
|
modelTier: "fast",
|
|
783
853
|
temperature: 0,
|
|
784
|
-
schema:
|
|
785
|
-
messages:
|
|
786
|
-
inputVariables: { query: s, candidates:
|
|
787
|
-
})).matchedTitles.map((
|
|
788
|
-
},
|
|
854
|
+
schema: pt,
|
|
855
|
+
messages: c,
|
|
856
|
+
inputVariables: { query: s, candidates: u }
|
|
857
|
+
})).matchedTitles.map((d) => l.find(({ solution: g }) => g.title === d)).filter((d) => d !== void 0) };
|
|
858
|
+
}, Pt = (t, e) => {
|
|
789
859
|
const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
|
|
790
860
|
if (n?.agentId !== "solutionBuilder" || n.id !== i) {
|
|
791
|
-
s.length === 1 ?
|
|
792
|
-
const
|
|
861
|
+
s.length === 1 ? le(s[0].solution.id) : re(s);
|
|
862
|
+
const u = f("existingSolutionMatch", e), c = [
|
|
793
863
|
f("continueBuildingYes", e),
|
|
794
864
|
f("continueBuildingNo", e)
|
|
795
|
-
],
|
|
865
|
+
], m = {
|
|
796
866
|
agentId: "solutionBuilder",
|
|
797
867
|
id: i,
|
|
798
868
|
kind: "singleSelection",
|
|
799
|
-
message:
|
|
800
|
-
metadata:
|
|
869
|
+
message: u,
|
|
870
|
+
metadata: c
|
|
801
871
|
};
|
|
802
|
-
throw new
|
|
872
|
+
throw new ne(m);
|
|
803
873
|
}
|
|
804
874
|
const o = String(n.payload ?? "").trim(), a = f("continueBuildingNo", e);
|
|
805
875
|
return { continueBuilding: o !== a };
|
|
806
|
-
},
|
|
876
|
+
}, Bt = (t, e) => {
|
|
807
877
|
const s = f("continueBuildingDeclined", e);
|
|
808
878
|
return {
|
|
809
879
|
outputMessage: s,
|
|
810
880
|
summary: s,
|
|
811
881
|
status: "success"
|
|
812
882
|
};
|
|
813
|
-
},
|
|
814
|
-
await
|
|
883
|
+
}, ve = async (t, e) => {
|
|
884
|
+
await ye(e);
|
|
815
885
|
const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
|
|
816
|
-
await
|
|
817
|
-
let i =
|
|
818
|
-
if (i?.initialTemplate || (await
|
|
886
|
+
await v({ text: f("creatingDesign", e) }, e);
|
|
887
|
+
let i = N(t.selectedTemplate);
|
|
888
|
+
if (i?.initialTemplate || (await W(e), i = N(t.selectedTemplate)), !i?.initialTemplate)
|
|
819
889
|
throw new Error("No hydrated templates are available for solution design.");
|
|
820
|
-
const o =
|
|
890
|
+
const o = I(
|
|
821
891
|
s ?? i.initialTemplate,
|
|
822
892
|
{
|
|
823
893
|
itemId: (s ?? i.initialTemplate)?.solution?.itemId ?? null,
|
|
824
894
|
sourceBuildSolution: s?.sourceBuildSolution ?? i.initialTemplate.sourceBuildSolution,
|
|
825
895
|
params: s?.params ?? i.initialTemplate.params ?? null
|
|
826
896
|
}
|
|
827
|
-
), a = t.agentExecutionContext.messages.slice(-11), l = await
|
|
828
|
-
promptText: await y(
|
|
897
|
+
), a = t.agentExecutionContext.messages.slice(-11), l = await E({
|
|
898
|
+
promptText: await y(T, "designSolution"),
|
|
829
899
|
modelTier: "advanced",
|
|
830
900
|
temperature: 0,
|
|
831
|
-
schema:
|
|
901
|
+
schema: V,
|
|
832
902
|
messages: a,
|
|
833
903
|
inputVariables: {
|
|
834
|
-
currentDesign: JSON.stringify(
|
|
904
|
+
currentDesign: JSON.stringify(oe(o)),
|
|
835
905
|
templateInstructions: i.instructions,
|
|
836
906
|
query: n
|
|
837
907
|
}
|
|
838
|
-
}), { response:
|
|
839
|
-
|
|
908
|
+
}), { response: u, featureLayer: c, ...m } = l, h = ae(
|
|
909
|
+
c,
|
|
840
910
|
o.featureLayer
|
|
841
|
-
),
|
|
842
|
-
{ ...
|
|
911
|
+
), d = I(
|
|
912
|
+
{ ...m, featureLayer: h },
|
|
843
913
|
{
|
|
844
914
|
itemId: o?.solution?.itemId,
|
|
845
915
|
sourceBuildSolution: o.sourceBuildSolution,
|
|
846
916
|
templateId: t.selectedTemplate ?? null,
|
|
847
917
|
params: o.params ?? null
|
|
848
918
|
}
|
|
849
|
-
), g = new
|
|
919
|
+
), g = new pe(d, i.initialTemplate);
|
|
850
920
|
if (!g.isValid)
|
|
851
921
|
return console.warn(
|
|
852
922
|
"[SolutionBuilder] designSolution validation failed:",
|
|
@@ -854,33 +924,33 @@ Description: ${c.description}`).join(`
|
|
|
854
924
|
), {
|
|
855
925
|
outputMessage: f("createDesignFailed", e)
|
|
856
926
|
};
|
|
857
|
-
const
|
|
858
|
-
if (!
|
|
927
|
+
const A = d.sourceBuildSolution, C = ge(d, A);
|
|
928
|
+
if (!C.ok) {
|
|
859
929
|
console.warn(
|
|
860
930
|
"[SolutionBuilder] designSolution Esri JSON conversion failed:",
|
|
861
|
-
{ error:
|
|
931
|
+
{ error: C.error, llmResponse: l, design: d }
|
|
862
932
|
);
|
|
863
|
-
const
|
|
933
|
+
const _ = f("createDesignFailed", e);
|
|
864
934
|
return {
|
|
865
|
-
outputMessage:
|
|
866
|
-
summary:
|
|
935
|
+
outputMessage: _,
|
|
936
|
+
summary: _,
|
|
867
937
|
status: "success"
|
|
868
938
|
};
|
|
869
939
|
}
|
|
870
|
-
return
|
|
871
|
-
outputMessage:
|
|
872
|
-
summary:
|
|
940
|
+
return me(d), {
|
|
941
|
+
outputMessage: u,
|
|
942
|
+
summary: u,
|
|
873
943
|
status: "success",
|
|
874
|
-
currentDesign:
|
|
944
|
+
currentDesign: d
|
|
875
945
|
};
|
|
876
|
-
},
|
|
946
|
+
}, qt = async (t, e) => {
|
|
877
947
|
const { currentDesign: s } = t;
|
|
878
948
|
if (!s)
|
|
879
|
-
return
|
|
949
|
+
return ve(t, e);
|
|
880
950
|
const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
|
|
881
|
-
await
|
|
882
|
-
const o = await
|
|
883
|
-
promptText: await y(
|
|
951
|
+
await v({ text: f("updatingDesign", e) }, e);
|
|
952
|
+
const o = await E({
|
|
953
|
+
promptText: await y(T, "updateDesign"),
|
|
884
954
|
modelTier: "advanced",
|
|
885
955
|
temperature: 0,
|
|
886
956
|
schema: dt,
|
|
@@ -896,12 +966,12 @@ Description: ${c.description}`).join(`
|
|
|
896
966
|
summary: a,
|
|
897
967
|
status: "success"
|
|
898
968
|
};
|
|
899
|
-
const
|
|
969
|
+
const u = (p) => {
|
|
900
970
|
try {
|
|
901
971
|
return JSON.parse(p);
|
|
902
972
|
} catch {
|
|
903
|
-
const
|
|
904
|
-
switch (
|
|
973
|
+
const S = p.replace(/[\u0000-\u001F]/g, (Y) => {
|
|
974
|
+
switch (Y) {
|
|
905
975
|
case "\b":
|
|
906
976
|
return "\\b";
|
|
907
977
|
case "\f":
|
|
@@ -914,45 +984,45 @@ Description: ${c.description}`).join(`
|
|
|
914
984
|
case " ":
|
|
915
985
|
return "\\t";
|
|
916
986
|
default:
|
|
917
|
-
return "\\u" +
|
|
987
|
+
return "\\u" + Y.charCodeAt(0).toString(16).padStart(4, "0");
|
|
918
988
|
}
|
|
919
989
|
});
|
|
920
990
|
try {
|
|
921
|
-
return JSON.parse(
|
|
991
|
+
return JSON.parse(S);
|
|
922
992
|
} catch {
|
|
923
993
|
return p;
|
|
924
994
|
}
|
|
925
995
|
}
|
|
926
|
-
},
|
|
996
|
+
}, m = [...l.map((p) => ({
|
|
927
997
|
op: p.op,
|
|
928
998
|
path: p.path.replace(/\/+$/, ""),
|
|
929
|
-
...p.value != null && p.value !== "" ? { value:
|
|
999
|
+
...p.value != null && p.value !== "" ? { value: u(p.value) } : {},
|
|
930
1000
|
...p.from != null && p.from !== "" ? { from: p.from } : {}
|
|
931
|
-
}))].sort((p,
|
|
932
|
-
|
|
1001
|
+
}))].sort((p, S) => p.op !== "remove" || S.op !== "remove" ? 0 : S.path.localeCompare(p.path, void 0, { numeric: !0 })), h = structuredClone(
|
|
1002
|
+
oe(s)
|
|
933
1003
|
);
|
|
934
1004
|
try {
|
|
935
|
-
|
|
1005
|
+
Be(h, m, !0);
|
|
936
1006
|
} catch (p) {
|
|
937
1007
|
console.warn(
|
|
938
1008
|
"[SolutionBuilder] updateDesign JSON patch failed:",
|
|
939
|
-
{ error: p, llmResponse: o, patches:
|
|
1009
|
+
{ error: p, llmResponse: o, patches: m, patchTarget: h }
|
|
940
1010
|
);
|
|
941
|
-
const
|
|
1011
|
+
const S = f("applyChangeFailed", e);
|
|
942
1012
|
return {
|
|
943
|
-
outputMessage:
|
|
944
|
-
summary:
|
|
1013
|
+
outputMessage: S,
|
|
1014
|
+
summary: S,
|
|
945
1015
|
status: "success"
|
|
946
1016
|
};
|
|
947
1017
|
}
|
|
948
|
-
const
|
|
949
|
-
{ response: "", ...
|
|
1018
|
+
const d = I(
|
|
1019
|
+
{ response: "", ...h },
|
|
950
1020
|
{ itemId: s.solution?.itemId ?? null }
|
|
951
|
-
), g =
|
|
1021
|
+
), g = V.safeParse(d);
|
|
952
1022
|
if (!g.success) {
|
|
953
1023
|
console.warn(
|
|
954
1024
|
"[SolutionBuilder] updateDesign schema validation failed:",
|
|
955
|
-
{ errors: g.error.issues, llmResponse: o, patchedDesign:
|
|
1025
|
+
{ errors: g.error.issues, llmResponse: o, patchedDesign: d }
|
|
956
1026
|
);
|
|
957
1027
|
const p = f("applyChangeFailed", e);
|
|
958
1028
|
return {
|
|
@@ -961,11 +1031,11 @@ Description: ${c.description}`).join(`
|
|
|
961
1031
|
status: "success"
|
|
962
1032
|
};
|
|
963
1033
|
}
|
|
964
|
-
const { response:
|
|
965
|
-
|
|
1034
|
+
const { response: A, featureLayer: C, ..._ } = g.data, Se = ae(
|
|
1035
|
+
C,
|
|
966
1036
|
s.featureLayer
|
|
967
|
-
),
|
|
968
|
-
{ ...
|
|
1037
|
+
), w = I(
|
|
1038
|
+
{ ..._, featureLayer: Se },
|
|
969
1039
|
{
|
|
970
1040
|
itemId: s.solution?.itemId,
|
|
971
1041
|
sourceBuildSolution: s.sourceBuildSolution,
|
|
@@ -973,22 +1043,33 @@ Description: ${c.description}`).join(`
|
|
|
973
1043
|
params: s.params ?? null
|
|
974
1044
|
}
|
|
975
1045
|
);
|
|
976
|
-
let
|
|
977
|
-
if (
|
|
1046
|
+
let F = N(t.selectedTemplate);
|
|
1047
|
+
if (F?.initialTemplate || (await W(e), F = N(t.selectedTemplate)), !F?.initialTemplate)
|
|
978
1048
|
throw new Error("No hydrated templates are available for solution design.");
|
|
979
|
-
const
|
|
980
|
-
if (!
|
|
981
|
-
|
|
1049
|
+
const q = new pe(w, F.initialTemplate, !1);
|
|
1050
|
+
if (!q.isValid) {
|
|
1051
|
+
console.warn(
|
|
982
1052
|
"[SolutionBuilder] updateDesign validation failed:",
|
|
983
|
-
{ issues:
|
|
984
|
-
)
|
|
985
|
-
|
|
1053
|
+
{ issues: q.issues, llmResponse: o, patchedDesign: w }
|
|
1054
|
+
);
|
|
1055
|
+
const p = await ft({
|
|
1056
|
+
query: n,
|
|
1057
|
+
validationIssues: q.issues,
|
|
1058
|
+
recentMessages: i,
|
|
1059
|
+
fallbackMessage: f("applyChangeFailed", e),
|
|
1060
|
+
promptModules: T
|
|
1061
|
+
});
|
|
1062
|
+
return {
|
|
1063
|
+
outputMessage: p,
|
|
1064
|
+
summary: p,
|
|
1065
|
+
status: "success"
|
|
986
1066
|
};
|
|
987
|
-
|
|
988
|
-
|
|
1067
|
+
}
|
|
1068
|
+
const Ie = w.sourceBuildSolution, Q = ge(w, Ie);
|
|
1069
|
+
if (!Q.ok) {
|
|
989
1070
|
console.warn(
|
|
990
1071
|
"[SolutionBuilder] updateDesign Esri JSON conversion failed:",
|
|
991
|
-
{ error:
|
|
1072
|
+
{ error: Q.error, llmResponse: o, design: w }
|
|
992
1073
|
);
|
|
993
1074
|
const p = f("applyChangeFailed", e);
|
|
994
1075
|
return {
|
|
@@ -997,44 +1078,44 @@ Description: ${c.description}`).join(`
|
|
|
997
1078
|
status: "success"
|
|
998
1079
|
};
|
|
999
1080
|
}
|
|
1000
|
-
return
|
|
1081
|
+
return me(w), {
|
|
1001
1082
|
outputMessage: a,
|
|
1002
1083
|
summary: a,
|
|
1003
1084
|
status: "success",
|
|
1004
|
-
currentDesign:
|
|
1085
|
+
currentDesign: w
|
|
1005
1086
|
};
|
|
1006
|
-
},
|
|
1087
|
+
}, Ut = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Ot = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", zt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", jt = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Jt = () => new z(Dt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessInitialRequest", $t).addNode("invalidUseCaseExit", Rt).addNode("selectTemplateHIL", Mt).addNode("findExistingSolutions", Nt).addNode("confirmContinueBuildingHIL", Pt).addNode("declineContinueBuildingExit", Bt).addNode("designSolution", ve).addNode("updateDesign", qt).addEdge(j, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Ut, {
|
|
1007
1088
|
updateDesign: "updateDesign",
|
|
1008
1089
|
assessInitialRequest: "assessInitialRequest"
|
|
1009
|
-
}).addConditionalEdges("assessInitialRequest",
|
|
1090
|
+
}).addConditionalEdges("assessInitialRequest", Ot, {
|
|
1010
1091
|
invalidUseCaseExit: "invalidUseCaseExit",
|
|
1011
1092
|
selectTemplateHIL: "selectTemplateHIL",
|
|
1012
1093
|
findExistingSolutions: "findExistingSolutions"
|
|
1013
|
-
}).addEdge("invalidUseCaseExit",
|
|
1094
|
+
}).addEdge("invalidUseCaseExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", zt, {
|
|
1014
1095
|
confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
|
|
1015
1096
|
designSolution: "designSolution"
|
|
1016
|
-
}).addConditionalEdges("confirmContinueBuildingHIL",
|
|
1097
|
+
}).addConditionalEdges("confirmContinueBuildingHIL", jt, {
|
|
1017
1098
|
declineContinueBuildingExit: "declineContinueBuildingExit",
|
|
1018
1099
|
designSolution: "designSolution"
|
|
1019
|
-
}).addEdge("declineContinueBuildingExit",
|
|
1020
|
-
await y(
|
|
1021
|
-
const
|
|
1022
|
-
tool:
|
|
1023
|
-
confidence:
|
|
1024
|
-
rationale:
|
|
1025
|
-
builderExclusion:
|
|
1026
|
-
}),
|
|
1100
|
+
}).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
|
|
1101
|
+
await y(T, "description");
|
|
1102
|
+
const Gt = L.object({
|
|
1103
|
+
tool: L.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
|
|
1104
|
+
confidence: L.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
|
|
1105
|
+
rationale: L.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
|
|
1106
|
+
builderExclusion: L.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
|
|
1107
|
+
}), P = /* @__PURE__ */ Object.assign({
|
|
1027
1108
|
"./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
|
|
1028
1109
|
"./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
|
|
1029
1110
|
"./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default),
|
|
1030
1111
|
"./prompts/responseOptionsBuilderExclusion.md": () => import("../../chunks/responseOptionsBuilderExclusion.js").then((t) => t.default),
|
|
1031
1112
|
"./prompts/responseOptionsDefault.md": () => import("../../chunks/responseOptionsDefault.js").then((t) => t.default)
|
|
1032
|
-
}),
|
|
1113
|
+
}), K = () => {
|
|
1033
1114
|
const t = new CustomEvent("assistantProcessing", {
|
|
1034
1115
|
detail: !1
|
|
1035
1116
|
});
|
|
1036
1117
|
window.dispatchEvent(t);
|
|
1037
|
-
},
|
|
1118
|
+
}, we = b.Root({
|
|
1038
1119
|
...J(),
|
|
1039
1120
|
selectedTool: b({
|
|
1040
1121
|
reducer: (t, e) => e ?? null,
|
|
@@ -1048,9 +1129,9 @@ const zt = E.object({
|
|
|
1048
1129
|
reducer: (t, e) => e ?? !1,
|
|
1049
1130
|
default: () => !1
|
|
1050
1131
|
})
|
|
1051
|
-
}),
|
|
1052
|
-
const s =
|
|
1053
|
-
await
|
|
1132
|
+
}), Vt = async (t, e) => {
|
|
1133
|
+
const s = B(e);
|
|
1134
|
+
await v(
|
|
1054
1135
|
{ text: s?.builderMessages.understandingRequest },
|
|
1055
1136
|
e
|
|
1056
1137
|
);
|
|
@@ -1062,71 +1143,71 @@ const zt = E.object({
|
|
|
1062
1143
|
} catch {
|
|
1063
1144
|
a = !1;
|
|
1064
1145
|
}
|
|
1065
|
-
const l = await y(
|
|
1146
|
+
const l = await y(P, "classifyIntent"), u = await E({
|
|
1066
1147
|
promptText: l,
|
|
1067
1148
|
modelTier: "advanced",
|
|
1068
1149
|
temperature: 0,
|
|
1069
|
-
schema:
|
|
1150
|
+
schema: Gt,
|
|
1070
1151
|
messages: i,
|
|
1071
1152
|
inputVariables: { query: n, activeSolutionDesign: a }
|
|
1072
1153
|
});
|
|
1073
1154
|
return {
|
|
1074
|
-
selectedTool:
|
|
1075
|
-
intentRationale:
|
|
1076
|
-
builderExclusion:
|
|
1155
|
+
selectedTool: u.tool,
|
|
1156
|
+
intentRationale: u.rationale,
|
|
1157
|
+
builderExclusion: u.builderExclusion
|
|
1077
1158
|
};
|
|
1078
|
-
}, Jt = async (t, e) => {
|
|
1079
|
-
const n = await We().compile().invoke(t, e);
|
|
1080
|
-
return W(), n;
|
|
1081
|
-
}, Gt = async (t, e) => {
|
|
1082
|
-
const n = await Ot().compile().invoke(t, e);
|
|
1083
|
-
return W(), n;
|
|
1084
1159
|
}, Ht = async (t, e) => {
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1160
|
+
const n = await Ke().compile().invoke(t, e);
|
|
1161
|
+
return K(), n;
|
|
1162
|
+
}, Wt = async (t, e) => {
|
|
1163
|
+
const n = await Jt().compile().invoke(t, e);
|
|
1164
|
+
return K(), n;
|
|
1165
|
+
}, Kt = async (t, e) => {
|
|
1166
|
+
const s = B(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.", o = t.builderExclusion ? "responseOptionsBuilderExclusion" : "responseOptionsDefault";
|
|
1167
|
+
await v(
|
|
1087
1168
|
{ text: s?.executingSolutionsAssistantAgent },
|
|
1088
1169
|
e
|
|
1089
1170
|
);
|
|
1090
|
-
const a = await y(
|
|
1091
|
-
|
|
1171
|
+
const a = await y(P, "assistantResponse"), l = await y(
|
|
1172
|
+
P,
|
|
1092
1173
|
o
|
|
1093
|
-
),
|
|
1174
|
+
), u = t.agentExecutionContext.messages.slice(-11), c = await Pe({
|
|
1094
1175
|
promptText: a,
|
|
1095
1176
|
modelTier: "advanced",
|
|
1096
1177
|
temperature: 0,
|
|
1097
|
-
messages:
|
|
1178
|
+
messages: u,
|
|
1098
1179
|
inputVariables: { query: n, rationale: i, responseOptions: l }
|
|
1099
1180
|
});
|
|
1100
|
-
return
|
|
1101
|
-
outputMessage:
|
|
1102
|
-
summary:
|
|
1181
|
+
return K(), {
|
|
1182
|
+
outputMessage: c,
|
|
1183
|
+
summary: c,
|
|
1103
1184
|
status: "success"
|
|
1104
1185
|
};
|
|
1105
|
-
},
|
|
1186
|
+
}, Qt = (t) => t.selectedTool ?? "other", Yt = () => new z(we).addNode("classifyIntent", Vt).addNode("routeToExplorer", Ht).addNode("routeToBuilder", Wt).addNode("assistantResponse", Kt).addEdge(j, "classifyIntent").addConditionalEdges("classifyIntent", Qt, {
|
|
1106
1187
|
explorer: "routeToExplorer",
|
|
1107
1188
|
builder: "routeToBuilder",
|
|
1108
1189
|
other: "assistantResponse"
|
|
1109
|
-
}).addEdge("routeToExplorer",
|
|
1190
|
+
}).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), Xt = await y(P, "description"), Zt = {
|
|
1110
1191
|
id: "solutionsAssistant",
|
|
1111
1192
|
name: "Solutions Assistant Agent",
|
|
1112
|
-
description:
|
|
1113
|
-
createGraph:
|
|
1114
|
-
workspace:
|
|
1115
|
-
},
|
|
1116
|
-
class
|
|
1193
|
+
description: Xt,
|
|
1194
|
+
createGraph: Yt,
|
|
1195
|
+
workspace: we
|
|
1196
|
+
}, es = "https://links.esri.com/solutions/agol-organizational-account", ts = "https://links.esri.com/solutions/configure-assistants";
|
|
1197
|
+
class ss extends ke {
|
|
1117
1198
|
constructor() {
|
|
1118
1199
|
super(), this.open = !1, this.userFirstName = "", this.builderVisible = !1, this.hasActiveBuilderDesign = !1, this._conversationId = void 0, this._orgSettings = {
|
|
1119
1200
|
aiAssistantsEnabled: !1,
|
|
1120
1201
|
blockBetaApps: !0,
|
|
1121
1202
|
colocateCompute: !1
|
|
1122
|
-
}, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer =
|
|
1203
|
+
}, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer = ee({
|
|
1123
1204
|
context: Ae,
|
|
1124
1205
|
subscribe: !0,
|
|
1125
1206
|
callback: (e) => {
|
|
1126
|
-
e?.portalURL && (
|
|
1207
|
+
e?.portalURL && (te.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
|
|
1127
1208
|
}
|
|
1128
|
-
}), this._builderDesignContextConsumer =
|
|
1129
|
-
context:
|
|
1209
|
+
}), this._builderDesignContextConsumer = ee({
|
|
1210
|
+
context: Le,
|
|
1130
1211
|
subscribe: !0,
|
|
1131
1212
|
callback: (e) => {
|
|
1132
1213
|
e?.design && (this._solutionDesignJson = JSON.stringify(e.design, null, 2));
|
|
@@ -1172,29 +1253,29 @@ class Xt extends ke {
|
|
|
1172
1253
|
this._checkURLOpenParameter();
|
|
1173
1254
|
}
|
|
1174
1255
|
load() {
|
|
1175
|
-
this._configContextConsumer.value?.portalURL && (
|
|
1256
|
+
this._configContextConsumer.value?.portalURL && (te.portalUrl = this._configContextConsumer.value.portalURL);
|
|
1176
1257
|
}
|
|
1177
1258
|
firstUpdated(e) {
|
|
1178
1259
|
this._loadUserFirstName();
|
|
1179
1260
|
}
|
|
1180
1261
|
willUpdate(e) {
|
|
1181
|
-
e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (
|
|
1262
|
+
e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (de(this._configContextConsumer.value?.authentication.Portal, this._configContextConsumer.value?.userSession?.token, this._configContextConsumer.value?.locale ?? "en"), this._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
|
|
1182
1263
|
}
|
|
1183
1264
|
_renderNoSign() {
|
|
1184
|
-
return
|
|
1265
|
+
return k`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage ?? Z} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`;
|
|
1185
1266
|
}
|
|
1186
1267
|
_renderNoPermission() {
|
|
1187
|
-
return
|
|
1268
|
+
return k`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ee(this._translations.noPermissionMessage.replace("{{orgUrl}}", es).replace("{{configAI}}", ts))}</div></calcite-notice>`;
|
|
1188
1269
|
}
|
|
1189
1270
|
render() {
|
|
1190
1271
|
let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
|
|
1191
|
-
return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]),
|
|
1272
|
+
return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), k`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token ? this._configContextConsumer.value?.authentication?.CanUseAI ? k`${!this._isMobile && k`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.builder} text-enabled .indicator=${this.hasActiveBuilderDesign} .disabled=${!this.hasActiveBuilderDesign} .active=${this.builderVisible} selection-appearance=highlight @click=${() => {
|
|
1192
1273
|
window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
|
|
1193
|
-
}} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile &&
|
|
1274
|
+
}} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && k`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.solutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? Z} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
|
|
1194
1275
|
console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0;
|
|
1195
|
-
const n = Date.now(), i =
|
|
1276
|
+
const n = Date.now(), i = Fe(n), o = s.detail || "Unknown";
|
|
1196
1277
|
this._telemetry?.logEvent({
|
|
1197
|
-
category:
|
|
1278
|
+
category: De.ASSISTANT,
|
|
1198
1279
|
action: "Chat",
|
|
1199
1280
|
dimensions: [o],
|
|
1200
1281
|
metrics: [i]
|
|
@@ -1207,9 +1288,9 @@ class Xt extends ke {
|
|
|
1207
1288
|
this._queryElementInShadowDom(this.el, ".footer-container", !1);
|
|
1208
1289
|
}} @arcgisInterruptSubmit=${() => {
|
|
1209
1290
|
this._queryElementInShadowDom(this.el, ".footer-container", !1);
|
|
1210
|
-
}} ${
|
|
1291
|
+
}} ${Re(this._assistantRef)}><calcite-button appearance=transparent id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${this._translations.tooltips.newChat} @click=${() => {
|
|
1211
1292
|
this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1);
|
|
1212
|
-
}} scale=
|
|
1293
|
+
}} round scale=m slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${Zt} .context=${{
|
|
1213
1294
|
token: this._configContextConsumer.value?.userSession?.token,
|
|
1214
1295
|
configContext: this._configContextConsumer.value,
|
|
1215
1296
|
convoId: this._conversationId,
|
|
@@ -1217,16 +1298,13 @@ class Xt extends ke {
|
|
|
1217
1298
|
assistantRef: this._assistantRef,
|
|
1218
1299
|
translations: this._translations,
|
|
1219
1300
|
solutionDesignJson: this._solutionDesignJson,
|
|
1220
|
-
updateSuggestedPrompts: (s) => {
|
|
1221
|
-
this._suggestedPrompts = s;
|
|
1222
|
-
},
|
|
1223
1301
|
setConversationId: (s) => {
|
|
1224
1302
|
this._conversationId = s;
|
|
1225
1303
|
},
|
|
1226
1304
|
clearSuggestedPrompts: () => {
|
|
1227
1305
|
this._suggestedPrompts = [];
|
|
1228
1306
|
}
|
|
1229
|
-
}}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=
|
|
1307
|
+
}}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=solid kind=neutral .label=${this._translations.betaTag} scale=s>${this._translations.betaTag}</calcite-chip><span>${this._translations.disclaimerMessage} <a href=https://links.esri.com/solutions/security-concern rel="noopener noreferrer" target=_blank>${this._translations.reportConcern}</a></span></div>` : this._renderNoPermission() : this._renderNoSign()}<calcite-action icon=x id=closeAssistantButton .label=${this._translations.tooltips.close} @click=${() => {
|
|
1230
1308
|
this.closeAssistant.emit(!0);
|
|
1231
1309
|
}} slot=header-actions-end .text=${this._translations.tooltips.close}></calcite-action><calcite-tooltip placement=bottom reference-element=closeAssistantButton><span>${this._translations.tooltips.close}</span></calcite-tooltip></calcite-panel>`;
|
|
1232
1310
|
}
|
|
@@ -1245,14 +1323,14 @@ class Xt extends ke {
|
|
|
1245
1323
|
}
|
|
1246
1324
|
}
|
|
1247
1325
|
_parseAgentPickedAndTask(e) {
|
|
1248
|
-
const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((
|
|
1326
|
+
const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((d, g) => g.id - d.id).find((d) => d.role === "user" && d.id <= e.id)?.content || null, l = n.find((d) => typeof d == "string" && d.includes("Agent picked:")) ?? null;
|
|
1249
1327
|
if (!l)
|
|
1250
1328
|
return { agentPicked: null, taskAssigned: null, userMessage: a };
|
|
1251
|
-
const
|
|
1252
|
-
if (!
|
|
1329
|
+
const u = /Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i, c = l.match(u);
|
|
1330
|
+
if (!c)
|
|
1253
1331
|
return { agentPicked: null, taskAssigned: null, userMessage: a };
|
|
1254
|
-
const
|
|
1255
|
-
return { agentPicked:
|
|
1332
|
+
const m = c[1].trim(), h = c[2].trim();
|
|
1333
|
+
return { agentPicked: m, taskAssigned: h, userMessage: a };
|
|
1256
1334
|
}
|
|
1257
1335
|
_emitItemIdFromAI(e) {
|
|
1258
1336
|
const s = new CustomEvent("solutionIDFromAssistant", {
|
|
@@ -1285,7 +1363,7 @@ class Xt extends ke {
|
|
|
1285
1363
|
});
|
|
1286
1364
|
}
|
|
1287
1365
|
}
|
|
1288
|
-
Ce("arcgis-solutions-assistant",
|
|
1366
|
+
Ce("arcgis-solutions-assistant", ss);
|
|
1289
1367
|
export {
|
|
1290
|
-
|
|
1368
|
+
ss as ArcgisSolutionsAssistant
|
|
1291
1369
|
};
|