@arcgis/portal-components 5.1.0-next.98 → 5.1.0
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/README.md +2 -2
- package/dist/cdn/3AFLX4RZ.js +31 -0
- package/dist/cdn/3XDKOO6K.js +2 -0
- package/dist/cdn/4ISLOZQ3.js +2 -0
- package/dist/cdn/{TTZBF4KI.js → 563BUCQX.js} +1 -1
- package/dist/cdn/{JOYFDD4B.js → 5BPXS3WU.js} +1 -1
- package/dist/cdn/65JPRIL4.js +98 -0
- package/dist/cdn/6K7GPATC.js +2 -0
- package/dist/cdn/6RA33SDH.js +34 -0
- package/dist/cdn/7IAAHGM2.js +2 -0
- package/dist/cdn/{SOPWLUP4.js → ABRHXRFP.js} +1 -1
- package/dist/cdn/BCUEYBNI.js +2 -0
- package/dist/cdn/CAQR2NSG.js +4 -0
- package/dist/cdn/D42PED2R.js +2 -0
- package/dist/cdn/DEHBTA5D.js +2 -0
- package/dist/cdn/EZ7YC5N5.js +99 -0
- package/dist/cdn/{SEZNHA2J.js → FK7QXBE2.js} +1 -1
- package/dist/cdn/IBYY5ORN.js +122 -0
- package/dist/cdn/ITFWXO7A.js +49 -0
- package/dist/cdn/JWUQZ52F.js +134 -0
- package/dist/cdn/KBYWRUKO.js +2 -0
- package/dist/cdn/KFH2OM2D.js +2 -0
- package/dist/cdn/{GPPEHGUO.js → LVUHKMSB.js} +1 -1
- package/dist/cdn/NDKFZPYE.js +2 -0
- package/dist/cdn/NX4L2LC2.js +2 -0
- package/dist/cdn/OYABHYVF.js +2 -0
- package/dist/cdn/{V5ZWDMLE.js → PIZFXU2N.js} +1 -1
- package/dist/cdn/QOCYNLQ7.js +71 -0
- package/dist/cdn/{ERNT74VA.js → QUYBZ3J7.js} +1 -1
- package/dist/cdn/R2XPTETT.js +22 -0
- package/dist/cdn/R53CO5LK.js +77 -0
- package/dist/cdn/{HQAGVE4P.js → RNRPTWHT.js} +17 -1
- package/dist/cdn/{32DRTMS4.js → SFKRR7GW.js} +1 -1
- package/dist/cdn/SQ54YADV.js +533 -0
- package/dist/cdn/SX4KDMYV.js +69 -0
- package/dist/cdn/TKQAFRBM.js +36 -0
- package/dist/cdn/TNDL67UN.js +2 -0
- package/dist/cdn/{LJUIMVQ2.js → W4RAJWHA.js} +1 -1
- package/dist/cdn/WHLL7DNC.js +146 -0
- package/dist/cdn/X3LZYQ4U.js +66 -0
- package/dist/cdn/XR4PMNYP.js +2 -0
- package/dist/cdn/YJK6JAPE.js +422 -0
- package/dist/cdn/{5WK4GJK2.js → Z5UVAVHJ.js} +1 -1
- package/dist/cdn/{3OTUKLZI.js → ZCL2V7W3.js} +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-ai-assistant-interrupt/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/portal-item-type/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/portal-item-type/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/fieldAddDelete.js +1 -1
- package/dist/chunks/functionalities.js +10 -0
- package/dist/chunks/groups.js +86 -0
- package/dist/chunks/item.js +124 -22
- package/dist/chunks/portal.js +48 -8
- package/dist/chunks/runtime.js +3 -3
- package/dist/chunks/user.js +4 -109
- package/dist/chunks/user2.js +113 -0
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +7 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +20 -6
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +738 -124
- package/dist/components/arcgis-portal-ai-assistant/index.js +2 -1
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +51 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/index.d.ts +1 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +6 -0
- package/dist/components/arcgis-portal-classification-config/customElement.js +44 -37
- package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.d.ts +2 -1
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +38 -41
- package/dist/components/arcgis-portal-mentionable-text-area/utils.d.ts +7 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.d.ts +3 -3
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +131 -63
- package/dist/components/arcgis-portal-user-avatar/customElement.js +24 -27
- package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +9 -1
- package/dist/types/preact.d.ts +10 -1
- package/dist/types/react.d.ts +11 -1
- package/dist/types/stencil.d.ts +9 -1
- package/package.json +12 -10
- package/dist/cdn/2UAWM45V.js +0 -2
- package/dist/cdn/4XGP5S32.js +0 -2
- package/dist/cdn/AMCZ4UZQ.js +0 -2
- package/dist/cdn/CVTNZK7F.js +0 -2
- package/dist/cdn/DAD7LUKA.js +0 -2
- package/dist/cdn/F5QGCGHF.js +0 -2
- package/dist/cdn/HGOHRPAD.js +0 -2
- package/dist/cdn/IZQBJ5VK.js +0 -2
- package/dist/cdn/JFG6QVNF.js +0 -2
- package/dist/cdn/LCWXNCUX.js +0 -396
- package/dist/cdn/NJMHL2Y7.js +0 -4
- package/dist/cdn/OGQ2PD7M.js +0 -2
- package/dist/cdn/S2PHM4WZ.js +0 -2
- package/dist/cdn/ZAHK6WQT.js +0 -138
- package/dist/chunks/item2.js +0 -128
- /package/dist/cdn/{3OPKWSWR.js → 34BMNP6G.js} +0 -0
- /package/dist/cdn/{JQKWT7SI.js → FPAFR5IL.js} +0 -0
- /package/dist/cdn/{N5K4DR3J.js → FPKINYFN.js} +0 -0
package/README.md
CHANGED
|
@@ -8,5 +8,5 @@ It is not intended to be used directly, but rather used as a dependency by other
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.
|
|
12
|
-
For third party notices, see https://js.arcgis.com/5.
|
|
11
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.1/LICENSE.txt.
|
|
12
|
+
For third party notices, see https://js.arcgis.com/5.1/third-party-notices.txt.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`# ArcgisKnowledge Tool Instructions
|
|
3
|
+
|
|
4
|
+
You are an assistant that helps users answer questions and perform operations on their knowledge graph, map or link chart. You have been assigned the task below, which must be achieved by calling a single tool.
|
|
5
|
+
|
|
6
|
+
## Task Details:
|
|
7
|
+
|
|
8
|
+
Assigned task:
|
|
9
|
+
{assignedTask}
|
|
10
|
+
|
|
11
|
+
User Request:
|
|
12
|
+
{userRequest}
|
|
13
|
+
|
|
14
|
+
Prior steps:
|
|
15
|
+
{priorSteps}
|
|
16
|
+
|
|
17
|
+
Context type:
|
|
18
|
+
{contextType}
|
|
19
|
+
|
|
20
|
+
## Rules:
|
|
21
|
+
|
|
22
|
+
1. Use the provided context type above for the following rule. If the context type is a map, you may never call any of the following arcgisKnowledge tools: changeNonspatialVisibility, applyLayout, createLinkChart.
|
|
23
|
+
|
|
24
|
+
2. Use the provided context type above for the following rule. If the context type is a knowledgeGraph, you may never call any of the following arcgisKnowledge tools: changeNonspatialVisibility, applyLayout, createLinkChart, addRecords.
|
|
25
|
+
|
|
26
|
+
3. If no tools apply to the assigned task, return zero tool calls and an empty message.
|
|
27
|
+
|
|
28
|
+
4. If a tool is found for the assigned task, call exactly one arcgisKnowledge tool, with the appropriate arguments given the assigned task. Use the provided user request or prior steps only if needed for context based on the assigned task.
|
|
29
|
+
|
|
30
|
+
5. CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call or ZERO tool calls.
|
|
31
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import a from"./563BUCQX.js";import"./BCUEYBNI.js";import{a as x}from"./PIZFXU2N.js";import"./SFKRR7GW.js";import{K as I,L as P,N as y,Q as M,R as D,h as S,j as g}from"./CAQR2NSG.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{a:A,b:j,c:G,d:C,e:T,f:E,g:k,h:b}])=>{var V=S`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,B=t=>typeof t?.role=="string"&&t?.role?t?.role:t?.roleId??t?.sourceJSON?.id;function W(t){return["org_admin","account_admin"].includes(B(t))&&!t?.roleId}function F(t){return!!(t?.roleId&&t.roleId.length>0)}function K(t){return!!t?.privileges?.includes("portal:admin:deleteItems")}function O(t,r){return r?k(t,r)||t.itemControl==="update"||b([t],r)&&W(r):!1}function z(t,r){if(!r)return!1;let a=b([t],r),e=k(t,r)||W(r)&&a,i=F(r)&&K(r);return!!(e||a&&i)}async function q({item:t,messages:r,user:a,serviceInfo:e,portal:i}){let s=J(t),o=Q(t,r,i);return{displayName:L(o,{item:t,user:a,messages:r,serviceInfo:e},!1),displayNameHosted:L(o,{item:t,user:a,messages:r,serviceInfo:e},!0),icon:s}}function _(t){if(t.type!=="Scene Service"&&t.type!=="3DTiles Service")return null;let r=t.typeKeywords;return r?.includes("IntegratedMesh")?"mesh":r?.includes("3DObject")?"3D object":r?.includes("Point")?"3D point":r?.includes("PointCloud")?"point cloud":r?.includes("Building")?"building":r?.includes("Voxel")?"voxel":null}function L(t,{item:r,user:a,messages:e,serviceInfo:i},s=!0){let o=r.type==="Image Service";if(!r||!e||!(s&&a)&&r.type!=="Image Service")return t;let n=r.type==="Feature Service"&&r.typeKeywords?.includes("UtilityNetwork"),l=r.type==="Feature Service"&&r.typeKeywords?.includes("ParcelFabric"),u=a&&O(r,a),d=a&&z(r,a),p=A(r),v=(u||d)&&p,f=(u||d)&&s;if(l)return`${t} (${v?e.parcelFabricHosted:e.parcelFabric})`;if(n){let c=v?`, ${e.hosted}`:"";return`${t} (${e.utilityNetwork}${c})`}if(o){let c=r.typeKeywords?.includes("Elevation 3D Layer"),$=f&&p,N=E(r,i)&&!c,R=T(r,i)&&!c,m=`${$?"Hosted":""}${R?"Collection":""}${N?"Multidimensional":""}`,w=m&&`${m[0].toLowerCase()}${m.slice(1)}`,H=w?` (${e[w]})`:"";return`${t}${H}`}if(f){if(r.type==="Scene Service"||r.type==="3DTiles Service"){let c=_(r);c&&(t=`${t} - ${e[c]||c}`)}if(p){let c=` (${j(r)?e.hostedView:e.hosted})`;return`${t}${c}`}return G(r)?`${t} (${e.locatorView})`:C(r)?`${t} (${e.photoLocations})`:t}return t}var U={"360 VR Experience":"360 VR experience","3DTiles Package":"3D tiles package","3DTiles Service":"3D tiles layer","Addin Package":"Add-in package","Administrative Report":"Administrative report","Analysis Model":"Analysis model","Apache Parquet":"Apache Parquet","API Key":"API key","AppBuilder Extension":"AppBuilder extension","AppBuilder Widget Package":"AppBuilder widget package","ArcGIS Explorer Application Configuration":"ArcGIS Explorer application configuration","ArcGIS Pro Add In":"ArcGIS Pro add-in","ArcGIS Pro Configuration":"ArcGIS Pro configuration","ArcMap Document":"ArcMap document","ArcPad Package":"ArcPad package","Basemap Package":"Basemap package","Big Data Analytic":"Big data analytic","Big Data File Share":"Big data file share","CAD Drawing":"CAD drawing","CityEngine Web Scene":"CityEngine web scene","Code Attachment":"Code attachment","Code Sample":"Code sample","Color Set":"Color set","Compact Tile Package":"Compact tile package","Content Category Set":"Content category set","CSV Collection":"CSV collection","Data Pipeline":"Data pipeline","datastore catalog service":"Datastore catalog service","Deep Learning Package":"Deep learning package","Deep Learning Studio Project":"Deep Learning Studio project","Desktop Add In":"Desktop add-in","Desktop Application":"Desktop application","Desktop Application Template":"Desktop application template","Desktop Style":"Desktop style","Dictionary Style":"Dictionary style","Document Link":"Document link","Earth Configuration":"Earth configuration","Esri Classification Schema":"Esri classification schema","Esri Classifier Definition":"Esri classifier definition","Excalibur Imagery Project":"Excalibur imagery project","Experience Builder Widget":"Experience Builder widget","Experience Builder Widget Package":"Experience Builder widget package","Explorer Add In":"Explorer add-in","Explorer Layer":"Explorer layer","Explorer Map":"Explorer map","Export Package":"Export package","Feature Collection Template":"Feature collection template","Feature Service":"Feature layer","File Geodatabase":"File geodatabase","GeoBIM Application":"GeoBIM application","GeoBIM Project":"GeoBIM project","Geocoding Service":"Geocoding service","Geodata Service":"Geodata service","Geoenrichment Service":"GeoEnrichment service","Geometry Service":"Geometry service","Geoprocessing Package":"Geoprocessing package","Geoprocessing Sample":"Geoprocessing sample","Globe Document":"Globe document","Globe Layer":"Globe layer","Globe Service":"Globe service","Group Layer":"Group layer","Hub Event":"Hub event","Hub Initiative":"Hub initiative","Hub Initiative Template":"Hub initiative template","Hub Page":"Hub page","Hub Project":"Hub project","Hub Site Application":"Hub site application","Image Collection":"Image collection","Image Service":"Image service","Imagery Layer":"Imagery layer","Insights Data Engineering Model":"Insights data engineering model","Insights Data Engineering Workbook":"Insights data engineering workbook","Insights Model":"Insights model","Insights Page":"Insights page","Insights Script":"Insights script","Insights Theme":"Insights theme","Insights Workbook":"Insights workbook","Insights Workbook Package":"Insights workbook package","Integration Info":"Integration info","iWork Keynote":"iWork Keynote","iWork Numbers":"iWork Numbers","iWork Pages":"iWork Pages","Kernel Gateway Connection":"Kernel gateway connection","KML Collection":"KML collection","Knowledge Graph":"Knowledge graph","Knowledge Graph Layer":"Knowledge graph layer","Knowledge Graph Web Investigation":"Knowledge graph web investigation","Knowledge Studio Project":"Knowledge Studio project","Layer Package":"Layer package","Layer Template":"Layer template","Living Atlas Export Package":"Living Atlas export package","Locator Package":"Locator package","Map Area":"Map area","Map Document":"Map document","Map Package":"Map package","Map Service":"Map service","Map Showcase":"Map showcase","Map Template":"Map template","Media Layer":"Media layer","Mission Report":"Mission report","Mission Template":"Mission template","Mobile Application":"Mobile application","Mobile Basemap Package":"Mobile basemap package","Mobile Map Package":"Mobile map package","Mobile Scene Package":"Mobile scene package","Native Application":"Native application","Native Application Installer":"Native application installer","Network Analysis Service":"Network analysis service","Notebook Code Snippet Library":"Notebook code snippet library","Notebook Code Snippets":"Notebook code snippets","Operation View":"Operation view","Operations Dashboard Add In":"Operations Dashboard add-in","Operations Dashboard Extension":"Operations Dashboard extension","Oriented Imagery Catalog":"Oriented imagery catalog","Ortho Mapping Project":"Ortho mapping project","Ortho Mapping Template":"Ortho mapping template","Pro Map":"Pro map","Pro Presentation":"Pro presentation","Pro Project":"Pro project","Pro Report":"Pro report","Pro Report Template":"Pro report template","Project Package":"Project package","Project Template":"Project template","Published Map":"Published map","QuickCapture Project":"QuickCapture project","Raster function template":"Raster function template","Real Time Analytic":"Real time analytic","Reality Studio Project":"Reality Studio project","Reality Mapping Project":"Reality mapping project","Relational Database Connection":"Relational database connection","Replication Package":"Replication package","Report Template":"Report template","Route Layer":"Route layer","Rule Package":"Rule package","Scene Document":"Scene document","Scene Service":"Scene service","Service Connection":"Service connection","Service Definition":"Service definition","SQLite Geodatabase":"SQLite geodatabase","Statistical Data Collection":"Statistical data collection","StoryMap Theme":"StoryMap theme","Suitability Model":"Suitability model","Survey123 Add In":"Survey123 add-in","Symbol Set":"Symbol set","Task File":"Task file","Tile Layer":"Tile layer","Tile Package":"Tile package","Urban Model":"Urban model","Urban Project":"Urban project","Vector Tile Package":"Vector tile package","Vector Tile Service":"Vector tile service","Visio Document":"Visio document","Web AppBuilder Widget":"Web AppBuilder widget","Web Experience":"Web experience","Web Experience Template":"Web experience template","Web Link Chart":"Web link chart","Web Map":"Web map","Web Mapping Application":"Web mapping application","Web Scene":"Web scene","Windows Mobile Package":"Windows mobile package","Workflow Manager Package":"Workflow Manager package","Workflow Manager Service":"Workflow Manager service","Workforce Project":"Workforce project","Viewer Configuration":"Viewer configuration","XR Experience":"XR experience"};function Q(t,r,a){let e=t.typeKeywords||[];switch(t.type){case"Stream Service":return"Stream layer";case"Feature Service":case"Feature Collection":return e.includes("Sketch Layer")?"Sketch layer":e.includes("IndoorPositioningDataService")?"Indoor positioning data service":e.includes("EditExtensionIndoorsSpaces")?"Indoors Spaces feature layer":e.includes("ArcgisWorkflowJobLocation")&&e.includes("View Service")?"Workflow job location view":e.includes("ArcgisWorkflowManager")?e.includes("View Service")?"Workflow view":"Workflow layer":e.includes("Table")?"Table":e.includes("Route Layer")?"Route layer":e.includes("Markup")?"Markup":"Feature layer";case"Image Service":return e.includes("Elevation 3D Layer")?"Elevation layer":e.includes("Tiled Imagery")?"Tiled imagery layer":"Imagery layer";case"Data Store":if(!e.length)return"Data store";let s=["cloudStore_amazon","cloudStore_azure","cloudStore_azureDataLakeStore","cloudStore_Google","cloudStore_Alibaba","Cloud"].some(l=>e.includes(l)),o=r.dataStore||{bigdata:"big data file share",cloud:"cloud",cloudStorage:"cloud storage",database:"database",folder:"folder"};return s?`Data store (${a?.isPortal?o.cloudStorage:o.cloud})`:e.includes("egdb")||e.includes("nosql")?`Data store (${o.database})`:e.includes("folder")||e.includes("ArcGIS Server")&&(e.includes("dedicated")||e.includes("global"))?`Data store (${o.folder})`:!e.includes("fileShare")||!e.includes("hdfs")||!e.includes("hive")||!e.includes("dataStore")?`Data store (${o.bigdata})`:"Data store";case"Scene Service":return"Scene layer";case"Video Service":return"Video layer";case"Scene Package":return"Scene layer package";case"Geoprocessing Service":return e.includes("Web Tool")?"Tool":"Geoprocessing service";case"StoryMap":let n=e.includes("storymaptemplate");return e.includes("storymapbriefing")?n?"StoryMap template (briefing)":"StoryMap briefing":e.includes("storymapcollection")?n?"StoryMap template (collection)":"StoryMap collection":e.includes("storymapframe")?n?"StoryMap template (frame)":"StoryMap frame":n?"StoryMap template (story)":"StoryMap story";case"Geocoding Service":return"Locator";case"Geoenrichment Service":return"GeoEnrichment service";case"Microsoft Powerpoint":return"Microsoft PowerPoint";case"GeoJson":return"GeoJSON";case"Globe Service":return"Globe layer";case"Vector Tile Service":return"Tile layer";case"netCDF":return"NetCDF";case"SQLite Geodatabase":return"Mobile geodatabase";case"Style":return e.includes("Dictionary")?"Dictionary style":"Style";case"Desktop Style":return e.includes("Dictionary")?"Desktop dictionary style":"Desktop style";case"Map Service":return!e.includes("Spatiotemporal")&&(e.includes("Hosted Service")||e.includes("Tiled"))&&!e.includes("Relational")?"Tile layer":"Map image layer";case"Compact Tile Package":return"Tile package (tpkx)";case"OGCFeatureServer":return"OGC feature layer";case"3DTiles Service":return e?.includes("GaussianSplat")?"Gaussian splat layer":"3D tiles layer";case"3DTiles Package":return"3D tiles package";case"API Key":return"API key (legacy)";case"Web Mapping Application":if(e.includes("configurableApp"))return"Instant App";if(e.includes("IndoorsApp"))return"Indoors Viewer";if(e.includes("IndoorsSpaceplannerApp"))return"Indoors Space Planner";if(e.includes("IndoorsFloorPlanEditorApp"))return"Indoors Floor Plan Editor";break;case"Application":case"Mobile Application":case"Operation View":case"Desktop Application":if(e.includes("configurableApp"))return"Instant App";break}let i=U[t.type]||t.type;return i?.toLowerCase().includes("add in")?i.replace(/(add in)/giu,"add-in"):i}function J(t){let r=t.type?.toLowerCase()||"",a=t.typeKeywords||[],e=a.includes("Hosted Service");switch(r.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return a.includes("3DObject")?"3dobjecttileslayer":a.includes("IntegratedMesh")?"integratedmeshtileslayer":a.includes("GaussianSplat")?"gaussianSplatLayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(a.includes("ParcelFabric"))return"parcellayer";if(a.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";let i=a.includes("Spatiotemporal");return a.includes("Table")?i?"spatiotemporaltable":"table":r==="feature collection"&&a.includes("Sketch Layer")?"sketchlayer":a.includes("Route Layer")?"routelayer":a.includes("Markup")?"markup":i?"spatiotemporal":a.includes("UtilityNetwork")?"utilitynetwork":e?"featureshosted":"features";case"group layer":return a.includes("Map")?"layergroup2d":a.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return e||a.includes("Tiled")?"maptiles":"mapimages";case"scene service":return a.includes("Line")?"sceneweblayerline":a.includes("3DObject")?"sceneweblayermultipatch":a.includes("Point")?"sceneweblayerpoint":a.includes("IntegratedMesh")?"sceneweblayermesh":a.includes("PointCloud")?"sceneweblayerpointcloud":a.includes("Polygon")?"sceneweblayerpolygon":a.includes("Building")?"sceneweblayerbuilding":a.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"wcs":return"imagery";case"image service":return a.includes("Elevation 3D Layer")?"elevationlayer":a.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return a.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return a.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return a.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return a?.some(s=>["IndoorsApp","IndoorsSpaceplannerApp","IndoorsFloorPlanEditorApp"].includes(s))?"indoors":a.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":if(a.includes("ArcGIS Pro"))return"mapsgray";break;case"explorer map":if(a.indexOf("Explorer Document"))return"mapsgray";if(a.includes("Explorer Mapping Application"))return"datafilesgray";break;case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"cad drawing":return"cad";case"service definition":case"geojson":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return a.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"map showcase":return"mapshowcase";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"discussion":return"discussion";case"hub initiative":return"hubinitiative";case"hub page":case"site page":return"hubpage";case"hub event":return"hubevent";case"hub site application":case"site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image":return"image";case"image collection":return"imagecollection";case"style":return a.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return a.includes("Dictionary")?"dictionarydesktopstyle":"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return a.includes("storymaptemplate")?"storymapstemplate":a.includes("storymapcollection")?"storymapcollection":a.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"mission template":return"missiontemplate";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"esri spectral library":return"spectrallibrary";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";case"service connection":return"serviceconnection";case"xr experience":return"xrexperience"}return a.includes("Document")?"datafilesgray":r.includes("service")?"layers":"maps"}var h=class extends I{constructor(){super(...arguments),this.messages=x({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=V}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:r,user:a,serviceInfo:e,portal:i,item:s}=this,{displayName:o,displayNameHosted:n,icon:l}=await q({item:s,messages:r,serviceInfo:e,user:a,portal:i||s.portal});this.displayName=o,this.displayNameHosted=n,this.icon=l}render(){let{showHosted:r,displayNameHosted:a,scale:e,icon:i,hideText:s,hideIcon:o,ellipsis:n}=this;if(!i)return null;let l=r?a:this.displayName,u=l?.includes("(")?"":"‭",d=D(`./assets/portal-item-type/icons/${i}16.svg`),p=this.hideText?l:void 0;return g`${!o&&g`<span class="icon"><img src=${d??y} alt=${(p||"")??y} class=${`icon icon--${e}`}></span>`||""}${!s&&g`<span class=${P({text:!0,"text--spaced":!o,"text--ellipsis":n})} .innerHTML=${`${u}${l}`}></span>`||""}`}};M("arcgis-portal-item-type",h);return h},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as i}from"./
|
|
2
|
+
import{a as i}from"./BCUEYBNI.js";export default $arcgis.t(([a])=>{function w(e){return e.typeKeywords?.includes("Hosted Service")&&e.type!=="Insights Workbook"&&e.type!=="Insights Data Engineering Workbook"&&e.type!=="Insights Page"}function g(e){return e.typeKeywords?.includes("View Service")}function h(e){return e.typeKeywords?.includes("Service Proxy")&&e.typeKeywords.includes("Geocoding filter")}function v(e){return e.type==="Image Collection"&&e.typeKeywords?.includes("Photo locations")}function p(e){return e?.sourceType==="mosaic-dataset"||e?.serviceSourceType==="esriImageServiceSourceTypeMosaicDataset"}function P(e,t){return e.typeKeywords?.includes("Managed Image Collection")||p(t)&&!e.typeKeywords?.includes("Tiled Imagery")}function I(e,t){return!!((e.sourceJSON?.serviceProperties?.tags||e?.serviceProperties?.tags)?.includes("hasMultidimensions")||t?.hasMultidimensions)}function S(e,t){return c(e,t)||y(e,t)}function c(e,t){return e.owner===t.username}function y(e,t){let r=e.owner,n=e.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return e.portal?.isPortal&&!c(e,t)&&n&&r?.includes("esri_")&&!s.includes(r)?!1:n}var K=(e,t)=>!!t.orgId&&e.every(r=>r.isOrgItem);function j(e){return e.typeKeywords?.includes("Spatiotemporal")}function k(e){return e.typeKeywords?.includes("View Service")}function T(e){return e.typeKeywords?.includes("Hosted Service")}function b(e){return e.typeKeywords?.includes("Multi Services View")}function M(e){return e?.hasViews&&!e.sourceSchemaChangesAllowed}async function $(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal;if(r?.user){let n=`${i(r)}community/users/${r.user.username}`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.groups??[];return await Promise.resolve(o)},async()=>await Promise.reject(new Error("Failed to fetch user groups")))}return await Promise.resolve(null)}async function C(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal,n=`${i(r)}content/items/${t.id}/groups`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.admin??[],u=s.data?.member??[],l=s.data?.other??[],d=[...o,...u,...l];return await Promise.resolve(d)},async()=>await Promise.reject(new Error("Failed to fetch item groups")))}async function V(e,t,{relationshipType:r,direction:n},s=!1){let o=`${i(t)}content/items/${e}/relatedItems`;return await a(o,{query:{f:"json",relationshipType:r,direction:n,includeRecycleBin:s},responseType:"json"})}function _(e,t){return e?.some(r=>t?.some(n=>r.id===n.id&&r.capabilities.includes("updateitemcontrol")))}return{a:w,b:g,c:h,d:v,e:P,f:I,g:S,h:K,i:j,j:k,k:T,l:b,m:M,n:$,o:C,p:V,q:_}},"request")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{A as
|
|
2
|
+
import{A as k,B as w,C as V,D as m,E as h,F as A,G as D,H as y,k as P}from"./CAQR2NSG.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
|
|
3
|
+
|
|
4
|
+
You are an assistant that generates a lucene query for graph query searching.
|
|
5
|
+
|
|
6
|
+
The knowledge graph you will be searching has the following named types, and next to each named type is a list of its searchable text fields corresponding to graph properties.
|
|
7
|
+
|
|
8
|
+
The search model data below is structured as follows:
|
|
9
|
+
<TYPE_NAME> - [array, of, searchable, field, names]
|
|
10
|
+
|
|
11
|
+
{dataModelForSearch}
|
|
12
|
+
|
|
13
|
+
The user is trying to answer the following inquiry via text search:
|
|
14
|
+
{inquiry}
|
|
15
|
+
|
|
16
|
+
Return a lucene search query that will answer the user's inquiry. The generated response should be an object with the following properties:
|
|
17
|
+
|
|
18
|
+
- \`query\` - string - the generated lucene query expression that answers the user's inquiry.
|
|
19
|
+
- \`typeFilters\` - array of strings - restricts the search to only use the named types specified. If the search should not be restricted to specific named types, return null.
|
|
20
|
+
- \`typeCategoryFilter\` - either 'entity', 'relationship' or 'both' - determines whether search should be limited to only entity or relationship types, or to search both. Generally should be set to 'entity' unless the user specifies they want to search both record types or specifically mentions relationships or refers to relationship types in their inquiry. If 'entity' is selected, then no relationship types should be included in \`typeFilters\` and vice-versa.
|
|
21
|
+
- \`resultLimit\` - number (min 1) or null - the max number of search results to return. Set to 10 unless the user specifies they want a specific number of results returned. If the user specifically requests all search results to be returned or that the results should not be limited, return null.
|
|
22
|
+
|
|
23
|
+
Additional rules for the generated arguments:
|
|
24
|
+
|
|
25
|
+
- Only include specific search fields in the lucene query expression if the user inquiry specifies specific fields or properties, and the fields are present in the searchable field list of the corresponding named type shown above, otherwise search across all fields.
|
|
26
|
+
- If the user's inquiry is specific to certain entity or relationship types in the graph, then return those types as the \`typeFilters\` property. Do not attempt to use search fields for this purpose. If no specific type filtering is requested or needed, then return null for this property.
|
|
27
|
+
- Regular expressions are not supported in the lucene search syntax, so do not include such queries in the \`query\` property.
|
|
28
|
+
|
|
29
|
+
**START EXAMPLE**
|
|
30
|
+
|
|
31
|
+
### Example searchable property data:
|
|
32
|
+
|
|
33
|
+
Entity Types:
|
|
34
|
+
Author - [name, title]
|
|
35
|
+
Report - [organization, summary, full_text, tags]
|
|
36
|
+
|
|
37
|
+
Relationship Types:
|
|
38
|
+
authored - [contribution_type]
|
|
39
|
+
|
|
40
|
+
Searchable fields per type:
|
|
41
|
+
|
|
42
|
+
Author:
|
|
43
|
+
name
|
|
44
|
+
title
|
|
45
|
+
|
|
46
|
+
Report:
|
|
47
|
+
organization
|
|
48
|
+
summary
|
|
49
|
+
full_text
|
|
50
|
+
tags
|
|
51
|
+
|
|
52
|
+
authored:
|
|
53
|
+
contributionType
|
|
54
|
+
|
|
55
|
+
### User Inquiry 1:
|
|
56
|
+
|
|
57
|
+
Find the first 5 reports where summary mentions flood zoning near Sacramento, and the organization name is close to City of Sacramento Utilities, and tags containing stormwater.
|
|
58
|
+
|
|
59
|
+
### Example generated query arguments 1:
|
|
60
|
+
|
|
61
|
+
query: 'summary:"flood zoning" AND summary:Sacramento AND organization:"City of Sacramento Utilities"~2 AND tags:stormwater'
|
|
62
|
+
|
|
63
|
+
typeFilters: ['Report']
|
|
64
|
+
|
|
65
|
+
typeCategoryFilter: "entity"
|
|
66
|
+
|
|
67
|
+
resultLimit: 5
|
|
68
|
+
|
|
69
|
+
### User Inquiry 2:
|
|
70
|
+
|
|
71
|
+
Find entities containing text like 'City of Sacramento Utilities'
|
|
72
|
+
|
|
73
|
+
### Example generated query arguments 2:
|
|
74
|
+
|
|
75
|
+
query: '"City of Sacramento Utilities"~2'
|
|
76
|
+
|
|
77
|
+
typeFilters: null
|
|
78
|
+
|
|
79
|
+
typeCategoryFilter: "entity"
|
|
80
|
+
|
|
81
|
+
resultLimit: 10
|
|
82
|
+
|
|
83
|
+
### User Inquiry 3:
|
|
84
|
+
|
|
85
|
+
Find all reports authored by someone with the title of 'Researcher'
|
|
86
|
+
|
|
87
|
+
### Example generated query arguments 3:
|
|
88
|
+
|
|
89
|
+
query: 'title:"Researcher"'
|
|
90
|
+
|
|
91
|
+
typeFilters: ['Author']
|
|
92
|
+
|
|
93
|
+
typeCategoryFilter: "entity"
|
|
94
|
+
|
|
95
|
+
resultLimit: null
|
|
96
|
+
|
|
97
|
+
**END EXAMPLE**
|
|
98
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{A as n,B as o,C as a,k as r,l as s}from"./CAQR2NSG.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`## Membership Bind Parameters
|
|
3
|
+
|
|
4
|
+
The current map contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
|
|
5
|
+
|
|
6
|
+
- $entityIds
|
|
7
|
+
- $relationshipIds
|
|
8
|
+
|
|
9
|
+
Included Types:
|
|
10
|
+
{nonDynamicTypes}
|
|
11
|
+
|
|
12
|
+
Filtering rules:
|
|
13
|
+
|
|
14
|
+
- Apply membership filtering only when BOTH are true:
|
|
15
|
+
- The user is asking for data to be limited by the records already on 'the current map', 'my map', 'the knowledge graph layer' or similar.
|
|
16
|
+
- The variable in the cypher query is a type in Included Types above.
|
|
17
|
+
- IMPORTANT: In all other cases, DO NOT apply membership filtering. DO NOT include membership filters for any type not listed in Included Types above.
|
|
18
|
+
|
|
19
|
+
### START EXAMPLES
|
|
20
|
+
|
|
21
|
+
User request: 'Add all records that are connected to people on this map to the map'
|
|
22
|
+
Context: 'Person' entity in data model and included in the bind parameter types above.
|
|
23
|
+
Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
|
|
24
|
+
|
|
25
|
+
User request: 'Add all the suppliers to the map'
|
|
26
|
+
Context: 'Supplier' entity in the data model.
|
|
27
|
+
Expected Result: MATCH (s:Supplier) RETURN s
|
|
28
|
+
|
|
29
|
+
User request: 'Add all suppliers connected to plants on my map'
|
|
30
|
+
Context: 'Plant' entity in data model but not included in the bind parameter types above.
|
|
31
|
+
Expected Result: MATCH (p:Plant)-[r]->(s:Supplier) return r, s
|
|
32
|
+
|
|
33
|
+
### END EXAMPLES
|
|
34
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import c from"./563BUCQX.js";import{a as $}from"./NX4L2LC2.js";import a from"./ZCL2V7W3.js";import{a as w,d as R}from"./BCUEYBNI.js";import{a as k}from"./6K7GPATC.js";import{a as I}from"./PIZFXU2N.js";import"./SFKRR7GW.js";import{I as h,J as f,K as g,N as v,Q as b,R as y,h as u,j as l,v as d}from"./CAQR2NSG.js";import"./CFDTXKJ6.js";export default $arcgis.t(([C,j,{b:M},{p:S}])=>{var x=u`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,D=["360 VR Experience","Big Data Analytic","Dashboard","Data Pipeline","Deep Learning Studio Project","Discussion","Document Link","Excalibur Imagery Project","Feature Collection","Feature Service","Feed","Form","GeoBIM Application","GeoBIM Project","Hub Event","Hub Initiative","Hub Initiative Template","Hub Page","Hub Project","Image Service","Knowledge Graph","Knowledge Studio Project","Map Service","Map Showcase","Mission Report","Mission Template","Notebook","OGCFeatureServer","Ortho Mapping Project","Parquet Layer","Real Time Analytic","Route Layer","Scene Service","Solution","StoryMap","StoryMap Theme","Tile Layer","Urban Model","Urban Project","Vector Tile Service","Video Service","Web Experience","Web Experience Template","Web Map","Web Mapping Application","Web Scene","WFS","Workflow"],L=["3DInsetMap","3DScene","3DViz","AttachmentViewer","CapacityAnalysis","Cascade","Compare","Compare/Configure","Compare/Multiviewer","Compare/Search","Compare/SideBySideViewer_Configure","Compare/storytelling_compare","Compare/storytelling_sidepanel","Compare/storytelling_tabbed","Compare3d","CompareAnalysis","CompareMaps","CrowdsourceManager","CrowdsourcePolling","CrowdsourceReporter","Directions","Edit","Editor","Elevations","ElevationsProfile","Embed","Filter","FilterGallery","GeoForm","GeoList","GeoTour","HeaderFooter","Identify","ImageInterpretation","ImageMask","ImageVisit","ImageryViewer","ImpactSummary","InformationLookup","InteractiveFilter","InteractiveLegend","LayerShowcase","Legend","LiveMaps","LocalPerspective","MapAndAppGallery","MapCarousel","MapJournal","MapSeries","Shortlist","MapTools","MapTour","Media","MinimalGallery","Minimalist","MobileViewer","Nearby","OnePane","Panels","PanelsLegend","Profile","PublicGallery","PublicInformation","ServiceLookup","SimpleMapViewer","SimpleViewer","SocialMedia","Solutions/s2.html?app=apps2/FindEditFilter","Solutions/s2.html?app=apps2/Finder","Solutions/s2.html","StoryMapBasic","StorytellingSwipe","StorytellingTextLegend","Styler","SummaryViewer","Time","TimeAware","TwoPane","View","Viewer","ZoneLookup"],U=i=>{if(!i)return!1;let e=L.some(t=>{let a=t.includes(".html"),r=`/apps/${t}${a?"":"/"}`;return decodeURIComponent(i.url)?.includes(r)});return i.type==="Web Mapping Application"&&!!i.url&&e};function F(i){let e=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","SwipeSpyglass","Story Map"];return i.type==="Web Mapping Application"&&(E(e,i)||V(i))}function V(i){return["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"].some(e=>{let t=`/apps/${e}/index.html`;return decodeURIComponent(i.url)?.includes(t)})}function E(i,e){return i?.some(t=>e?.typeKeywords?.includes(t))}function H(i){return!!i&&D.some(e=>i.type===e)}function A(i){let e=G(i);return y(`assets/portal-item-thumbnail/${e}`)}function G(i){let e=i.type?.toLowerCase(),t=i.typeKeywords||[];switch(e){case"web mapping application":return"webapp.avif";case"mobile application":return"mobileapp.avif";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.avif";case"notebook":return"notebook.avif";case"style":return t.includes("Dictionary")?"dictionarystyle.avif":"style.avif";case"feature service":return t.includes("Location Tracking View")?"locationtrackingservice.avif":t.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.avif":"default.avif";case"pro presentation":return"pro-presentation.avif";case"reality mapping project":return"realitymappingproject.avif";case"raster function template":return"rasterfunctiontemplate.avif";case"workforce project":return"workforceproject.avif";case"hub initiative":return"hubinitiative.avif";case"hub page":return"hubpage.avif";case"hub site application":case"site application":return"hubsite.avif";case"hub event":return"hubevent.avif";case"hub project":return"hubproject.avif";case"dashboard":return t.includes("ArcGIS Dashboards")?"dashboards.avif":"opsdashboard.avif";case"geoprocessing service":return t.includes("Notebook Web Tool")?"notebookwebtool.avif":"webtool.avif";case"web scene":case"scene service":return"scene.avif";case"ortho mapping project":return"orthomappingproject.avif";case"ortho mapping template":return"orthomappingtemplate.avif";case"insights theme":return"insightstheme.avif";case"insights workbook package":return"insightsworkbookpackage.avif";case"solution":return"solution.avif";case"mobile scene package":return"mobilescenepackage.avif";case"deep learning package":return"deeplearningpackage.avif";case"big data analytic":return"bigdataanalytic.avif";case"real time analytic":return"realtimeanalytic.avif";case"feed":return"feed.avif";case"excalibur imagery project":return"excaliburimageryproject.avif";case"storymap":return t?.includes("storymapcollection")?"storymapcollection.avif":"storymap.avif";case"survey123 add in":return"survey123addin.avif";case"mission":return"mission.avif";case"mission template":return"missiontemplate.avif";case"quickcapture project":return"quickcaptureproject.avif";case"pro report":return"proreport.avif";case"pro package":return"propackage.avif";case"pro report template":return"proreporttemplate.avif";case"urban model":return"urbanmodel.avif";case"urban project":return"urbanproject.avif";case"web experience":return"webexperience.avif";case"web experience template":return"webexperiencetemplate.avif";case"experience builder widget":return"experiencebuilderwidget.avif";case"experience builder widget package":return"experiencebuilderwidgetpackage.avif";case"workflow":return"workflow.avif";case"insights script":return"insightsscript.avif";case"kernel gateway connection":return"kernelgatewayconnection.avif";case"hub initiative template":return"hubinitiativetemplate.avif";case"image service":return t?.includes("Tile Imagery")?"tiledimagerylayer.avif":"imagerylayer.avif";case"mission report":return"missionreport.avif";case"administrative report":return"administrativereport.avif";case"storymap theme":return"storymaptheme.avif";case"knowledge graph":return"knowledgegraph.avif";case"knowledge graph layer":return"knowledgegraphlayer.avif";case"knowledge studio project":return"knowledgestudio.avif";case"earth configuration":return"earthconfiguration.avif";case"link chart":return"linkchart.avif";case"investigation":return"investigation.avif";case"apache parquet":return"apacheparquet.avif";case"curated collection":return"curatedcollection.avif";case"video service":return"mediaservice.avif";case"geodata service":return"geodataservice.avif";case"suitability model":return"suitabilitymodel.avif";case"esri classifier definition":return"classifierdefinition.avif";case"esri spectral library":return"spectrallibrary.avif";case"deep learning studio project":return"deeplearningstudioproject.avif";case"esri classification schema":return"classificationschema.avif";case"insights data engineering workbook":return"dataengineeringworkbook.avif";case"insights data engineering model":return"dataengineeringmodel.avif";case"discussion":return"discussion.avif";case"api key":return"apikey.avif";case"data pipeline":return"datapipeline.avif";case"analysis model":return"analysismodel.avif";case"service connection":return"serviceconnection.avif";case"xr experience":return"xrexperience.avif";case"3dtiles service":return t?.includes("GaussianSplat")?"gaussiansplatlayer.avif":"default.avif";default:return"default.avif"}}function _(i,e,t){let{restUrl:a}=i,r=B(i),o=r?`token=${r}`:"",s=`${a}/content/items/${e.id}`;if(e.thumbnail){let c=e.thumbnailUrl;if(c){let n=new URL(c);return n.searchParams.append("w","400"),n.href}return`${s}/info/${e.thumbnail}?w=400${r?"&":""}${o}`}else if(e.type==="Image")return`${s}/data?${o}`;return A(e)}function B(i){return i?.credential?.token||i?.token||i?.user?.credential?.token||i?.portalUser?.token||""}function O({portal:i,usePortalHostname:e}){let{customBaseUrl:t,portalHostname:a,urlKey:r}=i,{protocol:o}=window.location,s=!e&&r?`${r}.${t}`:a;return`${o}//${s}`}async function W(i){if(!i?.user)return[];let e=`${w(i)}portals/self/signinSettings`;return(await j(e,{query:{f:"json"}}))?.data.blockedApps||[]}var T=5e3,p=class extends g{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=I({blocking:!0}),this.primaryActionRef=h(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:a})=>{let r=O({portal:e,usePortalHostname:!this.user});return r?`${`${r}/home`}/item.html?id=${t}${a?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=T/1e3,this.arcgisPortalReplacementItemFetch=d()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=x}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=T/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return U(e)||F(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:a}=this,r=new C({id:e,portal:t});this.item=await r?.load();let o=await S(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),s=o.data?.relatedItems?.[0];this.replacementItemInRecycleBin=s?.inRecycleBin;let c=s?.id,n=!this.replacementItemInRecycleBin&&c?new C({id:c,portal:t}):null;await n?.load(),this.replacementItem=n,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!n&&o.data?.aggregations?.total?.count>0&&o.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:n||null}),this.replacementItem=n;let m=this.replacementItem?.owner??(r?.owner||null);this.itemOwnerName=m?$(await M(m,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=H(n),this.thumbnailUrl=_(t,n??this.item),this.supportsReplacement=!!n&&this.isItemRetired(r);let P=R(this.replacementItem,await W(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!P,this.replacementId=n?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>a()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:a}=this;return t?e.replacementUnavailable:a?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:a}=this;return t?e.retiredReplacementUnavailable:a?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:a,redirectCancelled:r}=this;return r?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${a}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:a}=this;return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??v} @error=${async()=>this.thumbnailUrl=A(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${a.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&l`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${a.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:a,replacementItem:r,supportsReplacement:o,canRedirect:s,redirectCancelled:c}=this;if(!(!a||!this.isItemRetired(a)))return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${k(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(o?r:a)}</div>${s&&!c&&l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),s?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${s?void 0:"launch"} ${f(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};b("arcgis-portal-replacement-item-redirect",p);return p},"portal/PortalItem","request",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as R}from"./V5ZWDMLE.js";import"./32DRTMS4.js";import{G as c,H as d,I as S,J as F,K as V,O as M,h as C,j as l,u as y}from"./NJMHL2Y7.js";import"./CFDTXKJ6.js";export default $arcgis.t(([T,I,b,x,P,g,h,N,m,u,w,v,D,O,G,z,j,k,W,B,J])=>{var U=C`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container,.search-container .esri-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,L=class{constructor(e){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=e}init(){this.maskSymbol=new k({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new v({id:"maskLayer "}),this.overlapLayer=new v({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(e,t){let i=this.buildGraphic(e,t);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(e,t,i){i?this.remove(null,i):this.clear();let a=this.buildGraphic(e,t);if(a)return a.graphic&&this.maskLayer?.add(a.graphic),a}clear(){this.maskLayer?.removeAll()}remove(e,t){!e&&!t||(t&&!e&&(e=this.maskLayer?.graphics.getItemAt(t)),e&&this.maskLayer?.remove(e))}buildGraphic(e,t=this.maskSymbol){let i={};if(!e)return i;if(e.type==="extent"&&e.xmax===e.xmin){let o=new h({rings:[this.outerRing]});return i.graphic=new u({geometry:o,symbol:t}),i}e=this.toWGS84(e);let a,s;if(e.type==="extent"){let o=this.checkPolyOverlap(e);o?(a=o?.ring?.reverse(),s=o?.oring?.reverse()):a=[[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin],[e.xmin,e.ymax]]}let r=[];e.xmin===e.xmax?r=[this.outerRing]:r=[this.outerRing,a?.reverse()||[[]]];let n=new h({rings:r});return s&&(i.overlap=s),i.graphic=new u({geometry:n,symbol:t}),i}checkPolyOverlap(e){let t={};if(e.xmax<=e.xmin){let i=[[e.xmin,e.ymin],[180,e.ymin],[180,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]],a=[[-180,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[-180,e.ymax],[-180,e.ymin]],s=180-Math.abs(e.xmax),r=180-Math.abs(e.xmin);return s>r?(t.ring=a,t.oring=i):(t.ring=i,t.oring=a),t}else return}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}};function q(p){if(!p)return;let e=b.assetsPath;e.endsWith("/")||(e+="/"),p?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${e}esri/themes/light/main.css" />`)}var $=class extends S{constructor(){super(...arguments),this.polygonSymbol=new k({style:"solid",color:new I([227,139,79,0]),outline:{color:new I([65,105,255]),width:0}}),this.dlOverlapSymbol=new k({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=R(),this.searchContainer=c(),this.mapContainer=c(),this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=y(),this.arcgisExtentPickerClose=y(),this.arcgisExtentPickerSave=y()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=U}getExtent(){return this.getExtentValue()}async load(){if(this.itemId){if(this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==b.portalUrl&&(b.portalUrl=t)}let e=new Intl.NumberFormat(w.getLocale(),{minimumFractionDigits:1,maximumFractionDigits:1});this.minLatLabel=e.format(-90),this.maxLatLabel=e.format(90),this.minLngLabel=e.format(-180),this.maxLngLabel=e.format(180),this.item=new z({id:this.itemId,portal:this.portal}),await this.item.load()}if(this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let e=this.portal.region,t=await j(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`,{responseType:"json"});this.orgRegionExtent=t.data.defaultExtent}}async loaded(){q(this.el.shadowRoot),await this.initMap()}convertToNumber(e){return this.parseNumber(e)}setFeatureExtent(e){let t;e.spatialReference.isGeographic?t=new x({xmax:e.xmax,xmin:e.xmin,ymax:e.ymax,ymin:e.ymin,spatialReference:{wkid:4326}}):t=this.toWGS84(e),this.featureExtent?(this.featureExtent.xmin=Math.min(t.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(t.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(t.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(t.ymax,this.featureExtent.ymax)):this.featureExtent=t}async initMap(){let e=new G({basemap:"streets-vector"});if(this.extentService){let t=new O({url:this.extentService}),i=new T({baseLayers:[t],id:"org_basemap"});e.basemap=i}if(this.mask=new L(e),this.mask.init(),this.dateLineLayer=new v({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new v({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let t=await D.fromPortalItem({portalItem:this.item});t.visible=!1,e.add(t),t.when(i=>{if("layers"in i)for(let a=0;a<i.layers.length;a++)i.layers.getItemAt(a).queryExtent().then(s=>{s.extent&&this.setFeatureExtent(s.extent)});else i.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}this.view=new W({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),this.view.when(async()=>{if(this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let t=this.portal.defaultExtent.toJSON();await this.drawExtent(t),this.initialValue=t}this.initSearchWidget(),this.loading=!1})}getBasemapExtent(){try{let e,t,i,a;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let s=this.view.map.basemap.baseLayers;if(s.length>0){for(let r of s){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};e=e!==void 0&&e>n?.xmin?e:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,t=t!==void 0&&t<n.xmax?t:n.xmax,a=a!==void 0&&a<n.ymax?a:n.ymax}return new x({xmin:e,xmax:t,ymin:i,ymax:a,spatialReference:this.view.spatialReference})}}return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(e){if(!e||!e.xmin&&e.xmin!==0||!e.xmax&&e.xmax!==0||!e.ymin&&e.ymin!==0||!e.ymax&&e.ymax!==0)return;let t=new h;t.spatialReference=e.spatialReference,t.addRing([new g({x:e.xmin,y:e.ymin}),new g({x:e.xmin,y:e.ymax}),new g({x:e.xmax,y:e.ymax}),new g({x:e.xmax,y:e.ymin}),new g({x:e.xmin,y:e.ymin})]),await this.addInitialExtentPicker({geometry:t})}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}formatNum(e){return w.formatNumber(e,{minimumFractionDigits:6,maximumFractionDigits:6})}strippedInvalidChars(e){let t=Array.from({length:10},(i,a)=>a.toString()).join("");return Array.from(e).filter(i=>t.includes(i)||i==="."||i==="-").join("")}parseNumber(e){let t=e.replace(",",".");return t=this.strippedInvalidChars(t),parseFloat(t)}async startupSketching(e,t){if(e&&(e=this.toMap(e)),this.sketchViewModel=new J({updateOnGraphicClick:!1,layer:this.areasLayer,view:this.view,polygonSymbol:this.polygonSymbol}),this.clearAllGraphics(),!t)if(e){e.type==="extent"&&(e=h.fromExtent(e)),this.currentExtent=this.toWGS84(e?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.arcgisExtentPickerChange.emit(this.getExtentValue()),e=P.intersect(e,this.basemapExtent);let i=new u({symbol:this.polygonSymbol,geometry:e});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),setTimeout(async()=>{try{i.layer&&await this.sketchViewModel?.update([i],{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}},0))}else this.sketchViewModel.create("rectangle");this.addSketchListeners()}addSketchListeners(){this.sketchViewModel?.on("update",async e=>{if(!e.toolEventInfo)return;let t=e?.graphics?.[0]?.geometry?.extent,i=t&&this.mask?.update(t);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,s=parseFloat(`${t?.xmax??"0"}`).toFixed(6),r=parseFloat(`${t?.xmin??"0"}`).toFixed(6),n=parseFloat(`${t?.ymax??"0"}`).toFixed(6),o=parseFloat(`${t?.ymin??"0"}`).toFixed(6);if(s===r||n===o?(a=t,s===r&&(a.xmax+=1),n===o&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,i?.overlap){let E=i.graphic?.geometry,A=new h({rings:[E?.rings[1]]});await this.addInitialExtentPicker({geometry:A.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),i?.overlap){let a=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}),this.sketchViewModel?.on("create",async e=>{if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let t=e?.graphic?.geometry?.extent,i=this.mask?.add(t);if(i?.overlap?(this.remainderPoly=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,s=e.graphic?.geometry?.extent?.xmin||0,r=e.graphic?.geometry?.extent?.xmax||0,n=e.graphic?.geometry?.extent?.ymin||0,o=e.graphic?.geometry?.extent?.ymax||0;if(s===r||n===o)s===r&&(r=r+1),n===o&&(o=o+1),a=new x({xmin:s,xmax:r,ymin:n,ymax:o,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let E=i?.graphic?.geometry;a=new h({rings:[E?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}})}async addInitialExtentPicker(e){if(!e.geometry){await this.startupSketching(null,!0);return}let t=this.toMap(e.geometry);await this.startupSketching(t)}async zoomTo(){if(this.areasLayer?.graphics){let e;if(this.areasLayer.graphics.forEach(i=>{let a=i?.geometry?.extent;e=e?e.union(a):a}),!e)return;let t=this.toMap(x.fromJSON(e.toJSON()).expand(1.35));t&&await this.view?.goTo(t)}}clearAllGraphics(){this.sketchViewModel?.cancel(),this.view?.map?.layers?.forEach(e=>{e.type==="graphics"&&e.removeAll()})}toMap(e){return this.view&&m.canProject(e,this.view)?m.project(e,this.view.spatialReference):e}initSearchWidget(){let e=new B({view:this.view,popupEnabled:!1,resultGraphicEnabled:!1,container:this.searchContainer.value}),t=e.viewModel;e.viewModel.allSources.on("change",()=>{t.allSources.forEach(i=>{i.zoomScale=null})}),e.on("select-result",i=>{this.startupSketching(i.result.extent)})}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}handleInputChange(){let e=this.parseNumber(this.ymin),t=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),a=this.parseNumber(this.xmax),s=new x({spatialReference:{wkid:4326},xmin:i,xmax:a,ymin:e,ymax:t});this.currentExtent=s,this.drawExtent(s)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(e){return e.replace(",",".")}formatLongitudeError(e){return e.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(e){return e.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(e){return await new Promise(t=>setTimeout(t,e))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${V({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{if(this.initialValue){let e=+this.ymin===f(this.initialValue.ymin)&&+this.ymax===f(this.initialValue.ymax);+this.xmin===f(this.initialValue.xmin)&&+this.xmax===f(this.initialValue.xmax)&&e&&(this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100)),this.drawExtent(this.initialValue)}}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let e=!!(this.portal&&!this.portal.id),t=!!(this.orgExtent&&!e),i=!!(this.orgRegionExtent&&!e),a=!!this.featureExtent;return l`<div class="side-panel">${!(!t&&!i&&!a)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${t&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${a&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><div ${d(this.searchContainer)}></div></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchViewModel||await this.startupSketching(),this.clearAllGraphics(),this.sketchViewModel?.create("rectangle")):(this.sketchViewModel?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymax=s.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${s=>s>this.convertToNumber(this.ymin)} ${d(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymin=s.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${s=>s<this.convertToNumber(this.ymax)} ${d(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmin=s.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${s=>s<this.convertToNumber(this.xmax)} ${d(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmax=s.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${s=>s>this.convertToNumber(this.xmin)} ${d(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<div class=${F({"map-container":!0,"map-container--loaded":!this.loading})} ${d(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};function f(p){return Math.round(p*1e6)/1e6}M("arcgis-portal-extent-picker",$);return $},"Basemap","Color","config","geometry/Extent","geometry/geometryEngine","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","Map","portal/PortalItem","request","symbols/SimpleFillSymbol","views/MapView","widgets/Search","widgets/Sketch/SketchViewModel")
|
|
2
|
+
import{a as R}from"./PIZFXU2N.js";import"./SFKRR7GW.js";import{I as c,J as d,K as S,L as F,M as V,Q as M,h as C,j as l,v as y}from"./CAQR2NSG.js";import"./CFDTXKJ6.js";export default $arcgis.t(([T,I,b,x,P,g,h,N,m,u,w,v,D,O,G,z,j,k,W,B,J])=>{var U=C`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container,.search-container .esri-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,L=class{constructor(e){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=e}init(){this.maskSymbol=new k({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new v({id:"maskLayer "}),this.overlapLayer=new v({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(e,t){let i=this.buildGraphic(e,t);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(e,t,i){i?this.remove(null,i):this.clear();let a=this.buildGraphic(e,t);if(a)return a.graphic&&this.maskLayer?.add(a.graphic),a}clear(){this.maskLayer?.removeAll()}remove(e,t){!e&&!t||(t&&!e&&(e=this.maskLayer?.graphics.getItemAt(t)),e&&this.maskLayer?.remove(e))}buildGraphic(e,t=this.maskSymbol){let i={};if(!e)return i;if(e.type==="extent"&&e.xmax===e.xmin){let o=new h({rings:[this.outerRing]});return i.graphic=new u({geometry:o,symbol:t}),i}e=this.toWGS84(e);let a,s;if(e.type==="extent"){let o=this.checkPolyOverlap(e);o?(a=o?.ring?.reverse(),s=o?.oring?.reverse()):a=[[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin],[e.xmin,e.ymax]]}let r=[];e.xmin===e.xmax?r=[this.outerRing]:r=[this.outerRing,a?.reverse()||[[]]];let n=new h({rings:r});return s&&(i.overlap=s),i.graphic=new u({geometry:n,symbol:t}),i}checkPolyOverlap(e){let t={};if(e.xmax<=e.xmin){let i=[[e.xmin,e.ymin],[180,e.ymin],[180,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]],a=[[-180,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[-180,e.ymax],[-180,e.ymin]],s=180-Math.abs(e.xmax),r=180-Math.abs(e.xmin);return s>r?(t.ring=a,t.oring=i):(t.ring=i,t.oring=a),t}else return}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}};function q(p){if(!p)return;let e=b.assetsPath;e.endsWith("/")||(e+="/"),p?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${e}esri/themes/light/main.css" />`)}var $=class extends S{constructor(){super(...arguments),this.polygonSymbol=new k({style:"solid",color:new I([227,139,79,0]),outline:{color:new I([65,105,255]),width:0}}),this.dlOverlapSymbol=new k({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=R(),this.searchContainer=c(),this.mapContainer=c(),this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=y(),this.arcgisExtentPickerClose=y(),this.arcgisExtentPickerSave=y()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=U}getExtent(){return this.getExtentValue()}async load(){if(this.itemId){if(this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==b.portalUrl&&(b.portalUrl=t)}let e=new Intl.NumberFormat(w.getLocale(),{minimumFractionDigits:1,maximumFractionDigits:1});this.minLatLabel=e.format(-90),this.maxLatLabel=e.format(90),this.minLngLabel=e.format(-180),this.maxLngLabel=e.format(180),this.item=new z({id:this.itemId,portal:this.portal}),await this.item.load()}if(this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let e=this.portal.region,t=await j(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`,{responseType:"json"});this.orgRegionExtent=t.data.defaultExtent}}async loaded(){q(this.el.shadowRoot),await this.initMap()}convertToNumber(e){return this.parseNumber(e)}setFeatureExtent(e){let t;e.spatialReference.isGeographic?t=new x({xmax:e.xmax,xmin:e.xmin,ymax:e.ymax,ymin:e.ymin,spatialReference:{wkid:4326}}):t=this.toWGS84(e),this.featureExtent?(this.featureExtent.xmin=Math.min(t.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(t.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(t.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(t.ymax,this.featureExtent.ymax)):this.featureExtent=t}async initMap(){let e=new G({basemap:"streets-vector"});if(this.extentService){let t=new O({url:this.extentService}),i=new T({baseLayers:[t],id:"org_basemap"});e.basemap=i}if(this.mask=new L(e),this.mask.init(),this.dateLineLayer=new v({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new v({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let t=await D.fromPortalItem({portalItem:this.item});t.visible=!1,e.add(t),t.when(i=>{if("layers"in i)for(let a=0;a<i.layers.length;a++)i.layers.getItemAt(a).queryExtent().then(s=>{s.extent&&this.setFeatureExtent(s.extent)});else i.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}this.view=new W({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),this.view.when(async()=>{if(this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let t=this.portal.defaultExtent.toJSON();await this.drawExtent(t),this.initialValue=t}this.initSearchWidget(),this.loading=!1})}getBasemapExtent(){try{let e,t,i,a;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let s=this.view.map.basemap.baseLayers;if(s.length>0){for(let r of s){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};e=e!==void 0&&e>n?.xmin?e:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,t=t!==void 0&&t<n.xmax?t:n.xmax,a=a!==void 0&&a<n.ymax?a:n.ymax}return new x({xmin:e,xmax:t,ymin:i,ymax:a,spatialReference:this.view.spatialReference})}}return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(e){if(!e||!e.xmin&&e.xmin!==0||!e.xmax&&e.xmax!==0||!e.ymin&&e.ymin!==0||!e.ymax&&e.ymax!==0)return;let t=new h;t.spatialReference=e.spatialReference,t.addRing([new g({x:e.xmin,y:e.ymin}),new g({x:e.xmin,y:e.ymax}),new g({x:e.xmax,y:e.ymax}),new g({x:e.xmax,y:e.ymin}),new g({x:e.xmin,y:e.ymin})]),await this.addInitialExtentPicker({geometry:t})}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}formatNum(e){return w.formatNumber(e,{minimumFractionDigits:6,maximumFractionDigits:6})}strippedInvalidChars(e){let t=Array.from({length:10},(i,a)=>a.toString()).join("");return Array.from(e).filter(i=>t.includes(i)||i==="."||i==="-").join("")}parseNumber(e){let t=e.replace(",",".");return t=this.strippedInvalidChars(t),parseFloat(t)}async startupSketching(e,t){if(e&&(e=this.toMap(e)),this.sketchViewModel=new J({updateOnGraphicClick:!1,layer:this.areasLayer,view:this.view,polygonSymbol:this.polygonSymbol}),this.clearAllGraphics(),!t)if(e){e.type==="extent"&&(e=h.fromExtent(e)),this.currentExtent=this.toWGS84(e?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.arcgisExtentPickerChange.emit(this.getExtentValue()),e=P.intersect(e,this.basemapExtent);let i=new u({symbol:this.polygonSymbol,geometry:e});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),setTimeout(async()=>{try{i.layer&&await this.sketchViewModel?.update([i],{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}},0))}else this.sketchViewModel.create("rectangle");this.addSketchListeners()}addSketchListeners(){this.sketchViewModel?.on("update",async e=>{if(!e.toolEventInfo)return;let t=e?.graphics?.[0]?.geometry?.extent,i=t&&this.mask?.update(t);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,s=parseFloat(`${t?.xmax??"0"}`).toFixed(6),r=parseFloat(`${t?.xmin??"0"}`).toFixed(6),n=parseFloat(`${t?.ymax??"0"}`).toFixed(6),o=parseFloat(`${t?.ymin??"0"}`).toFixed(6);if(s===r||n===o?(a=t,s===r&&(a.xmax+=1),n===o&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,i?.overlap){let E=i.graphic?.geometry,A=new h({rings:[E?.rings[1]]});await this.addInitialExtentPicker({geometry:A.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),i?.overlap){let a=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}),this.sketchViewModel?.on("create",async e=>{if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let t=e?.graphic?.geometry?.extent,i=this.mask?.add(t);if(i?.overlap?(this.remainderPoly=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,s=e.graphic?.geometry?.extent?.xmin||0,r=e.graphic?.geometry?.extent?.xmax||0,n=e.graphic?.geometry?.extent?.ymin||0,o=e.graphic?.geometry?.extent?.ymax||0;if(s===r||n===o)s===r&&(r=r+1),n===o&&(o=o+1),a=new x({xmin:s,xmax:r,ymin:n,ymax:o,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let E=i?.graphic?.geometry;a=new h({rings:[E?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}})}async addInitialExtentPicker(e){if(!e.geometry){await this.startupSketching(null,!0);return}let t=this.toMap(e.geometry);await this.startupSketching(t)}async zoomTo(){if(this.areasLayer?.graphics){let e;if(this.areasLayer.graphics.forEach(i=>{let a=i?.geometry?.extent;e=e?e.union(a):a}),!e)return;let t=this.toMap(x.fromJSON(e.toJSON()).expand(1.35));t&&await this.view?.goTo(t)}}clearAllGraphics(){this.sketchViewModel?.cancel(),this.view?.map?.layers?.forEach(e=>{e.type==="graphics"&&e.removeAll()})}toMap(e){return this.view&&m.canProject(e,this.view)?m.project(e,this.view.spatialReference):e}initSearchWidget(){let e=new B({view:this.view,popupEnabled:!1,resultGraphicEnabled:!1,container:this.searchContainer.value}),t=e.viewModel;e.viewModel.allSources.on("change",()=>{t.allSources.forEach(i=>{i.zoomScale=null})}),e.on("select-result",i=>{this.startupSketching(i.result.extent)})}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}handleInputChange(){let e=this.parseNumber(this.ymin),t=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),a=this.parseNumber(this.xmax),s=new x({spatialReference:{wkid:4326},xmin:i,xmax:a,ymin:e,ymax:t});this.currentExtent=s,this.drawExtent(s)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(e){return e.replace(",",".")}formatLongitudeError(e){return e.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(e){return e.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(e){return await new Promise(t=>setTimeout(t,e))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${V({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{if(this.initialValue){let e=+this.ymin===f(this.initialValue.ymin)&&+this.ymax===f(this.initialValue.ymax);+this.xmin===f(this.initialValue.xmin)&&+this.xmax===f(this.initialValue.xmax)&&e&&(this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100)),this.drawExtent(this.initialValue)}}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let e=!!(this.portal&&!this.portal.id),t=!!(this.orgExtent&&!e),i=!!(this.orgRegionExtent&&!e),a=!!this.featureExtent;return l`<div class="side-panel">${!(!t&&!i&&!a)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${t&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${a&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><div ${d(this.searchContainer)}></div></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchViewModel||await this.startupSketching(),this.clearAllGraphics(),this.sketchViewModel?.create("rectangle")):(this.sketchViewModel?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymax=s.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${s=>s>this.convertToNumber(this.ymin)} ${d(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymin=s.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${s=>s<this.convertToNumber(this.ymax)} ${d(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmin=s.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${s=>s<this.convertToNumber(this.xmax)} ${d(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmax=s.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${s=>s>this.convertToNumber(this.xmin)} ${d(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<div class=${F({"map-container":!0,"map-container--loaded":!this.loading})} ${d(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};function f(p){return Math.round(p*1e6)/1e6}M("arcgis-portal-extent-picker",$);return $},"Basemap","Color","config","geometry/Extent","geometry/geometryEngine","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","Map","portal/PortalItem","request","symbols/SimpleFillSymbol","views/MapView","widgets/Search","widgets/Sketch/SketchViewModel")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
var i=e=>e&&!e.endsWith("/")?`${e}/`:e;function p(e){return i(e.restUrl)}function s(e){return e.credential?.token||e.token||e.user?.credential?.token||e.portalUser?.token||""}function u(e){return e.sourceJSON?.isWebTierAuth}function a(e,t,r){if(!t?.type)return!1;let n=t.typeKeywords??[];switch(e){case"arcgisinstantapps":return t.type==="Web Mapping Application"&&n.includes("configurableApp");case"arcgis360vr":return!r&&t.type==="360 VR Experience";case"survey123":return t.type==="Form";case"datapipelines":return t.type==="Data Pipeline";case"dashboards":return t.type==="Dashboard";case"experienceBuilder":return t.type==="Web Experience"||t.type==="Web Experience Template";case"webappbuilder":return t.type==="Web Mapping Application"&&(n.includes("Web AppBuilder")||n.includes("WebAppBuilder"));case"fieldmaps":return t.type==="Web Map";case"arcgisnotebooks":return t.type==="Notebook";case"HubforArcGIS":return["Discussion","Hub Page","Hub Initiative Template","Hub Initiative","Hub Event","Hub Project"].includes(t.type);default:return!1}}function c(e,t,r){return(t??[]).some(n=>a(n,e,r))}export{p as a,s as b,u as c,c as d};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Mt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}},kt=s=>new M(typeof s=="string"?s:s+"",void 0,vt),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,vt)},jt=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},Et=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return kt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,Ht=tt.trustedTypes,De=Ht?Ht.emptyScript:"",xe=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,xe?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,Vt=s=>s,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,At="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+_,Le=`<${_t}>`,T=document,z=()=>T.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",Ct=Array.isArray,Qt=s=>Ct(s)||typeof s?.[Symbol.iterator]=="function",$t=`[
|
|
3
|
+
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Ft=/>/g,w=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=wt(1),gs=wt(2),vs=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+At+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Zt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Jt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Vt(t).nextSibling;Vt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:At,P:_,A:_t,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=bt.litHtmlPolyfillSupport;Ue?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=se(t);if(o?.once){let i=`${s}${n}${e}`;if(te.has(i))return;te.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;ee?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else ee?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},xs=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ne=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=lt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=lt(s);return await t.ready,t},lt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ne(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var pe=Tt,he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Qs=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Js=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Ys=s=>s._$AH,Zs=s=>{s._$AR(),s._$AA.remove()};var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Je(t)}};function Ke(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Qe(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Je=s=>{s.type==y.CHILD&&(s._$AP??=Qe,s._$AQ??=Ke)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var co=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=s=>s.replace(Ze,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Ze=/[A-Z]+(?![a-z])|[A-Z]/gu;var Xe="randomUUID"in crypto,Ao=()=>{if(Xe)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var xt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var ts=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(es):void 0,gt=C?.map(([x])=>x),J=class extends Dt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,es=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},ss=globalThis.HTMLElement??Ut,Dt=class extends ss{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);ns(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(os,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function os([s,t]){this[s]=t}var ns=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,rs)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},rs=1e3,yt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",is=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(is);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var as=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ut(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Rn=$(It);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://js.arcgis.com/5.1.0/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,D as b,G as c,ne as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,f as k,d as l,at as m,b as n,Ds as o,oe as p,xs as q,Ls as r,Ve as s,Be as t,We as u,Fe as v,Tt as w,pe as x,Ao as y,ts as z,y as A,$ as B,g as C,Qs as D,Js as E,me as F,Ys as G,Zs as H,co as I,Nt as J,be as K,Ln as L,Un as M,In as N,Mn as O,Q as P,Vn as Q,Bn as R};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{$a as L,A as z,Ab as ha,B as A,Bb as ia,C as B,Cb as ja,Db as ka,Eb as la,Sa as C,Ta as D,Ua as E,Va as F,Wa as G,Xa as H,Ya as I,Za as J,_a as K,a,ab as M,b,bb as N,c,cb as O,d,db as P,e,eb as Q,f,gb as R,h as g,hb as S,i as h,ib as T,j as i,jb as U,k as j,kb as V,l as k,lb as W,m as l,mb as X,n as m,nb as Y,o as n,ob as Z,p as o,pb as _,q as p,qb as $,r as q,rb as aa,s as r,t as s,u as t,ub as ba,v as u,vb as ca,w as v,wb as da,x as w,xb as ea,y as x,yb as fa,z as y,zb as ga}from"./YJK6JAPE.js";import"./CFDTXKJ6.js";export{L as Annotation,H as AsyncBatchedStore,J as BaseChannel,E as BaseCheckpointSaver,k as BaseLangGraphError,G as BaseStore,K as BinaryOperatorAggregate,d as COMMAND_SYMBOL,i as Command,e as CommandInstance,ca as CompiledStateGraph,b as END,v as EmptyChannelError,u as EmptyInputError,R as Graph,l as GraphBubbleUp,o as GraphInterrupt,m as GraphRecursionError,n as GraphValueError,c as INTERRUPT,I as InMemoryStore,w as InvalidUpdateError,F as MemorySaver,da as MessageGraph,ia as MessagesAnnotation,aa as MessagesValue,ja as MessagesZodMeta,ka as MessagesZodState,x as MultipleSubgraphsError,p as NodeInterrupt,g as Overwrite,q as ParentCommand,_ as REMOVE_ALL_MESSAGES,X as ReducedValue,z as RemoteException,a as START,f as Send,ba as StateGraph,A as StateGraphInputError,Z as StateSchema,y as UnreachableNodeError,Y as UntrackedValue,W as UntrackedValueChannel,$ as addMessages,D as copyCheckpoint,C as emptyCheckpoint,ga as entrypoint,O as getConfig,P as getCurrentTaskInput,U as getJsonSchemaFromSchema,ha as getPreviousState,V as getSchemaDefaultGetter,M as getStore,B as getSubgraphsSeenSet,N as getWriter,Q as interrupt,j as isCommand,s as isGraphBubbleUp,t as isGraphInterrupt,h as isInterrupted,r as isParentCommand,T as isSerializableSchema,S as isStandardSchema,$ as messagesStateReducer,ea as pushMessage,fa as task,la as writer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as k}from"./NX4L2LC2.js";import a from"./ZCL2V7W3.js";import{a as w,b as x}from"./BCUEYBNI.js";import{a as f}from"./PIZFXU2N.js";import"./SFKRR7GW.js";import{K as g,L as l,Q as v,h as d,j as s}from"./CAQR2NSG.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{b:b}])=>{var O=d`:host{max-width:100%;display:flex;align-items:center;min-width:0}.skeleton{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;display:flex;align-items:center}.skeleton-avatar{border-radius:100%;background-color:var(--calcite-color-foreground-3);width:var(--arcgis-portal-user-avatar-size);height:var(--arcgis-portal-user-avatar-size)}.skeleton-name{background-color:var(--calcite-color-foreground-3);border-radius:var(--calcite-border-radius);width:var(--arcgis-portal-user-avatar-skeleton-width);border-radius:var(--arcgis-portal-user-avatar-spacing);height:var(--arcgis-portal-user-avatar-spacing);margin-inline-start:var(--arcgis-portal-user-avatar-spacing)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.avatar{display:block;flex-grow:0;flex-shrink:0;border-radius:100%;background-color:var(--calcite-color-foreground-3);width:var(--arcgis-portal-user-avatar-size);height:var(--arcgis-portal-user-avatar-size)}.text{color:var(--calcite-color-text-2);display:flex;flex-direction:column;justify-content:center;min-width:0;text-align:start;margin-inline-start:var(--arcgis-portal-user-avatar-spacing);line-height:calc(var(--arcgis-portal-user-avatar-size) / 2)}.text--no-avatar{margin-inline-start:0}.-text-underline .title{text-decoration:underline}.text--clamp{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.text--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-description{font-weight:500}.description{font-weight:400;color:var(--calcite-color-text-2)}:host([scale="xs"]){font-size:.75rem;--arcgis-portal-user-avatar-size: 18px;--arcgis-portal-user-avatar-spacing: .25rem ;.description{font-size:.625rem;margin-top:-.125rem}.text{line-height:1.35}}:host([scale="s"]){font-size:.75rem;--arcgis-portal-user-avatar-size: 1.5rem ;--arcgis-portal-user-avatar-spacing: .5rem ;--arcgis-portal-user-avatar-skeleton-width: 4rem ;.description{font-size:.625rem}}:host([scale="m"]){font-size:.875rem;--arcgis-portal-user-avatar-size: 2rem ;--arcgis-portal-user-avatar-spacing: .75rem ;--arcgis-portal-user-avatar-skeleton-width: 5rem ;.description{font-size:.75rem}}:host([scale="l"]){font-size:1rem;--arcgis-portal-user-avatar-size: 2.5rem ;--arcgis-portal-user-avatar-spacing: 1rem ;--arcgis-portal-user-avatar-skeleton-width: 6rem ;.description{font-size:.875rem}}`,j=i=>i.thumbnailUrl!==void 0;function c(i,r,e=!1){if(j(i))return i.thumbnailUrl;let a=i.thumbnail;if(!a)return null;if(a.startsWith("http"))return a;let t=x(r);return`${e?"https://www.arcgis.com/sharing/rest/":w(r)}community/users/${i.username}/info/${a}${t&&!e?`?token=${t}`:""}`}var p=class extends g{constructor(){super(...arguments),this.messages=f({name:null}),this.thumbnailUrl=null,this.scale="m",this.hideAvatar=!1}static{this.properties={user:0,portal:0,scale:3,showName:5,hideAvatar:5,heading:1,description:1,underline:5,username:1,wrap:5,checkOnline:5}}static{this.styles=O}async load(){let{username:r,checkOnline:e,portal:a,user:t}=this;if(r&&a){let n=await b(r,a,e);this.user=n,this.thumbnailUrl=c(n,a,e)}else t&&a&&(this.thumbnailUrl=c(t,a,e))}updated(r){let e=r.get("user");e&&this.portal&&(this.thumbnailUrl=c(e,this.portal,this.checkOnline))}renderSkeleton(){return s`<div class="skeleton">${!this.hideAvatar&&s`<div class="skeleton-avatar"></div>`||""}${this.showName&&s`<div class="skeleton-name"></div>`||""}</div>`}renderUser(){let{user:r,messages:e,thumbnailUrl:a,hideAvatar:t,showName:n,description:u,scale:h,underline:$,heading:z}=this;if(!r)return[];let{fullName:y,username:U,id:A}=r,o=!!u,N=(y?.split(" ")||[]).slice(0,2).join(" "),m=this.wrap?"text--clamp":"text--ellipsis";return[!t&&s`<calcite-avatar class="avatar" .scale=${h==="xs"?"s":h} .fullName=${N} .username=${U} .userId=${A} .thumbnail=${a||void 0} .inert=${n||o?!0:void 0}></calcite-avatar>`||"",(n||o)&&s`<span class=${l({text:!0,"text--underline":$,"text--no-avatar":t})}>${n&&s`<span class=${l({title:!0,"has-description":o,[m]:!0})}>${z||k(r,e._lang)}</span>`||""}${o&&s`<span class=${l({description:!0,[m]:!0})}>${u}</span>`||""}</span>`||""]}render(){return this.user&&this.messages._lang?this.renderUser():this.renderSkeleton()}};v("arcgis-portal-user-avatar",p);return p},a)
|