@esri/solutions-components 5.1.0-next.86 → 5.1.0-next.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/2LV7NQMM.js +2 -0
- package/dist/cdn/3PUFU3VY.js +2 -0
- package/dist/cdn/3S5XSBME.js +2 -0
- package/dist/cdn/5G5LMAT4.js +2 -0
- package/dist/cdn/5Z43RSKO.js +2 -0
- package/dist/cdn/67YHFNNT.js +2 -0
- package/dist/cdn/7FKMQ3QO.js +2 -0
- package/dist/cdn/{NANKLLS4.js → A73LPATI.js} +2 -2
- package/dist/cdn/AODE5TBO.js +2 -0
- package/dist/cdn/AUNFZODL.js +2 -0
- package/dist/cdn/{X7FPPH3E.js → B4Y2UZHO.js} +1 -1
- package/dist/cdn/{BXFMZEWK.js → DV6MFL2N.js} +1 -1
- package/dist/cdn/EJQKVRSG.js +2 -0
- package/dist/cdn/ERCI6HI5.js +2 -0
- package/dist/cdn/HWOOHVH5.js +2 -0
- package/dist/cdn/I33PCNP7.js +2 -0
- package/dist/cdn/{XZWWZKHK.js → I53PAKKW.js} +1 -1
- package/dist/cdn/IVFBBPSY.js +2 -0
- package/dist/cdn/JAITP34E.js +2 -0
- package/dist/cdn/{NVJH5A6R.js → JSXNTE4I.js} +1 -1
- package/dist/cdn/KXGN75L6.js +2 -0
- package/dist/cdn/LXI55MKX.js +2 -0
- package/dist/cdn/{6GRAP4DV.js → LYDP7VMM.js} +1 -1
- package/dist/cdn/N2XIWSCG.js +2 -0
- package/dist/cdn/{7UFXL2ZB.js → NYWSGPCD.js} +2 -2
- package/dist/cdn/O5CIRNTW.js +2 -0
- package/dist/cdn/PX2KKGLQ.js +2 -0
- package/dist/cdn/QHHYNSCP.js +2 -0
- package/dist/cdn/QK5IXICV.js +2 -0
- package/dist/cdn/QMPT2LSN.js +2 -0
- package/dist/cdn/QX5WB6H3.js +2 -0
- package/dist/cdn/QX742MCD.js +2 -0
- package/dist/cdn/R4CW26PN.js +2 -0
- package/dist/cdn/RLHHGWT4.js +2 -0
- package/dist/cdn/RQRAFBVO.js +2 -0
- package/dist/cdn/SY5KYHF4.js +2 -0
- package/dist/cdn/{IHD4JFYA.js → TMYE7YBP.js} +1 -1
- package/dist/cdn/TV7TG34E.js +2 -0
- package/dist/cdn/WOBPKAC2.js +2 -0
- package/dist/cdn/X7ZFLHUP.js +2 -0
- package/dist/cdn/{MH2KV42H.js → XFG55QXT.js} +1 -1
- package/dist/cdn/XYG3Z7ZY.js +2 -0
- package/dist/cdn/YSLCWEDP.js +2 -0
- package/dist/cdn/{VZ4XWWT6.js → ZDTDI643.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-configure-titles/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-configure-titles/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/Auth.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +13 -12
- package/dist/chunks/cardsHelpers.js +1 -1
- package/dist/chunks/common.js +26 -0
- package/dist/chunks/getRelatedInfos.js +1 -1
- package/dist/chunks/helpers.js +81 -560
- package/dist/chunks/interfaces.js +446 -0
- package/dist/chunks/solution-deploy-dialog.js +12 -11
- package/dist/chunks/solutions-deploy-app-nav.js +7 -6
- package/dist/chunks/validators.js +127 -0
- package/dist/components/arcgis-solutions-assistant/customElement.js +4 -3
- package/dist/components/layer-table/customElement.js +11 -10
- package/dist/components/map-card/customElement.js +19 -18
- package/dist/components/solution-builder-assistant/customElement.d.ts +72 -2
- package/dist/components/solution-builder-assistant/customElement.js +273 -67
- package/dist/components/solution-configure-titles/customElement.js +42 -41
- package/dist/components/solution-delete-dialog/customElement.js +5 -4
- package/dist/components/solution-deploy-dialog/customElement.js +3 -2
- package/dist/components/solution-deployed-card/customElement.js +4 -2
- package/dist/components/solution-deployed-card-panel/customElement.js +11 -9
- package/dist/components/solution-details-card/customElement.js +5 -4
- package/dist/components/solution-details-panel/customElement.js +17 -15
- package/dist/components/solution-resource-card/customElement.js +7 -6
- package/dist/components/solution-snapshot-gallery/customElement.js +14 -13
- package/dist/components/solution-social-share/customElement.js +35 -34
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-all-panel/customElement.js +12 -11
- package/dist/components/solutions-all-shell/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.js +7 -13
- package/dist/components/solutions-deploy-app-nav/customElement.js +5 -3
- package/dist/components/solutions-deployed-panel/customElement.js +5 -4
- package/dist/components/solutions-deployed-shell/customElement.js +1 -1
- package/dist/components/solutions-filter-panel/customElement.js +8 -7
- package/dist/components/solutions-searchsort-toolbar/customElement.js +9 -8
- 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.js +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/dist/utils/interfaces.d.ts +4 -4
- package/package.json +1 -1
- package/dist/cdn/2AUHEG2A.js +0 -2
- package/dist/cdn/2C4TQJVZ.js +0 -2
- package/dist/cdn/2KKQKCK4.js +0 -2
- package/dist/cdn/2QEXO7ZH.js +0 -2
- package/dist/cdn/3DR66XVF.js +0 -2
- package/dist/cdn/4GJHDLZU.js +0 -2
- package/dist/cdn/7QNQNET4.js +0 -2
- package/dist/cdn/ARGV7QZA.js +0 -2
- package/dist/cdn/BCDBB2P5.js +0 -2
- package/dist/cdn/E26MY5HW.js +0 -2
- package/dist/cdn/EUFBJHIH.js +0 -2
- package/dist/cdn/FSTBKODU.js +0 -2
- package/dist/cdn/GNIPC2YA.js +0 -2
- package/dist/cdn/HYJFW2H7.js +0 -2
- package/dist/cdn/IKHBFQZ5.js +0 -2
- package/dist/cdn/J3VPCRTT.js +0 -2
- package/dist/cdn/JHPCQXLT.js +0 -2
- package/dist/cdn/MSCYNDSA.js +0 -2
- package/dist/cdn/OILJWT3N.js +0 -2
- package/dist/cdn/PDKHXNYX.js +0 -2
- package/dist/cdn/PUDHZZVS.js +0 -2
- package/dist/cdn/R7QOGWYL.js +0 -2
- package/dist/cdn/RHM4UJGX.js +0 -2
- package/dist/cdn/TJDM5OLA.js +0 -2
- package/dist/cdn/TNS6HDBI.js +0 -2
- package/dist/cdn/TQWICREM.js +0 -2
- package/dist/cdn/UIR3N7OD.js +0 -2
- package/dist/cdn/VOEOIQVJ.js +0 -2
- package/dist/cdn/WCTKCI5Q.js +0 -2
- package/dist/cdn/WVVZVPWX.js +0 -2
- package/dist/cdn/Y4D7GWPH.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{ka as c,ob as p}from"./HE2XAIDT.js";import{u as d}from"./XQQ52NKX.js";var V=250,g=new Set(["add","all","alter","and","any","as","asc","backup","between","by","case","check","column","constraint","create","database","date","default","delete","desc","distinct","drop","exec","exists","foreign","from","full","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","on","or","order","outer","primary","procedure","right","rownum","select","set","table","top","truncate","union","unique","update","values","view","where"]),w=new Set(["objectid","globalid","created_date","created_user","last_edited_date","last_edited_user","fid","shape","shape_length","shape_area"]),x=/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F018}-\u{1F270}\u{238C}-\u{2454}\u{20D0}-\u{20FF}\u{FE0F}]/u;function l(e){return!e||e.trim().length===0}function s(e){return e.length>V}function n(e,r){return x.test(e)?!0:r==="item"?/[><~`$^+=|]/u.test(e):/[/<>]/u.test(e)}async function b(e,r){let t=r,a=await t.getUsername(),y={q:new d().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:t},h=(await p(y)).results.map(i=>i.title),{folders:m}=await c(t),f=m.map(i=>i.title),o=[...h,...f].map(i=>i.trim().toLowerCase()),u=e.toLowerCase(),F=o.filter(i=>i===u),T=o.filter(i=>i.startsWith(u));return{conflictingNames:F,similiarNames:T}}async function C(e,r,t=!1){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:n(e,"folder")||n(e,"item")?{isValid:!1,errorType:"special-character"}:!t&&r&&(await b(e.trim(),r)).conflictingNames.length>0?{isValid:!1,errorType:"not-unique"}:{isValid:!0,errorType:null}}function v(e){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:n(e,"item")?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function L(e,r,t=!1){if(e.length>r)return{isValid:!1,errorType:"exceed-length"};let a=[];return e.includes("<")&&a.push("<"),e.includes(">")&&a.push(">"),!t&&e.includes("/")&&a.push("/"),a.length>0?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function k(e){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}function S(e,r=[]){return l(e)?{isValid:!1,errorType:"empty"}:/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e)?e.length>31?{isValid:!1,errorType:"exceed-length"}:g.has(e.toLowerCase())?{isValid:!1,errorType:"sql-keyword"}:w.has(e.toLowerCase())?{isValid:!1,errorType:"system-field"}:r.includes(e.toLowerCase())?{isValid:!1,errorType:"duplicate-field"}:{isValid:!0,errorType:null}:{isValid:!1,errorType:"invalid-format"}}function q(e){return e<1||e>4e3?{isValid:!1,errorType:"out-of-range"}:{isValid:!0,errorType:null}}function A(e,r,t=!1){return t?{isValid:!0,errorType:null}:e.trim().length===0?{isValid:!1,errorType:"empty"}:e.length>r?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}export{b as a,C as b,v as c,L as d,k as e,S as f,q as g,A as h};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import{b as u}from"./2B4SGB3I.js";import{b as m}from"./TFINIJHF.js";import{a as g}from"./HO5JGUUI.js";import{b as p}from"./JSJYFWT6.js";import{E as l,F as d,G as h,K as s,h as c,i}from"./MRGCC5C4.js";export default $arcgis.t(([,,,{q:f},{b:r}])=>{var b=c`*[tabindex]:focus-visible{outline:solid 2px var(--calcite-color-brand);outline-offset:2px}.display-flex{display:flex}.align-items-center{align-items:center}.justify-content-center{justify-content:center}.screenshot-container{width:100%;overflow:hidden}.footer{width:100%}.footer-override{--calcite-dialog-footer-space: 0px}.footer-card{width:200px;height:110px;cursor:pointer}.padding-1{padding:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-end-1{padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.padding-top-1{padding-top:1rem}.padding-top-1-2{padding-top:.5rem}.background-black{background-color:var(--calcite-color-surface-4)}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer;padding-bottom:2px}.calcite-card-selected{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer;padding-bottom:2px}calcite-card:hover .hover-text{opacity:1;color:#fff}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-lg)}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.footer-card img{background-color:var(--calcite-color-surface-2)}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip;display:block;object-fit:contain}`,n=class extends h{constructor(){super(...arguments),this.open=!1,this._screenshots=[],this._translations=g({name:"solution-snapshot-gallery",blocking:!0}),this._configContextConsumer=m({context:u,subscribe:!0}),this._displayText="",this._paginationControl=l(),this._screenshotNames=[]}static{this.properties={card:0,screenshot:0,itemProperties:0,open:5,_screenshots:16,_translations:16}}static{this.styles=b}willUpdate(t){t.has("screenshot")&&this.screenshot&&(this._displayText=this.screenshot.description||this.screenshot.alt),t.has("itemProperties")&&this.itemProperties&&(this._screenshots=this.itemProperties.preview.filter(e=>e.format==="image"),this._screenshotNames=this._screenshots.map(e=>e.name))}render(){return i`<calcite-dialog class="footer-override" .heading=${this.card?.title} modal @calciteDialogClose=${()=>this.open=!1} .open=${this.open} outside-close-disabled width=l>${this._getScreenshotView()}${this._getFooter()}</calcite-dialog>`}_getScreenshotView(){return this.screenshot?i`<div class="display-flex justify-content-center screenshot-container">${this._getImage(this.screenshot)}</div>`:""}_getFooter(){let t=this._screenshotNames.indexOf(this.screenshot?.name||""),e=document.body.classList.contains("calcite-mode-dark")?"calcite-mode-dark":"";return i`<div class="footer" slot=footer><div class=${`display-flex align-items-center padding-start-1 padding-top-1-2 background-black ${e}`}><calcite-label layout=inline><calcite-pagination class="padding-end-1" @calcitePaginationChange=${this._changeScreenshot} page-size=1 start-item=${t+1} total-items=${this._screenshots.length??s} ${d(this._paginationControl)}></calcite-pagination><span tabindex=0>${this._displayText}</span></calcite-label></div>${this._getCards()}</div>`}_changeScreenshot(){this.screenshot=this._screenshots[this._paginationControl.value.startItem-1]}_getCards(){return i`<calcite-card-group class="card-group padding-1" .label=${this._translations.seeSolutionScreenshots} selection-mode=single>${this._screenshots.map(t=>{let e=t.name===this.screenshot?.name;return i`<calcite-card class=${`footer-card ${e?"calcite-card-selected":""}`} .label=${t.alt} @click=${()=>this._showScreenshot(t)} @keydown=${o=>f(o,()=>this._showScreenshot(t))} .selected=${e}><div class="card-image-wrap" slot=thumbnail>${this._getImage(t,"thumbnail")}<div class="hover-text">${this._translations.viewScreenshot}</div></div></calcite-card>`})}</calcite-card-group>`}_getImage(t,e){return i`<img alt=${t.alt??s} slot=${e??s} src=${this._getSource(this._configContextConsumer.value.authentication,this.card?.id||"",t.name)??s}>`}_showScreenshot(t){this.screenshot=t}_getSource(t,e,o){let a=this._configContextConsumer.value;return a.agoBasedEnterpriseSolutionsGroupId&&a.isEnterprise?r(e||"",o,void 0,a.agolPortalUrl):t?r(e||"",o,t):""}};p("solution-snapshot-gallery",n);return n},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",a,b)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import k from"./XYG3Z7ZY.js";import j from"./RLHHGWT4.js";import d from"./R4CW26PN.js";import{b as x}from"./2B4SGB3I.js";import{b}from"./TFINIJHF.js";import"./HE2XAIDT.js";import{a as m}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as g}from"./JSJYFWT6.js";import{E as a,F as n,G as f,J as i,K as c,h as v,i as e,j as h}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([k,R,{m:w},,{n:y}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-surface-2);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-surface-3)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d,j,k)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import c from"./ZDTDI643.js";import b from"./XYG3Z7ZY.js";import a from"./R4CW26PN.js";import{K as J,ob as j,pb as O,r as R,ra as M}from"./HE2XAIDT.js";import{g as S}from"./JUUVYK2H.js";export default $arcgis.t(([{c:B,d:D,f:k,g:T,j:U,k:w},{k:V},{a:v,b:h,c:K,e:p}])=>{var z=class{constructor(e,r,s){this.cMissingImageDataURI="https://static.arcgis.com/images/solution.png",this.cardCache=[],this.cardCacheParams={q:"",categoriesAsStr:"[]",sortField:"title",sortOrder:"asc"},this.locale=e,this.orgUrl=r,this.portalUrl=s,this.anonAgolSession=new S({}),this.agolPortalUrl=T(s)}addToCache(e){this.cardCache.push(e)}getCache(){return this.cardCache}removeFromCache(e){this.cardCache=this.cardCache.filter(r=>r.id!==e)}requestAvailableSolutionCards(e,r,s,t,o,n,a,i){let m=a?.start?a.start:1,g=a?.num?a.num:24,P=this.portalUrl+"/sharing/rest",f=this.agolPortalUrl+"/sharing/rest",C=this.anonAgolSession,q=JSON.stringify(e.categories);if(this.cardCacheParams.q!==e.q||this.cardCacheParams.categoriesAsStr!==q||e.sortField==="relevance"?(this.cardCache=[],this.cardCacheParams={q:e.q,categoriesAsStr:q,sortField:e.sortField,sortOrder:e.sortOrder}):(this.cardCacheParams.sortField!==e.sortField||this.cardCacheParams.sortOrder!==e.sortOrder)&&(this.cardCacheParams.sortField=e.sortField,this.cardCacheParams.sortOrder=e.sortOrder,this.cardCache=p(this.cardCache,this.cardCacheParams.sortField,this.cardCacheParams.sortOrder)),this.cardCache.length>0){let c;if(i&&i.size>0){let d=v(this.cardCache,i);c=h(d,m,g)}else c=h(this.cardCache,m,g);return Promise.resolve(c)}let A={filter:e.filter,sortField:e.sortField,sortOrder:e.sortOrder,categories:e?.categories?this.convertSearchCategories(e.categories):"",signal:n},y=[];if(r&&!o){let c=t||new S({});y.push(O(r,e.q,c,A,P))}return s&&o&&y.push(O(s,e.q,C,A,f)),Promise.allSettled(y).then(c=>{let d=[];c.forEach(u=>{if(u.status==="fulfilled"){let I=u.value,b="",E=!1;b=this.agolPortalUrl,E=!0,I.results.forEach(N=>{N.sourcePortalUrl=b,N.knownToBePublicSource=E}),d.push(I)}else if(u.status==="rejected")throw new Error(u.reason.message?u.reason.message:"cannotAccessAGO")}),d.length===0?this.cardCache=[]:d.length===1?this.cardCache=this.getCardsFromResponse(d[0]):this.cardCache=p(this.getCardsFromResponse(this.mergeResponses(d)),this.cardCacheParams.sortField,this.cardCacheParams.sortOrder);let F;if(i&&i.size>0){let u=v(this.cardCache,i);F=h(u,m,g)}else F=h(this.cardCache,m,g);return Promise.resolve(F)}).catch(c=>Promise.reject(new Error(c.message)))}requestDeployedSolutionCards(e,r,s="",t){let o=this.portalUrl+"/sharing/rest";if(t.aborted)return Promise.resolve([]);if(this.cardCacheParams.q!==e.q||this.cardCacheParams.categoriesAsStr!==JSON.stringify(e.q)||e.sortField==="relevance"?(this.cardCache=[],this.cardCacheParams={q:e.q,categoriesAsStr:"[]",sortField:e.sortField,sortOrder:e.sortOrder}):(this.cardCacheParams.sortField!==e.sortField||this.cardCacheParams.sortOrder!==e.sortOrder)&&(this.cardCacheParams.sortField=e.sortField,this.cardCacheParams.sortOrder=e.sortOrder,this.cardCache=p(this.cardCache,this.cardCacheParams.sortField,this.cardCacheParams.sortOrder)),t.aborted)return Promise.resolve([]);if(this.cardCache.length>0){let a=h(this.cardCache,1,this.cardCache.length);return Promise.resolve(a)}let n={q:e.q,filter:e.filter,sortField:e.sortField,sortOrder:e.sortOrder,authentication:r,portal:o,categories:e?.categories?JSON.stringify(e.categories):"",num:e.num,signal:t};return s?M(s,r).then(a=>{if(t.aborted)return Promise.resolve([]);this.cardCache=this.getCardsFromResponse({results:[a]});let i=h(this.cardCache,1,this.cardCache.length);return Promise.resolve(i)}).catch(a=>Promise.reject(new Error(a))):j(n).then(a=>{this.cardCache=this.getCardsFromResponse(a);let i=h(this.cardCache,1,this.cardCache.length);return Promise.resolve(i)}).catch(a=>Promise.reject(new Error(a)))}convertSearchCategories(e){return e&&(Array.isArray(e)?e=e.map(r=>JSON.stringify(Array.isArray(r)?r:[r])):e=JSON.stringify([e])),e}getCardsFromResponse(e){return e.results.length>0?R(e.results).map(r=>{let s=r.sourcePortalUrl?r.sourcePortalUrl:this.portalUrl,t=r.sourcePortalUrl?r.sourcePortalUrl:this.orgUrl,o={id:r.id,title:r.title,snippet:r.snippet||"",description:r.description||"",url:r.url||"",itemUrl:`${t}/home/item.html`+D([{k:"id",v:r.id}])||"",thumbnailFilename:r.thumbnail,thumbnailUrl:k(r.id,r.thumbnail,this.cMissingImageDataURI,s),tryitUrl:r.url||"",typeKeywords:r.typeKeywords,learnMoreUrl:r.properties?.learnMoreUrl||"",createdMs:r.created,created:U(r.created,this.locale),modified:U(r.modified,this.locale),numViews:r.numViews,tags:r.tags,categories:r.groupCategories&&r.groupCategories.length>0?r.groupCategories:r.categories||[],licenseInfo:B(r.licenseInfo),deployCommonId:w(r.typeKeywords||[],"solutionid-"),deployVersion:w(r.typeKeywords||[],"solutionversion-"),canDelete:r.created>16183314e5,preview:this.preparePreviewImageUrls(r.id,r.properties?.preview,s),sourcePortalUrl:r.sourcePortalUrl||"",knownToBePublicSource:r.knownToBePublicSource||!1,waitId:"",relatedSolutions:J(r,"properties.relatedSolutions")||[],owner:r.owner};return o.deployCommonId!==""&&o.deployVersion!==""?o:null}).filter(r=>r!=null):[]}mergeResponses(e){let r=0;e.forEach(t=>r+=t.total);let s=[];return e.forEach(t=>s=s.concat(t.results)),{query:e[0].query,start:1,num:r,nextStart:-1,total:r,results:s}}preparePreviewImageUrls(e,r,s){return r?r.map(t=>(t.format==="image"&&(t.name=s+"/sharing/rest/content/items/"+e+"/resources/"+t.name),t)):[]}};async function W(l,e,r,s,t=V,o="created",n="desc",a=!1,i=[],m=[],g,P,f){if(!l?.IsSignedIn)return;let C={q:t,filter:"type:Solution",sortField:o,sortOrder:n,delay:a,categories:i,num:100};return C.q+=G(l,P),await x(e,C,s,m,f,g)}function G(l,e){let r="",s=l.PortalUserOrg,t=l.PortalUserName;return s&&(r+=" orgid:"+s),e!=="My organization's solutions"&&t&&(r+=" owner:"+t),r}async function x(l,e,r,s,t="",o){let n=await r.requestDeployedSolutionCards(e,l,t,o),a=K(n.cards,s);return{cards:n.cards,relatedSolutions:a}}return{a:z,b:W}},a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import h from"./5G5LMAT4.js";import e from"./ZDTDI643.js";import c from"./XYG3Z7ZY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import{b as C}from"./2B4SGB3I.js";import{b as v}from"./TFINIJHF.js";import"./HE2XAIDT.js";import{a as w}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as f}from"./JSJYFWT6.js";import{E as u,F as d,G as g,K as y,h as m,i as r,j as _,q as n}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([{n:x,r:T},,{k:c,n:l,o:b},,{a:h,b:S}])=>{var $=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@container (max-width: 1280px){solution-deployed-card{width:calc(25% - .75rem)}}@container (max-width: 1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@container (max-width: 740px){solution-deployed-card{width:calc(50% - .75rem)}}@container (max-width: 440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,F=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=v({context:C,subscribe:!0,callback:async t=>{t&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=n(),this.searchTermSet=n(),this.sortTypeSet=n(),this.listenOn(window,"solutionDeleted",t=>{this._modifiedCheckTry=F,this.reload(t.detail.showAlert,t.detail.refreshSolutionsTimeout,t.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",t=>{t.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",t=>{this._modifiedCheckTry=F,this._refreshAfterDeploy(t.detail)}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Sort",dimensions:[x(t.detail.sortType)]}),this.searchSolutions(t.detail))}),this.listenOn(window,"searchChanged",t=>{t.detail&&t.detail.scope==="deployments"&&(t.detail.logSearchTelemetry&&t.detail.option?.searchTerm?this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Search",dimensions:[t.detail.option.searchTerm]}):this.searchSolutions(t.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=$}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(t=!0,e=!0,s){if(this._initCardsFetchers(),t){let i=s||this._translations.solution;T({kind:"success",icon:"check-circle",title:this._translations.deleteComplete.replace("{{solutionName}}",i),message:"",autoClose:!0,autoCloseDuration:"fast"})}e?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(t){if(t){if("searchTerm"in t&&this._setSearchTerm(t.searchTerm||""),"sortType"in t&&this._setSortOptions(t),Object.keys(t).indexOf("type")>-1){let e=t;this._owner=e.value,this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Filter",dimensions:[e.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(t).indexOf("filter")>-1){let e=t;this._owner=e.filter===b.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(t){t&&("searchTerm"in t&&(this._setSearchTerm(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"deployments"})),"sortType"in t&&(this._setSortOptions(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let t=this._mainPanelRef.value;t.componentOnReady?.().then(()=>{if(t.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&(e.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(e=>{e.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let t=this._mainPanelRef.value;if(t?.shadowRoot){let e=t.shadowRoot.querySelector(".content-wrapper");e&&this._panelObserver.observe(e,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let t=this._configContextConsumer.value;this._cardsFetcher=new h(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new h(t.locale,t.orgUrl,t.portalURL)}}_renderCards(){return this._refs={},this._cards.map(t=>r`<solution-deployed-card .card=${t} .deployedDate=${t.created} .description=${t.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${t.title} id=${t.id??y} .itemId=${t.id} .owner=${this._owner==="My solutions"?"":t.owner} .thumbnail=${t.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(t){t&&(this._refs[t.id]=t)}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication;if(t.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let e=await S(t,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===e?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=e?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(e){e.message!=="redundant request"&&console.warn(e)}}}_getSolutionsBriefcase(){return r`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_setSortOptions(t){let e=t.sortType;e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):(e==="updated"||e==="created")&&(this._sortOrder="desc",this._sortField=e),this.sortType=e}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(t){if(t){this._newId=t;let e=10,s=500;for(let a=0;a<e&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===t));a++)a<e-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,O=100;for(let a=0;a<i;a++){if(this._refs[t]){let o=this._cards.find(D=>D.id===t);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[t]}})),this._newId="";return}await new Promise(o=>setTimeout(o,O)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${t}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:t}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c,e,h)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import d from"./QX5WB6H3.js";import c from"./XYG3Z7ZY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import"./2B4SGB3I.js";import"./TFINIJHF.js";import"./HE2XAIDT.js";import"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./JSJYFWT6.js";import"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,{b:o}])=>{return o},a,b,c,d)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"./I53PAKKW.js";import d from"./QMPT2LSN.js";import"./LRRFLTS7.js";import c from"./XYG3Z7ZY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import"./2B4SGB3I.js";import"./TFINIJHF.js";import"./HE2XAIDT.js";import"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./JSJYFWT6.js";import"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,a])=>{return a},a,b,c,d,e)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./4GJHDLZU.js";import{b as Ab}from"./2B4SGB3I.js";import{b as Eb}from"./TFINIJHF.js";import"./HE2XAIDT.js";import{a as $s,c as br,d as jb,e as Pb,k as Rb}from"./IRRMUFW7.js";import{a as Tb}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as Ob}from"./JSJYFWT6.js";import{E as $b,F as Ib,G as Sb,K as Rh,h as _b,i as ji,k as vb,l as Ph,q as bb,v as wb,w as kb,x as xb}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([gj,Jk,Gg,,,,{J:Nb,q:Cb}])=>{var Ga=class extends xb{constructor(t){if(super(t),this.it=Ph,t.type!==wb.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Ph||t==null)return this._t=void 0,this.it=t;if(t===vb)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 n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}};Ga.directiveName="unsafeHTML",Ga.resultType=1;var Ub=kb(Ga);var yj=_b`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-spacing-md)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`,mt="__start__",ht="__end__",Qr="__input__",pp="__error__",Uh="__pregel_ns_writes",si="__pregel_send",Kg="__pregel_call",Ki="__pregel_read",Cr="__pregel_checkpointer",$l="__pregel_resuming",Wu="__pregel_task_id",Xg="__pregel_stream",_j="__pregel_resume_value",Gu="__pregel_resume_map",ai="__pregel_scratchpad",Ku="__pregel_previous",vj="__pregel_durability",Lm="checkpoint_id",Nr="checkpoint_ns",bj="__pregel_node_finished",Or="checkpoint_map",wj="__pregel_abort_signals",_t="__interrupt__",pi="__resume__",Yg="__no_writes__",hp="__return__",Mh="__previous__",Yt="langsmith:hidden",Mb="__self__",ra="__pregel_tasks",jr="__pregel_push",zm="__pregel_pull",tr="00000000-0000-0000-0000-000000000000",kj=[Yt,Qr,_t,pi,pp,Yg,si,Ki,Cr,vj,Xg,$l,Wu,Kg,_j,ai,Ku,Or,Nr,Lm],Lb=Symbol.for("langgraph.command"),xj=class{[Lb];constructor(e){this[Lb]=e}};function Dm(e){let t=e;return t!=null&&typeof t.node=="string"&&t.args!==void 0}var No=class{lg_name="Send";node;args;constructor(e,t){this.node=e,this.args=jo(t)}toJSON(){return{lg_name:this.lg_name,node:this.node,args:this.args}}};function tn(e){return e instanceof No}var $j="__overwrite__";function Fm(e){return typeof e=="object"&&e!==null&&"__overwrite__"in e?[!0,e[$j]]:[!1,void 0]}function Ij(e){return Fm(e)[0]}function Wk(e){return!e||typeof e!="object"||!("__interrupt__"in e)?!1:Array.isArray(e[_t])}var nr=class extends xj{lg_name="Command";lc_direct_tool_output=!0;graph;update;resume;goto=[];static PARENT="__parent__";constructor(e){super(e),this.resume=e.resume,this.graph=e.graph,this.update=e.update,e.goto&&(this.goto=Array.isArray(e.goto)?jo(e.goto):[jo(e.goto)])}_updateAsTuples(){return this.update&&typeof this.update=="object"&&!Array.isArray(this.update)?Object.entries(this.update):Array.isArray(this.update)&&this.update.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string")?this.update:[["__root__",this.update]]}toJSON(){let e;return typeof this.goto=="string"?e=this.goto:tn(this.goto)?e=this.goto.toJSON():e=this.goto?.map(t=>typeof t=="string"?t:t.toJSON()),{lg_name:this.lg_name,update:this.update,resume:this.resume,goto:e}}};function Pt(e){return typeof e!="object"||e==null?!1:"lg_name"in e&&e.lg_name==="Command"}function jo(e,t=new Map){if(e!=null&&typeof e=="object"){if(t.has(e))return t.get(e);let n;if(Array.isArray(e))n=[],t.set(e,n),e.forEach((r,i)=>{n[i]=jo(r,t)});else if(Pt(e)&&!(e instanceof nr))n=new nr(e),t.set(e,n);else if(Dm(e)&&!(e instanceof No))n=new No(e.node,e.args),t.set(e,n);else if(Pt(e)||tn(e))n=e,t.set(e,n);else if("lc_serializable"in e&&e.lc_serializable)n=e,t.set(e,n);else{n={},t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=jo(i,t)}return n}return e}var Si=class extends Error{lc_error_code;constructor(e,t){let n=e??"";t?.lc_error_code&&(n=`${n}
|
|
2
|
+
import c from"./XYG3Z7ZY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import{b as Ab}from"./2B4SGB3I.js";import{b as Eb}from"./TFINIJHF.js";import"./HE2XAIDT.js";import{a as $s,c as br,d as jb,e as Pb,k as Rb}from"./IRRMUFW7.js";import{a as Tb}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as Ob}from"./JSJYFWT6.js";import{E as $b,F as Ib,G as Sb,K as Rh,h as _b,i as ji,k as vb,l as Ph,q as bb,v as wb,w as kb,x as xb}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([gj,Jk,Gg,,,,{p:Cb},,{n:Nb}])=>{var Ga=class extends xb{constructor(t){if(super(t),this.it=Ph,t.type!==wb.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Ph||t==null)return this._t=void 0,this.it=t;if(t===vb)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 n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}};Ga.directiveName="unsafeHTML",Ga.resultType=1;var Ub=kb(Ga);var yj=_b`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-spacing-md)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`,mt="__start__",ht="__end__",Qr="__input__",pp="__error__",Uh="__pregel_ns_writes",si="__pregel_send",Kg="__pregel_call",Ki="__pregel_read",Cr="__pregel_checkpointer",$l="__pregel_resuming",Wu="__pregel_task_id",Xg="__pregel_stream",_j="__pregel_resume_value",Gu="__pregel_resume_map",ai="__pregel_scratchpad",Ku="__pregel_previous",vj="__pregel_durability",Lm="checkpoint_id",Nr="checkpoint_ns",bj="__pregel_node_finished",Or="checkpoint_map",wj="__pregel_abort_signals",_t="__interrupt__",pi="__resume__",Yg="__no_writes__",hp="__return__",Mh="__previous__",Yt="langsmith:hidden",Mb="__self__",ra="__pregel_tasks",jr="__pregel_push",zm="__pregel_pull",tr="00000000-0000-0000-0000-000000000000",kj=[Yt,Qr,_t,pi,pp,Yg,si,Ki,Cr,vj,Xg,$l,Wu,Kg,_j,ai,Ku,Or,Nr,Lm],Lb=Symbol.for("langgraph.command"),xj=class{[Lb];constructor(e){this[Lb]=e}};function Dm(e){let t=e;return t!=null&&typeof t.node=="string"&&t.args!==void 0}var No=class{lg_name="Send";node;args;constructor(e,t){this.node=e,this.args=jo(t)}toJSON(){return{lg_name:this.lg_name,node:this.node,args:this.args}}};function tn(e){return e instanceof No}var $j="__overwrite__";function Fm(e){return typeof e=="object"&&e!==null&&"__overwrite__"in e?[!0,e[$j]]:[!1,void 0]}function Ij(e){return Fm(e)[0]}function Wk(e){return!e||typeof e!="object"||!("__interrupt__"in e)?!1:Array.isArray(e[_t])}var nr=class extends xj{lg_name="Command";lc_direct_tool_output=!0;graph;update;resume;goto=[];static PARENT="__parent__";constructor(e){super(e),this.resume=e.resume,this.graph=e.graph,this.update=e.update,e.goto&&(this.goto=Array.isArray(e.goto)?jo(e.goto):[jo(e.goto)])}_updateAsTuples(){return this.update&&typeof this.update=="object"&&!Array.isArray(this.update)?Object.entries(this.update):Array.isArray(this.update)&&this.update.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string")?this.update:[["__root__",this.update]]}toJSON(){let e;return typeof this.goto=="string"?e=this.goto:tn(this.goto)?e=this.goto.toJSON():e=this.goto?.map(t=>typeof t=="string"?t:t.toJSON()),{lg_name:this.lg_name,update:this.update,resume:this.resume,goto:e}}};function Pt(e){return typeof e!="object"||e==null?!1:"lg_name"in e&&e.lg_name==="Command"}function jo(e,t=new Map){if(e!=null&&typeof e=="object"){if(t.has(e))return t.get(e);let n;if(Array.isArray(e))n=[],t.set(e,n),e.forEach((r,i)=>{n[i]=jo(r,t)});else if(Pt(e)&&!(e instanceof nr))n=new nr(e),t.set(e,n);else if(Dm(e)&&!(e instanceof No))n=new No(e.node,e.args),t.set(e,n);else if(Pt(e)||tn(e))n=e,t.set(e,n);else if("lc_serializable"in e&&e.lc_serializable)n=e,t.set(e,n);else{n={},t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=jo(i,t)}return n}return e}var Si=class extends Error{lc_error_code;constructor(e,t){let n=e??"";t?.lc_error_code&&(n=`${n}
|
|
3
3
|
|
|
4
4
|
Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/${t.lc_error_code}/
|
|
5
5
|
`),super(n),this.lc_error_code=t?.lc_error_code}},Gk=class extends Si{get is_bubble_up(){return!0}},Sj=class extends Si{constructor(e,t){super(e,t),this.name="GraphRecursionError"}static get unminifiable_name(){return"GraphRecursionError"}},Xu=class extends Si{constructor(e,t){super(e,t),this.name="GraphValueError"}static get unminifiable_name(){return"GraphValueError"}},Ys=class extends Gk{interrupts;constructor(e,t){super(JSON.stringify(e,null,2),t),this.name="GraphInterrupt",this.interrupts=e??[]}static get unminifiable_name(){return"GraphInterrupt"}},za=class extends Ys{constructor(e,t){super([{value:e}],t),this.name="NodeInterrupt"}static get unminifiable_name(){return"NodeInterrupt"}},Kk=class extends Gk{command;constructor(e){super(),this.name="ParentCommand",this.command=e}static get unminifiable_name(){return"ParentCommand"}};function Oj(e){return e!==void 0&&e.name===Kk.unminifiable_name}function Yu(e){return e!==void 0&&e.is_bubble_up===!0}function Fs(e){return e!==void 0&&[Ys.unminifiable_name,za.unminifiable_name].includes(e.name)}var zb=class extends Si{constructor(e,t){super(e,t),this.name="EmptyInputError"}static get unminifiable_name(){return"EmptyInputError"}},bt=class extends Si{constructor(e,t){super(e,t),this.name="EmptyChannelError"}static get unminifiable_name(){return"EmptyChannelError"}},Be=class extends Si{constructor(e,t){super(e,t),this.name="InvalidUpdateError"}static get unminifiable_name(){return"InvalidUpdateError"}},Tj=class extends Si{constructor(e,t){super(e,t),this.name="UnreachableNodeError"}static get unminifiable_name(){return"UnreachableNodeError"}},Lh=class extends Si{constructor(e,t){super(e,t),this.name="StateGraphInputError",this.message="Invalid StateGraph input. Make sure to pass a valid StateDefinition, Annotation.Root, or Zod schema."}static get unminifiable_name(){return"StateGraphInputError"}},Ej=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Zm(e){return typeof e=="string"&&Ej.test(e)}function Xk(e){if(!Zm(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var kt=[];for(pu=0;pu<256;++pu)kt.push((pu+256).toString(16).slice(1));var pu;function Da(e,t=0){return(kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]).toLowerCase()}var hu,Aj=new Uint8Array(16);function Qg(){if(!hu&&(hu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!hu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hu(Aj)}var zh,mu,Dh=0,Fh=0;function Cj(e,t,n){var r=0,i=t||new Array(16);e=e||{};var s=e.node,a=e.clockseq;if(e._v6||(s||(s=zh),a==null&&(a=mu)),s==null||a==null){var o=e.random||(e.rng||Qg)();s==null&&(s=[o[0],o[1],o[2],o[3],o[4],o[5]],!zh&&!e._v6&&(s[0]|=1,zh=s)),a==null&&(a=(o[6]<<8|o[7])&16383,mu===void 0&&!e._v6&&(mu=a))}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:Fh+1,l=c-Dh+(u-Fh)/1e4;if(l<0&&e.clockseq===void 0&&(a=a+1&16383),(l<0||c>Dh)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Dh=c,Fh=u,mu=a,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var p=c/4294967296*1e4&268435455;i[r++]=p>>>8&255,i[r++]=p&255,i[r++]=p>>>24&15|16,i[r++]=p>>>16&255,i[r++]=a>>>8|128,i[r++]=a&255;for(var h=0;h<6;++h)i[r+h]=s[h];return t||Da(i)}function Nj(e){var t=typeof e=="string"?Xk(e):e,n=jj(t);return typeof e=="string"?Da(n):n}function jj(e,t=!1){return Uint8Array.of((e[6]&15)<<4|e[7]>>4&15,(e[7]&15)<<4|(e[4]&240)>>4,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,(e[1]&15)<<4|(e[2]&240)>>4,96|e[2]&15,e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Pj(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Rj="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Uj="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Mj(e,t,n){function r(i,s,a,o){var c;if(typeof i=="string"&&(i=Pj(i)),typeof s=="string"&&(s=Xk(s)),((c=s)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+i.length);if(u.set(s),u.set(i,s.length),u=n(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,a){o=o||0;for(var l=0;l<16;++l)a[o+l]=u[l];return a}return Da(u)}try{r.name=e}catch{}return r.DNS=Rj,r.URL=Uj,r}var Lj=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Db={randomUUID:Lj};function Fi(e,t,n){if(Db.randomUUID&&!e)return Db.randomUUID();e=e||{};var r=e.random||(e.rng||Qg)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Da(r)}function zj(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Zh(e,t){return e<<t|e>>>32-t}function Dj(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var s=e.length/4+2,a=Math.ceil(s/16),o=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[c*64+l*4]<<24|e[c*64+l*4+1]<<16|e[c*64+l*4+2]<<8|e[c*64+l*4+3];o[c]=u}o[a-1][14]=(e.length-1)*8/Math.pow(2,32),o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<a;++d){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=o[d][h];for(var m=16;m<80;++m)p[m]=Zh(p[m-3]^p[m-8]^p[m-14]^p[m-16],1);for(var f=n[0],b=n[1],g=n[2],y=n[3],k=n[4],x=0;x<80;++x){var O=Math.floor(x/20),L=Zh(f,5)+zj(O,b,g,y)+k+t[O]+p[x]>>>0;k=y,y=g,g=Zh(b,30)>>>0,b=f,f=L}n[0]=n[0]+f>>>0,n[1]=n[1]+b>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+k>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var Yk=Mj("v5",80,Dj);function Fb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(n),!0).forEach(function(r){Fj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fj(e,t,n){return(t=Zj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zj(e){var t=Bj(e,"string");return typeof t=="symbol"?t:t+""}function Bj(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qj(e={},t,n=0){var r=Cj(Zb(Zb({},e),{},{_v6:!0}),new Uint8Array(16));return r=Nj(r),Da(r)}var Bb=null,qb=null,An=0;function Qk(e,t,n){e=e||{};var r=0,i=new Uint8Array(16),s=e.random||(e.rng||Qg)(),a=e.msecs!==void 0?e.msecs:Date.now(),o=e.seq!==void 0?e.seq:null,c=qb,u=Bb;return a>An&&e.msecs===void 0&&(An=a,o!==null&&(c=null,u=null)),o!==null&&(o>2147483647&&(o=2147483647),c=o>>>19&4095,u=o&524287),(c===null||u===null)&&(c=s[6]&127,c=c<<8|s[7],u=s[8]&63,u=u<<8|s[9],u=u<<5|s[10]>>>3),a+1e4>An&&o===null?++u>524287&&(u=0,++c>4095&&(c=0,An++)):An=a,qb=c,Bb=u,i[r++]=An/1099511627776&255,i[r++]=An/4294967296&255,i[r++]=An/16777216&255,i[r++]=An/65536&255,i[r++]=An/256&255,i[r++]=An&255,i[r++]=c>>>4&15|112,i[r++]=c&255,i[r++]=u>>>13&63|128,i[r++]=u>>>5&255,i[r++]=u<<3&255|s[10]&7,i[r++]=s[11],i[r++]=s[12],i[r++]=s[13],i[r++]=s[14],i[r++]=s[15],t||Da(i)}function ex(e){return qj({clockseq:e})}function Zs(e,t){let n=t.replace(/-/g,"").match(/.{2}/g).map(r=>parseInt(r,16));return Yk(e,new Uint8Array(n))}var Vj="__error__",Qu="__scheduled__",Hj="__interrupt__",Jj="__resume__",Vb="[...]",Wj="[Circular]",Il=[],Bs=[];function Gj(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Kj(e,t,n,r){typeof r>"u"&&(r=Gj()),Bm(e,"",0,[],void 0,0,r);var i;try{Bs.length===0?i=JSON.stringify(e,t,n):i=JSON.stringify(e,Xj(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Il.length!==0;){var s=Il.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Bh(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);i.get!==void 0?i.configurable?(Object.defineProperty(r,n,{value:e}),Il.push([r,n,t,i])):Bs.push([t,n,e]):(r[n]=e,Il.push([r,n,t]))}function Bm(e,t,n,r,i,s,a){s+=1;var o;if(typeof e=="object"&&e!==null){for(o=0;o<r.length;o++)if(r[o]===e){Bh(Wj,e,t,i);return}if(typeof a.depthLimit<"u"&&s>a.depthLimit){Bh(Vb,e,t,i);return}if(typeof a.edgesLimit<"u"&&n+1>a.edgesLimit){Bh(Vb,e,t,i);return}if(r.push(e),Array.isArray(e))for(o=0;o<e.length;o++)Bm(e[o],o,o,r,e,s,a);else{var c=Object.keys(e);for(o=0;o<c.length;o++){var u=c[o];Bm(e[u],u,o,r,e,s,a)}}r.pop()}}function Xj(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(Bs.length>0)for(var r=0;r<Bs.length;r++){var i=Bs[r];if(i[1]===t&&i[0]===n){n=i[2],Bs.splice(r,1);break}}return e.call(this,t,n)}}var Hb,Jb;function Yj(){return Jb||(Jb=1,Hb=function(e,t){if(typeof e!="string")throw new TypeError("Expected a string");return t=typeof t>"u"?"_":t,e.replace(/([a-z\d])([A-Z])/g,"$1"+t+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+t+"$2").toLowerCase()}),Hb}var Qj=Yj(),eP=$s(Qj),fu={exports:{}},Wb;function tP(){if(Wb)return fu.exports;Wb=1;let e=/[\p{Lu}]/u,t=/[\p{Ll}]/u,n=/^[\p{Lu}](?![\p{Lu}])/gu,r=/([\p{Alpha}\p{N}_]|$)/u,i=/[_.\- ]+/,s=new RegExp("^"+i.source),a=new RegExp(i.source+r.source,"gu"),o=new RegExp("\\d+"+r.source,"gu"),c=(p,h,m)=>{let f=!1,b=!1,g=!1;for(let y=0;y<p.length;y++){let k=p[y];f&&e.test(k)?(p=p.slice(0,y)+"-"+p.slice(y),f=!1,g=b,b=!0,y++):b&&g&&t.test(k)?(p=p.slice(0,y-1)+"-"+p.slice(y-1),g=b,b=!1,f=!0):(f=h(k)===k&&m(k)!==k,g=b,b=m(k)===k&&h(k)!==k)}return p},u=(p,h)=>(n.lastIndex=0,p.replace(n,m=>h(m))),l=(p,h)=>(a.lastIndex=0,o.lastIndex=0,p.replace(a,(m,f)=>h(f)).replace(o,m=>h(m))),d=(p,h)=>{if(!(typeof p=="string"||Array.isArray(p)))throw new TypeError("Expected the input to be `string | string[]`");if(h={pascalCase:!1,preserveConsecutiveUppercase:!1,...h},Array.isArray(p)?p=p.map(b=>b.trim()).filter(b=>b.length).join("-"):p=p.trim(),p.length===0)return"";let m=h.locale===!1?b=>b.toLowerCase():b=>b.toLocaleLowerCase(h.locale),f=h.locale===!1?b=>b.toUpperCase():b=>b.toLocaleUpperCase(h.locale);return p.length===1?h.pascalCase?f(p):m(p):(p!==m(p)&&(p=c(p,m,f)),p=p.replace(s,""),h.preserveConsecutiveUppercase?p=u(p,m):p=m(p),h.pascalCase&&(p=f(p.charAt(0))+p.slice(1)),l(p,f))};return fu.exports=d,fu.exports.default=d,fu.exports}var nP=tP(),rP=$s(nP);function iP(e,t){return t?.[e]||eP(e)}function sP(e,t){return t?.[e]||rP(e)}function tx(e,t,n){let r={};for(let i in e)Object.hasOwn(e,i)&&(r[t(i,n)]=e[i]);return r}var nx="__lc_escaped__";function aP(e){return"lc"in e||Object.keys(e).length===1&&"__lc_escaped__"in e}function oP(e){return{[nx]:e}}function rx(e){return Object.keys(e).length===1&&"__lc_escaped__"in e}function cP(e){return e!==null&&typeof e=="object"&&"lc_serializable"in e&&typeof e.toJSON=="function"}function uP(e){let t;return e!==null&&typeof e=="object"?"lc_id"in e&&Array.isArray(e.lc_id)?t=e.lc_id:t=[e.constructor?.name??"Object"]:t=[typeof e],{lc:1,type:"not_implemented",id:t}}function qm(e,t=new WeakSet){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){if(t.has(e))return uP(e);if(cP(e))return e;t.add(e);let n=e;if(aP(n))return t.delete(e),oP(n);let r={};for(let[i,s]of Object.entries(n))r[i]=qm(s,t);return t.delete(e),r}return Array.isArray(e)?e.map(n=>qm(n,t)):e}function Vm(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t=e;if(rx(t))return t[nx];let n={};for(let[r,i]of Object.entries(t))n[r]=Vm(i);return n}return Array.isArray(e)?e.map(t=>Vm(t)):e}var Gb=Object.defineProperty,X=(e,t)=>{let n={};for(var r in e)Gb(n,r,{get:e[r],enumerable:!0});return Gb(n,Symbol.toStringTag,{value:"Module"}),n},lP=X({Serializable:()=>$n,get_lc_unique_name:()=>mp});function Kb(e){return Array.isArray(e)?[...e]:{...e}}function dP(e,t){let n=Kb(e);for(let[r,i]of Object.entries(t)){let[s,...a]=r.split(".").reverse(),o=n;for(let c of a.reverse()){if(o[c]===void 0)break;o[c]=Kb(o[c]),o=o[c]}o[s]!==void 0&&(o[s]={lc:1,type:"secret",id:[i]})}return n}function mp(e){let t=Object.getPrototypeOf(e);return typeof e.lc_name=="function"&&(typeof t.lc_name!="function"||e.lc_name()!==t.lc_name())?e.lc_name():e.name}var $n=class ix{lc_serializable=!1;lc_kwargs;static lc_name(){return this.name}get lc_id(){return[...this.lc_namespace,mp(this.constructor)]}get lc_secrets(){}get lc_attributes(){}get lc_aliases(){}get lc_serializable_keys(){}constructor(t,...n){this.lc_serializable_keys!==void 0?this.lc_kwargs=Object.fromEntries(Object.entries(t||{}).filter(([r])=>this.lc_serializable_keys?.includes(r))):this.lc_kwargs=t??{}}toJSON(){if(!this.lc_serializable)return this.toJSONNotImplemented();if(this.lc_kwargs instanceof ix||typeof this.lc_kwargs!="object"||Array.isArray(this.lc_kwargs))return this.toJSONNotImplemented();let t={},n={},r=Object.keys(this.lc_kwargs).reduce((o,c)=>(o[c]=c in this?this[c]:this.lc_kwargs[c],o),{});for(let o=Object.getPrototypeOf(this);o;o=Object.getPrototypeOf(o))Object.assign(t,Reflect.get(o,"lc_aliases",this)),Object.assign(n,Reflect.get(o,"lc_secrets",this)),Object.assign(r,Reflect.get(o,"lc_attributes",this));Object.keys(n).forEach(o=>{let c=this,u=r,[l,...d]=o.split(".").reverse();for(let p of d.reverse()){if(!(p in c)||c[p]===void 0)return;(!(p in u)||u[p]===void 0)&&(typeof c[p]=="object"&&c[p]!=null?u[p]={}:Array.isArray(c[p])&&(u[p]=[])),c=c[p],u=u[p]}l in c&&c[l]!==void 0&&(u[l]=u[l]||c[l])});let i={},s=new WeakSet;s.add(this);for(let[o,c]of Object.entries(r))i[o]=qm(c,s);let a=tx(Object.keys(n).length?dP(i,n):i,iP,t);return{lc:1,type:"constructor",id:this.lc_id,kwargs:a}}toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:this.lc_id}}},pP=X({getEnv:()=>ey,getEnvironmentVariable:()=>fn,getRuntimeEnvironment:()=>ux,isBrowser:()=>sx,isDeno:()=>fp,isJsDom:()=>ox,isNode:()=>cx,isWebWorker:()=>ax}),sx=()=>typeof window<"u"&&typeof window.document<"u",ax=()=>typeof globalThis=="object"&&globalThis.constructor&&globalThis.constructor.name==="DedicatedWorkerGlobalScope",ox=()=>typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent.includes("jsdom"),fp=()=>typeof Deno<"u",cx=()=>typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"&&!fp(),ey=()=>{let e;return sx()?e="browser":cx()?e="node":ax()?e="webworker":ox()?e="jsdom":fp()?e="deno":e="other",e},qh;function ux(){return qh===void 0&&(qh={library:"langchain-js",runtime:ey()}),qh}function fn(e){try{return typeof process<"u"?process.env?.[e]:fp()?Deno?.env.get(e):void 0}catch{return}}var hP=[],mP=X({}),fP=X({}),K="0123456789abcdef".split(""),gP=[-2147483648,8388608,32768,128],Cn=[24,16,8,0],gu=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],gt=[];function Jn(e,t){t?(gt[0]=gt[16]=gt[1]=gt[2]=gt[3]=gt[4]=gt[5]=gt[6]=gt[7]=gt[8]=gt[9]=gt[10]=gt[11]=gt[12]=gt[13]=gt[14]=gt[15]=0,this.blocks=gt):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Jn.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if(n!=="string"){if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var r,i=0,s,a=e.length,o=this.blocks;i<a;){if(this.hashed&&(this.hashed=!1,o[0]=this.block,this.block=o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),t)for(s=this.start;i<a&&s<64;++i)o[s>>>2]|=e[i]<<Cn[s++&3];else for(s=this.start;i<a&&s<64;++i)r=e.charCodeAt(i),r<128?o[s>>>2]|=r<<Cn[s++&3]:r<2048?(o[s>>>2]|=(192|r>>>6)<<Cn[s++&3],o[s>>>2]|=(128|r&63)<<Cn[s++&3]):r<55296||r>=57344?(o[s>>>2]|=(224|r>>>12)<<Cn[s++&3],o[s>>>2]|=(128|r>>>6&63)<<Cn[s++&3],o[s>>>2]|=(128|r&63)<<Cn[s++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),o[s>>>2]|=(240|r>>>18)<<Cn[s++&3],o[s>>>2]|=(128|r>>>12&63)<<Cn[s++&3],o[s>>>2]|=(128|r>>>6&63)<<Cn[s++&3],o[s>>>2]|=(128|r&63)<<Cn[s++&3]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=o[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Jn.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=gP[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};Jn.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,s=this.h5,a=this.h6,o=this.h7,c=this.blocks,u,l,d,p,h,m,f,b,g,y,k;for(u=16;u<64;++u)h=c[u-15],l=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=c[u-2],d=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,c[u]=c[u-16]+l+c[u-7]+d<<0;for(k=t&n,u=0;u<64;u+=4)this.first?(this.is224?(b=300032,h=c[0]-1413257819,o=h-150054599<<0,r=h+24177077<<0):(b=704751109,h=c[0]-210244248,o=h-1521486534<<0,r=h+143694565<<0),this.first=!1):(l=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),b=e&t,p=b^e&n^k,f=i&s^~i&a,h=o+d+f+gu[u]+c[u],m=l+p,o=r+h<<0,r=h+m<<0),l=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),g=r&e,p=g^r&t^b,f=a&o^~a&i,h=s+d+f+gu[u+1]+c[u+1],m=l+p,a=n+h<<0,n=h+m<<0,l=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),y=n&r,p=y^n&e^g,f=s&a^~s&o,h=i+d+f+gu[u+2]+c[u+2],m=l+p,s=t+h<<0,t=h+m<<0,l=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),k=t&n,p=k^t&r^y,f=s&a^~s&o,h=i+d+f+gu[u+3]+c[u+3],m=l+p,i=e+h<<0,e=h+m<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+s<<0,this.h6=this.h6+a<<0,this.h7=this.h7+o<<0};Jn.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,s=this.h5,a=this.h6,o=this.h7,c=K[e>>>28&15]+K[e>>>24&15]+K[e>>>20&15]+K[e>>>16&15]+K[e>>>12&15]+K[e>>>8&15]+K[e>>>4&15]+K[e&15]+K[t>>>28&15]+K[t>>>24&15]+K[t>>>20&15]+K[t>>>16&15]+K[t>>>12&15]+K[t>>>8&15]+K[t>>>4&15]+K[t&15]+K[n>>>28&15]+K[n>>>24&15]+K[n>>>20&15]+K[n>>>16&15]+K[n>>>12&15]+K[n>>>8&15]+K[n>>>4&15]+K[n&15]+K[r>>>28&15]+K[r>>>24&15]+K[r>>>20&15]+K[r>>>16&15]+K[r>>>12&15]+K[r>>>8&15]+K[r>>>4&15]+K[r&15]+K[i>>>28&15]+K[i>>>24&15]+K[i>>>20&15]+K[i>>>16&15]+K[i>>>12&15]+K[i>>>8&15]+K[i>>>4&15]+K[i&15]+K[s>>>28&15]+K[s>>>24&15]+K[s>>>20&15]+K[s>>>16&15]+K[s>>>12&15]+K[s>>>8&15]+K[s>>>4&15]+K[s&15]+K[a>>>28&15]+K[a>>>24&15]+K[a>>>20&15]+K[a>>>16&15]+K[a>>>12&15]+K[a>>>8&15]+K[a>>>4&15]+K[a&15];return this.is224||(c+=K[o>>>28&15]+K[o>>>24&15]+K[o>>>20&15]+K[o>>>16&15]+K[o>>>12&15]+K[o>>>8&15]+K[o>>>4&15]+K[o&15]),c};Jn.prototype.toString=Jn.prototype.hex;Jn.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,s=this.h5,a=this.h6,o=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255];return this.is224||c.push(o>>>24&255,o>>>16&255,o>>>8&255,o&255),c};Jn.prototype.array=Jn.prototype.digest;Jn.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};var ty=(...e)=>new Jn(!1,!0).update(e.join("")).hex(),yP=X({sha256:()=>ty});function lx(e){let t=Symbol.for(e);return{brand(n,r){let i=r?Symbol.for(`${e}.${r}`):t;class s extends n{[i]=!0;constructor(...o){super(...o)}static isInstance(o){return typeof o=="object"&&o!==null&&i in o&&o[i]===!0}}return Object.defineProperty(s,"name",{value:n.name}),s},sub(n){return lx(`${e}.${n}`)},isInstance(n){return typeof n=="object"&&n!==null&&t in n&&n[t]===!0}}}var _P=lx("langchain"),vP=X({ContextOverflowError:()=>dx,LangChainError:()=>ny,ModelAbortError:()=>Hm,addLangChainErrorFields:()=>wc,ns:()=>gp});function wc(e,t){return e.lc_error_code=t,e.message=`${e.message}
|
|
@@ -373,4 +373,4 @@ Available prompts:
|
|
|
373
373
|
${Object.keys(e).join(`
|
|
374
374
|
`)}`);return await n[1]()}function _n(e){return e?.configurable?.context?.translations}var YN=e=>{if(e&&Array.isArray(e.id)&&e.id.length>0)return e.id[e.id.length-1].replace("Message","").toLowerCase();if(e&&typeof e._getType=="function")try{return e._getType()}catch{return"human"}return"human"},z7=e=>{let t=YN(e);if(e&&e.kwargs)return{role:t,...e.kwargs};if(e&&typeof e=="object"){let n={role:t,content:typeof e.content=="string"?e.content:String(e.content||"")};return e.id&&(n.id=e.id),e.name&&(n.name=e.name),e.additional_kwargs&&(n.additional_kwargs=e.additional_kwargs),e.response_metadata&&(n.response_metadata=e.response_metadata),n}return{role:"human",content:String(e)}},D7=e=>YN(e)==="human",Nh=(e,t=3)=>{let n=e.map((i,s)=>D7(i)?s:-1).filter(i=>i!==-1);if(n.length===0)return[];let r=n.length>t?n[n.length-t]:n[0];return e.slice(r).map(z7)},QN=Object.assign({"./prompts/solutions_assistant_description.md":()=>import("./224TOFAW.js").then(e=>e.default),"./prompts/solutions_assistant_prompts.md":()=>import("./JMO7ZFWL.js").then(e=>e.default)}),ej=Ie.Root({agentExecutionContext:Ie({reducer:(e,t)=>({...e,...t}),default:()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[]})}),outputMessage:Ie({reducer:(e="",t)=>typeof t=="string"&&t.trim()?e?`${e}
|
|
375
375
|
|
|
376
|
-
${t}`:t:e,default:()=>""})}),F7=async(e,t)=>{let n=_n(t);await Br({text:n?.executingSolutionsAssistantAgent||"Preparing a response..."},t);let r=await Vn(QN,"solutions_assistant_prompts"),i=e.agentExecutionContext.messages.slice(-10),s=await U7({promptText:r,modelTier:"default",temperature:.7,messages:Nh(i)}),a=t?.configurable?.context?.clearSuggestedPrompts;return a&&a(),{outputMessage:s}},Z7=()=>new rb(ej).addNode("assistantLLM",F7).addEdge(mt,"assistantLLM").addEdge("assistantLLM",ht),B7=await Vn(QN,"solutions_assistant_description"),q7={id:"solutionsAssistant",name:"Solutions Assistant Agent",description:B7,createGraph:Z7,workspace:ej};function V7(e,t,n){let r=["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"],i=Object.assign(Object.assign({params:{}},n),e);return i.params=t.reduce((s,a)=>((e[a]||typeof e[a]=="boolean"||typeof e[a]=="number"&&e[a]===0)&&(s[a]=e[a]),s),i.params),r.reduce((s,a)=>(i[a]&&(s[a]=i[a]),s),{})}var Co=class e{constructor(t=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=t}match(...t){return this.termStack=this.termStack.concat(t),this}in(t){let n=`\`in(${t?`"${t}"`:""})\``;return!this.hasRange&&!this.hasTerms?(br(`${n} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this):(t&&t!=="*"&&(this.q+=`${t}:`),this.commit())}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?(br("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(t){return this.hasTerms?(br('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[0]=t,this)}to(t){return this.hasTerms?(br('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[1]=t,this)}boost(t){return this.commit(),this.q+=`^${t}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new e(this.q+"")}addModifier(t){return this.currentModifer?(br(`You have called \`${this.currentModifer}()\` after \`${t}()\`. Your current query was not modified.`),this):(this.commit(),this.q===""&&t!=="not"?(br(`You have called \`${t}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=t,this.q+=this.q===""?"":" ",this.q+=`${t.toUpperCase()} `,this))}hasWhiteSpace(t){return/\s/g.test(t)}formatTerm(t){return t instanceof Date?t.getTime():typeof t=="string"&&this.hasWhiteSpace(t)?`"${t}"`:t}commit(){return this.currentModifer=void 0,this.hasRange&&(this.q+=`[${this.formatTerm(this.rangeStack[0])} TO ${this.formatTerm(this.rangeStack[1])}]`,this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(t=>this.formatTerm(t)).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for(br(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;let t=this.q;this.q=t.replace(/( AND ?| NOT ?| OR ?)*$/,""),t!==this.q&&br("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}};function tj(e,t){let n;typeof e=="string"||e instanceof Co?n={httpMethod:"GET",params:{q:e}}:n=V7(e,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});let r;switch(t){case"item":r="/search";break;case"group":r="/community/groups";break;case"groupContent":if(typeof e!="string"&&!(e instanceof Co)&&e.groupId)r=`/content/groups/${e.groupId}/search`;else return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));break;case"communityUser":r="/community/users";break;default:r="/portals/self/users/search";break}let i=Pb(n)+r;return jb(i,n).then(s=>(s.nextStart&&s.nextStart!==-1&&(s.nextPage=function(){let a;return typeof e=="string"||e instanceof Co?a={q:e,start:s.nextStart}:(a=e,a.start=s.nextStart),tj(a,t)}),s))}function nj(e){return tj(e,"item")}var H7=Oe({key:ie(),value:ie(),description:ie()}),J7=yr(["Feature Layer (hosted)","Feature Layer (hosted, view)","Web Map","Instant App","Dashboard","Web Experience","Form","Table (hosted)","Table (hosted, view)","Hub Site Application","Hub Page","CSV","Data Pipeline","Desktop Application Template","Group","Notebook","QuickCapture Project"]),W7=Oe({name:ie(),type:yr(["oid","guid","globalid","integer","double","date"]),alias:ie(),description:ie()}),G7=Oe({name:ie(),type:at("string"),alias:ie(),description:ie(),choiceList:Sa(tt(ie())),length:We().int()}),Hk=gr([G7,W7]),K7=gr([gh(),tt(ie())]),X7=Oe({name:ie(),type:at("string"),alias:ie(),description:ie(),choiceList:K7,length:We().int()}),Y7=Oe({name:ie(),type:yr(["integer","double","date"]),alias:ie(),description:ie()}),Q7=gr([X7,Y7]),rj=Oe({id:We().int(),type:yr(["Point","Polyline","Polygon","Table"]),name:ie(),customFields:tt(Q7),requiredFields:tt(Hk),systemFields:tt(Hk)}),eV=Oe({itemId:ie().regex(/^[a-fA-F0-9]{32}$/),addLayers:mh(),layers:tt(rj)}),ij=Oe({id:ie().regex(/^[a-fA-F0-9]{32}$/),title:ie(),description:ie(),type:J7}),sj=Oe({title:ie(),description:ie(),tags:tt(ie()),strings:tt(H7)});Oe({solution:sj,items:tt(ij),featureLayer:eV});function tV(){return{renderer:{type:"simple",symbol:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,colorLocked:!0,anchorPoint:{x:0,y:-12.600000000000001},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:7.2,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:84.3,ymax:84.3},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[83.2,32.5],[84.3,40.7],[83.8,48.9],[81.7,56.9],[78.1,64.3],[73,70.9],[66.9,76.4],[59.7,80.5],[51.9,83.2],[43.7,84.3],[35.4,83.8],[27.4,81.7],[20,78],[13.4,73],[7.9,66.8],[3.8,59.7],[1.1,51.9],[0,43.7],[.5,35.4],[2.6,27.4],[6.3,20],[11.3,13.4],[17.5,7.9],[24.7,3.8],[32.5,1.1],[39.8,.1],[47.1,.3],[54.3,1.8],[61.1,4.5],[67.4,8.4],[72.9,13.3],[77.4,19.1],[80.9,25.5],[83.2,32.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[242,242,242,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[84.3,0],[84.3,84.3],[0,84.3],[0,0]]]}},rotation:360},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-9},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:18,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:197.7,ymax:294.7},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[98.9,0],[119.4,23.2],[139.4,49.3],[156.8,75.2],[171.2,100.8],[182.4,125.3],[190.6,148.8],[195.7,171.4],[197.7,192.9],[197.7,195.8],[197.7,200.3],[197.6,202.5],[197.5,204.8],[197.3,207.1],[197,209.4],[196.7,211.7],[196.4,214.1],[196,216.4],[195.5,218.7],[195,221.1],[194.4,223.4],[193.7,225.8],[193,228.1],[192.2,230.5],[191.4,232.8],[190.5,235.1],[189.5,237.5],[188.5,239.7],[187.4,242],[186.2,244.3],[185,246.5],[183.7,248.7],[182.4,250.9],[181,253.1],[179.5,255.2],[178,257.3],[176.4,259.4],[174.7,261.4],[173.1,263.3],[171.3,265.3],[169.5,267.2],[167.7,269],[165.8,270.8],[163.9,272.5],[161.9,274.2],[159.9,275.8],[157.8,277.4],[155.7,278.9],[153.6,280.4],[151.4,281.7],[149.2,283.1],[147,284.4],[144.8,285.6],[142.5,286.7],[140.3,287.8],[138,288.8],[135.7,289.8],[133.4,290.7],[131,291.5],[128.7,292.3],[126.4,293],[124,293.6],[121.7,294.2],[119.4,294.7],[117,295.2],[114.7,295.6],[112.4,296],[110.1,296.3],[107.8,296.5],[105.5,296.7],[103.3,296.8],[101.1,296.9],[98.8,296.9],[83.1,295.7],[67.8,292],[53.3,285.9],[39.9,277.5],[28.1,267.2],[18,255.1],[10,241.5],[4.2,226.9],[.9,211.5],[0,195.8],[.1,192.9],[2.1,171.4],[7.2,148.8],[15.4,125.3],[26.6,100.8],[41,75.2],[58.4,49.3],[78.4,23.2],[98.9,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[39,17,17,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[197.7,0],[197.7,294.7],[0,294.7],[0,0]]]}},rotation:360}],haloSize:1,scaleX:1,angleAlignment:"Display",angle:360}}}}}function nV(){return{renderer:{type:"simple",symbol:{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],size:10,angle:0,xoffset:0,yoffset:0,outline:{color:[0,0,0,255],width:0}}}}}var Hg=class e{constructor(t){this.llm_fs_lookup={},this.structure=t,this._s=this.structure?.buildSolution}static{this.TYPE_LOOKUP={point:"esriGeometryPoint",polyline:"esriGeometryPolyline",polygon:"esriGeometryPolygon"}}static{this.DRAWING_TOOL_LOOKUP={esriGeometryPoint:"esriFeatureEditToolPoint",esriGeometryPolyline:"esriFeatureEditToolLine",esriGeometryPolygon:"esriFeatureEditToolPolygon",Table:"esriFeatureEditToolNone"}}static{this.FIELD_TYPE_TO_ESRI={string:"esriFieldTypeString",integer:"esriFieldTypeInteger",double:"esriFieldTypeDouble",date:"esriFieldTypeDate",guid:"esriFieldTypeGUID",globalid:"esriFieldTypeGlobalID",oid:"esriFieldTypeOID"}}static{this.FIELD_TYPE_TO_SIMPLE=Object.fromEntries(Object.entries(e.FIELD_TYPE_TO_ESRI).map(([t,n])=>[n,t]))}dump_to_llm_template(){let t=this.structure?.buildSolution?.solution,n=Object.entries(t?.strings||{}).map(([o,c])=>({key:o,value:c.value,description:c.description})),r={title:t?.title,description:t?.description,tags:t?.tags,strings:n},i=this.structure?.buildSolution?.items,s=Object.entries(i||{}).map(([o,c])=>({id:o,title:c.title,description:c.description,type:c.type})),a=[];for(let[o,c]of Object.entries(i||{})){if(c.type!=="Feature Layer (hosted)")continue;let u=[];for(let l of c.service?.layers||[]){let d=this._get_fields(l);u.push({id:l.id,type:"",name:l.name,customFields:[],requiredFields:d,systemFields:[]})}for(let l of c.service?.tables||[]){let d=this._get_fields(l);u.push({id:l.id,type:"Table",name:l.name,customFields:[],requiredFields:d,systemFields:[]})}a.push({itemId:o,addLayers:c.addLayers,layers:u})}return{solution:r,items:s,featureLayers:a}}_get_fields(t){let n=[];for(let r of t.fields||[])n.push({name:r.name,type:e.FIELD_TYPE_TO_SIMPLE[r.type]||r.type,alias:r.alias,description:e._get_field_description(r.description),choiceList:e._get_field_domain(r.domain)});return n}static _get_field_description(t){if(t)try{return JSON.parse(t).value||t}catch{return t}}static _get_field_domain(t){if(t)return t.codedValues?.map(n=>n.code)}apply_llm_template(t){let n=this._s.solution;this.llm_fs_lookup={};for(let o of t.featureLayers){this.llm_fs_lookup[o.itemId]={};for(let c of o.layers)this.llm_fs_lookup[o.itemId][c.id]=c}for(let[o,c]of Object.entries(this._s.items))c.type==="Feature Layer (hosted, view)"&&(this.llm_fs_lookup[o]={...this.llm_fs_lookup[c.source]});n.title=t.solution.title,n.description=t.solution.description,n.tags=t.solution.tags;let r=n.strings;for(let o of t.solution.strings)r[o.key]&&(r[o.key].value=o.value);let i={},s=new Set,a=this._s.items;for(let o of t.items){let c=a[o.id];if(c)if(c.title=o.title,c.description=o.description,c.type==="Web Map")this._apply_web_map(c);else if(c.type==="Feature Layer (hosted)"){this._apply_feature_service(c,o.id,!1);let u=new Jg(c).generate_data();c.data=u,i[o.id]=u}else c.type==="Feature Layer (hosted, view)"&&(this._apply_feature_service(c,o.id,!0),s.add(o.id))}for(let o of s){let c=a[o];c.data=i[c.source]}return this.structure}_apply_web_map(t){if(t.layerSources)for(let n of[...t.layers||[],...t.tables||[]]){let[r,i]=this._extract_id_and_layid(n.url),s=this.llm_fs_lookup[r]?.[i];s&&(n.title=s.name)}}_extract_id_and_layid(t){let n=t.replace(/[{}]/g,"").split("."),r=n[0],i=parseInt(n[1].replace("layer",""));return[r,i]}_apply_feature_service(t,n,r=!1){let i=t.source||n,s=this.llm_fs_lookup[i];for(let a of[...t.service.layers,...t.service.tables])this._apply_layer(a,s,r)}_apply_layer(t,n,r=!1){let i=n[t.id];if(!i||(t.name=i.name,r))return;let s=e.TYPE_LOOKUP[i.type.toLowerCase()]||i.type;s.toLowerCase()==="table"?t.type=s:t.geometryType=s,t.editFieldsInfo=this._edit_fields_info(),t.globalIdField="globalid",t.objectIdField="objectid",t.uniqueIdField={name:"objectid",isSystemMaintained:!0},t.hasAttachments=!0,this._update_relationships(t,n),this._update_fields(t,i),this._update_templates(t),this._update_drawing_info(t)}_update_relationships(t,n){let r=t.relationships||[];for(let i of r){let s=n[i.relatedTableId];s&&(i.name=s.name)}}_update_fields(t,n){let r=[],i=[[!1,n.customFields],[!0,n.requiredFields],[!0,n.systemFields]];for(let[s,a]of i)if(Array.isArray(a))for(let o of a){let c={name:o.name,alias:o.alias,type:e.FIELD_TYPE_TO_ESRI[o.type]||o.type,description:JSON.stringify({value:o.description,fieldValueType:""},null,0),domain:this._create_domain(o.choiceList,o.name),required:s};if(o.type?.toLowerCase()==="string"){let u=256;o.choiceList&&(u=Math.max(...o.choiceList.map(l=>l.length))+10),c.length=u}r.push(c)}t.fields=r}_update_templates(t){let n=e.DRAWING_TOOL_LOOKUP[t.geometryType||t.type];t.templates=[{name:t.name,description:"",drawingTool:n,prototype:{attributes:{}}}]}_update_drawing_info(t){if(t.drawingTool==="esriGeometryPoint")t.drawingInfo=nV();else return}_create_domain(t,n){return t?{type:"codedValue",name:`${n}_${crypto.randomUUID().replace(/-/g,"")}`,codedValues:t.map(r=>({name:r,code:r}))}:null}_edit_fields_info(){return{creationDateField:"created_date",creatorField:"created_user",editDateField:"last_edited_date",editorField:"last_edited_user"}}},Jg=class{constructor(t){this.item_def=t,this.source_service_props=this.item_def.service}generate_data(){let t={};for(let n of this.source_service_props.layers||[]){let r={id:n.id};r.formInfo=this._generate_form_info(n),r.popupInfo=this._generate_popup_info(n),r.layerDefinition=this._generate_drawing_info(n),t.layers=t.layers||[],t.layers.push(r)}for(let n of this.source_service_props.tables||[]){let r={id:n.id};r.formInfo=this._generate_form_info(n),r.popupInfo=this._generate_popup_info(n),t.tables=t.tables||[],t.tables.push(r)}return t}_generate_form_info(t){let n=[];for(let i of t.fields){if(i.required)continue;let s={label:i.alias,type:"field",editableExpression:"expr/system/true",fieldName:i.name,inputType:this._get_input_type(i.type,i.domain,i.length)};n.push(s)}let r=t.relationships||[];for(let i of r)n.push({description:"",label:i.name,type:"relationship",displayCount:3,displayType:"list",editableExpression:"expr/system/true",orderByFields:[{field:"created_date",order:"asc"}],relationshipId:i.id,title:i.name});return{formElements:n,expressionInfos:[{expression:"false",name:"expr/system/false",returnType:"boolean",title:"False"},{expression:"true",name:"expr/system/true",returnType:"boolean",title:"True"}],title:t.name}}_generate_popup_info(t){let n=[],r=[];for(let s of t.fields)s.required||r.push({fieldName:s.name,isEditable:!0,label:s.alias,visible:!0});n.push({type:"fields",description:"",fieldInfos:r});let i=t.relationships||[];if(i.length&&t.type!=="Table")for(let s of i)n.push({type:"relationship",description:"",displayCount:3,displayType:"list",orderByFields:[{field:"created_date",order:"asc"}],relationshipId:s.id});return n.push({type:"attachments",description:"",displayType:"auto",title:""}),{popupElements:n,showLastEditInfo:!1,title:""}}_generate_drawing_info(t){return t.geometryType==="esriGeometryPoint"?{drawingInfo:tV()}:{drawingInfo:{}}}_get_input_type(t,n,r){return t==="esriFieldTypeString"&&!n?{type:"text-box",maxLength:r||255,minLength:0}:t==="esriFieldTypeString"&&n?{type:"combo-box",noValueOptionLabel:"No value",showNoValueOption:!0}:["esriFieldTypeInteger","esriFieldTypeDouble"].includes(t)?{type:"text-box",minLength:0}:t==="esriFieldTypeDate"?{type:"datetime-picker",includeTime:!1}:{type:"text-box",maxLength:r||255,minLength:0}}},dp="966b251241bb4e3bb9ee3f2b92921aa5",rV="Build",iV="Embeddings",ko={"field inspections":{id:"b5327547c3fd4f77aa605c055dd9bb65",display:"Field Inspections"},"spatial data management":{id:"39488e3668364d9488089d47f77499aa",display:"Spatial Data Management"},"points of interest":{id:"db71359ab2f4405f9777718a9b93e373",display:"Points of Interest"}},aj=[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset.",choiceList:null},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record.",choiceList:null},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created.",choiceList:null},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record.",choiceList:null},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited.",choiceList:null},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record.",choiceList:null}],ii=Object.assign({"./prompts/create_design_prompt.md":()=>import("./WROPXUSZ.js").then(e=>e.default),"./prompts/create_user_query.md":()=>import("./4TL66G66.js").then(e=>e.default),"./prompts/description.md":()=>import("./CQIP3CFN.js").then(e=>e.default),"./prompts/extract-template.md":()=>import("./NTOQES4U.js").then(e=>e.default),"./prompts/extract-use-case.md":()=>import("./CIG6UPFZ.js").then(e=>e.default),"./prompts/matching_solution_prompt.md":()=>import("./NUVTCMAW.js").then(e=>e.default),"./prompts/prompts.md":()=>import("./46C7TV4N.js").then(e=>e.default),"./prompts/review_use_case_prompt.md":()=>import("./BDKWDKBM.js").then(e=>e.default),"./prompts/system_prompt.md":()=>import("./O3G7OWBQ.js").then(e=>e.default),"./prompts/valid_tempates.md":()=>import("./KQBIVJ7H.js").then(e=>e.default),"./prompts/workflow_1_step_4.md":()=>import("./HQE4ABPK.js").then(e=>e.default)}),oj=e=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("arcgis-solution-design-update",{detail:e}))},cj=Ie.Root({activePanel:Ie({reducer:(e,t)=>t==="chat"||t==="builder"?t:e??"chat",default:()=>"chat"}),agentExecutionContext:Ie({reducer:(e,t)=>({...e,...t}),default:()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[]})}),buildSolutionParameters:Ie({reducer:(e,t)=>t??null,default:()=>null}),directToCreate:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),cancelled:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),isAppropriate:Ie({reducer:(e,t)=>t===null||typeof t=="boolean"?t:e??null,default:()=>null}),isAssistantBusy:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),isBuilderEditing:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),outputMessage:Ie({reducer:(e="",t)=>typeof t=="string"&&t.trim()?t:e,default:()=>""}),solutionDesign:Ie({reducer:(e,t)=>t??null,default:()=>null}),solutionHistory:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]}),solutionMatch:Ie({reducer:(e,t)=>typeof t=="string"||t===null?t:e??null,default:()=>null}),templateDescription:Ie({reducer:(e,t)=>typeof t=="string"||t===null?t:e??null,default:()=>null}),templateItems:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]}),ticket:Ie({reducer:(e,t)=>t??null,default:()=>null}),topFiveMatches:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]})}),uj=e=>{let t=e?.trim().toLowerCase();return["field inspections","inspections","fieldinspections"].includes(t)?"Field Inspections":["spatial data management","spatial","data management"].includes(t)?"Spatial Data Management":["points of interest","poi"].includes(t)?"Points of Interest":""},jh=e=>({outputMessage:_n(e)?.builderMessages?.cancelledMessage,ticket:null,cancelled:!0}),sV=(e,t)=>({solution:{title:`${ko[e].display} Solution`,description:`Solution created for: ${t??"unspecified use case"}`,tags:[e],strings:[{key:"defaultTitle",value:`${ko[e].display} solution`,description:"Default display title for the solution"}]},items:[{id:crypto.randomUUID?.()??"00000000000000000000000000000000",title:`${ko[e].display} item`,description:`Item for ${t}`,type:ko[e].display}],featureLayer:{itemId:"00000000000000000000000000000000",addLayers:!0,layers:[{id:0,type:"Point",name:"MainLayer",customFields:[],requiredFields:[],systemFields:aj}]}}),aV=async(e=dp,t)=>{let n=`typekeywords:${rV} ${e?`AND group:${e}`:""}`.trim();return(await nj({q:n,authentication:t?{token:t}:void 0,num:100}))?.results??[]},oV=async(e=dp,t)=>{let n=`typekeywords:${iV} ${e?`AND group:${e}`:""}`.trim();return(await nj({q:n,authentication:t?{token:t}:void 0,num:100}))?.results??[]},lj=async(e,t)=>await Rb(e,{authentication:t?{token:t}:void 0}),cV=e=>e.replaceAll("{","{{").replaceAll("}","}}"),dj=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t)){let s=`{${r.toUpperCase()}}`,a=typeof i=="string"?i:JSON.stringify(i);n=n.replace(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),a)}return n},uV=e=>{if(!e)return null;let t=lV(e);return t&&Object.prototype.hasOwnProperty.call(ko,t)?t:null},lV=e=>{let t=e&&e.trim().toLowerCase();return t==="inspections"||t==="inspection"?"field inspections":t==="poi"?"points of interest":t==="spatial"?"spatial data management":t},pj=e=>!(!e||!e.solution?.title||!e.solution?.description||!Array.isArray(e.items)||!e.featureLayer),dV=De.object({solution:sj,items:De.array(ij),featureLayer:De.object({itemId:De.string().regex(/^[a-fA-F0-9]{32}$/),addLayers:De.boolean(),layers:De.array(rj.omit({systemFields:!0}))})}),pV=e=>e?.featureLayer?.layers?{...e,featureLayer:{...e.featureLayer,layers:e.featureLayer.layers.map(({systemFields:t,...n})=>n)}}:e,hV=e=>e?.featureLayer?.layers?{...e,featureLayer:{...e.featureLayer,layers:e.featureLayer.layers.map(t=>({...t,systemFields:aj}))}}:e,mV=e=>/^(new (conversation|chat)|start over)$/i.test(e.trim()),fV=e=>/^(undo)$/i.test(e.trim()),gV=e=>/^(redo)$/i.test(e.trim()),yV=e=>{let t=e.trim().toLowerCase();return/(edit|update|modify|change|revise|refine|tweak|add|remove|delete)\b/.test(t)||/(field|fields|tag|tags|description|descriptions|layer|layers|item|items|schema)\b/.test(t)},hj=e=>{let t=[...e.agentExecutionContext?.messages||[]].reverse().find(n=>(n.type||"").toLowerCase()==="human");if(t){let n=t;if(typeof n.content=="string")return n.content;if(typeof n.text=="string")return n.text}return""},_V=async(e,t)=>{let n=_n(t),r=(e.agentExecutionContext?.userRequest||"").trim();if(mV(r))return oj(null),{outputMessage:n?.builderMessages?.newConversationStarted||"",ticket:null,solutionDesign:null,solutionMatch:null,directToCreate:!1,cancelled:!1};if(e.cancelled)return{cancelled:!0,directToCreate:!1};if(!r)return{cancelled:!0,directToCreate:!1};if(fV(r))return window.dispatchEvent(new CustomEvent("arcgis-solution-undo")),{outputMessage:n?.builderMessages?.undoDesignChange||"",directToCreate:!1};if(gV(r))return window.dispatchEvent(new CustomEvent("arcgis-solution-redo")),{outputMessage:n?.builderMessages?.redoDesignChange||"",directToCreate:!1};let i=t?.configurable?.context?.solutionDesignJson;if(i)try{let s=JSON.parse(i);if(pj(s))return yV(r)?{solutionDesign:s,ticket:e.ticket??{template:"",useCase:""},directToCreate:!0}:{cancelled:!0,directToCreate:!1}}catch{}return{directToCreate:!1}},vV=async(e,t)=>{let n=_n(t);await Br({text:n?.agentProgress?.builderAgentExecuting||""},t),await Br({text:n?.agentProgress?.builderAgentUnderstanding||""},t);let r=Nh(e.agentExecutionContext?.messages),i=(async()=>{let l=await Vn(ii,"extract-use-case"),d=De.object({useCase:De.string().nullable()});return(await Ao({promptText:l,modelTier:"default",temperature:0,messages:r,schema:d}))?.useCase?.trim()||null})(),s=(async()=>{let l=await Vn(ii,"review_use_case_prompt"),d=hj(e),p=dj(l,{USECASE:d}),h=De.object({isAppropriate:De.boolean()});return(await Ao({promptText:p,modelTier:"default",temperature:0,messages:r,schema:h}))?.isAppropriate??!0})(),a=(async()=>{let l=await Vn(ii,"extract-template"),d=await Vn(ii,"valid_tempates"),p=l.replace("{{validTemplates}}",d),h=De.object({templateId:De.string().nullable()});return(await Ao({promptText:p,modelTier:"default",temperature:0,messages:r,schema:h}))?.templateId??null})(),[o,c,u]=await Promise.all([i,s,a]);return{ticket:{template:uj(u??""),useCase:o},isAppropriate:c}},bV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="appropriatenessGate";if(r?.agentId==="solutionsBuilder"&&r?.id===i){let s=String(r.payload||"").trim();return s.toLowerCase()==="cancel"?jh(t):{ticket:{template:"",useCase:s},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(s)]}}}if(e.isAppropriate===!1)throw new za({agentId:"solutionsBuilder",id:i,kind:"textInput",message:n?.builderMessages?.inappropriateUseCase||""});return e},wV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="ensureUseCase";if(r?.agentId==="solutionsBuilder"&&r?.id===i&&!e.ticket?.useCase){let s=String(r.payload||"").trim();return s.toLowerCase()==="cancel"?jh(t):{ticket:{template:"",useCase:s},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(s)]}}}if(!(e.ticket?.useCase??""))throw new za({agentId:"solutionsBuilder",id:i,kind:"textInput",message:n?.builderMessages?.describeWorkflowPrompt||""});return e},kV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="resolveTemplate";if(r?.agentId==="solutionsBuilder"&&r?.id===i){let s=String(r.payload||"").trim();if(s.toLowerCase()==="cancel")return jh(t);let a=uj(s);if(a)return{ticket:{...e.ticket??{template:"",useCase:""},template:a},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(`Selected template: ${a}`)]}}}if(!(e.ticket?.template??""))throw new za({agentId:"solutionsBuilder",id:i,kind:"singleSelection",message:n?.builderMessages?.selectTemplatePrompt||"",metadata:["Field Inspections","Spatial Data Management","Points of Interest"]});return e},xV=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentSearching||""},t);try{let r=t?.configurable?.context?.token,i=await aV(dp,r),s=await oV(dp,r),a=await lj(s[0]?.id??"",r),o=[];e.ticket.template&&o.push(e.ticket.template),e.ticket.useCase&&o.push(e.ticket.useCase);let c=o.join(" \u2014 "),u=await E7([c]),l=a.items.map((p,h)=>({index:h,score:L7(u[0],p.embedding)}));l.sort((p,h)=>h.score-p.score);let d=l.slice(0,5).map(({index:p})=>{let h=a.items[p];return{item:{...h,title:h.title??"",snippet:h.snippet??"",description:h.description??""}}});return{templateItems:i,topFiveMatches:d}}catch(r){return console.warn("Failed to search existing solutions:",r),{templateItems:[]}}},$V=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentFindingMatch||""},t);let r=await Vn(ii,"matching_solution_prompt"),i=[];Object.keys(e.topFiveMatches).forEach(o=>{let c=e.topFiveMatches[parseInt(o,10)]?.item;i.push({title:c.title,snippet:c.snippet||"",description:c.description||""})});let s=cV(dj(r,{TEMPLATE:e.ticket?.template||"",USECASE:e.ticket?.useCase||"",CANDIDATES:i})),a=De.object({solutionMatch:De.string().nullable()});return{solutionMatch:(await Ao({promptText:s,modelTier:"default",temperature:0,messages:Nh(e.agentExecutionContext?.messages),schema:a,inputVariables:{TEMPLATE:e.ticket.template,USECASE:e.ticket.useCase,CANDIDATES:i}}))?.solutionMatch??null}},IV=async(e,t)=>{if(e.cancelled)return e;let n=_n(t),r="confirmContinueExistingSolution",i=t?.configurable?.hitlResponse;if(e.solutionMatch&&(!i||i.agentId!=="solutionsBuilder"||i.id!==r))throw new za({agentId:"solutionsBuilder",id:r,kind:"booleanChoice",message:(n?.builderMessages?.existingSolutionMatch||"").replace("{{solutionMatch}}",e.solutionMatch),metadata:["Yes","No"]});let s=String(i?.payload||"").trim().toLowerCase();if(s==="false"||s==="no")return jh(t);let a=null;e.templateItems.some(u=>u.title===e.ticket?.template?(a=u,!0):!1);let o=null,c=null;if(a?.id)try{let u=t?.configurable?.context?.token;a=await lj(a.id,u),o=new Hg(a?.params).dump_to_llm_template(),c=a?.params?.templateDescription??null}catch(u){console.warn("Failed to fetch matched solution item data:",u)}return{...e,solutionDesign:o,templateDescription:c}},SV=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentCreatingDesign||""},t);let r=De.object({reply:De.string(),solutionDesign:dV}),i=pV(e.solutionDesign),s=hj(e)||e.agentExecutionContext.userRequest,a=await Vn(ii,"create_design_prompt"),o=await Vn(ii,"create_user_query"),c=await Ao({promptText:a,schema:r,messages:Nh([new At(o)]),modelTier:"advanced",temperature:0,inputVariables:{currentDesign:i,templateInstructions:e.templateDescription??"",query:s}}),u=c?.solutionDesign?hV(c.solutionDesign):sV(uV(e.ticket.template)??"field inspections",e.ticket.useCase);if(!pj(u))throw new Error("Generated design failed validation.");return oj(u),{outputMessage:c?.reply||"",solutionDesign:u,directToCreate:!1}},OV=async(e,t)=>{let n=_n(t);return await Br({text:n?.agentProgress?.builderAgentValidating||""},t),console.log(e),{directToCreate:!1,cancelled:!0}},TV=()=>new rb(cj).addNode("commandHandler",_V).addNode("parallelIntentAnalysis",vV).addNode("appropriatenessGate",bV).addNode("ensureUseCase",wV).addNode("resolveTemplate",kV).addNode("searchExistingSolutions",xV).addNode("findMatchingSolution",$V).addNode("confirmContinueExistingSolution",IV).addNode("createSolutionDesign",SV).addNode("validateSolutionDesign",OV).addEdge(mt,"commandHandler").addConditionalEdges("commandHandler",e=>e.cancelled?ht:e.directToCreate?"createSolutionDesign":"parallelIntentAnalysis").addEdge("parallelIntentAnalysis","appropriatenessGate").addConditionalEdges("appropriatenessGate",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":e.isAppropriate===!0&&e.ticket?.useCase&&e.ticket?.template?"searchExistingSolutions":"ensureUseCase").addConditionalEdges("ensureUseCase",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":"resolveTemplate").addConditionalEdges("resolveTemplate",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":"searchExistingSolutions").addEdge("searchExistingSolutions","findMatchingSolution").addEdge("findMatchingSolution","confirmContinueExistingSolution").addEdge("confirmContinueExistingSolution","createSolutionDesign").addEdge("createSolutionDesign","validateSolutionDesign").addEdge("validateSolutionDesign",ht),EV=await Vn(ii,"description"),AV={id:"solutionsBuilder",name:"Solutions Builder Agent",description:EV,createGraph:TV,workspace:cj},CV=Object.assign({"./prompts/solutions_explorer_description.md":()=>import("./36TEZXBH.js").then(e=>e.default)});function NV(e){return e.replace(/<sup>\[\[(\d+)\]\]\(([^)]+)\)<\/sup>/g,'<sup><a href="$2">[$1]</a></sup>')}function jV(e,t){if(t.startsWith(e))return t.slice(e.length);let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return t.slice(n)}function PV(e){return e&&e.helperServices.aiAssistantServices?`${e.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat`:null}var RV=e=>new Promise(t=>setTimeout(t,e)),mj=Ie.Root({agentExecutionContext:Ie({reducer:(e,t)=>({...e,...t}),default:()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[]})}),outputMessage:Ie({default:()=>"",reducer:(e,t)=>typeof t!="string"||t.length===0?e:e+t}),_lastFullOutput:Ie({default:()=>"",reducer:(e,t)=>typeof t!="string"?e:t}),solutionResponse:Ie({reducer:(e,t)=>t??null,default:()=>null}),documentSkillUrl:Ie({reducer:(e,t)=>t??null,default:()=>null}),conversationId:Ie({reducer:(e,t)=>t??e,default:()=>null})}),UV=()=>new rb(mj).addNode("initializeAgent",LV).addNode("askSolutionsQuestions",MV).addEdge(mt,"initializeAgent").addEdge("initializeAgent","askSolutionsQuestions").addEdge("askSolutionsQuestions",ht),MV=async(e,t)=>{let n=_n(t),r=e.documentSkillUrl;await Br({text:n.agentProgress.explorerAgentSearching},t);let i=async d=>{let p=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",token:t?.configurable?.context?.token},body:JSON.stringify(d)});if(!p.ok)throw new Error(`HTTP ${p.status} calling ${r}`);return p.json()},s=await i({message:e.agentExecutionContext.userRequest,conversationId:t?.configurable?.context?.convoId??void 0,context:{kind:"DocAIAssistantRequest",filters:{persona:{persona:"solutions"}}}});s.conversationId&&t?.configurable?.context?.setConversationId&&t.configurable.context.setConversationId(s.conversationId);let a={message:s.message,conversationId:s.conversationId,hasMore:s.hasMore,ackSequenceNumber:s.sequenceNumber,inquiryId:s.inquiryId},o=e._lastFullOutput??"",c="",u=null,l=async d=>{let p=d.context?.results?.[0]?.reply??"",h=NV(p),m=jV(o,h);c+=m,o=h,h!==""&&d.context?.results?.[0]?.followupQuestions&&(u=d.context.results[0].followupQuestions);let f=d.context?.results?.[0]?.status?.currentStatusStep;if(f){let b="";f===1?b=n.agentProgress.explorerAgentReading:f===2?b=n.agentProgress.explorerAgentReviewing:f===3&&(b=n.agentProgress.explorerAgentPreparing),await Br({text:b},t)}};for(await l(s);a.hasMore;)await RV(500),s=await i({conversationId:a.conversationId,ackSequenceNumber:a.ackSequenceNumber,inquiryId:a.inquiryId}),a={message:s.message,conversationId:s.conversationId,hasMore:s.hasMore,ackSequenceNumber:s.sequenceNumber,inquiryId:s.inquiryId},await l(s);if(u&&t?.configurable?.context?.updateSuggestedPrompts){let d=t.configurable.context.updateSuggestedPrompts,p=u;setTimeout(()=>d(p),0)}return{outputMessage:c,_lastFullOutput:o,solutionResponse:a,conversationId:a.conversationId}},LV=async(e,t)=>{let n=null;return e.documentSkillUrl===null&&t?.configurable?.context?.portal&&(n=PV(t.configurable.context.portal)),{documentSkillUrl:n}},zV=await Vn(CV,"solutions_explorer_description"),DV={id:"solutionsExplorer",name:"Solutions Explorer Agent",description:zV,createGraph:UV,workspace:mj},FV="https://links.esri.com/solutions/agol-organizational-account",ZV="https://links.esri.com/solutions/configure-assistants",Wg=class extends Sb{constructor(){super(),this.open=!1,this.userFirstName="",this.builderVisible=!1,this._conversationId=void 0,this._orgSettings={aiAssistantsEnabled:!1,blockBetaApps:!0,colocateCompute:!1},this._suggestedPrompts=[],this._hasInteracted=!1,this._isMobile=window.innerWidth<=800,this._translations=Tb({name:"arcgis-solutions-assistant",blocking:!0}),this._builderWidth=48,this._solutionDesignJson='{ "solution": null }',this._isAssistantBusy=!1,this._isBuilderBusy=!1,this._assistantRef=$b(),this._configContextConsumer=Eb({context:Ab,subscribe:!0,callback:t=>{t?.userSession&&!this.userFirstName&&this._loadUserFirstName(),t?.authentication?.PortalSubset?.orgSettings&&(this._orgSettings=t?.authentication?.PortalSubset?.orgSettings)}}),this._handleResize=()=>{this._isMobile=window.innerWidth<=800},this.closeAssistant=bb(),this._handleAssistantLinkClick=t=>{let n=t.composedPath().find(r=>r instanceof HTMLAnchorElement);n?.href&&(t.preventDefault(),window.open(n.href,"_blank","noopener,noreferrer"))},this._onSolutionDesignUpdate=t=>{let n=t.detail;this._solutionDesignJson=n?JSON.stringify(n,null,2):'{ "solution": null }'},this._handleSignIn=()=>{this._configContextConsumer.value?.authentication?.signIn("aiOpen")},this._checkURLOpenParameter=()=>{this.open=this._configContextConsumer.value?.authentication?.SignInParam==="aiOpen"||this.open},this.listenOn(window,"arcgisFeedback",t=>{let n=t.detail,{agentPicked:r,taskAssigned:i}=this._parseAgentPickedAndTask(n.log);this._sendFeedback(n.content,i??"",n.feedback?.positive?"Good":"Bad",r??"")})}static{this.properties={open:5,userFirstName:1,builderVisible:5,_conversationId:16,_orgSettings:16,_suggestedPrompts:16,_hasInteracted:16,_isMobile:16,_translations:16,_builderWidth:16,_solutionDesignJson:16,_isAssistantBusy:16,_isBuilderBusy:16}}static{this.styles=yj}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}connectedCallback(){super.connectedCallback(),window.addEventListener("arcgis-solution-design-update",this._onSolutionDesignUpdate),this.el.addEventListener("click",this._handleAssistantLinkClick),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){window.removeEventListener("arcgis-solution-design-update",this._onSolutionDesignUpdate),this.el.removeEventListener("click",this._handleAssistantLinkClick),window.removeEventListener("resize",this._handleResize),super.disconnectedCallback()}loaded(){this._checkURLOpenParameter()}load(){this._configContextConsumer.value?.portalURL&&(gj.portalUrl=this._configContextConsumer.value.portalURL)}firstUpdated(t){this._loadUserFirstName()}willUpdate(t){t.has("open")&&this.open&&window.dispatchEvent(new CustomEvent("openAssistant")),this._configContextConsumer.value?.userSession?.token&&this._configContextConsumer.value?.authentication?.CanUseAI}_renderNoSign(){return ji`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage??Rh} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`}_renderNoPermission(){return ji`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ub(this._translations.noPermissionMessage.replace("{{orgUrl}}",FV).replace("{{configAI}}",ZV))}</div></calcite-notice>`}render(){let t=this._suggestedPrompts.length>0?this._suggestedPrompts:Object.values(this._translations.defaultFollowUpQuestions);return this._suggestedPrompts.length>0?t=this._suggestedPrompts:this._hasInteracted||(t=[...Object.values(this._translations.defaultFollowUpQuestions)]),ji`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token?this._configContextConsumer.value?.authentication?.CanUseAI?ji`${!this._isMobile&&ji`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.solutionBuilder} indicator .active=${this.builderVisible} selection-appearance=highlight @click=${()=>{window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"))}} scale=m slot=header-actions-end></calcite-action>`||""}<calcite-action id=newChatButton icon=speech-bubble-plus .text=${this._translations.tooltips.newConversation} @click=${()=>{this._conversationId=void 0,this._suggestedPrompts=[],this._hasInteracted=!1,this._assistantRef.value?.clearChatHistory()}} scale=m slot=header-actions-end></calcite-action><calcite-tooltip placement=bottom reference-element=newChatButton><span>${this._translations.tooltips.newConversation}</span></calcite-tooltip>${!this._isMobile&&ji`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.toggleSolutionBuilder}</span></calcite-tooltip>`||""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage??Rh} .suggestedPrompts=${t} @arcgisSubmit=${n=>{console.log("arcgis submit: ",n.detail),this._suggestedPrompts=[],this._hasInteracted=!0;let r=Date.now(),i=Nb(r),s=n.detail||"Unknown";this._telemetry?.logEvent({category:Cb.ASSISTANT,action:"Chat",dimensions:[s],metrics:[i]})}} @arcgisFeedback=${n=>{n.detail}} ${Ib(this._assistantRef)}><arcgis-assistant-agent .agent=${DV} .context=${{token:this._configContextConsumer.value?.userSession?.token,convoId:this._conversationId,portal:this._configContextConsumer.value?.authentication.Portal,assistantRef:this._assistantRef,translations:this._translations,updateSuggestedPrompts:n=>{this._suggestedPrompts=n},setConversationId:n=>{this._conversationId=n}}}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${q7} .context=${{translations:this._translations,clearSuggestedPrompts:()=>{this._suggestedPrompts=[]}}}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${AV} .context=${{solutionDesignJson:this._solutionDesignJson,translations:this._translations}}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=outline kind=neutral .label=${this._translations.betaTag} scale=s>${this._translations.betaTag}</calcite-chip><span>${this._translations.disclaimerMessage} <a href=https://links.esri.com/solutions/security-concern target=_blank>${this._translations.reportConcern}</a></span></div>`:this._renderNoPermission():this._renderNoSign()}<calcite-action icon=x id=closeAssistantButton label=Close @click=${()=>{this.closeAssistant.emit(!0)}} slot=header-actions-end text=Close></calcite-action><calcite-tooltip placement=bottom reference-element=closeAssistantButton><span>${this._translations.tooltips.close}</span></calcite-tooltip></calcite-panel>`}_sendFeedback(t,n,r,i){let s=`https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(r)}&field:question=${encodeURIComponent(n)}&field:answer=${encodeURIComponent(t)}&field:context=${encodeURIComponent(JSON.stringify({agent:i}))}&field:version=${encodeURIComponent("v2")}`;window.open(s,"_blank")}async _loadUserFirstName(){try{let t=await this._configContextConsumer.value?.userSession?.getUser();if(t?.fullName){let n=t.fullName.split(" ")[0];this.userFirstName=n}}catch{}}_parseAgentPickedAndTask(t){let n=t.find(o=>typeof o=="string"&&o.includes("Agent picked:"))??null;if(!n)return{agentPicked:null,taskAssigned:null};let r=/Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i,i=n.match(r);if(!i)return{agentPicked:null,taskAssigned:null};let s=i[1].trim(),a=i[2].trim();return{agentPicked:s,taskAssigned:a}}};Ob("arcgis-solutions-assistant",Wg);return Wg},"config","identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request",a)
|
|
376
|
+
${t}`:t:e,default:()=>""})}),F7=async(e,t)=>{let n=_n(t);await Br({text:n?.executingSolutionsAssistantAgent||"Preparing a response..."},t);let r=await Vn(QN,"solutions_assistant_prompts"),i=e.agentExecutionContext.messages.slice(-10),s=await U7({promptText:r,modelTier:"default",temperature:.7,messages:Nh(i)}),a=t?.configurable?.context?.clearSuggestedPrompts;return a&&a(),{outputMessage:s}},Z7=()=>new rb(ej).addNode("assistantLLM",F7).addEdge(mt,"assistantLLM").addEdge("assistantLLM",ht),B7=await Vn(QN,"solutions_assistant_description"),q7={id:"solutionsAssistant",name:"Solutions Assistant Agent",description:B7,createGraph:Z7,workspace:ej};function V7(e,t,n){let r=["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"],i=Object.assign(Object.assign({params:{}},n),e);return i.params=t.reduce((s,a)=>((e[a]||typeof e[a]=="boolean"||typeof e[a]=="number"&&e[a]===0)&&(s[a]=e[a]),s),i.params),r.reduce((s,a)=>(i[a]&&(s[a]=i[a]),s),{})}var Co=class e{constructor(t=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=t}match(...t){return this.termStack=this.termStack.concat(t),this}in(t){let n=`\`in(${t?`"${t}"`:""})\``;return!this.hasRange&&!this.hasTerms?(br(`${n} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this):(t&&t!=="*"&&(this.q+=`${t}:`),this.commit())}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?(br("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(t){return this.hasTerms?(br('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[0]=t,this)}to(t){return this.hasTerms?(br('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[1]=t,this)}boost(t){return this.commit(),this.q+=`^${t}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new e(this.q+"")}addModifier(t){return this.currentModifer?(br(`You have called \`${this.currentModifer}()\` after \`${t}()\`. Your current query was not modified.`),this):(this.commit(),this.q===""&&t!=="not"?(br(`You have called \`${t}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=t,this.q+=this.q===""?"":" ",this.q+=`${t.toUpperCase()} `,this))}hasWhiteSpace(t){return/\s/g.test(t)}formatTerm(t){return t instanceof Date?t.getTime():typeof t=="string"&&this.hasWhiteSpace(t)?`"${t}"`:t}commit(){return this.currentModifer=void 0,this.hasRange&&(this.q+=`[${this.formatTerm(this.rangeStack[0])} TO ${this.formatTerm(this.rangeStack[1])}]`,this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(t=>this.formatTerm(t)).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for(br(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;let t=this.q;this.q=t.replace(/( AND ?| NOT ?| OR ?)*$/,""),t!==this.q&&br("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}};function tj(e,t){let n;typeof e=="string"||e instanceof Co?n={httpMethod:"GET",params:{q:e}}:n=V7(e,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});let r;switch(t){case"item":r="/search";break;case"group":r="/community/groups";break;case"groupContent":if(typeof e!="string"&&!(e instanceof Co)&&e.groupId)r=`/content/groups/${e.groupId}/search`;else return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));break;case"communityUser":r="/community/users";break;default:r="/portals/self/users/search";break}let i=Pb(n)+r;return jb(i,n).then(s=>(s.nextStart&&s.nextStart!==-1&&(s.nextPage=function(){let a;return typeof e=="string"||e instanceof Co?a={q:e,start:s.nextStart}:(a=e,a.start=s.nextStart),tj(a,t)}),s))}function nj(e){return tj(e,"item")}var H7=Oe({key:ie(),value:ie(),description:ie()}),J7=yr(["Feature Layer (hosted)","Feature Layer (hosted, view)","Web Map","Instant App","Dashboard","Web Experience","Form","Table (hosted)","Table (hosted, view)","Hub Site Application","Hub Page","CSV","Data Pipeline","Desktop Application Template","Group","Notebook","QuickCapture Project"]),W7=Oe({name:ie(),type:yr(["oid","guid","globalid","integer","double","date"]),alias:ie(),description:ie()}),G7=Oe({name:ie(),type:at("string"),alias:ie(),description:ie(),choiceList:Sa(tt(ie())),length:We().int()}),Hk=gr([G7,W7]),K7=gr([gh(),tt(ie())]),X7=Oe({name:ie(),type:at("string"),alias:ie(),description:ie(),choiceList:K7,length:We().int()}),Y7=Oe({name:ie(),type:yr(["integer","double","date"]),alias:ie(),description:ie()}),Q7=gr([X7,Y7]),rj=Oe({id:We().int(),type:yr(["Point","Polyline","Polygon","Table"]),name:ie(),customFields:tt(Q7),requiredFields:tt(Hk),systemFields:tt(Hk)}),eV=Oe({itemId:ie().regex(/^[a-fA-F0-9]{32}$/),addLayers:mh(),layers:tt(rj)}),ij=Oe({id:ie().regex(/^[a-fA-F0-9]{32}$/),title:ie(),description:ie(),type:J7}),sj=Oe({title:ie(),description:ie(),tags:tt(ie()),strings:tt(H7)});Oe({solution:sj,items:tt(ij),featureLayer:eV});function tV(){return{renderer:{type:"simple",symbol:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,colorLocked:!0,anchorPoint:{x:0,y:-12.600000000000001},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:7.2,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:84.3,ymax:84.3},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[83.2,32.5],[84.3,40.7],[83.8,48.9],[81.7,56.9],[78.1,64.3],[73,70.9],[66.9,76.4],[59.7,80.5],[51.9,83.2],[43.7,84.3],[35.4,83.8],[27.4,81.7],[20,78],[13.4,73],[7.9,66.8],[3.8,59.7],[1.1,51.9],[0,43.7],[.5,35.4],[2.6,27.4],[6.3,20],[11.3,13.4],[17.5,7.9],[24.7,3.8],[32.5,1.1],[39.8,.1],[47.1,.3],[54.3,1.8],[61.1,4.5],[67.4,8.4],[72.9,13.3],[77.4,19.1],[80.9,25.5],[83.2,32.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[242,242,242,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[84.3,0],[84.3,84.3],[0,84.3],[0,0]]]}},rotation:360},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-9},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:18,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:197.7,ymax:294.7},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[98.9,0],[119.4,23.2],[139.4,49.3],[156.8,75.2],[171.2,100.8],[182.4,125.3],[190.6,148.8],[195.7,171.4],[197.7,192.9],[197.7,195.8],[197.7,200.3],[197.6,202.5],[197.5,204.8],[197.3,207.1],[197,209.4],[196.7,211.7],[196.4,214.1],[196,216.4],[195.5,218.7],[195,221.1],[194.4,223.4],[193.7,225.8],[193,228.1],[192.2,230.5],[191.4,232.8],[190.5,235.1],[189.5,237.5],[188.5,239.7],[187.4,242],[186.2,244.3],[185,246.5],[183.7,248.7],[182.4,250.9],[181,253.1],[179.5,255.2],[178,257.3],[176.4,259.4],[174.7,261.4],[173.1,263.3],[171.3,265.3],[169.5,267.2],[167.7,269],[165.8,270.8],[163.9,272.5],[161.9,274.2],[159.9,275.8],[157.8,277.4],[155.7,278.9],[153.6,280.4],[151.4,281.7],[149.2,283.1],[147,284.4],[144.8,285.6],[142.5,286.7],[140.3,287.8],[138,288.8],[135.7,289.8],[133.4,290.7],[131,291.5],[128.7,292.3],[126.4,293],[124,293.6],[121.7,294.2],[119.4,294.7],[117,295.2],[114.7,295.6],[112.4,296],[110.1,296.3],[107.8,296.5],[105.5,296.7],[103.3,296.8],[101.1,296.9],[98.8,296.9],[83.1,295.7],[67.8,292],[53.3,285.9],[39.9,277.5],[28.1,267.2],[18,255.1],[10,241.5],[4.2,226.9],[.9,211.5],[0,195.8],[.1,192.9],[2.1,171.4],[7.2,148.8],[15.4,125.3],[26.6,100.8],[41,75.2],[58.4,49.3],[78.4,23.2],[98.9,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[39,17,17,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[197.7,0],[197.7,294.7],[0,294.7],[0,0]]]}},rotation:360}],haloSize:1,scaleX:1,angleAlignment:"Display",angle:360}}}}}function nV(){return{renderer:{type:"simple",symbol:{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],size:10,angle:0,xoffset:0,yoffset:0,outline:{color:[0,0,0,255],width:0}}}}}var Hg=class e{constructor(t){this.llm_fs_lookup={},this.structure=t,this._s=this.structure?.buildSolution}static{this.TYPE_LOOKUP={point:"esriGeometryPoint",polyline:"esriGeometryPolyline",polygon:"esriGeometryPolygon"}}static{this.DRAWING_TOOL_LOOKUP={esriGeometryPoint:"esriFeatureEditToolPoint",esriGeometryPolyline:"esriFeatureEditToolLine",esriGeometryPolygon:"esriFeatureEditToolPolygon",Table:"esriFeatureEditToolNone"}}static{this.FIELD_TYPE_TO_ESRI={string:"esriFieldTypeString",integer:"esriFieldTypeInteger",double:"esriFieldTypeDouble",date:"esriFieldTypeDate",guid:"esriFieldTypeGUID",globalid:"esriFieldTypeGlobalID",oid:"esriFieldTypeOID"}}static{this.FIELD_TYPE_TO_SIMPLE=Object.fromEntries(Object.entries(e.FIELD_TYPE_TO_ESRI).map(([t,n])=>[n,t]))}dump_to_llm_template(){let t=this.structure?.buildSolution?.solution,n=Object.entries(t?.strings||{}).map(([o,c])=>({key:o,value:c.value,description:c.description})),r={title:t?.title,description:t?.description,tags:t?.tags,strings:n},i=this.structure?.buildSolution?.items,s=Object.entries(i||{}).map(([o,c])=>({id:o,title:c.title,description:c.description,type:c.type})),a=[];for(let[o,c]of Object.entries(i||{})){if(c.type!=="Feature Layer (hosted)")continue;let u=[];for(let l of c.service?.layers||[]){let d=this._get_fields(l);u.push({id:l.id,type:"",name:l.name,customFields:[],requiredFields:d,systemFields:[]})}for(let l of c.service?.tables||[]){let d=this._get_fields(l);u.push({id:l.id,type:"Table",name:l.name,customFields:[],requiredFields:d,systemFields:[]})}a.push({itemId:o,addLayers:c.addLayers,layers:u})}return{solution:r,items:s,featureLayers:a}}_get_fields(t){let n=[];for(let r of t.fields||[])n.push({name:r.name,type:e.FIELD_TYPE_TO_SIMPLE[r.type]||r.type,alias:r.alias,description:e._get_field_description(r.description),choiceList:e._get_field_domain(r.domain)});return n}static _get_field_description(t){if(t)try{return JSON.parse(t).value||t}catch{return t}}static _get_field_domain(t){if(t)return t.codedValues?.map(n=>n.code)}apply_llm_template(t){let n=this._s.solution;this.llm_fs_lookup={};for(let o of t.featureLayers){this.llm_fs_lookup[o.itemId]={};for(let c of o.layers)this.llm_fs_lookup[o.itemId][c.id]=c}for(let[o,c]of Object.entries(this._s.items))c.type==="Feature Layer (hosted, view)"&&(this.llm_fs_lookup[o]={...this.llm_fs_lookup[c.source]});n.title=t.solution.title,n.description=t.solution.description,n.tags=t.solution.tags;let r=n.strings;for(let o of t.solution.strings)r[o.key]&&(r[o.key].value=o.value);let i={},s=new Set,a=this._s.items;for(let o of t.items){let c=a[o.id];if(c)if(c.title=o.title,c.description=o.description,c.type==="Web Map")this._apply_web_map(c);else if(c.type==="Feature Layer (hosted)"){this._apply_feature_service(c,o.id,!1);let u=new Jg(c).generate_data();c.data=u,i[o.id]=u}else c.type==="Feature Layer (hosted, view)"&&(this._apply_feature_service(c,o.id,!0),s.add(o.id))}for(let o of s){let c=a[o];c.data=i[c.source]}return this.structure}_apply_web_map(t){if(t.layerSources)for(let n of[...t.layers||[],...t.tables||[]]){let[r,i]=this._extract_id_and_layid(n.url),s=this.llm_fs_lookup[r]?.[i];s&&(n.title=s.name)}}_extract_id_and_layid(t){let n=t.replace(/[{}]/g,"").split("."),r=n[0],i=parseInt(n[1].replace("layer",""));return[r,i]}_apply_feature_service(t,n,r=!1){let i=t.source||n,s=this.llm_fs_lookup[i];for(let a of[...t.service.layers,...t.service.tables])this._apply_layer(a,s,r)}_apply_layer(t,n,r=!1){let i=n[t.id];if(!i||(t.name=i.name,r))return;let s=e.TYPE_LOOKUP[i.type.toLowerCase()]||i.type;s.toLowerCase()==="table"?t.type=s:t.geometryType=s,t.editFieldsInfo=this._edit_fields_info(),t.globalIdField="globalid",t.objectIdField="objectid",t.uniqueIdField={name:"objectid",isSystemMaintained:!0},t.hasAttachments=!0,this._update_relationships(t,n),this._update_fields(t,i),this._update_templates(t),this._update_drawing_info(t)}_update_relationships(t,n){let r=t.relationships||[];for(let i of r){let s=n[i.relatedTableId];s&&(i.name=s.name)}}_update_fields(t,n){let r=[],i=[[!1,n.customFields],[!0,n.requiredFields],[!0,n.systemFields]];for(let[s,a]of i)if(Array.isArray(a))for(let o of a){let c={name:o.name,alias:o.alias,type:e.FIELD_TYPE_TO_ESRI[o.type]||o.type,description:JSON.stringify({value:o.description,fieldValueType:""},null,0),domain:this._create_domain(o.choiceList,o.name),required:s};if(o.type?.toLowerCase()==="string"){let u=256;o.choiceList&&(u=Math.max(...o.choiceList.map(l=>l.length))+10),c.length=u}r.push(c)}t.fields=r}_update_templates(t){let n=e.DRAWING_TOOL_LOOKUP[t.geometryType||t.type];t.templates=[{name:t.name,description:"",drawingTool:n,prototype:{attributes:{}}}]}_update_drawing_info(t){if(t.drawingTool==="esriGeometryPoint")t.drawingInfo=nV();else return}_create_domain(t,n){return t?{type:"codedValue",name:`${n}_${crypto.randomUUID().replace(/-/g,"")}`,codedValues:t.map(r=>({name:r,code:r}))}:null}_edit_fields_info(){return{creationDateField:"created_date",creatorField:"created_user",editDateField:"last_edited_date",editorField:"last_edited_user"}}},Jg=class{constructor(t){this.item_def=t,this.source_service_props=this.item_def.service}generate_data(){let t={};for(let n of this.source_service_props.layers||[]){let r={id:n.id};r.formInfo=this._generate_form_info(n),r.popupInfo=this._generate_popup_info(n),r.layerDefinition=this._generate_drawing_info(n),t.layers=t.layers||[],t.layers.push(r)}for(let n of this.source_service_props.tables||[]){let r={id:n.id};r.formInfo=this._generate_form_info(n),r.popupInfo=this._generate_popup_info(n),t.tables=t.tables||[],t.tables.push(r)}return t}_generate_form_info(t){let n=[];for(let i of t.fields){if(i.required)continue;let s={label:i.alias,type:"field",editableExpression:"expr/system/true",fieldName:i.name,inputType:this._get_input_type(i.type,i.domain,i.length)};n.push(s)}let r=t.relationships||[];for(let i of r)n.push({description:"",label:i.name,type:"relationship",displayCount:3,displayType:"list",editableExpression:"expr/system/true",orderByFields:[{field:"created_date",order:"asc"}],relationshipId:i.id,title:i.name});return{formElements:n,expressionInfos:[{expression:"false",name:"expr/system/false",returnType:"boolean",title:"False"},{expression:"true",name:"expr/system/true",returnType:"boolean",title:"True"}],title:t.name}}_generate_popup_info(t){let n=[],r=[];for(let s of t.fields)s.required||r.push({fieldName:s.name,isEditable:!0,label:s.alias,visible:!0});n.push({type:"fields",description:"",fieldInfos:r});let i=t.relationships||[];if(i.length&&t.type!=="Table")for(let s of i)n.push({type:"relationship",description:"",displayCount:3,displayType:"list",orderByFields:[{field:"created_date",order:"asc"}],relationshipId:s.id});return n.push({type:"attachments",description:"",displayType:"auto",title:""}),{popupElements:n,showLastEditInfo:!1,title:""}}_generate_drawing_info(t){return t.geometryType==="esriGeometryPoint"?{drawingInfo:tV()}:{drawingInfo:{}}}_get_input_type(t,n,r){return t==="esriFieldTypeString"&&!n?{type:"text-box",maxLength:r||255,minLength:0}:t==="esriFieldTypeString"&&n?{type:"combo-box",noValueOptionLabel:"No value",showNoValueOption:!0}:["esriFieldTypeInteger","esriFieldTypeDouble"].includes(t)?{type:"text-box",minLength:0}:t==="esriFieldTypeDate"?{type:"datetime-picker",includeTime:!1}:{type:"text-box",maxLength:r||255,minLength:0}}},dp="966b251241bb4e3bb9ee3f2b92921aa5",rV="Build",iV="Embeddings",ko={"field inspections":{id:"b5327547c3fd4f77aa605c055dd9bb65",display:"Field Inspections"},"spatial data management":{id:"39488e3668364d9488089d47f77499aa",display:"Spatial Data Management"},"points of interest":{id:"db71359ab2f4405f9777718a9b93e373",display:"Points of Interest"}},aj=[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset.",choiceList:null},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record.",choiceList:null},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created.",choiceList:null},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record.",choiceList:null},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited.",choiceList:null},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record.",choiceList:null}],ii=Object.assign({"./prompts/create_design_prompt.md":()=>import("./WROPXUSZ.js").then(e=>e.default),"./prompts/create_user_query.md":()=>import("./4TL66G66.js").then(e=>e.default),"./prompts/description.md":()=>import("./CQIP3CFN.js").then(e=>e.default),"./prompts/extract-template.md":()=>import("./NTOQES4U.js").then(e=>e.default),"./prompts/extract-use-case.md":()=>import("./CIG6UPFZ.js").then(e=>e.default),"./prompts/matching_solution_prompt.md":()=>import("./NUVTCMAW.js").then(e=>e.default),"./prompts/prompts.md":()=>import("./46C7TV4N.js").then(e=>e.default),"./prompts/review_use_case_prompt.md":()=>import("./BDKWDKBM.js").then(e=>e.default),"./prompts/system_prompt.md":()=>import("./O3G7OWBQ.js").then(e=>e.default),"./prompts/valid_tempates.md":()=>import("./KQBIVJ7H.js").then(e=>e.default),"./prompts/workflow_1_step_4.md":()=>import("./HQE4ABPK.js").then(e=>e.default)}),oj=e=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("arcgis-solution-design-update",{detail:e}))},cj=Ie.Root({activePanel:Ie({reducer:(e,t)=>t==="chat"||t==="builder"?t:e??"chat",default:()=>"chat"}),agentExecutionContext:Ie({reducer:(e,t)=>({...e,...t}),default:()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[]})}),buildSolutionParameters:Ie({reducer:(e,t)=>t??null,default:()=>null}),directToCreate:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),cancelled:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),isAppropriate:Ie({reducer:(e,t)=>t===null||typeof t=="boolean"?t:e??null,default:()=>null}),isAssistantBusy:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),isBuilderEditing:Ie({reducer:(e,t)=>typeof t=="boolean"?t:e??!1,default:()=>!1}),outputMessage:Ie({reducer:(e="",t)=>typeof t=="string"&&t.trim()?t:e,default:()=>""}),solutionDesign:Ie({reducer:(e,t)=>t??null,default:()=>null}),solutionHistory:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]}),solutionMatch:Ie({reducer:(e,t)=>typeof t=="string"||t===null?t:e??null,default:()=>null}),templateDescription:Ie({reducer:(e,t)=>typeof t=="string"||t===null?t:e??null,default:()=>null}),templateItems:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]}),ticket:Ie({reducer:(e,t)=>t??null,default:()=>null}),topFiveMatches:Ie({reducer:(e,t)=>Array.isArray(t)?t:e??[],default:()=>[]})}),uj=e=>{let t=e?.trim().toLowerCase();return["field inspections","inspections","fieldinspections"].includes(t)?"Field Inspections":["spatial data management","spatial","data management"].includes(t)?"Spatial Data Management":["points of interest","poi"].includes(t)?"Points of Interest":""},jh=e=>({outputMessage:_n(e)?.builderMessages?.cancelledMessage,ticket:null,cancelled:!0}),sV=(e,t)=>({solution:{title:`${ko[e].display} Solution`,description:`Solution created for: ${t??"unspecified use case"}`,tags:[e],strings:[{key:"defaultTitle",value:`${ko[e].display} solution`,description:"Default display title for the solution"}]},items:[{id:crypto.randomUUID?.()??"00000000000000000000000000000000",title:`${ko[e].display} item`,description:`Item for ${t}`,type:ko[e].display}],featureLayer:{itemId:"00000000000000000000000000000000",addLayers:!0,layers:[{id:0,type:"Point",name:"MainLayer",customFields:[],requiredFields:[],systemFields:aj}]}}),aV=async(e=dp,t)=>{let n=`typekeywords:${rV} ${e?`AND group:${e}`:""}`.trim();return(await nj({q:n,authentication:t?{token:t}:void 0,num:100}))?.results??[]},oV=async(e=dp,t)=>{let n=`typekeywords:${iV} ${e?`AND group:${e}`:""}`.trim();return(await nj({q:n,authentication:t?{token:t}:void 0,num:100}))?.results??[]},lj=async(e,t)=>await Rb(e,{authentication:t?{token:t}:void 0}),cV=e=>e.replaceAll("{","{{").replaceAll("}","}}"),dj=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t)){let s=`{${r.toUpperCase()}}`,a=typeof i=="string"?i:JSON.stringify(i);n=n.replace(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),a)}return n},uV=e=>{if(!e)return null;let t=lV(e);return t&&Object.prototype.hasOwnProperty.call(ko,t)?t:null},lV=e=>{let t=e&&e.trim().toLowerCase();return t==="inspections"||t==="inspection"?"field inspections":t==="poi"?"points of interest":t==="spatial"?"spatial data management":t},pj=e=>!(!e||!e.solution?.title||!e.solution?.description||!Array.isArray(e.items)||!e.featureLayer),dV=De.object({solution:sj,items:De.array(ij),featureLayer:De.object({itemId:De.string().regex(/^[a-fA-F0-9]{32}$/),addLayers:De.boolean(),layers:De.array(rj.omit({systemFields:!0}))})}),pV=e=>e?.featureLayer?.layers?{...e,featureLayer:{...e.featureLayer,layers:e.featureLayer.layers.map(({systemFields:t,...n})=>n)}}:e,hV=e=>e?.featureLayer?.layers?{...e,featureLayer:{...e.featureLayer,layers:e.featureLayer.layers.map(t=>({...t,systemFields:aj}))}}:e,mV=e=>/^(new (conversation|chat)|start over)$/i.test(e.trim()),fV=e=>/^(undo)$/i.test(e.trim()),gV=e=>/^(redo)$/i.test(e.trim()),yV=e=>{let t=e.trim().toLowerCase();return/(edit|update|modify|change|revise|refine|tweak|add|remove|delete)\b/.test(t)||/(field|fields|tag|tags|description|descriptions|layer|layers|item|items|schema)\b/.test(t)},hj=e=>{let t=[...e.agentExecutionContext?.messages||[]].reverse().find(n=>(n.type||"").toLowerCase()==="human");if(t){let n=t;if(typeof n.content=="string")return n.content;if(typeof n.text=="string")return n.text}return""},_V=async(e,t)=>{let n=_n(t),r=(e.agentExecutionContext?.userRequest||"").trim();if(mV(r))return oj(null),{outputMessage:n?.builderMessages?.newConversationStarted||"",ticket:null,solutionDesign:null,solutionMatch:null,directToCreate:!1,cancelled:!1};if(e.cancelled)return{cancelled:!0,directToCreate:!1};if(!r)return{cancelled:!0,directToCreate:!1};if(fV(r))return window.dispatchEvent(new CustomEvent("arcgis-solution-undo")),{outputMessage:n?.builderMessages?.undoDesignChange||"",directToCreate:!1};if(gV(r))return window.dispatchEvent(new CustomEvent("arcgis-solution-redo")),{outputMessage:n?.builderMessages?.redoDesignChange||"",directToCreate:!1};let i=t?.configurable?.context?.solutionDesignJson;if(i)try{let s=JSON.parse(i);if(pj(s))return yV(r)?{solutionDesign:s,ticket:e.ticket??{template:"",useCase:""},directToCreate:!0}:{cancelled:!0,directToCreate:!1}}catch{}return{directToCreate:!1}},vV=async(e,t)=>{let n=_n(t);await Br({text:n?.agentProgress?.builderAgentExecuting||""},t),await Br({text:n?.agentProgress?.builderAgentUnderstanding||""},t);let r=Nh(e.agentExecutionContext?.messages),i=(async()=>{let l=await Vn(ii,"extract-use-case"),d=De.object({useCase:De.string().nullable()});return(await Ao({promptText:l,modelTier:"default",temperature:0,messages:r,schema:d}))?.useCase?.trim()||null})(),s=(async()=>{let l=await Vn(ii,"review_use_case_prompt"),d=hj(e),p=dj(l,{USECASE:d}),h=De.object({isAppropriate:De.boolean()});return(await Ao({promptText:p,modelTier:"default",temperature:0,messages:r,schema:h}))?.isAppropriate??!0})(),a=(async()=>{let l=await Vn(ii,"extract-template"),d=await Vn(ii,"valid_tempates"),p=l.replace("{{validTemplates}}",d),h=De.object({templateId:De.string().nullable()});return(await Ao({promptText:p,modelTier:"default",temperature:0,messages:r,schema:h}))?.templateId??null})(),[o,c,u]=await Promise.all([i,s,a]);return{ticket:{template:uj(u??""),useCase:o},isAppropriate:c}},bV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="appropriatenessGate";if(r?.agentId==="solutionsBuilder"&&r?.id===i){let s=String(r.payload||"").trim();return s.toLowerCase()==="cancel"?jh(t):{ticket:{template:"",useCase:s},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(s)]}}}if(e.isAppropriate===!1)throw new za({agentId:"solutionsBuilder",id:i,kind:"textInput",message:n?.builderMessages?.inappropriateUseCase||""});return e},wV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="ensureUseCase";if(r?.agentId==="solutionsBuilder"&&r?.id===i&&!e.ticket?.useCase){let s=String(r.payload||"").trim();return s.toLowerCase()==="cancel"?jh(t):{ticket:{template:"",useCase:s},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(s)]}}}if(!(e.ticket?.useCase??""))throw new za({agentId:"solutionsBuilder",id:i,kind:"textInput",message:n?.builderMessages?.describeWorkflowPrompt||""});return e},kV=(e,t)=>{if(e.cancelled)return e;let n=_n(t),r=t?.configurable?.hitlResponse,i="resolveTemplate";if(r?.agentId==="solutionsBuilder"&&r?.id===i){let s=String(r.payload||"").trim();if(s.toLowerCase()==="cancel")return jh(t);let a=uj(s);if(a)return{ticket:{...e.ticket??{template:"",useCase:""},template:a},isAppropriate:null,agentExecutionContext:{...e.agentExecutionContext??{},messages:[...e.agentExecutionContext?.messages??[],new At(`Selected template: ${a}`)]}}}if(!(e.ticket?.template??""))throw new za({agentId:"solutionsBuilder",id:i,kind:"singleSelection",message:n?.builderMessages?.selectTemplatePrompt||"",metadata:["Field Inspections","Spatial Data Management","Points of Interest"]});return e},xV=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentSearching||""},t);try{let r=t?.configurable?.context?.token,i=await aV(dp,r),s=await oV(dp,r),a=await lj(s[0]?.id??"",r),o=[];e.ticket.template&&o.push(e.ticket.template),e.ticket.useCase&&o.push(e.ticket.useCase);let c=o.join(" \u2014 "),u=await E7([c]),l=a.items.map((p,h)=>({index:h,score:L7(u[0],p.embedding)}));l.sort((p,h)=>h.score-p.score);let d=l.slice(0,5).map(({index:p})=>{let h=a.items[p];return{item:{...h,title:h.title??"",snippet:h.snippet??"",description:h.description??""}}});return{templateItems:i,topFiveMatches:d}}catch(r){return console.warn("Failed to search existing solutions:",r),{templateItems:[]}}},$V=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentFindingMatch||""},t);let r=await Vn(ii,"matching_solution_prompt"),i=[];Object.keys(e.topFiveMatches).forEach(o=>{let c=e.topFiveMatches[parseInt(o,10)]?.item;i.push({title:c.title,snippet:c.snippet||"",description:c.description||""})});let s=cV(dj(r,{TEMPLATE:e.ticket?.template||"",USECASE:e.ticket?.useCase||"",CANDIDATES:i})),a=De.object({solutionMatch:De.string().nullable()});return{solutionMatch:(await Ao({promptText:s,modelTier:"default",temperature:0,messages:Nh(e.agentExecutionContext?.messages),schema:a,inputVariables:{TEMPLATE:e.ticket.template,USECASE:e.ticket.useCase,CANDIDATES:i}}))?.solutionMatch??null}},IV=async(e,t)=>{if(e.cancelled)return e;let n=_n(t),r="confirmContinueExistingSolution",i=t?.configurable?.hitlResponse;if(e.solutionMatch&&(!i||i.agentId!=="solutionsBuilder"||i.id!==r))throw new za({agentId:"solutionsBuilder",id:r,kind:"booleanChoice",message:(n?.builderMessages?.existingSolutionMatch||"").replace("{{solutionMatch}}",e.solutionMatch),metadata:["Yes","No"]});let s=String(i?.payload||"").trim().toLowerCase();if(s==="false"||s==="no")return jh(t);let a=null;e.templateItems.some(u=>u.title===e.ticket?.template?(a=u,!0):!1);let o=null,c=null;if(a?.id)try{let u=t?.configurable?.context?.token;a=await lj(a.id,u),o=new Hg(a?.params).dump_to_llm_template(),c=a?.params?.templateDescription??null}catch(u){console.warn("Failed to fetch matched solution item data:",u)}return{...e,solutionDesign:o,templateDescription:c}},SV=async(e,t)=>{if(!e.ticket||e.cancelled)return e;let n=_n(t);await Br({text:n?.agentProgress?.builderAgentCreatingDesign||""},t);let r=De.object({reply:De.string(),solutionDesign:dV}),i=pV(e.solutionDesign),s=hj(e)||e.agentExecutionContext.userRequest,a=await Vn(ii,"create_design_prompt"),o=await Vn(ii,"create_user_query"),c=await Ao({promptText:a,schema:r,messages:Nh([new At(o)]),modelTier:"advanced",temperature:0,inputVariables:{currentDesign:i,templateInstructions:e.templateDescription??"",query:s}}),u=c?.solutionDesign?hV(c.solutionDesign):sV(uV(e.ticket.template)??"field inspections",e.ticket.useCase);if(!pj(u))throw new Error("Generated design failed validation.");return oj(u),{outputMessage:c?.reply||"",solutionDesign:u,directToCreate:!1}},OV=async(e,t)=>{let n=_n(t);return await Br({text:n?.agentProgress?.builderAgentValidating||""},t),console.log(e),{directToCreate:!1,cancelled:!0}},TV=()=>new rb(cj).addNode("commandHandler",_V).addNode("parallelIntentAnalysis",vV).addNode("appropriatenessGate",bV).addNode("ensureUseCase",wV).addNode("resolveTemplate",kV).addNode("searchExistingSolutions",xV).addNode("findMatchingSolution",$V).addNode("confirmContinueExistingSolution",IV).addNode("createSolutionDesign",SV).addNode("validateSolutionDesign",OV).addEdge(mt,"commandHandler").addConditionalEdges("commandHandler",e=>e.cancelled?ht:e.directToCreate?"createSolutionDesign":"parallelIntentAnalysis").addEdge("parallelIntentAnalysis","appropriatenessGate").addConditionalEdges("appropriatenessGate",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":e.isAppropriate===!0&&e.ticket?.useCase&&e.ticket?.template?"searchExistingSolutions":"ensureUseCase").addConditionalEdges("ensureUseCase",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":"resolveTemplate").addConditionalEdges("resolveTemplate",e=>e.isAppropriate===null&&!e.cancelled?"parallelIntentAnalysis":"searchExistingSolutions").addEdge("searchExistingSolutions","findMatchingSolution").addEdge("findMatchingSolution","confirmContinueExistingSolution").addEdge("confirmContinueExistingSolution","createSolutionDesign").addEdge("createSolutionDesign","validateSolutionDesign").addEdge("validateSolutionDesign",ht),EV=await Vn(ii,"description"),AV={id:"solutionsBuilder",name:"Solutions Builder Agent",description:EV,createGraph:TV,workspace:cj},CV=Object.assign({"./prompts/solutions_explorer_description.md":()=>import("./36TEZXBH.js").then(e=>e.default)});function NV(e){return e.replace(/<sup>\[\[(\d+)\]\]\(([^)]+)\)<\/sup>/g,'<sup><a href="$2">[$1]</a></sup>')}function jV(e,t){if(t.startsWith(e))return t.slice(e.length);let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return t.slice(n)}function PV(e){return e&&e.helperServices.aiAssistantServices?`${e.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat`:null}var RV=e=>new Promise(t=>setTimeout(t,e)),mj=Ie.Root({agentExecutionContext:Ie({reducer:(e,t)=>({...e,...t}),default:()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[]})}),outputMessage:Ie({default:()=>"",reducer:(e,t)=>typeof t!="string"||t.length===0?e:e+t}),_lastFullOutput:Ie({default:()=>"",reducer:(e,t)=>typeof t!="string"?e:t}),solutionResponse:Ie({reducer:(e,t)=>t??null,default:()=>null}),documentSkillUrl:Ie({reducer:(e,t)=>t??null,default:()=>null}),conversationId:Ie({reducer:(e,t)=>t??e,default:()=>null})}),UV=()=>new rb(mj).addNode("initializeAgent",LV).addNode("askSolutionsQuestions",MV).addEdge(mt,"initializeAgent").addEdge("initializeAgent","askSolutionsQuestions").addEdge("askSolutionsQuestions",ht),MV=async(e,t)=>{let n=_n(t),r=e.documentSkillUrl;await Br({text:n.agentProgress.explorerAgentSearching},t);let i=async d=>{let p=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",token:t?.configurable?.context?.token},body:JSON.stringify(d)});if(!p.ok)throw new Error(`HTTP ${p.status} calling ${r}`);return p.json()},s=await i({message:e.agentExecutionContext.userRequest,conversationId:t?.configurable?.context?.convoId??void 0,context:{kind:"DocAIAssistantRequest",filters:{persona:{persona:"solutions"}}}});s.conversationId&&t?.configurable?.context?.setConversationId&&t.configurable.context.setConversationId(s.conversationId);let a={message:s.message,conversationId:s.conversationId,hasMore:s.hasMore,ackSequenceNumber:s.sequenceNumber,inquiryId:s.inquiryId},o=e._lastFullOutput??"",c="",u=null,l=async d=>{let p=d.context?.results?.[0]?.reply??"",h=NV(p),m=jV(o,h);c+=m,o=h,h!==""&&d.context?.results?.[0]?.followupQuestions&&(u=d.context.results[0].followupQuestions);let f=d.context?.results?.[0]?.status?.currentStatusStep;if(f){let b="";f===1?b=n.agentProgress.explorerAgentReading:f===2?b=n.agentProgress.explorerAgentReviewing:f===3&&(b=n.agentProgress.explorerAgentPreparing),await Br({text:b},t)}};for(await l(s);a.hasMore;)await RV(500),s=await i({conversationId:a.conversationId,ackSequenceNumber:a.ackSequenceNumber,inquiryId:a.inquiryId}),a={message:s.message,conversationId:s.conversationId,hasMore:s.hasMore,ackSequenceNumber:s.sequenceNumber,inquiryId:s.inquiryId},await l(s);if(u&&t?.configurable?.context?.updateSuggestedPrompts){let d=t.configurable.context.updateSuggestedPrompts,p=u;setTimeout(()=>d(p),0)}return{outputMessage:c,_lastFullOutput:o,solutionResponse:a,conversationId:a.conversationId}},LV=async(e,t)=>{let n=null;return e.documentSkillUrl===null&&t?.configurable?.context?.portal&&(n=PV(t.configurable.context.portal)),{documentSkillUrl:n}},zV=await Vn(CV,"solutions_explorer_description"),DV={id:"solutionsExplorer",name:"Solutions Explorer Agent",description:zV,createGraph:UV,workspace:mj},FV="https://links.esri.com/solutions/agol-organizational-account",ZV="https://links.esri.com/solutions/configure-assistants",Wg=class extends Sb{constructor(){super(),this.open=!1,this.userFirstName="",this.builderVisible=!1,this._conversationId=void 0,this._orgSettings={aiAssistantsEnabled:!1,blockBetaApps:!0,colocateCompute:!1},this._suggestedPrompts=[],this._hasInteracted=!1,this._isMobile=window.innerWidth<=800,this._translations=Tb({name:"arcgis-solutions-assistant",blocking:!0}),this._builderWidth=48,this._solutionDesignJson='{ "solution": null }',this._isAssistantBusy=!1,this._isBuilderBusy=!1,this._assistantRef=$b(),this._configContextConsumer=Eb({context:Ab,subscribe:!0,callback:t=>{t?.userSession&&!this.userFirstName&&this._loadUserFirstName(),t?.authentication?.PortalSubset?.orgSettings&&(this._orgSettings=t?.authentication?.PortalSubset?.orgSettings)}}),this._handleResize=()=>{this._isMobile=window.innerWidth<=800},this.closeAssistant=bb(),this._handleAssistantLinkClick=t=>{let n=t.composedPath().find(r=>r instanceof HTMLAnchorElement);n?.href&&(t.preventDefault(),window.open(n.href,"_blank","noopener,noreferrer"))},this._onSolutionDesignUpdate=t=>{let n=t.detail;this._solutionDesignJson=n?JSON.stringify(n,null,2):'{ "solution": null }'},this._handleSignIn=()=>{this._configContextConsumer.value?.authentication?.signIn("aiOpen")},this._checkURLOpenParameter=()=>{this.open=this._configContextConsumer.value?.authentication?.SignInParam==="aiOpen"||this.open},this.listenOn(window,"arcgisFeedback",t=>{let n=t.detail,{agentPicked:r,taskAssigned:i}=this._parseAgentPickedAndTask(n.log);this._sendFeedback(n.content,i??"",n.feedback?.positive?"Good":"Bad",r??"")})}static{this.properties={open:5,userFirstName:1,builderVisible:5,_conversationId:16,_orgSettings:16,_suggestedPrompts:16,_hasInteracted:16,_isMobile:16,_translations:16,_builderWidth:16,_solutionDesignJson:16,_isAssistantBusy:16,_isBuilderBusy:16}}static{this.styles=yj}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}connectedCallback(){super.connectedCallback(),window.addEventListener("arcgis-solution-design-update",this._onSolutionDesignUpdate),this.el.addEventListener("click",this._handleAssistantLinkClick),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){window.removeEventListener("arcgis-solution-design-update",this._onSolutionDesignUpdate),this.el.removeEventListener("click",this._handleAssistantLinkClick),window.removeEventListener("resize",this._handleResize),super.disconnectedCallback()}loaded(){this._checkURLOpenParameter()}load(){this._configContextConsumer.value?.portalURL&&(gj.portalUrl=this._configContextConsumer.value.portalURL)}firstUpdated(t){this._loadUserFirstName()}willUpdate(t){t.has("open")&&this.open&&window.dispatchEvent(new CustomEvent("openAssistant")),this._configContextConsumer.value?.userSession?.token&&this._configContextConsumer.value?.authentication?.CanUseAI}_renderNoSign(){return ji`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage??Rh} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`}_renderNoPermission(){return ji`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ub(this._translations.noPermissionMessage.replace("{{orgUrl}}",FV).replace("{{configAI}}",ZV))}</div></calcite-notice>`}render(){let t=this._suggestedPrompts.length>0?this._suggestedPrompts:Object.values(this._translations.defaultFollowUpQuestions);return this._suggestedPrompts.length>0?t=this._suggestedPrompts:this._hasInteracted||(t=[...Object.values(this._translations.defaultFollowUpQuestions)]),ji`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token?this._configContextConsumer.value?.authentication?.CanUseAI?ji`${!this._isMobile&&ji`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.solutionBuilder} indicator .active=${this.builderVisible} selection-appearance=highlight @click=${()=>{window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"))}} scale=m slot=header-actions-end></calcite-action>`||""}<calcite-action id=newChatButton icon=speech-bubble-plus .text=${this._translations.tooltips.newConversation} @click=${()=>{this._conversationId=void 0,this._suggestedPrompts=[],this._hasInteracted=!1,this._assistantRef.value?.clearChatHistory()}} scale=m slot=header-actions-end></calcite-action><calcite-tooltip placement=bottom reference-element=newChatButton><span>${this._translations.tooltips.newConversation}</span></calcite-tooltip>${!this._isMobile&&ji`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.toggleSolutionBuilder}</span></calcite-tooltip>`||""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage??Rh} .suggestedPrompts=${t} @arcgisSubmit=${n=>{console.log("arcgis submit: ",n.detail),this._suggestedPrompts=[],this._hasInteracted=!0;let r=Date.now(),i=Cb(r),s=n.detail||"Unknown";this._telemetry?.logEvent({category:Nb.ASSISTANT,action:"Chat",dimensions:[s],metrics:[i]})}} @arcgisFeedback=${n=>{n.detail}} ${Ib(this._assistantRef)}><arcgis-assistant-agent .agent=${DV} .context=${{token:this._configContextConsumer.value?.userSession?.token,convoId:this._conversationId,portal:this._configContextConsumer.value?.authentication.Portal,assistantRef:this._assistantRef,translations:this._translations,updateSuggestedPrompts:n=>{this._suggestedPrompts=n},setConversationId:n=>{this._conversationId=n}}}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${q7} .context=${{translations:this._translations,clearSuggestedPrompts:()=>{this._suggestedPrompts=[]}}}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${AV} .context=${{solutionDesignJson:this._solutionDesignJson,translations:this._translations}}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=outline kind=neutral .label=${this._translations.betaTag} scale=s>${this._translations.betaTag}</calcite-chip><span>${this._translations.disclaimerMessage} <a href=https://links.esri.com/solutions/security-concern target=_blank>${this._translations.reportConcern}</a></span></div>`:this._renderNoPermission():this._renderNoSign()}<calcite-action icon=x id=closeAssistantButton label=Close @click=${()=>{this.closeAssistant.emit(!0)}} slot=header-actions-end text=Close></calcite-action><calcite-tooltip placement=bottom reference-element=closeAssistantButton><span>${this._translations.tooltips.close}</span></calcite-tooltip></calcite-panel>`}_sendFeedback(t,n,r,i){let s=`https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(r)}&field:question=${encodeURIComponent(n)}&field:answer=${encodeURIComponent(t)}&field:context=${encodeURIComponent(JSON.stringify({agent:i}))}&field:version=${encodeURIComponent("v2")}`;window.open(s,"_blank")}async _loadUserFirstName(){try{let t=await this._configContextConsumer.value?.userSession?.getUser();if(t?.fullName){let n=t.fullName.split(" ")[0];this.userFirstName=n}}catch{}}_parseAgentPickedAndTask(t){let n=t.find(o=>typeof o=="string"&&o.includes("Agent picked:"))??null;if(!n)return{agentPicked:null,taskAssigned:null};let r=/Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i,i=n.match(r);if(!i)return{agentPicked:null,taskAssigned:null};let s=i[1].trim(),a=i[2].trim();return{agentPicked:s,taskAssigned:a}}};Ob("arcgis-solutions-assistant",Wg);return Wg},"config","identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import f from"./QX742MCD.js";import e from"./ZDTDI643.js";import d from"./DV6MFL2N.js";import c from"./XYG3Z7ZY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import"./2B4SGB3I.js";import"./TFINIJHF.js";import"./HE2XAIDT.js";import"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./JSJYFWT6.js";import"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,,a])=>{return a},a,b,c,d,e,f)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./IPIK53AM.js";import i from"./DV6MFL2N.js";import h from"./XYG3Z7ZY.js";import e from"./RLHHGWT4.js";import b from"./R4CW26PN.js";import{b as I}from"./2B4SGB3I.js";import{b as D}from"./TFINIJHF.js";import{_b as y}from"./HE2XAIDT.js";import{a as f}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as _}from"./JSJYFWT6.js";import{E as u,F as d,G as g,I as r,h as m,i as a,l as p,q as c}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:b},{c:w,n:$},{a:C,b:v}])=>{var x=m`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.deletion-note-text{display:inline-block}.deletion-note-container{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-0);margin-bottom:var(--calcite-spacing-md)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.display-none{display:none}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-md);margin-bottom:var(--calcite-spacing-xl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.padding-around{padding:12px 2rem 2rem}`,h=class extends g{constructor(){super(),this.open=!1,this.source="Card Dropdown",this._deletePercentage=0,this._fetchingTemplates=!1,this._isDeleteInProgress=!1,this._nonSolutionDependencyItems=[],this._showDeleteError=!1,this._showUndeletableItems=!1,this._templateInfos=[],this._translations=f({name:"solution-delete-dialog",blocking:!0}),this._accordion=u(),this._configContextConsumer=D({context:I,subscribe:!0}),this.solutionDeleteDialogOpen=c(),this.solutionDeleted=c(),this.solutionDeleteDialogBeforeClose=c(),this.listenOn(window,"beforeunload",e=>{this._isDeleteInProgress&&(e.preventDefault(),e.returnValue=!0)})}static{this.properties={card:0,open:5,source:1,_deletePercentage:16,_fetchingTemplates:16,_isDeleteInProgress:16,_nonSolutionDependencyItems:16,_showDeleteError:16,_showUndeletableItems:16,_templateInfos:16,_translations:16}}static{this.styles=x}get _hasAdminDeletePermission(){return this._configContextConsumer.value?.authentication?w(this._configContextConsumer.value?.authentication):!1}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}close(){this._showUndeletableItems&&this.solutionDeleted.emit({showAlert:!1,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._showDeleteError=!1,this._showUndeletableItems=!1,this._isDeleteInProgress=!1,this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}delete(){if(this._telemetry?.logEvent({category:$.DEPLOYMENTS,action:"Delete Solution",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._isDeleteInProgress=!0,this.card){let e=[{itemName:this.card.title,itemType:"Solution",owner:this.card.owner,modified:this.card.modified}],i={progressCallback:o=>{this._deletePercentage=Math.round(o)},solutionOwner:this.card.owner};y(this.card.id,this._configContextConsumer.value.userSession,i).then(o=>{let s=o[1],n;if(s?n=s.items.map(t=>({itemName:t.title,itemType:t.type,owner:t.owner,modified:t.modified})):n=e,n.length===0)this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._isDeleteInProgress=!1,this.open=!1;else if(n.some(t=>t.itemType==="Solution"))this.card?v(this.card,this._configContextConsumer.value.userSession).then(t=>{this._templateInfos=t,this._showDeleteError=!0,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}):(this._showDeleteError=!0,this._isDeleteInProgress=!1);else if(this.card){let t=[];t=s.items.map(l=>({id:l.id,title:l.title,type:l.type,owner:l.owner,modified:l.modified,typeKeywords:[],snippet:"",dependencies:[],url:b(l.id,this._configContextConsumer.value.authentication)})),this._templateInfos=t,this._showDeleteError=!1,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}else this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0}),this._isDeleteInProgress=!1,this.open=!1})}}willUpdate(e){if(e.has("open")){let i=e.get("open");this.open&&!i&&(this._fetchingTemplates=!0,C(this._configContextConsumer.value.userSession,this.card).then(o=>{this._templateInfos=o.templateInfos,this._nonSolutionDependencyItems=o._nonSolutionDependencyItems,this._fetchingTemplates=!1}))}}render(){let e=this._fetchingTemplates?"":"display-none",i=this._fetchingTemplates?"display-none":"",o=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))],s=this._templateInfos.length-this._getDependencyCount()-this._getNonOwnerCount(),n=this._translations.deletionCount.replace("{{deleteableCount}}",s.toString()).replace("{{totalCount}}",this._templateInfos.length.toString());return a`<calcite-dialog class="panel-bg-color" .closeDisabled=${this._isDeleteInProgress} .escapeDisabled=${this._isDeleteInProgress} .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} id=${this._translations.title.replace("{{solution}}",this.card?.title??"")??p} modal kind=danger .open=${this.open} width=l outside-close-disabled @calciteDialogBeforeClose=${()=>{this.solutionDeleteDialogBeforeClose.emit()}} @calciteDialogClose=${()=>{this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}}>${this._isDeleteInProgress?a`<calcite-loader .label=${this._translations.deleteInProgress} scale=l type=determinate-value .value=${this._deletePercentage}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deleteInProgress}</div>`:this._showUndeletableItems?a`<calcite-label class=${r(i)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonClose}</calcite-button>`:a`<div class="padding-around"><div class=${`deletion-note-container ${i}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${n} scale=m icon=information>${n}</calcite-chip></div><calcite-loader class=${r(e)} label></calcite-loader><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${o} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion></div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonCancel}</calcite-button><calcite-button @click=${()=>{this.delete()}} slot=footer-end kind=danger>${this._translations.buttonDelete}</calcite-button>${this._showDeleteError&&a`<calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._translations.failedToDelete} @calciteAlertClose=${()=>{this._showDeleteError=!1}} open><div slot=message>${this._translations.failedToDelete}</div></calcite-alert>`||""}`}</calcite-dialog>`}_getDependencyCount(){let e=this._nonSolutionDependencyItems.map(i=>i.controlItemId);return new Set(e).size}_getNonOwnerCount(){if(this._templateInfos.length===0||this._hasAdminDeletePermission)return 0;let e=this._nonSolutionDependencyItems.map(s=>s.controlItemId),i=new Set(e),o=this._configContextConsumer.value.userSession.username;return this._templateInfos.filter(s=>!i.has(s.id)).filter(s=>s.owner!==o).length}};_("solution-delete-dialog",h);return h},b,e,h,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import c from"./3PUFU3VY.js";import b from"./RLHHGWT4.js";import a from"./R4CW26PN.js";import"./2B4SGB3I.js";import"./TFINIJHF.js";import"./HE2XAIDT.js";import"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./JSJYFWT6.js";import"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./XYG3Z7ZY.js";import{ua as i}from"./HE2XAIDT.js";export default $arcgis.t(([{a:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import g from"./PX2KKGLQ.js";import f from"./AE4OV2XZ.js";import"./US5FON7D.js";import"./3OCYAA4P.js";import"./VVZAS55G.js";import"./OR5M4R6K.js";import e from"./XYG3Z7ZY.js";import d from"./RLHHGWT4.js";import c from"./R4CW26PN.js";import"./2B4SGB3I.js";import"./TFINIJHF.js";import"./HE2XAIDT.js";import b from"./CEP54NLT.js";import a from"./YVNP437O.js";import"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import"./TEHBW75B.js";import"./YFXSWGXE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./JBNWEBAG.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./N2KSPEVT.js";import"./GF4QELNV.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./JSJYFWT6.js";import"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,,,a])=>{return a},a,b,c,d,e,f,g)
|